diff --git a/.gitignore b/.gitignore index 1b5d5e6d..e74518b7 100644 --- a/.gitignore +++ b/.gitignore @@ -293,3 +293,8 @@ __pycache__/ *.btm.cs *.odx.cs *.xsd.cs +.vscode/ +vsts/build/bdist.win32/ + +# don't ignore release managment client +!vsts/vsts/release diff --git a/README.md b/README.md index 72f1506a..0e4ef35f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,41 @@ +[![Visual Studio Team services](https://mseng.visualstudio.com/_apis/public/build/definitions/698eacea-9ea2-4eb8-80a4-d06170edf6bc/5904/badge)]() +[![Python](https://img.shields.io/pypi/pyversions/vsts-cli.svg)](https://pypi.python.org/pypi/vsts) + +# Microsoft Visual Studio Team Services Python API + +This repository contains Microsoft Visual Studio Team Services Python API. This API is used to build the Visual Studio Team Services CLI. To learn more about the VSTS CLI, check out our [github repo](https://github.com/Microsoft/vsts-cli). + +# Installation + +```pip install vsts``` + +# Getting Started + +Following is an example how to use the API directly: + +``` +from vsts.vss_connection import VssConnection +from msrest.authentication import BasicAuthentication +import pprint + +token='REDACTED' +team_instance='https://REDACTED.visualstudio.com' + +credentials = BasicAuthentication('', token) +connection = VssConnection(base_url=team_instance, creds=credentials) +core_client = connection.get_client('vsts.core.v4_0.core_client.CoreClient') + +team_projects = core_client.get_projects() + +for project in team_projects: + pprint.pprint(project.__dict__) +``` + +# VSTS REST API Documentation + +The python SDK is a thin wrapper around the VSTS REST APIs. Please consult our REST API documentation for API specific details while working with this python SDK. + +[VSTS REST API Documentation](https://docs.microsoft.com/en-us/rest/api/vsts) # Contributing diff --git a/vsts/README.md b/vsts/README.md deleted file mode 100644 index 014e8167..00000000 --- a/vsts/README.md +++ /dev/null @@ -1,20 +0,0 @@ -#Introduction -TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. - -#Getting Started -TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: -1. Installation process -2. Software dependencies -3. Latest releases -4. API references - -#Build and Test -TODO: Describe and show how to build your code and run the tests. - -#Contribute -TODO: Explain how other users and developers can contribute to make your code better. - -If you want to learn more about creating good readme files then refer the following [guidelines](https://www.visualstudio.com/en-us/docs/git/create-a-readme). You can also seek inspiration from the below readme files: -- [ASP.NET Core](https://github.com/aspnet/Home) -- [Visual Studio Code](https://github.com/Microsoft/vscode) -- [Chakra Core](https://github.com/Microsoft/ChakraCore) \ No newline at end of file diff --git a/vsts/README.rst b/vsts/README.rst deleted file mode 100644 index 85d40bf3..00000000 --- a/vsts/README.rst +++ /dev/null @@ -1,21 +0,0 @@ -Visual Studio Team Services API -======================================================= - -This project provides access to Visual Studio Team Services APIs. - -Contribute Code -=============== - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. - -Packaging -========= - -The released packages for this code can be found here https://pypi.python.org/pypi/vsts-python-api. -Use the standard PYPI packaging flow to push a new release. Make sure to increment the version number appropriately. - -*Example* -:: - python setup.py sdist - python -m twine upload dist/* -:: diff --git a/vsts/setup.py b/vsts/setup.py index 322e750d..1d803b35 100644 --- a/vsts/setup.py +++ b/vsts/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_packages NAME = "vsts" -VERSION = "0.1.0b0" +VERSION = "0.1.1" # To install the library, run the following # @@ -16,7 +16,7 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "msrest>=0.4.5" + "msrest~=0.4.19" ] CLASSIFIERS = [ @@ -34,10 +34,11 @@ setup( name=NAME, version=VERSION, + license='MIT', description="Python wrapper around the VSTS APIs", author="Microsoft Corporation", author_email="vstscli@microsoft.com", - url="https://github.com/Microsoft/vsts-python-api ", + url="https://github.com/Microsoft/vsts-python-api", keywords=["Microsoft", "VSTS", "Team Services", "SDK", "AzureTfs"], install_requires=REQUIRES, classifiers=CLASSIFIERS, diff --git a/vsts/vsts/_file_cache.py b/vsts/vsts/_file_cache.py index 4c208f4a..eff4e347 100644 --- a/vsts/vsts/_file_cache.py +++ b/vsts/vsts/_file_cache.py @@ -33,20 +33,20 @@ def load(self): try: if os.path.isfile(self.file_name): if self.max_age > 0 and os.stat(self.file_name).st_mtime + self.max_age < time.clock(): - logging.info('Cache file expired: {file}'.format(file=self.file_name)) + logging.info('Cache file expired: %s', file=self.file_name) os.remove(self.file_name) else: - logging.info('Loading cache file: {file}'.format(file=self.file_name)) + logging.info('Loading cache file: %s', self.file_name) self.data = get_file_json(self.file_name, throw_on_empty=False) or {} else: - logging.info('Cache file does not exist: {file}'.format(file=self.file_name)) - except Exception as e: - logging.exception(e) + logging.info('Cache file does not exist: %s', self.file_name) + except Exception as ex: + logging.exception(ex) # file is missing or corrupt so attempt to delete it try: os.remove(self.file_name) - except Exception as e2: - logging.exception(e2) + except Exception as ex2: + logging.exception(ex2) self.initial_load_occurred = True def save(self): diff --git a/vsts/vsts/accounts/__init__.py b/vsts/vsts/accounts/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/accounts/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/accounts/v4_0/__init__.py b/vsts/vsts/accounts/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/accounts/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/accounts/v4_0/accounts_client.py b/vsts/vsts/accounts/v4_0/accounts_client.py new file mode 100644 index 00000000..861e2660 --- /dev/null +++ b/vsts/vsts/accounts/v4_0/accounts_client.py @@ -0,0 +1,91 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class AccountsClient(VssClient): + """Accounts + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(AccountsClient, 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 = '0d55247a-1c47-4462-9b1f-5e2125590ee6' + + def create_account(self, info, use_precreated=None): + """CreateAccount. + :param :class:` ` info: + :param bool use_precreated: + :rtype: :class:` ` + """ + query_parameters = {} + if use_precreated is not None: + query_parameters['usePrecreated'] = self._serialize.query('use_precreated', use_precreated, 'bool') + content = self._serialize.body(info, 'AccountCreateInfoInternal') + response = self._send(http_method='POST', + location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e', + version='4.0', + query_parameters=query_parameters, + content=content) + return self._deserialize('Account', response) + + def get_account(self, account_id): + """GetAccount. + :param str account_id: + :rtype: :class:` ` + """ + route_values = {} + if account_id is not None: + route_values['accountId'] = self._serialize.url('account_id', account_id, 'str') + response = self._send(http_method='GET', + location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e', + version='4.0', + route_values=route_values) + return self._deserialize('Account', response) + + def get_accounts(self, owner_id=None, member_id=None, properties=None): + """GetAccounts. + A new version GetAccounts API. Only supports limited set of parameters, returns a list of account ref objects that only contains AccountUrl, AccountName and AccountId information, will use collection host Id as the AccountId. + :param str owner_id: Owner Id to query for + :param str member_id: Member Id to query for + :param str properties: Only support service URL properties + :rtype: [Account] + """ + query_parameters = {} + if owner_id is not None: + query_parameters['ownerId'] = self._serialize.query('owner_id', owner_id, 'str') + if member_id is not None: + query_parameters['memberId'] = self._serialize.query('member_id', member_id, 'str') + if properties is not None: + query_parameters['properties'] = self._serialize.query('properties', properties, 'str') + response = self._send(http_method='GET', + location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Account]', response) + + def get_account_settings(self): + """GetAccountSettings. + [Preview API] + :rtype: {str} + """ + response = self._send(http_method='GET', + location_id='4e012dd4-f8e1-485d-9bb3-c50d83c5b71b', + version='4.0-preview.1', + returns_collection=True) + return self._deserialize('{str}', response) + diff --git a/vsts/vsts/accounts/v4_0/models/__init__.py b/vsts/vsts/accounts/v4_0/models/__init__.py new file mode 100644 index 00000000..2c3eee0b --- /dev/null +++ b/vsts/vsts/accounts/v4_0/models/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 .account import Account +from .account_create_info_internal import AccountCreateInfoInternal +from .account_preferences_internal import AccountPreferencesInternal + +__all__ = [ + 'Account', + 'AccountCreateInfoInternal', + 'AccountPreferencesInternal', +] diff --git a/vsts/vsts/accounts/v4_0/models/account.py b/vsts/vsts/accounts/v4_0/models/account.py new file mode 100644 index 00000000..ff00f955 --- /dev/null +++ b/vsts/vsts/accounts/v4_0/models/account.py @@ -0,0 +1,85 @@ +# -------------------------------------------------------------------------------------------- +# 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 Account(Model): + """Account. + + :param account_id: Identifier for an Account + :type account_id: str + :param account_name: Name for an account + :type account_name: str + :param account_owner: Owner of account + :type account_owner: str + :param account_status: Current account status + :type account_status: object + :param account_type: Type of account: Personal, Organization + :type account_type: object + :param account_uri: Uri for an account + :type account_uri: str + :param created_by: Who created the account + :type created_by: str + :param created_date: Date account was created + :type created_date: datetime + :param has_moved: + :type has_moved: bool + :param last_updated_by: Identity of last person to update the account + :type last_updated_by: str + :param last_updated_date: Date account was last updated + :type last_updated_date: datetime + :param namespace_id: Namespace for an account + :type namespace_id: str + :param new_collection_id: + :type new_collection_id: str + :param organization_name: Organization that created the account + :type organization_name: str + :param properties: Extended properties + :type properties: :class:`object ` + :param status_reason: Reason for current status + :type status_reason: str + """ + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_owner': {'key': 'accountOwner', 'type': 'str'}, + 'account_status': {'key': 'accountStatus', 'type': 'object'}, + 'account_type': {'key': 'accountType', 'type': 'object'}, + 'account_uri': {'key': 'accountUri', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'has_moved': {'key': 'hasMoved', 'type': 'bool'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'str'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'namespace_id': {'key': 'namespaceId', 'type': 'str'}, + 'new_collection_id': {'key': 'newCollectionId', 'type': 'str'}, + 'organization_name': {'key': 'organizationName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'} + } + + def __init__(self, account_id=None, account_name=None, account_owner=None, account_status=None, account_type=None, account_uri=None, created_by=None, created_date=None, has_moved=None, last_updated_by=None, last_updated_date=None, namespace_id=None, new_collection_id=None, organization_name=None, properties=None, status_reason=None): + super(Account, self).__init__() + self.account_id = account_id + self.account_name = account_name + self.account_owner = account_owner + self.account_status = account_status + self.account_type = account_type + self.account_uri = account_uri + self.created_by = created_by + self.created_date = created_date + self.has_moved = has_moved + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.namespace_id = namespace_id + self.new_collection_id = new_collection_id + self.organization_name = organization_name + self.properties = properties + self.status_reason = status_reason diff --git a/vsts/vsts/accounts/v4_0/models/account_create_info_internal.py b/vsts/vsts/accounts/v4_0/models/account_create_info_internal.py new file mode 100644 index 00000000..00510434 --- /dev/null +++ b/vsts/vsts/accounts/v4_0/models/account_create_info_internal.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountCreateInfoInternal(Model): + """AccountCreateInfoInternal. + + :param account_name: + :type account_name: str + :param creator: + :type creator: str + :param organization: + :type organization: str + :param preferences: + :type preferences: :class:`AccountPreferencesInternal ` + :param properties: + :type properties: :class:`object ` + :param service_definitions: + :type service_definitions: list of { key: str; value: str } + """ + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'creator': {'key': 'creator', 'type': 'str'}, + 'organization': {'key': 'organization', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'AccountPreferencesInternal'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'service_definitions': {'key': 'serviceDefinitions', 'type': '[{ key: str; value: str }]'} + } + + def __init__(self, account_name=None, creator=None, organization=None, preferences=None, properties=None, service_definitions=None): + super(AccountCreateInfoInternal, self).__init__() + self.account_name = account_name + self.creator = creator + self.organization = organization + self.preferences = preferences + self.properties = properties + self.service_definitions = service_definitions diff --git a/vsts/vsts/accounts/v4_0/models/account_preferences_internal.py b/vsts/vsts/accounts/v4_0/models/account_preferences_internal.py new file mode 100644 index 00000000..506c60aa --- /dev/null +++ b/vsts/vsts/accounts/v4_0/models/account_preferences_internal.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountPreferencesInternal(Model): + """AccountPreferencesInternal. + + :param culture: + :type culture: object + :param language: + :type language: object + :param time_zone: + :type time_zone: object + """ + + _attribute_map = { + 'culture': {'key': 'culture', 'type': 'object'}, + 'language': {'key': 'language', 'type': 'object'}, + 'time_zone': {'key': 'timeZone', 'type': 'object'} + } + + def __init__(self, culture=None, language=None, time_zone=None): + super(AccountPreferencesInternal, self).__init__() + self.culture = culture + self.language = language + self.time_zone = time_zone diff --git a/vsts/vsts/accounts/v4_1/__init__.py b/vsts/vsts/accounts/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/accounts/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/accounts/v4_1/accounts_client.py b/vsts/vsts/accounts/v4_1/accounts_client.py new file mode 100644 index 00000000..31bfa14d --- /dev/null +++ b/vsts/vsts/accounts/v4_1/accounts_client.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class AccountsClient(VssClient): + """Accounts + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(AccountsClient, 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 = '0d55247a-1c47-4462-9b1f-5e2125590ee6' + + def get_accounts(self, owner_id=None, member_id=None, properties=None): + """GetAccounts. + [Preview API] Get a list of accounts for a specific owner or a specific member. + :param str owner_id: ID for the owner of the accounts. + :param str member_id: ID for a member of the accounts. + :param str properties: + :rtype: [Account] + """ + query_parameters = {} + if owner_id is not None: + query_parameters['ownerId'] = self._serialize.query('owner_id', owner_id, 'str') + if member_id is not None: + query_parameters['memberId'] = self._serialize.query('member_id', member_id, 'str') + if properties is not None: + query_parameters['properties'] = self._serialize.query('properties', properties, 'str') + response = self._send(http_method='GET', + location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Account]', response) + diff --git a/vsts/vsts/accounts/v4_1/models/__init__.py b/vsts/vsts/accounts/v4_1/models/__init__.py new file mode 100644 index 00000000..2c3eee0b --- /dev/null +++ b/vsts/vsts/accounts/v4_1/models/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 .account import Account +from .account_create_info_internal import AccountCreateInfoInternal +from .account_preferences_internal import AccountPreferencesInternal + +__all__ = [ + 'Account', + 'AccountCreateInfoInternal', + 'AccountPreferencesInternal', +] diff --git a/vsts/vsts/accounts/v4_1/models/account.py b/vsts/vsts/accounts/v4_1/models/account.py new file mode 100644 index 00000000..a34732cb --- /dev/null +++ b/vsts/vsts/accounts/v4_1/models/account.py @@ -0,0 +1,85 @@ +# -------------------------------------------------------------------------------------------- +# 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 Account(Model): + """Account. + + :param account_id: Identifier for an Account + :type account_id: str + :param account_name: Name for an account + :type account_name: str + :param account_owner: Owner of account + :type account_owner: str + :param account_status: Current account status + :type account_status: object + :param account_type: Type of account: Personal, Organization + :type account_type: object + :param account_uri: Uri for an account + :type account_uri: str + :param created_by: Who created the account + :type created_by: str + :param created_date: Date account was created + :type created_date: datetime + :param has_moved: + :type has_moved: bool + :param last_updated_by: Identity of last person to update the account + :type last_updated_by: str + :param last_updated_date: Date account was last updated + :type last_updated_date: datetime + :param namespace_id: Namespace for an account + :type namespace_id: str + :param new_collection_id: + :type new_collection_id: str + :param organization_name: Organization that created the account + :type organization_name: str + :param properties: Extended properties + :type properties: :class:`object ` + :param status_reason: Reason for current status + :type status_reason: str + """ + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'account_owner': {'key': 'accountOwner', 'type': 'str'}, + 'account_status': {'key': 'accountStatus', 'type': 'object'}, + 'account_type': {'key': 'accountType', 'type': 'object'}, + 'account_uri': {'key': 'accountUri', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'has_moved': {'key': 'hasMoved', 'type': 'bool'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'str'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'namespace_id': {'key': 'namespaceId', 'type': 'str'}, + 'new_collection_id': {'key': 'newCollectionId', 'type': 'str'}, + 'organization_name': {'key': 'organizationName', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'status_reason': {'key': 'statusReason', 'type': 'str'} + } + + def __init__(self, account_id=None, account_name=None, account_owner=None, account_status=None, account_type=None, account_uri=None, created_by=None, created_date=None, has_moved=None, last_updated_by=None, last_updated_date=None, namespace_id=None, new_collection_id=None, organization_name=None, properties=None, status_reason=None): + super(Account, self).__init__() + self.account_id = account_id + self.account_name = account_name + self.account_owner = account_owner + self.account_status = account_status + self.account_type = account_type + self.account_uri = account_uri + self.created_by = created_by + self.created_date = created_date + self.has_moved = has_moved + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.namespace_id = namespace_id + self.new_collection_id = new_collection_id + self.organization_name = organization_name + self.properties = properties + self.status_reason = status_reason diff --git a/vsts/vsts/accounts/v4_1/models/account_create_info_internal.py b/vsts/vsts/accounts/v4_1/models/account_create_info_internal.py new file mode 100644 index 00000000..f3f0e219 --- /dev/null +++ b/vsts/vsts/accounts/v4_1/models/account_create_info_internal.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountCreateInfoInternal(Model): + """AccountCreateInfoInternal. + + :param account_name: + :type account_name: str + :param creator: + :type creator: str + :param organization: + :type organization: str + :param preferences: + :type preferences: :class:`AccountPreferencesInternal ` + :param properties: + :type properties: :class:`object ` + :param service_definitions: + :type service_definitions: list of { key: str; value: str } + """ + + _attribute_map = { + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'creator': {'key': 'creator', 'type': 'str'}, + 'organization': {'key': 'organization', 'type': 'str'}, + 'preferences': {'key': 'preferences', 'type': 'AccountPreferencesInternal'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'service_definitions': {'key': 'serviceDefinitions', 'type': '[{ key: str; value: str }]'} + } + + def __init__(self, account_name=None, creator=None, organization=None, preferences=None, properties=None, service_definitions=None): + super(AccountCreateInfoInternal, self).__init__() + self.account_name = account_name + self.creator = creator + self.organization = organization + self.preferences = preferences + self.properties = properties + self.service_definitions = service_definitions diff --git a/vsts/vsts/accounts/v4_1/models/account_preferences_internal.py b/vsts/vsts/accounts/v4_1/models/account_preferences_internal.py new file mode 100644 index 00000000..506c60aa --- /dev/null +++ b/vsts/vsts/accounts/v4_1/models/account_preferences_internal.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountPreferencesInternal(Model): + """AccountPreferencesInternal. + + :param culture: + :type culture: object + :param language: + :type language: object + :param time_zone: + :type time_zone: object + """ + + _attribute_map = { + 'culture': {'key': 'culture', 'type': 'object'}, + 'language': {'key': 'language', 'type': 'object'}, + 'time_zone': {'key': 'timeZone', 'type': 'object'} + } + + def __init__(self, culture=None, language=None, time_zone=None): + super(AccountPreferencesInternal, self).__init__() + self.culture = culture + self.language = language + self.time_zone = time_zone diff --git a/vsts/vsts/build/v4_0/build_client.py b/vsts/vsts/build/v4_0/build_client.py index bd62ce88..01d6abdb 100644 --- a/vsts/vsts/build/v4_0/build_client.py +++ b/vsts/vsts/build/v4_0/build_client.py @@ -18,7 +18,7 @@ class BuildClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(BuildClient, 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) @@ -234,16 +234,16 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N :param datetime min_finish_time: :param datetime max_finish_time: :param str requested_for: - :param BuildReason reason_filter: - :param BuildStatus status_filter: - :param BuildResult result_filter: + :param str reason_filter: + :param str status_filter: + :param str result_filter: :param [str] tag_filters: A comma-delimited list of tags :param [str] properties: A comma-delimited list of properties to include in the results :param int top: The maximum number of builds to retrieve :param str continuation_token: :param int max_builds_per_definition: - :param QueryDeletedOption deleted_filter: - :param BuildQueryOrder query_order: + :param str deleted_filter: + :param str query_order: :param str branch_name: :param [int] build_ids: :param str repository_id: @@ -269,11 +269,11 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N if requested_for is not None: query_parameters['requestedFor'] = self._serialize.query('requested_for', requested_for, 'str') if reason_filter is not None: - query_parameters['reasonFilter'] = self._serialize.query('reason_filter', reason_filter, 'BuildReason') + query_parameters['reasonFilter'] = self._serialize.query('reason_filter', reason_filter, 'str') if status_filter is not None: - query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'BuildStatus') + query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') if result_filter is not None: - query_parameters['resultFilter'] = self._serialize.query('result_filter', result_filter, 'BuildResult') + query_parameters['resultFilter'] = self._serialize.query('result_filter', result_filter, 'str') if tag_filters is not None: tag_filters = ",".join(tag_filters) query_parameters['tagFilters'] = self._serialize.query('tag_filters', tag_filters, 'str') @@ -287,9 +287,9 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N if max_builds_per_definition is not None: query_parameters['maxBuildsPerDefinition'] = self._serialize.query('max_builds_per_definition', max_builds_per_definition, 'int') if deleted_filter is not None: - query_parameters['deletedFilter'] = self._serialize.query('deleted_filter', deleted_filter, 'QueryDeletedOption') + query_parameters['deletedFilter'] = self._serialize.query('deleted_filter', deleted_filter, 'str') if query_order is not None: - query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'BuildQueryOrder') + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') if branch_name is not None: query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') if build_ids is not None: @@ -543,7 +543,7 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor :param str name: :param str repository_id: :param str repository_type: - :param DefinitionQueryOrder query_order: + :param str query_order: :param int top: :param str continuation_token: :param datetime min_metrics_time: @@ -567,7 +567,7 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor if repository_type is not None: query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str') if query_order is not None: - query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'DefinitionQueryOrder') + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if continuation_token is not None: @@ -668,7 +668,7 @@ def get_folders(self, project, path=None, query_order=None): [Preview API] Gets folders :param str project: Project ID or project name :param str path: - :param FolderQueryOrder query_order: + :param str query_order: :rtype: [Folder] """ route_values = {} @@ -678,7 +678,7 @@ def get_folders(self, project, path=None, query_order=None): route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if query_order is not None: - query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'FolderQueryOrder') + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') response = self._send(http_method='GET', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', version='4.0-preview.1', diff --git a/vsts/vsts/build/v4_1/build_client.py b/vsts/vsts/build/v4_1/build_client.py index a160e903..50a718ce 100644 --- a/vsts/vsts/build/v4_1/build_client.py +++ b/vsts/vsts/build/v4_1/build_client.py @@ -18,7 +18,7 @@ class BuildClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(BuildClient, 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) @@ -111,6 +111,58 @@ def get_artifacts(self, build_id, project=None): returns_collection=True) return self._deserialize('[BuildArtifact]', response) + def get_attachments(self, project, build_id, type): + """GetAttachments. + [Preview API] Gets the list of attachments of a specific type that are associated with a build. + :param str project: Project ID or project name + :param int build_id: The ID of the build. + :param str type: The type of attachment. + :rtype: [Attachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + response = self._send(http_method='GET', + location_id='f2192269-89fa-4f94-baf6-8fb128c55159', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[Attachment]', response) + + def get_attachment(self, project, build_id, timeline_id, record_id, type, name): + """GetAttachment. + [Preview API] Gets a specific attachment. + :param str project: Project ID or project name + :param int build_id: The ID of the build. + :param str timeline_id: The ID of the timeline. + :param str record_id: The ID of the timeline record. + :param str type: The type of the attachment. + :param str name: The name of the attachment. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='af5122d3-3438-485e-a25a-2dbbfde84ee6', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + def get_badge(self, project, definition_id, branch_name=None): """GetBadge. [Preview API] Gets a badge that indicates the status of the most recent build for a definition. @@ -134,6 +186,33 @@ def get_badge(self, project, definition_id, branch_name=None): query_parameters=query_parameters) return self._deserialize('str', response) + def list_branches(self, project, provider_name, service_endpoint_id=None, repository=None): + """ListBranches. + [Preview API] Gets a list of branches for the given source code repository. + :param str project: Project ID or project name + :param str provider_name: The name of the source provider. + :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + :param str repository: If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if provider_name is not None: + route_values['providerName'] = self._serialize.url('provider_name', provider_name, 'str') + query_parameters = {} + if service_endpoint_id is not None: + query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') + if repository is not None: + query_parameters['repository'] = self._serialize.query('repository', repository, 'str') + response = self._send(http_method='GET', + location_id='e05d4403-9b81-4244-8763-20fde28d1976', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[str]', response) + def get_build_badge(self, project, repo_type, repo_id=None, branch_name=None): """GetBuildBadge. [Preview API] Gets a badge that indicates the status of the most recent build for the specified branch. @@ -199,15 +278,15 @@ def delete_build(self, build_id, project=None): route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') self._send(http_method='DELETE', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='4.1-preview.3', + version='4.1-preview.4', route_values=route_values) def get_build(self, build_id, project=None, property_filters=None): """GetBuild. - [Preview API] Gets a build. - :param int build_id: The ID of the build. + [Preview API] Gets a build + :param int build_id: :param str project: Project ID or project name - :param str property_filters: A comma-delimited list of properties to include in the results. + :param str property_filters: :rtype: :class:` ` """ route_values = {} @@ -220,31 +299,31 @@ def get_build(self, build_id, project=None, property_filters=None): query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') response = self._send(http_method='GET', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='4.1-preview.3', + version='4.1-preview.4', route_values=route_values, query_parameters=query_parameters) return self._deserialize('Build', response) - def get_builds(self, project=None, definitions=None, queues=None, build_number=None, min_finish_time=None, max_finish_time=None, requested_for=None, reason_filter=None, status_filter=None, result_filter=None, tag_filters=None, properties=None, top=None, continuation_token=None, max_builds_per_definition=None, deleted_filter=None, query_order=None, branch_name=None, build_ids=None, repository_id=None, repository_type=None): + def get_builds(self, project=None, definitions=None, queues=None, build_number=None, min_time=None, max_time=None, requested_for=None, reason_filter=None, status_filter=None, result_filter=None, tag_filters=None, properties=None, top=None, continuation_token=None, max_builds_per_definition=None, deleted_filter=None, query_order=None, branch_name=None, build_ids=None, repository_id=None, repository_type=None): """GetBuilds. [Preview API] Gets a list of builds. :param str project: Project ID or project name :param [int] definitions: A comma-delimited list of definition IDs. If specified, filters to builds for these definitions. :param [int] queues: A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues. :param str build_number: If specified, filters to builds that match this build number. Append * to do a prefix search. - :param datetime min_finish_time: If specified, filters to builds that finished after this date. - :param datetime max_finish_time: If specified, filters to builds that finished before this date. + :param datetime min_time: If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified. + :param datetime max_time: If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified. :param str requested_for: If specified, filters to builds requested for the specified user. - :param BuildReason reason_filter: If specified, filters to builds that match this reason. - :param BuildStatus status_filter: If specified, filters to builds that match this status. - :param BuildResult result_filter: If specified, filters to builds that match this result. + :param str reason_filter: If specified, filters to builds that match this reason. + :param str status_filter: If specified, filters to builds that match this status. + :param str result_filter: If specified, filters to builds that match this result. :param [str] tag_filters: A comma-delimited list of tags. If specified, filters to builds that have the specified tags. :param [str] properties: A comma-delimited list of properties to retrieve. :param int top: The maximum number of builds to return. :param str continuation_token: A continuation token, returned by a previous call to this method, that can be used to return the next set of builds. :param int max_builds_per_definition: The maximum number of builds to return per definition. - :param QueryDeletedOption deleted_filter: Indicates whether to exclude, include, or only return deleted builds. - :param BuildQueryOrder query_order: The order in which builds should be returned. + :param str deleted_filter: Indicates whether to exclude, include, or only return deleted builds. + :param str query_order: The order in which builds should be returned. :param str branch_name: If specified, filters to builds that built branches that built this branch. :param [int] build_ids: A comma-delimited list that specifies the IDs of builds to retrieve. :param str repository_id: If specified, filters to builds that built from this repository. @@ -263,18 +342,18 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N query_parameters['queues'] = self._serialize.query('queues', queues, 'str') if build_number is not None: query_parameters['buildNumber'] = self._serialize.query('build_number', build_number, 'str') - if min_finish_time is not None: - query_parameters['minFinishTime'] = self._serialize.query('min_finish_time', min_finish_time, 'iso-8601') - if max_finish_time is not None: - query_parameters['maxFinishTime'] = self._serialize.query('max_finish_time', max_finish_time, 'iso-8601') + if min_time is not None: + query_parameters['minTime'] = self._serialize.query('min_time', min_time, 'iso-8601') + if max_time is not None: + query_parameters['maxTime'] = self._serialize.query('max_time', max_time, 'iso-8601') if requested_for is not None: query_parameters['requestedFor'] = self._serialize.query('requested_for', requested_for, 'str') if reason_filter is not None: - query_parameters['reasonFilter'] = self._serialize.query('reason_filter', reason_filter, 'BuildReason') + query_parameters['reasonFilter'] = self._serialize.query('reason_filter', reason_filter, 'str') if status_filter is not None: - query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'BuildStatus') + query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') if result_filter is not None: - query_parameters['resultFilter'] = self._serialize.query('result_filter', result_filter, 'BuildResult') + query_parameters['resultFilter'] = self._serialize.query('result_filter', result_filter, 'str') if tag_filters is not None: tag_filters = ",".join(tag_filters) query_parameters['tagFilters'] = self._serialize.query('tag_filters', tag_filters, 'str') @@ -288,9 +367,9 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N if max_builds_per_definition is not None: query_parameters['maxBuildsPerDefinition'] = self._serialize.query('max_builds_per_definition', max_builds_per_definition, 'int') if deleted_filter is not None: - query_parameters['deletedFilter'] = self._serialize.query('deleted_filter', deleted_filter, 'QueryDeletedOption') + query_parameters['deletedFilter'] = self._serialize.query('deleted_filter', deleted_filter, 'str') if query_order is not None: - query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'BuildQueryOrder') + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') if branch_name is not None: query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') if build_ids is not None: @@ -302,7 +381,7 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str') response = self._send(http_method='GET', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='4.1-preview.3', + version='4.1-preview.4', route_values=route_values, query_parameters=query_parameters, returns_collection=True) @@ -328,7 +407,7 @@ def queue_build(self, build, project=None, ignore_warnings=None, check_in_ticket content = self._serialize.body(build, 'Build') response = self._send(http_method='POST', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='4.1-preview.3', + version='4.1-preview.4', route_values=route_values, query_parameters=query_parameters, content=content) @@ -350,7 +429,7 @@ def update_build(self, build, build_id, project=None): content = self._serialize.body(build, 'Build') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='4.1-preview.3', + version='4.1-preview.4', route_values=route_values, content=content) return self._deserialize('Build', response) @@ -368,7 +447,7 @@ def update_builds(self, builds, project=None): content = self._serialize.body(builds, '[Build]') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', - version='4.1-preview.3', + version='4.1-preview.4', route_values=route_values, content=content, returns_collection=True) @@ -376,11 +455,11 @@ def update_builds(self, builds, project=None): def get_build_changes(self, project, build_id, continuation_token=None, top=None, include_source_change=None): """GetBuildChanges. - [Preview API] Gets the changes associated with a build. + [Preview API] Gets the changes associated with a build :param str project: Project ID or project name - :param int build_id: The build ID. + :param int build_id: :param str continuation_token: - :param int top: The maximum number of changes to return. + :param int top: The maximum number of changes to return :param bool include_source_change: :rtype: [Change] """ @@ -544,7 +623,7 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor :param str name: If specified, filters to definitions whose names match this pattern. :param str repository_id: A repository ID. If specified, filters to definitions that use this repository. :param str repository_type: If specified, filters to definitions that have a repository of this type. - :param DefinitionQueryOrder query_order: Indicates the order in which definitions should be returned. + :param str query_order: Indicates the order in which definitions should be returned. :param int top: The maximum number of definitions to return. :param str continuation_token: A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions. :param datetime min_metrics_time: If specified, indicates the date from which metrics should be included. @@ -568,7 +647,7 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor if repository_type is not None: query_parameters['repositoryType'] = self._serialize.query('repository_type', repository_type, 'str') if query_order is not None: - query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'DefinitionQueryOrder') + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if continuation_token is not None: @@ -598,6 +677,54 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor returns_collection=True) return self._deserialize('[BuildDefinitionReference]', response) + def reset_counter(self, definition_id, counter_id, project=None): + """ResetCounter. + [Preview API] Resets the counter variable Value back to the Seed. + :param int definition_id: The ID of the definition. + :param int counter_id: The ID of the counter. + :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 definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + query_parameters = {} + if counter_id is not None: + query_parameters['counterId'] = self._serialize.query('counter_id', counter_id, 'int') + self._send(http_method='POST', + location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', + version='4.1-preview.6', + route_values=route_values, + query_parameters=query_parameters) + + def update_counter_seed(self, definition_id, counter_id, new_seed, reset_value, project=None): + """UpdateCounterSeed. + [Preview API] Changes the counter variable Seed, and optionally resets the Value to this new Seed. Note that if Seed is being set above Value, then Value will be updated regardless. + :param int definition_id: The ID of the definition. + :param int counter_id: The ID of the counter. + :param long new_seed: The new Seed value. + :param bool reset_value: Flag indicating if Value should also be reset. + :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 definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + query_parameters = {} + if counter_id is not None: + query_parameters['counterId'] = self._serialize.query('counter_id', counter_id, 'int') + if new_seed is not None: + query_parameters['newSeed'] = self._serialize.query('new_seed', new_seed, 'long') + if reset_value is not None: + query_parameters['resetValue'] = self._serialize.query('reset_value', reset_value, 'bool') + self._send(http_method='POST', + location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', + version='4.1-preview.6', + route_values=route_values, + query_parameters=query_parameters) + def update_definition(self, definition, definition_id, project=None, secrets_source_definition_id=None, secrets_source_definition_revision=None): """UpdateDefinition. [Preview API] Updates an existing definition. @@ -627,6 +754,38 @@ def update_definition(self, definition, definition_id, project=None, secrets_sou content=content) return self._deserialize('BuildDefinition', response) + def get_file_contents(self, project, provider_name, service_endpoint_id=None, repository=None, commit_or_branch=None, path=None): + """GetFileContents. + [Preview API] Gets the contents of a file in the given source code repository. + :param str project: Project ID or project name + :param str provider_name: The name of the source provider. + :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + :param str repository: If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + :param str commit_or_branch: The identifier of the commit or branch from which a file's contents are retrieved. + :param str path: The path to the file to retrieve, relative to the root of the repository. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if provider_name is not None: + route_values['providerName'] = self._serialize.url('provider_name', provider_name, 'str') + query_parameters = {} + if service_endpoint_id is not None: + query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') + if repository is not None: + query_parameters['repository'] = self._serialize.query('repository', repository, 'str') + if commit_or_branch is not None: + query_parameters['commitOrBranch'] = self._serialize.query('commit_or_branch', commit_or_branch, 'str') + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + response = self._send(http_method='GET', + location_id='29d12225-b1d9-425f-b668-6c594a981313', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + def create_folder(self, folder, project, path): """CreateFolder. [Preview API] Creates a new folder. @@ -669,7 +828,7 @@ def get_folders(self, project, path=None, query_order=None): [Preview API] Gets a list of build definition folders. :param str project: Project ID or project name :param str path: The path to start with. - :param FolderQueryOrder query_order: The order in which folders should be returned. + :param str query_order: The order in which folders should be returned. :rtype: [Folder] """ route_values = {} @@ -679,7 +838,7 @@ def get_folders(self, project, path=None, query_order=None): route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if query_order is not None: - query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'FolderQueryOrder') + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') response = self._send(http_method='GET', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', version='4.1-preview.1', @@ -869,6 +1028,39 @@ def get_build_option_definitions(self, project=None): returns_collection=True) return self._deserialize('[BuildOptionDefinition]', response) + def get_path_contents(self, project, provider_name, service_endpoint_id=None, repository=None, commit_or_branch=None, path=None): + """GetPathContents. + [Preview API] Gets the contents of a directory in the given source code repository. + :param str project: Project ID or project name + :param str provider_name: The name of the source provider. + :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + :param str repository: If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + :param str commit_or_branch: The identifier of the commit or branch from which a file's contents are retrieved. + :param str path: The path contents to list, relative to the root of the repository. + :rtype: [SourceRepositoryItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if provider_name is not None: + route_values['providerName'] = self._serialize.url('provider_name', provider_name, 'str') + query_parameters = {} + if service_endpoint_id is not None: + query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') + if repository is not None: + query_parameters['repository'] = self._serialize.query('repository', repository, 'str') + if commit_or_branch is not None: + query_parameters['commitOrBranch'] = self._serialize.query('commit_or_branch', commit_or_branch, 'str') + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + response = self._send(http_method='GET', + location_id='7944d6fb-df01-4709-920a-7a189aa34037', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[SourceRepositoryItem]', response) + def get_build_properties(self, project, build_id, filter=None): """GetBuildProperties. [Preview API] Gets properties for a build. @@ -1007,6 +1199,41 @@ def get_build_report_html_content(self, project, build_id, type=None): query_parameters=query_parameters) return self._deserialize('object', response) + def list_repositories(self, project, provider_name, service_endpoint_id=None, repository=None, result_set=None, page_results=None, continuation_token=None): + """ListRepositories. + [Preview API] Gets a list of source code repositories. + :param str project: Project ID or project name + :param str provider_name: The name of the source provider. + :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + :param str repository: If specified, the vendor-specific identifier or the name of a single repository to get. + :param str result_set: 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set. + :param bool page_results: If set to true, this will limit the set of results and will return a continuation token to continue the query. + :param str continuation_token: When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if provider_name is not None: + route_values['providerName'] = self._serialize.url('provider_name', provider_name, 'str') + query_parameters = {} + if service_endpoint_id is not None: + query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') + if repository is not None: + query_parameters['repository'] = self._serialize.query('repository', repository, 'str') + if result_set is not None: + query_parameters['resultSet'] = self._serialize.query('result_set', result_set, 'str') + if page_results is not None: + query_parameters['pageResults'] = self._serialize.query('page_results', page_results, 'bool') + 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='d44d1680-f978-4834-9b93-8c6e132329c9', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('SourceRepositories', response) + def get_resource_usage(self): """GetResourceUsage. [Preview API] Gets information about build resources in the system. @@ -1059,6 +1286,22 @@ def update_build_settings(self, settings): content=content) return self._deserialize('BuildSettings', response) + def list_source_providers(self, project): + """ListSourceProviders. + [Preview API] Get a list of source providers and their capabilities. + :param str project: Project ID or project name + :rtype: [SourceProviderAttributes] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='3ce81729-954f-423d-a581-9fea01d25186', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SourceProviderAttributes]', response) + def add_build_tag(self, project, build_id, tag): """AddBuildTag. [Preview API] Adds a tag to a build. @@ -1321,14 +1564,54 @@ def save_template(self, template, project, template_id): content=content) return self._deserialize('BuildDefinitionTemplate', response) + def get_ticketed_artifact_content_zip(self, build_id, project_id, artifact_name, download_ticket): + """GetTicketedArtifactContentZip. + [Preview API] Gets a Zip file of the artifact with the given name for a build. + :param int build_id: The ID of the build. + :param str project_id: The project ID. + :param str artifact_name: The name of the artifact. + :param String download_ticket: A valid ticket that gives permission to download artifacts + :rtype: object + """ + route_values = {} + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + query_parameters = {} + if project_id is not None: + query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') + if artifact_name is not None: + query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') + response = self._send(http_method='GET', + location_id='731b7e7a-0b6c-4912-af75-de04fe4899db', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_ticketed_logs_content_zip(self, build_id, download_ticket): + """GetTicketedLogsContentZip. + [Preview API] Gets a Zip file of the logs for a given build. + :param int build_id: The ID of the build. + :param String download_ticket: A valid ticket that gives permission to download the logs. + :rtype: object + """ + route_values = {} + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + response = self._send(http_method='GET', + location_id='917890d1-a6b5-432d-832a-6afcf6bb0734', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None, plan_id=None): """GetBuildTimeline. - [Preview API] Gets a timeline for a build. + [Preview API] Gets details for a build :param str project: Project ID or project name - :param int build_id: The ID of the build. - :param str timeline_id: The ID of the timeline. If not specified, uses the main timeline for the plan. + :param int build_id: + :param str timeline_id: :param int change_id: - :param str plan_id: The ID of the plan. If not specified, uses the primary plan for the build. + :param str plan_id: :rtype: :class:` ` """ route_values = {} @@ -1350,6 +1633,60 @@ def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None query_parameters=query_parameters) return self._deserialize('Timeline', response) + def restore_webhooks(self, trigger_types, project, provider_name, service_endpoint_id=None, repository=None): + """RestoreWebhooks. + [Preview API] Recreates the webhooks for the specified triggers in the given source code repository. + :param [DefinitionTriggerType] trigger_types: The types of triggers to restore webhooks for. + :param str project: Project ID or project name + :param str provider_name: The name of the source provider. + :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + :param str repository: If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if provider_name is not None: + route_values['providerName'] = self._serialize.url('provider_name', provider_name, 'str') + query_parameters = {} + if service_endpoint_id is not None: + query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') + if repository is not None: + query_parameters['repository'] = self._serialize.query('repository', repository, 'str') + content = self._serialize.body(trigger_types, '[DefinitionTriggerType]') + self._send(http_method='POST', + location_id='793bceb8-9736-4030-bd2f-fb3ce6d6b478', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + + def list_webhooks(self, project, provider_name, service_endpoint_id=None, repository=None): + """ListWebhooks. + [Preview API] Gets a list of webhooks installed in the given source code repository. + :param str project: Project ID or project name + :param str provider_name: The name of the source provider. + :param str service_endpoint_id: If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + :param str repository: If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + :rtype: [RepositoryWebhook] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if provider_name is not None: + route_values['providerName'] = self._serialize.url('provider_name', provider_name, 'str') + query_parameters = {} + if service_endpoint_id is not None: + query_parameters['serviceEndpointId'] = self._serialize.query('service_endpoint_id', service_endpoint_id, 'str') + if repository is not None: + query_parameters['repository'] = self._serialize.query('repository', repository, 'str') + response = self._send(http_method='GET', + location_id='8f20ff82-9498-4812-9f6e-9c01bdc50e99', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[RepositoryWebhook]', response) + def get_build_work_items_refs(self, project, build_id, top=None): """GetBuildWorkItemsRefs. [Preview API] Gets the work items associated with a build. diff --git a/vsts/vsts/build/v4_1/models/__init__.py b/vsts/vsts/build/v4_1/models/__init__.py index 990a3465..ed1d399e 100644 --- a/vsts/vsts/build/v4_1/models/__init__.py +++ b/vsts/vsts/build/v4_1/models/__init__.py @@ -7,7 +7,13 @@ # -------------------------------------------------------------------------------------------- from .agent_pool_queue import AgentPoolQueue +from .aggregated_results_analysis import AggregatedResultsAnalysis +from .aggregated_results_by_outcome import AggregatedResultsByOutcome +from .aggregated_results_difference import AggregatedResultsDifference +from .aggregated_runs_by_state import AggregatedRunsByState from .artifact_resource import ArtifactResource +from .associated_work_item import AssociatedWorkItem +from .attachment import Attachment from .authorization_header import AuthorizationHeader from .build import Build from .build_artifact import BuildArtifact @@ -15,7 +21,9 @@ from .build_controller import BuildController from .build_definition import BuildDefinition from .build_definition3_2 import BuildDefinition3_2 +from .build_definition_counter import BuildDefinitionCounter from .build_definition_reference import BuildDefinitionReference +from .build_definition_reference3_2 import BuildDefinitionReference3_2 from .build_definition_revision import BuildDefinitionRevision from .build_definition_step import BuildDefinitionStep from .build_definition_template import BuildDefinitionTemplate @@ -41,13 +49,21 @@ from .definition_reference import DefinitionReference from .deployment import Deployment from .folder import Folder +from .graph_subject_base import GraphSubjectBase from .identity_ref import IdentityRef from .issue import Issue from .json_patch_operation import JsonPatchOperation from .process_parameters import ProcessParameters from .reference_links import ReferenceLinks +from .release_reference import ReleaseReference +from .repository_webhook import RepositoryWebhook from .resource_ref import ResourceRef from .retention_policy import RetentionPolicy +from .source_provider_attributes import SourceProviderAttributes +from .source_repositories import SourceRepositories +from .source_repository import SourceRepository +from .source_repository_item import SourceRepositoryItem +from .supported_trigger import SupportedTrigger from .task_agent_pool_reference import TaskAgentPoolReference from .task_definition_reference import TaskDefinitionReference from .task_input_definition_base import TaskInputDefinitionBase @@ -56,6 +72,7 @@ from .task_reference import TaskReference from .task_source_definition_base import TaskSourceDefinitionBase from .team_project_reference import TeamProjectReference +from .test_results_context import TestResultsContext from .timeline import Timeline from .timeline_record import TimelineRecord from .timeline_reference import TimelineReference @@ -66,7 +83,13 @@ __all__ = [ 'AgentPoolQueue', + 'AggregatedResultsAnalysis', + 'AggregatedResultsByOutcome', + 'AggregatedResultsDifference', + 'AggregatedRunsByState', 'ArtifactResource', + 'AssociatedWorkItem', + 'Attachment', 'AuthorizationHeader', 'Build', 'BuildArtifact', @@ -74,7 +97,9 @@ 'BuildController', 'BuildDefinition', 'BuildDefinition3_2', + 'BuildDefinitionCounter', 'BuildDefinitionReference', + 'BuildDefinitionReference3_2', 'BuildDefinitionRevision', 'BuildDefinitionStep', 'BuildDefinitionTemplate', @@ -100,13 +125,21 @@ 'DefinitionReference', 'Deployment', 'Folder', + 'GraphSubjectBase', 'IdentityRef', 'Issue', 'JsonPatchOperation', 'ProcessParameters', 'ReferenceLinks', + 'ReleaseReference', + 'RepositoryWebhook', 'ResourceRef', 'RetentionPolicy', + 'SourceProviderAttributes', + 'SourceRepositories', + 'SourceRepository', + 'SourceRepositoryItem', + 'SupportedTrigger', 'TaskAgentPoolReference', 'TaskDefinitionReference', 'TaskInputDefinitionBase', @@ -115,6 +148,7 @@ 'TaskReference', 'TaskSourceDefinitionBase', 'TeamProjectReference', + 'TestResultsContext', 'Timeline', 'TimelineRecord', 'TimelineReference', diff --git a/vsts/vsts/build/v4_1/models/artifact_resource.py b/vsts/vsts/build/v4_1/models/artifact_resource.py index 49e52950..5d9174e3 100644 --- a/vsts/vsts/build/v4_1/models/artifact_resource.py +++ b/vsts/vsts/build/v4_1/models/artifact_resource.py @@ -16,6 +16,8 @@ class ArtifactResource(Model): :type _links: :class:`ReferenceLinks ` :param data: Type-specific data about the artifact. :type data: str + :param download_ticket: A secret that can be sent in a request header to retrieve an artifact anonymously. Valid for a limited amount of time. Optional. + :type download_ticket: str :param download_url: A link to download the resource. :type download_url: str :param properties: Type-specific properties of the artifact. @@ -29,16 +31,18 @@ class ArtifactResource(Model): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'data': {'key': 'data', 'type': 'str'}, + 'download_ticket': {'key': 'downloadTicket', 'type': 'str'}, 'download_url': {'key': 'downloadUrl', 'type': 'str'}, 'properties': {'key': 'properties', 'type': '{str}'}, 'type': {'key': 'type', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, _links=None, data=None, download_url=None, properties=None, type=None, url=None): + def __init__(self, _links=None, data=None, download_ticket=None, download_url=None, properties=None, type=None, url=None): super(ArtifactResource, self).__init__() self._links = _links self.data = data + self.download_ticket = download_ticket self.download_url = download_url self.properties = properties self.type = type diff --git a/vsts/vsts/build/v4_1/models/build.py b/vsts/vsts/build/v4_1/models/build.py index f7eada17..4a8f2566 100644 --- a/vsts/vsts/build/v4_1/models/build.py +++ b/vsts/vsts/build/v4_1/models/build.py @@ -88,6 +88,8 @@ class Build(Model): :type status: object :param tags: :type tags: list of str + :param triggered_by_build: The build that triggered this build via a Build completion trigger. + :type triggered_by_build: :class:`Build ` :param trigger_info: Sourceprovider-specific information about what triggered the build :type trigger_info: dict :param uri: The URI of the build. @@ -137,13 +139,14 @@ class Build(Model): 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, 'status': {'key': 'status', 'type': 'object'}, 'tags': {'key': 'tags', 'type': '[str]'}, + 'triggered_by_build': {'key': 'triggeredByBuild', 'type': 'Build'}, 'trigger_info': {'key': 'triggerInfo', 'type': '{str}'}, 'uri': {'key': 'uri', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'validation_results': {'key': 'validationResults', 'type': '[BuildRequestValidationResult]'} } - def __init__(self, _links=None, build_number=None, build_number_revision=None, controller=None, definition=None, deleted=None, deleted_by=None, deleted_date=None, deleted_reason=None, demands=None, finish_time=None, id=None, keep_forever=None, last_changed_by=None, last_changed_date=None, logs=None, orchestration_plan=None, parameters=None, plans=None, priority=None, project=None, properties=None, quality=None, queue=None, queue_options=None, queue_position=None, queue_time=None, reason=None, repository=None, requested_by=None, requested_for=None, result=None, retained_by_release=None, source_branch=None, source_version=None, start_time=None, status=None, tags=None, trigger_info=None, uri=None, url=None, validation_results=None): + def __init__(self, _links=None, build_number=None, build_number_revision=None, controller=None, definition=None, deleted=None, deleted_by=None, deleted_date=None, deleted_reason=None, demands=None, finish_time=None, id=None, keep_forever=None, last_changed_by=None, last_changed_date=None, logs=None, orchestration_plan=None, parameters=None, plans=None, priority=None, project=None, properties=None, quality=None, queue=None, queue_options=None, queue_position=None, queue_time=None, reason=None, repository=None, requested_by=None, requested_for=None, result=None, retained_by_release=None, source_branch=None, source_version=None, start_time=None, status=None, tags=None, triggered_by_build=None, trigger_info=None, uri=None, url=None, validation_results=None): super(Build, self).__init__() self._links = _links self.build_number = build_number @@ -183,6 +186,7 @@ def __init__(self, _links=None, build_number=None, build_number_revision=None, c self.start_time = start_time self.status = status self.tags = tags + self.triggered_by_build = triggered_by_build self.trigger_info = trigger_info self.uri = uri self.url = url diff --git a/vsts/vsts/build/v4_1/models/build_definition.py b/vsts/vsts/build/v4_1/models/build_definition.py index 5b5b89b1..d443d215 100644 --- a/vsts/vsts/build/v4_1/models/build_definition.py +++ b/vsts/vsts/build/v4_1/models/build_definition.py @@ -40,6 +40,10 @@ class BuildDefinition(BuildDefinitionReference): :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. :type drafts: list of :class:`DefinitionReference ` + :param latest_build: + :type latest_build: :class:`Build ` + :param latest_completed_build: + :type latest_completed_build: :class:`Build ` :param metrics: :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) @@ -52,6 +56,8 @@ class BuildDefinition(BuildDefinitionReference): :type build_number_format: str :param comment: A save-time comment for the definition. :type comment: str + :param counters: + :type counters: dict :param demands: :type demands: list of :class:`object ` :param description: The description. @@ -64,10 +70,6 @@ class BuildDefinition(BuildDefinitionReference): :type job_cancel_timeout_in_minutes: int :param job_timeout_in_minutes: The job execution timeout (in minutes) for builds queued against this definition. :type job_timeout_in_minutes: int - :param latest_build: - :type latest_build: :class:`Build ` - :param latest_completed_build: - :type latest_completed_build: :class:`Build ` :param options: :type options: list of :class:`BuildOption ` :param process: The build process. @@ -105,20 +107,21 @@ class BuildDefinition(BuildDefinitionReference): 'authored_by': {'key': 'authoredBy', 'type': 'IdentityRef'}, 'draft_of': {'key': 'draftOf', 'type': 'DefinitionReference'}, 'drafts': {'key': 'drafts', 'type': '[DefinitionReference]'}, + 'latest_build': {'key': 'latestBuild', 'type': 'Build'}, + 'latest_completed_build': {'key': 'latestCompletedBuild', 'type': 'Build'}, 'metrics': {'key': 'metrics', 'type': '[BuildMetric]'}, 'quality': {'key': 'quality', 'type': 'object'}, 'queue': {'key': 'queue', 'type': 'AgentPoolQueue'}, 'badge_enabled': {'key': 'badgeEnabled', 'type': 'bool'}, 'build_number_format': {'key': 'buildNumberFormat', 'type': 'str'}, 'comment': {'key': 'comment', 'type': 'str'}, + 'counters': {'key': 'counters', 'type': '{BuildDefinitionCounter}'}, 'demands': {'key': 'demands', 'type': '[object]'}, 'description': {'key': 'description', 'type': 'str'}, 'drop_location': {'key': 'dropLocation', 'type': 'str'}, 'job_authorization_scope': {'key': 'jobAuthorizationScope', 'type': 'object'}, 'job_cancel_timeout_in_minutes': {'key': 'jobCancelTimeoutInMinutes', 'type': 'int'}, 'job_timeout_in_minutes': {'key': 'jobTimeoutInMinutes', 'type': 'int'}, - 'latest_build': {'key': 'latestBuild', 'type': 'Build'}, - 'latest_completed_build': {'key': 'latestCompletedBuild', 'type': 'Build'}, 'options': {'key': 'options', 'type': '[BuildOption]'}, 'process': {'key': 'process', 'type': 'BuildProcess'}, 'process_parameters': {'key': 'processParameters', 'type': 'ProcessParameters'}, @@ -131,19 +134,18 @@ class BuildDefinition(BuildDefinitionReference): 'variables': {'key': 'variables', 'type': '{BuildDefinitionVariable}'} } - def __init__(self, created_date=None, id=None, name=None, path=None, project=None, queue_status=None, revision=None, type=None, uri=None, url=None, _links=None, authored_by=None, draft_of=None, drafts=None, metrics=None, quality=None, queue=None, badge_enabled=None, build_number_format=None, comment=None, demands=None, description=None, drop_location=None, job_authorization_scope=None, job_cancel_timeout_in_minutes=None, job_timeout_in_minutes=None, latest_build=None, latest_completed_build=None, options=None, process=None, process_parameters=None, properties=None, repository=None, retention_rules=None, tags=None, triggers=None, variable_groups=None, variables=None): - super(BuildDefinition, self).__init__(created_date=created_date, id=id, name=name, path=path, project=project, queue_status=queue_status, revision=revision, type=type, uri=uri, url=url, _links=_links, authored_by=authored_by, draft_of=draft_of, drafts=drafts, metrics=metrics, quality=quality, queue=queue) + def __init__(self, created_date=None, id=None, name=None, path=None, project=None, queue_status=None, revision=None, type=None, uri=None, url=None, _links=None, authored_by=None, draft_of=None, drafts=None, latest_build=None, latest_completed_build=None, metrics=None, quality=None, queue=None, badge_enabled=None, build_number_format=None, comment=None, counters=None, demands=None, description=None, drop_location=None, job_authorization_scope=None, job_cancel_timeout_in_minutes=None, job_timeout_in_minutes=None, options=None, process=None, process_parameters=None, properties=None, repository=None, retention_rules=None, tags=None, triggers=None, variable_groups=None, variables=None): + super(BuildDefinition, self).__init__(created_date=created_date, id=id, name=name, path=path, project=project, queue_status=queue_status, revision=revision, type=type, uri=uri, url=url, _links=_links, authored_by=authored_by, draft_of=draft_of, drafts=drafts, latest_build=latest_build, latest_completed_build=latest_completed_build, metrics=metrics, quality=quality, queue=queue) self.badge_enabled = badge_enabled self.build_number_format = build_number_format self.comment = comment + self.counters = counters self.demands = demands self.description = description self.drop_location = drop_location self.job_authorization_scope = job_authorization_scope self.job_cancel_timeout_in_minutes = job_cancel_timeout_in_minutes self.job_timeout_in_minutes = job_timeout_in_minutes - self.latest_build = latest_build - self.latest_completed_build = latest_completed_build self.options = options self.process = process self.process_parameters = process_parameters diff --git a/vsts/vsts/build/v4_1/models/build_definition3_2.py b/vsts/vsts/build/v4_1/models/build_definition3_2.py index e356d7c0..9aef37d5 100644 --- a/vsts/vsts/build/v4_1/models/build_definition3_2.py +++ b/vsts/vsts/build/v4_1/models/build_definition3_2.py @@ -6,10 +6,10 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from .build_definition_reference import BuildDefinitionReference +from .build_definition_reference3_2 import BuildDefinitionReference3_2 -class BuildDefinition3_2(BuildDefinitionReference): +class BuildDefinition3_2(BuildDefinitionReference3_2): """BuildDefinition3_2. :param created_date: The date the definition was created. diff --git a/vsts/vsts/build/v4_1/models/build_definition_reference.py b/vsts/vsts/build/v4_1/models/build_definition_reference.py index 64264ea2..828ef304 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_reference.py +++ b/vsts/vsts/build/v4_1/models/build_definition_reference.py @@ -40,6 +40,10 @@ class BuildDefinitionReference(DefinitionReference): :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. :type drafts: list of :class:`DefinitionReference ` + :param latest_build: + :type latest_build: :class:`Build ` + :param latest_completed_build: + :type latest_completed_build: :class:`Build ` :param metrics: :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) @@ -63,17 +67,21 @@ class BuildDefinitionReference(DefinitionReference): 'authored_by': {'key': 'authoredBy', 'type': 'IdentityRef'}, 'draft_of': {'key': 'draftOf', 'type': 'DefinitionReference'}, 'drafts': {'key': 'drafts', 'type': '[DefinitionReference]'}, + 'latest_build': {'key': 'latestBuild', 'type': 'Build'}, + 'latest_completed_build': {'key': 'latestCompletedBuild', 'type': 'Build'}, 'metrics': {'key': 'metrics', 'type': '[BuildMetric]'}, 'quality': {'key': 'quality', 'type': 'object'}, 'queue': {'key': 'queue', 'type': 'AgentPoolQueue'} } - def __init__(self, created_date=None, id=None, name=None, path=None, project=None, queue_status=None, revision=None, type=None, uri=None, url=None, _links=None, authored_by=None, draft_of=None, drafts=None, metrics=None, quality=None, queue=None): + def __init__(self, created_date=None, id=None, name=None, path=None, project=None, queue_status=None, revision=None, type=None, uri=None, url=None, _links=None, authored_by=None, draft_of=None, drafts=None, latest_build=None, latest_completed_build=None, metrics=None, quality=None, queue=None): super(BuildDefinitionReference, self).__init__(created_date=created_date, id=id, name=name, path=path, project=project, queue_status=queue_status, revision=revision, type=type, uri=uri, url=url) self._links = _links self.authored_by = authored_by self.draft_of = draft_of self.drafts = drafts + self.latest_build = latest_build + self.latest_completed_build = latest_completed_build self.metrics = metrics self.quality = quality self.queue = queue diff --git a/vsts/vsts/build/v4_1/models/build_definition_reference3_2.py b/vsts/vsts/build/v4_1/models/build_definition_reference3_2.py new file mode 100644 index 00000000..08361ab3 --- /dev/null +++ b/vsts/vsts/build/v4_1/models/build_definition_reference3_2.py @@ -0,0 +1,79 @@ +# -------------------------------------------------------------------------------------------- +# 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 .definition_reference import DefinitionReference + + +class BuildDefinitionReference3_2(DefinitionReference): + """BuildDefinitionReference3_2. + + :param created_date: The date the definition was created. + :type created_date: datetime + :param id: The ID of the referenced definition. + :type id: int + :param name: The name of the referenced definition. + :type name: str + :param path: The folder path of the definition. + :type path: str + :param project: A reference to the project. + :type project: :class:`TeamProjectReference ` + :param queue_status: A value that indicates whether builds can be queued against this definition. + :type queue_status: object + :param revision: The definition revision number. + :type revision: int + :param type: The type of the definition. + :type type: object + :param uri: The definition's URI. + :type uri: str + :param url: The REST URL of the definition. + :type url: str + :param _links: + :type _links: :class:`ReferenceLinks ` + :param authored_by: The author of the definition. + :type authored_by: :class:`IdentityRef ` + :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. + :type draft_of: :class:`DefinitionReference ` + :param drafts: The list of drafts associated with this definition, if this is not a draft definition. + :type drafts: list of :class:`DefinitionReference ` + :param metrics: + :type metrics: list of :class:`BuildMetric ` + :param quality: The quality of the definition document (draft, etc.) + :type quality: object + :param queue: The default queue for builds run against this definition. + :type queue: :class:`AgentPoolQueue ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'queue_status': {'key': 'queueStatus', 'type': 'object'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'object'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'authored_by': {'key': 'authoredBy', 'type': 'IdentityRef'}, + 'draft_of': {'key': 'draftOf', 'type': 'DefinitionReference'}, + 'drafts': {'key': 'drafts', 'type': '[DefinitionReference]'}, + 'metrics': {'key': 'metrics', 'type': '[BuildMetric]'}, + 'quality': {'key': 'quality', 'type': 'object'}, + 'queue': {'key': 'queue', 'type': 'AgentPoolQueue'} + } + + def __init__(self, created_date=None, id=None, name=None, path=None, project=None, queue_status=None, revision=None, type=None, uri=None, url=None, _links=None, authored_by=None, draft_of=None, drafts=None, metrics=None, quality=None, queue=None): + super(BuildDefinitionReference3_2, self).__init__(created_date=created_date, id=id, name=name, path=path, project=project, queue_status=queue_status, revision=revision, type=type, uri=uri, url=url) + self._links = _links + self.authored_by = authored_by + self.draft_of = draft_of + self.drafts = drafts + self.metrics = metrics + self.quality = quality + self.queue = queue diff --git a/vsts/vsts/build/v4_1/models/build_definition_template.py b/vsts/vsts/build/v4_1/models/build_definition_template.py index bcd59370..50efc44c 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_template.py +++ b/vsts/vsts/build/v4_1/models/build_definition_template.py @@ -16,6 +16,8 @@ class BuildDefinitionTemplate(Model): :type can_delete: bool :param category: The template category. :type category: str + :param default_hosted_queue: An optional hosted agent queue for the template to use by default. + :type default_hosted_queue: str :param description: A description of the template. :type description: str :param icons: @@ -33,6 +35,7 @@ class BuildDefinitionTemplate(Model): _attribute_map = { 'can_delete': {'key': 'canDelete', 'type': 'bool'}, 'category': {'key': 'category', 'type': 'str'}, + 'default_hosted_queue': {'key': 'defaultHostedQueue', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'icons': {'key': 'icons', 'type': '{str}'}, 'icon_task_id': {'key': 'iconTaskId', 'type': 'str'}, @@ -41,10 +44,11 @@ class BuildDefinitionTemplate(Model): 'template': {'key': 'template', 'type': 'BuildDefinition'} } - def __init__(self, can_delete=None, category=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None): + def __init__(self, can_delete=None, category=None, default_hosted_queue=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None): super(BuildDefinitionTemplate, self).__init__() self.can_delete = can_delete self.category = category + self.default_hosted_queue = default_hosted_queue self.description = description self.icons = icons self.icon_task_id = icon_task_id diff --git a/vsts/vsts/build/v4_1/models/build_definition_template3_2.py b/vsts/vsts/build/v4_1/models/build_definition_template3_2.py index 8bd0c687..e497668d 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_template3_2.py +++ b/vsts/vsts/build/v4_1/models/build_definition_template3_2.py @@ -16,6 +16,8 @@ class BuildDefinitionTemplate3_2(Model): :type can_delete: bool :param category: :type category: str + :param default_hosted_queue: + :type default_hosted_queue: str :param description: :type description: str :param icons: @@ -33,6 +35,7 @@ class BuildDefinitionTemplate3_2(Model): _attribute_map = { 'can_delete': {'key': 'canDelete', 'type': 'bool'}, 'category': {'key': 'category', 'type': 'str'}, + 'default_hosted_queue': {'key': 'defaultHostedQueue', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'icons': {'key': 'icons', 'type': '{str}'}, 'icon_task_id': {'key': 'iconTaskId', 'type': 'str'}, @@ -41,10 +44,11 @@ class BuildDefinitionTemplate3_2(Model): 'template': {'key': 'template', 'type': 'BuildDefinition3_2'} } - def __init__(self, can_delete=None, category=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None): + def __init__(self, can_delete=None, category=None, default_hosted_queue=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None): super(BuildDefinitionTemplate3_2, self).__init__() self.can_delete = can_delete self.category = category + self.default_hosted_queue = default_hosted_queue self.description = description self.icons = icons self.icon_task_id = icon_task_id diff --git a/vsts/vsts/build/v4_1/models/data_source_binding_base.py b/vsts/vsts/build/v4_1/models/data_source_binding_base.py index fe92a446..04638445 100644 --- a/vsts/vsts/build/v4_1/models/data_source_binding_base.py +++ b/vsts/vsts/build/v4_1/models/data_source_binding_base.py @@ -12,21 +12,21 @@ class DataSourceBindingBase(Model): """DataSourceBindingBase. - :param data_source_name: + :param data_source_name: Gets or sets the name of the data source. :type data_source_name: str - :param endpoint_id: + :param endpoint_id: Gets or sets the endpoint Id. :type endpoint_id: str - :param endpoint_url: + :param endpoint_url: Gets or sets the url of the service endpoint. :type endpoint_url: str - :param headers: + :param headers: Gets or sets the authorization headers. :type headers: list of :class:`AuthorizationHeader ` - :param parameters: + :param parameters: Gets or sets the parameters for the data source. :type parameters: dict - :param result_selector: + :param result_selector: Gets or sets the result selector. :type result_selector: str - :param result_template: + :param result_template: Gets or sets the result template. :type result_template: str - :param target: + :param target: Gets or sets the target of the data source. :type target: str """ diff --git a/vsts/vsts/build/v4_1/models/identity_ref.py b/vsts/vsts/build/v4_1/models/identity_ref.py index 40c776c5..c4c35ad5 100644 --- a/vsts/vsts/build/v4_1/models/identity_ref.py +++ b/vsts/vsts/build/v4_1/models/identity_ref.py @@ -6,16 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .graph_subject_base import GraphSubjectBase -class IdentityRef(Model): +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: :type directory_alias: str - :param display_name: - :type display_name: str :param id: :type id: str :param image_url: @@ -30,27 +36,26 @@ class IdentityRef(Model): :type profile_url: str :param unique_name: :type unique_name: str - :param url: - :type url: str """ _attribute_map = { - 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + '_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'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} + 'unique_name': {'key': 'uniqueName', 'type': 'str'} } - def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): - super(IdentityRef, self).__init__() + 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, 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.display_name = display_name self.id = id self.image_url = image_url self.inactive = inactive @@ -58,4 +63,3 @@ def __init__(self, directory_alias=None, display_name=None, id=None, image_url=N self.is_container = is_container self.profile_url = profile_url self.unique_name = unique_name - self.url = url diff --git a/vsts/vsts/build/v4_1/models/source_provider_attributes.py b/vsts/vsts/build/v4_1/models/source_provider_attributes.py new file mode 100644 index 00000000..e03a9198 --- /dev/null +++ b/vsts/vsts/build/v4_1/models/source_provider_attributes.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SourceProviderAttributes(Model): + """SourceProviderAttributes. + + :param name: The name of the source provider. + :type name: str + :param supported_capabilities: The capabilities supported by this source provider. + :type supported_capabilities: dict + :param supported_triggers: The types of triggers supported by this source provider. + :type supported_triggers: list of :class:`SupportedTrigger ` + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'supported_capabilities': {'key': 'supportedCapabilities', 'type': '{bool}'}, + 'supported_triggers': {'key': 'supportedTriggers', 'type': '[SupportedTrigger]'} + } + + def __init__(self, name=None, supported_capabilities=None, supported_triggers=None): + super(SourceProviderAttributes, self).__init__() + self.name = name + self.supported_capabilities = supported_capabilities + self.supported_triggers = supported_triggers diff --git a/vsts/vsts/build/v4_1/models/source_repository.py b/vsts/vsts/build/v4_1/models/source_repository.py new file mode 100644 index 00000000..3e2e39a1 --- /dev/null +++ b/vsts/vsts/build/v4_1/models/source_repository.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 SourceRepository(Model): + """SourceRepository. + + :param default_branch: The name of the default branch. + :type default_branch: str + :param full_name: The full name of the repository. + :type full_name: str + :param id: The ID of the repository. + :type id: str + :param name: The friendly name of the repository. + :type name: str + :param properties: + :type properties: dict + :param source_provider_name: The name of the source provider the repository is from. + :type source_provider_name: str + :param url: The URL of the repository. + :type url: str + """ + + _attribute_map = { + 'default_branch': {'key': 'defaultBranch', 'type': 'str'}, + 'full_name': {'key': 'fullName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'source_provider_name': {'key': 'sourceProviderName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, default_branch=None, full_name=None, id=None, name=None, properties=None, source_provider_name=None, url=None): + super(SourceRepository, self).__init__() + self.default_branch = default_branch + self.full_name = full_name + self.id = id + self.name = name + self.properties = properties + self.source_provider_name = source_provider_name + self.url = url diff --git a/vsts/vsts/build/v4_1/models/supported_trigger.py b/vsts/vsts/build/v4_1/models/supported_trigger.py new file mode 100644 index 00000000..7e446749 --- /dev/null +++ b/vsts/vsts/build/v4_1/models/supported_trigger.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SupportedTrigger(Model): + """SupportedTrigger. + + :param default_polling_interval: The default interval to wait between polls (only relevant when NotificationType is Polling). + :type default_polling_interval: int + :param notification_type: How the trigger is notified of changes. + :type notification_type: str + :param supported_capabilities: The capabilities supported by this trigger. + :type supported_capabilities: dict + :param type: The type of trigger. + :type type: object + """ + + _attribute_map = { + 'default_polling_interval': {'key': 'defaultPollingInterval', 'type': 'int'}, + 'notification_type': {'key': 'notificationType', 'type': 'str'}, + 'supported_capabilities': {'key': 'supportedCapabilities', 'type': '{SupportLevel}'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, default_polling_interval=None, notification_type=None, supported_capabilities=None, type=None): + super(SupportedTrigger, self).__init__() + self.default_polling_interval = default_polling_interval + self.notification_type = notification_type + self.supported_capabilities = supported_capabilities + self.type = type diff --git a/vsts/vsts/contributions/__init__.py b/vsts/vsts/contributions/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/contributions/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/contributions/v4_0/__init__.py b/vsts/vsts/contributions/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/contributions/v4_0/contributions_client.py b/vsts/vsts/contributions/v4_0/contributions_client.py new file mode 100644 index 00000000..417ba8ae --- /dev/null +++ b/vsts/vsts/contributions/v4_0/contributions_client.py @@ -0,0 +1,101 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ContributionsClient(VssClient): + """Contributions + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ContributionsClient, 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 = '8477aec9-a4c7-4bd4-a456-ba4c53c989cb' + + def query_contribution_nodes(self, query): + """QueryContributionNodes. + [Preview API] Query for contribution nodes and provider details according the parameters in the passed in query object. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'ContributionNodeQuery') + response = self._send(http_method='POST', + location_id='db7f2146-2309-4cee-b39c-c767777a1c55', + version='4.0-preview.1', + content=content) + return self._deserialize('ContributionNodeQueryResult', response) + + def query_data_providers(self, query): + """QueryDataProviders. + [Preview API] + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'DataProviderQuery') + response = self._send(http_method='POST', + location_id='738368db-35ee-4b85-9f94-77ed34af2b0d', + version='4.0-preview.1', + content=content) + return self._deserialize('DataProviderResult', response) + + def get_installed_extensions(self, contribution_ids=None, include_disabled_apps=None, asset_types=None): + """GetInstalledExtensions. + [Preview API] + :param [str] contribution_ids: + :param bool include_disabled_apps: + :param [str] asset_types: + :rtype: [InstalledExtension] + """ + query_parameters = {} + if contribution_ids is not None: + contribution_ids = ";".join(contribution_ids) + query_parameters['contributionIds'] = self._serialize.query('contribution_ids', contribution_ids, 'str') + if include_disabled_apps is not None: + query_parameters['includeDisabledApps'] = self._serialize.query('include_disabled_apps', include_disabled_apps, 'bool') + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + response = self._send(http_method='GET', + location_id='2648442b-fd63-4b9a-902f-0c913510f139', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[InstalledExtension]', response) + + def get_installed_extension_by_name(self, publisher_name, extension_name, asset_types=None): + """GetInstalledExtensionByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param [str] asset_types: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + response = self._send(http_method='GET', + location_id='3e2f6668-0798-4dcb-b592-bfe2fa57fde2', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('InstalledExtension', response) + diff --git a/vsts/vsts/contributions/v4_0/models/__init__.py b/vsts/vsts/contributions/v4_0/models/__init__.py new file mode 100644 index 00000000..a2b2f347 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/__init__.py @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------------------------- +# 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 .client_data_provider_query import ClientDataProviderQuery +from .contribution import Contribution +from .contribution_base import ContributionBase +from .contribution_constraint import ContributionConstraint +from .contribution_node_query import ContributionNodeQuery +from .contribution_node_query_result import ContributionNodeQueryResult +from .contribution_property_description import ContributionPropertyDescription +from .contribution_provider_details import ContributionProviderDetails +from .contribution_type import ContributionType +from .data_provider_context import DataProviderContext +from .data_provider_exception_details import DataProviderExceptionDetails +from .data_provider_query import DataProviderQuery +from .data_provider_result import DataProviderResult +from .extension_event_callback import ExtensionEventCallback +from .extension_event_callback_collection import ExtensionEventCallbackCollection +from .extension_file import ExtensionFile +from .extension_licensing import ExtensionLicensing +from .extension_manifest import ExtensionManifest +from .installed_extension import InstalledExtension +from .installed_extension_state import InstalledExtensionState +from .installed_extension_state_issue import InstalledExtensionStateIssue +from .licensing_override import LicensingOverride +from .resolved_data_provider import ResolvedDataProvider +from .serialized_contribution_node import SerializedContributionNode + +__all__ = [ + 'ClientDataProviderQuery', + 'Contribution', + 'ContributionBase', + 'ContributionConstraint', + 'ContributionNodeQuery', + 'ContributionNodeQueryResult', + 'ContributionPropertyDescription', + 'ContributionProviderDetails', + 'ContributionType', + 'DataProviderContext', + 'DataProviderExceptionDetails', + 'DataProviderQuery', + 'DataProviderResult', + 'ExtensionEventCallback', + 'ExtensionEventCallbackCollection', + 'ExtensionFile', + 'ExtensionLicensing', + 'ExtensionManifest', + 'InstalledExtension', + 'InstalledExtensionState', + 'InstalledExtensionStateIssue', + 'LicensingOverride', + 'ResolvedDataProvider', + 'SerializedContributionNode', +] diff --git a/vsts/vsts/contributions/v4_0/models/client_data_provider_query.py b/vsts/vsts/contributions/v4_0/models/client_data_provider_query.py new file mode 100644 index 00000000..f6f8d2cf --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/client_data_provider_query.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# 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 .data_provider_query import DataProviderQuery + + +class ClientDataProviderQuery(DataProviderQuery): + """ClientDataProviderQuery. + + :param context: Contextual information to pass to the data providers + :type context: :class:`DataProviderContext ` + :param contribution_ids: The contribution ids of the data providers to resolve + :type contribution_ids: list of str + :param query_service_instance_type: The Id of the service instance type that should be communicated with in order to resolve the data providers from the client given the query values. + :type query_service_instance_type: str + """ + + _attribute_map = { + 'context': {'key': 'context', 'type': 'DataProviderContext'}, + 'contribution_ids': {'key': 'contributionIds', 'type': '[str]'}, + 'query_service_instance_type': {'key': 'queryServiceInstanceType', 'type': 'str'} + } + + def __init__(self, context=None, contribution_ids=None, query_service_instance_type=None): + super(ClientDataProviderQuery, self).__init__(context=context, contribution_ids=contribution_ids) + self.query_service_instance_type = query_service_instance_type diff --git a/vsts/vsts/contributions/v4_0/models/contribution.py b/vsts/vsts/contributions/v4_0/models/contribution.py new file mode 100644 index 00000000..41f648f5 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class Contribution(ContributionBase): + """Contribution. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param constraints: List of constraints (filters) that should be applied to the availability of this contribution + :type constraints: list of :class:`ContributionConstraint ` + :param includes: Includes is a set of contributions that should have this contribution included in their targets list. + :type includes: list of str + :param properties: Properties/attributes of this contribution + :type properties: :class:`object ` + :param targets: The ids of the contribution(s) that this contribution targets. (parent contributions) + :type targets: list of str + :param type: Id of the Contribution Type + :type type: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'includes': {'key': 'includes', 'type': '[str]'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'targets': {'key': 'targets', 'type': '[str]'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, description=None, id=None, visible_to=None, constraints=None, includes=None, properties=None, targets=None, type=None): + super(Contribution, self).__init__(description=description, id=id, visible_to=visible_to) + self.constraints = constraints + self.includes = includes + self.properties = properties + self.targets = targets + self.type = type diff --git a/vsts/vsts/contributions/v4_0/models/contribution_base.py b/vsts/vsts/contributions/v4_0/models/contribution_base.py new file mode 100644 index 00000000..4a2402c0 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution_base.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionBase(Model): + """ContributionBase. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'} + } + + def __init__(self, description=None, id=None, visible_to=None): + super(ContributionBase, self).__init__() + self.description = description + self.id = id + self.visible_to = visible_to diff --git a/vsts/vsts/contributions/v4_0/models/contribution_constraint.py b/vsts/vsts/contributions/v4_0/models/contribution_constraint.py new file mode 100644 index 00000000..bf82e72b --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution_constraint.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionConstraint(Model): + """ContributionConstraint. + + :param group: An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included). + :type group: int + :param inverse: If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true) + :type inverse: bool + :param name: Name of the IContributionFilter class + :type name: str + :param properties: Properties that are fed to the contribution filter class + :type properties: :class:`object ` + :param relationships: Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will elimiate the contribution from the tree completely if the constraint is applied. + :type relationships: list of str + """ + + _attribute_map = { + 'group': {'key': 'group', 'type': 'int'}, + 'inverse': {'key': 'inverse', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'relationships': {'key': 'relationships', 'type': '[str]'} + } + + def __init__(self, group=None, inverse=None, name=None, properties=None, relationships=None): + super(ContributionConstraint, self).__init__() + self.group = group + self.inverse = inverse + self.name = name + self.properties = properties + self.relationships = relationships diff --git a/vsts/vsts/contributions/v4_0/models/contribution_node_query.py b/vsts/vsts/contributions/v4_0/models/contribution_node_query.py new file mode 100644 index 00000000..39d2c5ad --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution_node_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionNodeQuery(Model): + """ContributionNodeQuery. + + :param contribution_ids: The contribution ids of the nodes to find. + :type contribution_ids: list of str + :param include_provider_details: Indicator if contribution provider details should be included in the result. + :type include_provider_details: bool + :param query_options: Query options tpo be used when fetching ContributionNodes + :type query_options: object + """ + + _attribute_map = { + 'contribution_ids': {'key': 'contributionIds', 'type': '[str]'}, + 'include_provider_details': {'key': 'includeProviderDetails', 'type': 'bool'}, + 'query_options': {'key': 'queryOptions', 'type': 'object'} + } + + def __init__(self, contribution_ids=None, include_provider_details=None, query_options=None): + super(ContributionNodeQuery, self).__init__() + self.contribution_ids = contribution_ids + self.include_provider_details = include_provider_details + self.query_options = query_options diff --git a/vsts/vsts/contributions/v4_0/models/contribution_node_query_result.py b/vsts/vsts/contributions/v4_0/models/contribution_node_query_result.py new file mode 100644 index 00000000..902bac31 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution_node_query_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionNodeQueryResult(Model): + """ContributionNodeQueryResult. + + :param nodes: Map of contribution ids to corresponding node. + :type nodes: dict + :param provider_details: Map of provder ids to the corresponding provider details object. + :type provider_details: dict + """ + + _attribute_map = { + 'nodes': {'key': 'nodes', 'type': '{SerializedContributionNode}'}, + 'provider_details': {'key': 'providerDetails', 'type': '{ContributionProviderDetails}'} + } + + def __init__(self, nodes=None, provider_details=None): + super(ContributionNodeQueryResult, self).__init__() + self.nodes = nodes + self.provider_details = provider_details diff --git a/vsts/vsts/contributions/v4_0/models/contribution_property_description.py b/vsts/vsts/contributions/v4_0/models/contribution_property_description.py new file mode 100644 index 00000000..d4684adf --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution_property_description.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionPropertyDescription(Model): + """ContributionPropertyDescription. + + :param description: Description of the property + :type description: str + :param name: Name of the property + :type name: str + :param required: True if this property is required + :type required: bool + :param type: The type of value used for this property + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, required=None, type=None): + super(ContributionPropertyDescription, self).__init__() + self.description = description + self.name = name + self.required = required + self.type = type diff --git a/vsts/vsts/contributions/v4_0/models/contribution_provider_details.py b/vsts/vsts/contributions/v4_0/models/contribution_provider_details.py new file mode 100644 index 00000000..0cdda303 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution_provider_details.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionProviderDetails(Model): + """ContributionProviderDetails. + + :param display_name: Friendly name for the provider. + :type display_name: str + :param name: Unique identifier for this provider. The provider name can be used to cache the contribution data and refer back to it when looking for changes + :type name: str + :param properties: Properties associated with the provider + :type properties: dict + :param version: Version of contributions assoicated with this contribution provider. + :type version: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, display_name=None, name=None, properties=None, version=None): + super(ContributionProviderDetails, self).__init__() + self.display_name = display_name + self.name = name + self.properties = properties + self.version = version diff --git a/vsts/vsts/contributions/v4_0/models/contribution_type.py b/vsts/vsts/contributions/v4_0/models/contribution_type.py new file mode 100644 index 00000000..4eda81f4 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/contribution_type.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class ContributionType(ContributionBase): + """ContributionType. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param indexed: Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type. NOTE: Only TrustedPartners are allowed to specify indexed contribution types. + :type indexed: bool + :param name: Friendly name of the contribution/type + :type name: str + :param properties: Describes the allowed properties for this contribution type + :type properties: dict + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'indexed': {'key': 'indexed', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{ContributionPropertyDescription}'} + } + + def __init__(self, description=None, id=None, visible_to=None, indexed=None, name=None, properties=None): + super(ContributionType, self).__init__(description=description, id=id, visible_to=visible_to) + self.indexed = indexed + self.name = name + self.properties = properties diff --git a/vsts/vsts/contributions/v4_0/models/data_provider_context.py b/vsts/vsts/contributions/v4_0/models/data_provider_context.py new file mode 100644 index 00000000..c57c845d --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/data_provider_context.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderContext(Model): + """DataProviderContext. + + :param properties: Generic property bag that contains context-specific properties that data providers can use when populating their data dictionary + :type properties: dict + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{object}'} + } + + def __init__(self, properties=None): + super(DataProviderContext, self).__init__() + self.properties = properties diff --git a/vsts/vsts/contributions/v4_0/models/data_provider_exception_details.py b/vsts/vsts/contributions/v4_0/models/data_provider_exception_details.py new file mode 100644 index 00000000..96c3b8c7 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/data_provider_exception_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderExceptionDetails(Model): + """DataProviderExceptionDetails. + + :param exception_type: The type of the exception that was thrown. + :type exception_type: str + :param message: Message that is associated with the exception. + :type message: str + :param stack_trace: The StackTrace from the exception turned into a string. + :type stack_trace: str + """ + + _attribute_map = { + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'} + } + + def __init__(self, exception_type=None, message=None, stack_trace=None): + super(DataProviderExceptionDetails, self).__init__() + self.exception_type = exception_type + self.message = message + self.stack_trace = stack_trace diff --git a/vsts/vsts/contributions/v4_0/models/data_provider_query.py b/vsts/vsts/contributions/v4_0/models/data_provider_query.py new file mode 100644 index 00000000..221d4cb3 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/data_provider_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderQuery(Model): + """DataProviderQuery. + + :param context: Contextual information to pass to the data providers + :type context: :class:`DataProviderContext ` + :param contribution_ids: The contribution ids of the data providers to resolve + :type contribution_ids: list of str + """ + + _attribute_map = { + 'context': {'key': 'context', 'type': 'DataProviderContext'}, + 'contribution_ids': {'key': 'contributionIds', 'type': '[str]'} + } + + def __init__(self, context=None, contribution_ids=None): + super(DataProviderQuery, self).__init__() + self.context = context + self.contribution_ids = contribution_ids diff --git a/vsts/vsts/contributions/v4_0/models/data_provider_result.py b/vsts/vsts/contributions/v4_0/models/data_provider_result.py new file mode 100644 index 00000000..e7b519fc --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/data_provider_result.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderResult(Model): + """DataProviderResult. + + :param client_providers: This is the set of data providers that were requested, but either they were defined as client providers, or as remote providers that failed and may be retried by the client. + :type client_providers: dict + :param data: Property bag of data keyed off of the data provider contribution id + :type data: dict + :param exceptions: Set of exceptions that occurred resolving the data providers. + :type exceptions: dict + :param resolved_providers: List of data providers resolved in the data-provider query + :type resolved_providers: list of :class:`ResolvedDataProvider ` + :param shared_data: Property bag of shared data that was contributed to by any of the individual data providers + :type shared_data: dict + """ + + _attribute_map = { + 'client_providers': {'key': 'clientProviders', 'type': '{ClientDataProviderQuery}'}, + 'data': {'key': 'data', 'type': '{object}'}, + 'exceptions': {'key': 'exceptions', 'type': '{DataProviderExceptionDetails}'}, + 'resolved_providers': {'key': 'resolvedProviders', 'type': '[ResolvedDataProvider]'}, + 'shared_data': {'key': 'sharedData', 'type': '{object}'} + } + + def __init__(self, client_providers=None, data=None, exceptions=None, resolved_providers=None, shared_data=None): + super(DataProviderResult, self).__init__() + self.client_providers = client_providers + self.data = data + self.exceptions = exceptions + self.resolved_providers = resolved_providers + self.shared_data = shared_data diff --git a/vsts/vsts/contributions/v4_0/models/extension_event_callback.py b/vsts/vsts/contributions/v4_0/models/extension_event_callback.py new file mode 100644 index 00000000..59ab677a --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/extension_event_callback.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallback(Model): + """ExtensionEventCallback. + + :param uri: The uri of the endpoint that is hit when an event occurs + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, uri=None): + super(ExtensionEventCallback, self).__init__() + self.uri = uri diff --git a/vsts/vsts/contributions/v4_0/models/extension_event_callback_collection.py b/vsts/vsts/contributions/v4_0/models/extension_event_callback_collection.py new file mode 100644 index 00000000..d455ef88 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/extension_event_callback_collection.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallbackCollection(Model): + """ExtensionEventCallbackCollection. + + :param post_disable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension disable has occurred. + :type post_disable: :class:`ExtensionEventCallback ` + :param post_enable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension enable has occurred. + :type post_enable: :class:`ExtensionEventCallback ` + :param post_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install has completed. + :type post_install: :class:`ExtensionEventCallback ` + :param post_uninstall: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension uninstall has occurred. + :type post_uninstall: :class:`ExtensionEventCallback ` + :param post_update: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension update has occurred. + :type post_update: :class:`ExtensionEventCallback ` + :param pre_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install is about to occur. Response indicates whether to proceed or abort. + :type pre_install: :class:`ExtensionEventCallback ` + :param version_check: For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used + :type version_check: :class:`ExtensionEventCallback ` + """ + + _attribute_map = { + 'post_disable': {'key': 'postDisable', 'type': 'ExtensionEventCallback'}, + 'post_enable': {'key': 'postEnable', 'type': 'ExtensionEventCallback'}, + 'post_install': {'key': 'postInstall', 'type': 'ExtensionEventCallback'}, + 'post_uninstall': {'key': 'postUninstall', 'type': 'ExtensionEventCallback'}, + 'post_update': {'key': 'postUpdate', 'type': 'ExtensionEventCallback'}, + 'pre_install': {'key': 'preInstall', 'type': 'ExtensionEventCallback'}, + 'version_check': {'key': 'versionCheck', 'type': 'ExtensionEventCallback'} + } + + def __init__(self, post_disable=None, post_enable=None, post_install=None, post_uninstall=None, post_update=None, pre_install=None, version_check=None): + super(ExtensionEventCallbackCollection, self).__init__() + self.post_disable = post_disable + self.post_enable = post_enable + self.post_install = post_install + self.post_uninstall = post_uninstall + self.post_update = post_update + self.pre_install = pre_install + self.version_check = version_check diff --git a/vsts/vsts/contributions/v4_0/models/extension_file.py b/vsts/vsts/contributions/v4_0/models/extension_file.py new file mode 100644 index 00000000..ba792fd5 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/extension_file.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFile(Model): + """ExtensionFile. + + :param asset_type: + :type asset_type: str + :param content_type: + :type content_type: str + :param file_id: + :type file_id: int + :param is_default: + :type is_default: bool + :param is_public: + :type is_public: bool + :param language: + :type language: str + :param short_description: + :type short_description: str + :param source: + :type source: str + :param version: + :type version: str + """ + + _attribute_map = { + 'asset_type': {'key': 'assetType', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_public': {'key': 'isPublic', 'type': 'bool'}, + 'language': {'key': 'language', 'type': 'str'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, asset_type=None, content_type=None, file_id=None, is_default=None, is_public=None, language=None, short_description=None, source=None, version=None): + super(ExtensionFile, self).__init__() + self.asset_type = asset_type + self.content_type = content_type + self.file_id = file_id + self.is_default = is_default + self.is_public = is_public + self.language = language + self.short_description = short_description + self.source = source + self.version = version diff --git a/vsts/vsts/contributions/v4_0/models/extension_licensing.py b/vsts/vsts/contributions/v4_0/models/extension_licensing.py new file mode 100644 index 00000000..286cbcdc --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/extension_licensing.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionLicensing(Model): + """ExtensionLicensing. + + :param overrides: A list of contributions which deviate from the default licensing behavior + :type overrides: list of :class:`LicensingOverride ` + """ + + _attribute_map = { + 'overrides': {'key': 'overrides', 'type': '[LicensingOverride]'} + } + + def __init__(self, overrides=None): + super(ExtensionLicensing, self).__init__() + self.overrides = overrides diff --git a/vsts/vsts/contributions/v4_0/models/extension_manifest.py b/vsts/vsts/contributions/v4_0/models/extension_manifest.py new file mode 100644 index 00000000..dff371a9 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/extension_manifest.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionManifest(Model): + """ExtensionManifest. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'} + } + + def __init__(self, base_uri=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, scopes=None, service_instance_type=None): + super(ExtensionManifest, self).__init__() + self.base_uri = base_uri + self.contributions = contributions + self.contribution_types = contribution_types + self.demands = demands + self.event_callbacks = event_callbacks + self.fallback_base_uri = fallback_base_uri + self.language = language + self.licensing = licensing + self.manifest_version = manifest_version + self.scopes = scopes + self.service_instance_type = service_instance_type diff --git a/vsts/vsts/contributions/v4_0/models/installed_extension.py b/vsts/vsts/contributions/v4_0/models/installed_extension.py new file mode 100644 index 00000000..e8f24964 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/installed_extension.py @@ -0,0 +1,94 @@ +# -------------------------------------------------------------------------------------------- +# 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 .extension_manifest import ExtensionManifest + + +class InstalledExtension(ExtensionManifest): + """InstalledExtension. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + :param extension_id: The friendly extension id for this extension - unique for a given publisher. + :type extension_id: str + :param extension_name: The display name of the extension. + :type extension_name: str + :param files: This is the set of files available from the extension. + :type files: list of :class:`ExtensionFile ` + :param flags: Extension flags relevant to contribution consumers + :type flags: object + :param install_state: Information about this particular installation of the extension + :type install_state: :class:`InstalledExtensionState ` + :param last_published: This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension. + :type last_published: datetime + :param publisher_id: Unique id of the publisher of this extension + :type publisher_id: str + :param publisher_name: The display name of the publisher + :type publisher_name: str + :param registration_id: Unique id for this extension (the same id is used for all versions of a single extension) + :type registration_id: str + :param version: Version of this extension + :type version: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'install_state': {'key': 'installState', 'type': 'InstalledExtensionState'}, + 'last_published': {'key': 'lastPublished', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, base_uri=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, scopes=None, service_instance_type=None, extension_id=None, extension_name=None, files=None, flags=None, install_state=None, last_published=None, publisher_id=None, publisher_name=None, registration_id=None, version=None): + super(InstalledExtension, self).__init__(base_uri=base_uri, contributions=contributions, contribution_types=contribution_types, demands=demands, event_callbacks=event_callbacks, fallback_base_uri=fallback_base_uri, language=language, licensing=licensing, manifest_version=manifest_version, scopes=scopes, service_instance_type=service_instance_type) + self.extension_id = extension_id + self.extension_name = extension_name + self.files = files + self.flags = flags + self.install_state = install_state + self.last_published = last_published + self.publisher_id = publisher_id + self.publisher_name = publisher_name + self.registration_id = registration_id + self.version = version diff --git a/vsts/vsts/contributions/v4_0/models/installed_extension_state.py b/vsts/vsts/contributions/v4_0/models/installed_extension_state.py new file mode 100644 index 00000000..e612084b --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/installed_extension_state.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionState(Model): + """InstalledExtensionState. + + :param flags: States of an installed extension + :type flags: object + :param installation_issues: List of installation issues + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :param last_updated: The time at which this installation was last updated + :type last_updated: datetime + """ + + _attribute_map = { + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_issues': {'key': 'installationIssues', 'type': '[InstalledExtensionStateIssue]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'} + } + + def __init__(self, flags=None, installation_issues=None, last_updated=None): + super(InstalledExtensionState, self).__init__() + self.flags = flags + self.installation_issues = installation_issues + self.last_updated = last_updated diff --git a/vsts/vsts/contributions/v4_0/models/installed_extension_state_issue.py b/vsts/vsts/contributions/v4_0/models/installed_extension_state_issue.py new file mode 100644 index 00000000..e66bb556 --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/installed_extension_state_issue.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionStateIssue(Model): + """InstalledExtensionStateIssue. + + :param message: The error message + :type message: str + :param source: Source of the installation issue, for example "Demands" + :type source: str + :param type: Installation issue type (Warning, Error) + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, source=None, type=None): + super(InstalledExtensionStateIssue, self).__init__() + self.message = message + self.source = source + self.type = type diff --git a/vsts/vsts/contributions/v4_0/models/licensing_override.py b/vsts/vsts/contributions/v4_0/models/licensing_override.py new file mode 100644 index 00000000..7812d57f --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/licensing_override.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 LicensingOverride(Model): + """LicensingOverride. + + :param behavior: How the inclusion of this contribution should change based on licensing + :type behavior: object + :param id: Fully qualified contribution id which we want to define licensing behavior for + :type id: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, behavior=None, id=None): + super(LicensingOverride, self).__init__() + self.behavior = behavior + self.id = id diff --git a/vsts/vsts/contributions/v4_0/models/resolved_data_provider.py b/vsts/vsts/contributions/v4_0/models/resolved_data_provider.py new file mode 100644 index 00000000..75845c8e --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/resolved_data_provider.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResolvedDataProvider(Model): + """ResolvedDataProvider. + + :param duration: The total time the data provider took to resolve its data (in milliseconds) + :type duration: number + :param error: + :type error: str + :param id: + :type id: str + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'number'}, + 'error': {'key': 'error', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, duration=None, error=None, id=None): + super(ResolvedDataProvider, self).__init__() + self.duration = duration + self.error = error + self.id = id diff --git a/vsts/vsts/contributions/v4_0/models/serialized_contribution_node.py b/vsts/vsts/contributions/v4_0/models/serialized_contribution_node.py new file mode 100644 index 00000000..e89e08ae --- /dev/null +++ b/vsts/vsts/contributions/v4_0/models/serialized_contribution_node.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SerializedContributionNode(Model): + """SerializedContributionNode. + + :param children: List of ids for contributions which are children to the current contribution. + :type children: list of str + :param contribution: Contribution associated with this node. + :type contribution: :class:`Contribution ` + :param parents: List of ids for contributions which are parents to the current contribution. + :type parents: list of str + """ + + _attribute_map = { + 'children': {'key': 'children', 'type': '[str]'}, + 'contribution': {'key': 'contribution', 'type': 'Contribution'}, + 'parents': {'key': 'parents', 'type': '[str]'} + } + + def __init__(self, children=None, contribution=None, parents=None): + super(SerializedContributionNode, self).__init__() + self.children = children + self.contribution = contribution + self.parents = parents diff --git a/vsts/vsts/contributions/v4_1/__init__.py b/vsts/vsts/contributions/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/contributions/v4_1/contributions_client.py b/vsts/vsts/contributions/v4_1/contributions_client.py new file mode 100644 index 00000000..be4e8395 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/contributions_client.py @@ -0,0 +1,109 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ContributionsClient(VssClient): + """Contributions + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ContributionsClient, 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 = '8477aec9-a4c7-4bd4-a456-ba4c53c989cb' + + def query_contribution_nodes(self, query): + """QueryContributionNodes. + [Preview API] Query for contribution nodes and provider details according the parameters in the passed in query object. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'ContributionNodeQuery') + response = self._send(http_method='POST', + location_id='db7f2146-2309-4cee-b39c-c767777a1c55', + version='4.1-preview.1', + content=content) + return self._deserialize('ContributionNodeQueryResult', response) + + def query_data_providers(self, query, scope_name=None, scope_value=None): + """QueryDataProviders. + [Preview API] + :param :class:` ` query: + :param str scope_name: + :param str scope_value: + :rtype: :class:` ` + """ + route_values = {} + if scope_name is not None: + route_values['scopeName'] = self._serialize.url('scope_name', scope_name, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + content = self._serialize.body(query, 'DataProviderQuery') + response = self._send(http_method='POST', + location_id='738368db-35ee-4b85-9f94-77ed34af2b0d', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DataProviderResult', response) + + def get_installed_extensions(self, contribution_ids=None, include_disabled_apps=None, asset_types=None): + """GetInstalledExtensions. + [Preview API] + :param [str] contribution_ids: + :param bool include_disabled_apps: + :param [str] asset_types: + :rtype: [InstalledExtension] + """ + query_parameters = {} + if contribution_ids is not None: + contribution_ids = ";".join(contribution_ids) + query_parameters['contributionIds'] = self._serialize.query('contribution_ids', contribution_ids, 'str') + if include_disabled_apps is not None: + query_parameters['includeDisabledApps'] = self._serialize.query('include_disabled_apps', include_disabled_apps, 'bool') + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + response = self._send(http_method='GET', + location_id='2648442b-fd63-4b9a-902f-0c913510f139', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[InstalledExtension]', response) + + def get_installed_extension_by_name(self, publisher_name, extension_name, asset_types=None): + """GetInstalledExtensionByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param [str] asset_types: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + response = self._send(http_method='GET', + location_id='3e2f6668-0798-4dcb-b592-bfe2fa57fde2', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('InstalledExtension', response) + diff --git a/vsts/vsts/contributions/v4_1/models/__init__.py b/vsts/vsts/contributions/v4_1/models/__init__.py new file mode 100644 index 00000000..475ee422 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/__init__.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 .client_contribution import ClientContribution +from .client_contribution_node import ClientContributionNode +from .client_contribution_provider_details import ClientContributionProviderDetails +from .client_data_provider_query import ClientDataProviderQuery +from .contribution import Contribution +from .contribution_base import ContributionBase +from .contribution_constraint import ContributionConstraint +from .contribution_node_query import ContributionNodeQuery +from .contribution_node_query_result import ContributionNodeQueryResult +from .contribution_property_description import ContributionPropertyDescription +from .contribution_type import ContributionType +from .data_provider_context import DataProviderContext +from .data_provider_exception_details import DataProviderExceptionDetails +from .data_provider_query import DataProviderQuery +from .data_provider_result import DataProviderResult +from .extension_event_callback import ExtensionEventCallback +from .extension_event_callback_collection import ExtensionEventCallbackCollection +from .extension_file import ExtensionFile +from .extension_licensing import ExtensionLicensing +from .extension_manifest import ExtensionManifest +from .installed_extension import InstalledExtension +from .installed_extension_state import InstalledExtensionState +from .installed_extension_state_issue import InstalledExtensionStateIssue +from .licensing_override import LicensingOverride +from .resolved_data_provider import ResolvedDataProvider + +__all__ = [ + 'ClientContribution', + 'ClientContributionNode', + 'ClientContributionProviderDetails', + 'ClientDataProviderQuery', + 'Contribution', + 'ContributionBase', + 'ContributionConstraint', + 'ContributionNodeQuery', + 'ContributionNodeQueryResult', + 'ContributionPropertyDescription', + 'ContributionType', + 'DataProviderContext', + 'DataProviderExceptionDetails', + 'DataProviderQuery', + 'DataProviderResult', + 'ExtensionEventCallback', + 'ExtensionEventCallbackCollection', + 'ExtensionFile', + 'ExtensionLicensing', + 'ExtensionManifest', + 'InstalledExtension', + 'InstalledExtensionState', + 'InstalledExtensionStateIssue', + 'LicensingOverride', + 'ResolvedDataProvider', +] diff --git a/vsts/vsts/contributions/v4_1/models/client_data_provider_query.py b/vsts/vsts/contributions/v4_1/models/client_data_provider_query.py new file mode 100644 index 00000000..0c7ebb73 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/client_data_provider_query.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# 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 .data_provider_query import DataProviderQuery + + +class ClientDataProviderQuery(DataProviderQuery): + """ClientDataProviderQuery. + + :param context: Contextual information to pass to the data providers + :type context: :class:`DataProviderContext ` + :param contribution_ids: The contribution ids of the data providers to resolve + :type contribution_ids: list of str + :param query_service_instance_type: The Id of the service instance type that should be communicated with in order to resolve the data providers from the client given the query values. + :type query_service_instance_type: str + """ + + _attribute_map = { + 'context': {'key': 'context', 'type': 'DataProviderContext'}, + 'contribution_ids': {'key': 'contributionIds', 'type': '[str]'}, + 'query_service_instance_type': {'key': 'queryServiceInstanceType', 'type': 'str'} + } + + def __init__(self, context=None, contribution_ids=None, query_service_instance_type=None): + super(ClientDataProviderQuery, self).__init__(context=context, contribution_ids=contribution_ids) + self.query_service_instance_type = query_service_instance_type diff --git a/vsts/vsts/contributions/v4_1/models/contribution.py b/vsts/vsts/contributions/v4_1/models/contribution.py new file mode 100644 index 00000000..5a48a8b7 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/contribution.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class Contribution(ContributionBase): + """Contribution. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param constraints: List of constraints (filters) that should be applied to the availability of this contribution + :type constraints: list of :class:`ContributionConstraint ` + :param includes: Includes is a set of contributions that should have this contribution included in their targets list. + :type includes: list of str + :param properties: Properties/attributes of this contribution + :type properties: :class:`object ` + :param restricted_to: List of demanded claims in order for the user to see this contribution (like anonymous, public, member...). + :type restricted_to: list of str + :param targets: The ids of the contribution(s) that this contribution targets. (parent contributions) + :type targets: list of str + :param type: Id of the Contribution Type + :type type: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'includes': {'key': 'includes', 'type': '[str]'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'restricted_to': {'key': 'restrictedTo', 'type': '[str]'}, + 'targets': {'key': 'targets', 'type': '[str]'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, description=None, id=None, visible_to=None, constraints=None, includes=None, properties=None, restricted_to=None, targets=None, type=None): + super(Contribution, self).__init__(description=description, id=id, visible_to=visible_to) + self.constraints = constraints + self.includes = includes + self.properties = properties + self.restricted_to = restricted_to + self.targets = targets + self.type = type diff --git a/vsts/vsts/contributions/v4_1/models/contribution_base.py b/vsts/vsts/contributions/v4_1/models/contribution_base.py new file mode 100644 index 00000000..4a2402c0 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/contribution_base.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionBase(Model): + """ContributionBase. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'} + } + + def __init__(self, description=None, id=None, visible_to=None): + super(ContributionBase, self).__init__() + self.description = description + self.id = id + self.visible_to = visible_to diff --git a/vsts/vsts/contributions/v4_1/models/contribution_constraint.py b/vsts/vsts/contributions/v4_1/models/contribution_constraint.py new file mode 100644 index 00000000..a26d702e --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/contribution_constraint.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionConstraint(Model): + """ContributionConstraint. + + :param group: An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included). + :type group: int + :param id: Fully qualified identifier of a shared constraint + :type id: str + :param inverse: If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true) + :type inverse: bool + :param name: Name of the IContributionFilter plugin + :type name: str + :param properties: Properties that are fed to the contribution filter class + :type properties: :class:`object ` + :param relationships: Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will elimiate the contribution from the tree completely if the constraint is applied. + :type relationships: list of str + """ + + _attribute_map = { + 'group': {'key': 'group', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inverse': {'key': 'inverse', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'relationships': {'key': 'relationships', 'type': '[str]'} + } + + def __init__(self, group=None, id=None, inverse=None, name=None, properties=None, relationships=None): + super(ContributionConstraint, self).__init__() + self.group = group + self.id = id + self.inverse = inverse + self.name = name + self.properties = properties + self.relationships = relationships diff --git a/vsts/vsts/contributions/v4_1/models/contribution_node_query.py b/vsts/vsts/contributions/v4_1/models/contribution_node_query.py new file mode 100644 index 00000000..39d2c5ad --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/contribution_node_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionNodeQuery(Model): + """ContributionNodeQuery. + + :param contribution_ids: The contribution ids of the nodes to find. + :type contribution_ids: list of str + :param include_provider_details: Indicator if contribution provider details should be included in the result. + :type include_provider_details: bool + :param query_options: Query options tpo be used when fetching ContributionNodes + :type query_options: object + """ + + _attribute_map = { + 'contribution_ids': {'key': 'contributionIds', 'type': '[str]'}, + 'include_provider_details': {'key': 'includeProviderDetails', 'type': 'bool'}, + 'query_options': {'key': 'queryOptions', 'type': 'object'} + } + + def __init__(self, contribution_ids=None, include_provider_details=None, query_options=None): + super(ContributionNodeQuery, self).__init__() + self.contribution_ids = contribution_ids + self.include_provider_details = include_provider_details + self.query_options = query_options diff --git a/vsts/vsts/contributions/v4_1/models/contribution_node_query_result.py b/vsts/vsts/contributions/v4_1/models/contribution_node_query_result.py new file mode 100644 index 00000000..4fc173df --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/contribution_node_query_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionNodeQueryResult(Model): + """ContributionNodeQueryResult. + + :param nodes: Map of contribution ids to corresponding node. + :type nodes: dict + :param provider_details: Map of provder ids to the corresponding provider details object. + :type provider_details: dict + """ + + _attribute_map = { + 'nodes': {'key': 'nodes', 'type': '{ClientContributionNode}'}, + 'provider_details': {'key': 'providerDetails', 'type': '{ClientContributionProviderDetails}'} + } + + def __init__(self, nodes=None, provider_details=None): + super(ContributionNodeQueryResult, self).__init__() + self.nodes = nodes + self.provider_details = provider_details diff --git a/vsts/vsts/contributions/v4_1/models/contribution_property_description.py b/vsts/vsts/contributions/v4_1/models/contribution_property_description.py new file mode 100644 index 00000000..d4684adf --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/contribution_property_description.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionPropertyDescription(Model): + """ContributionPropertyDescription. + + :param description: Description of the property + :type description: str + :param name: Name of the property + :type name: str + :param required: True if this property is required + :type required: bool + :param type: The type of value used for this property + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, required=None, type=None): + super(ContributionPropertyDescription, self).__init__() + self.description = description + self.name = name + self.required = required + self.type = type diff --git a/vsts/vsts/contributions/v4_1/models/contribution_type.py b/vsts/vsts/contributions/v4_1/models/contribution_type.py new file mode 100644 index 00000000..4eda81f4 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/contribution_type.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class ContributionType(ContributionBase): + """ContributionType. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param indexed: Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type. NOTE: Only TrustedPartners are allowed to specify indexed contribution types. + :type indexed: bool + :param name: Friendly name of the contribution/type + :type name: str + :param properties: Describes the allowed properties for this contribution type + :type properties: dict + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'indexed': {'key': 'indexed', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{ContributionPropertyDescription}'} + } + + def __init__(self, description=None, id=None, visible_to=None, indexed=None, name=None, properties=None): + super(ContributionType, self).__init__(description=description, id=id, visible_to=visible_to) + self.indexed = indexed + self.name = name + self.properties = properties diff --git a/vsts/vsts/contributions/v4_1/models/data_provider_context.py b/vsts/vsts/contributions/v4_1/models/data_provider_context.py new file mode 100644 index 00000000..c57c845d --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/data_provider_context.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderContext(Model): + """DataProviderContext. + + :param properties: Generic property bag that contains context-specific properties that data providers can use when populating their data dictionary + :type properties: dict + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': '{object}'} + } + + def __init__(self, properties=None): + super(DataProviderContext, self).__init__() + self.properties = properties diff --git a/vsts/vsts/contributions/v4_1/models/data_provider_exception_details.py b/vsts/vsts/contributions/v4_1/models/data_provider_exception_details.py new file mode 100644 index 00000000..96c3b8c7 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/data_provider_exception_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderExceptionDetails(Model): + """DataProviderExceptionDetails. + + :param exception_type: The type of the exception that was thrown. + :type exception_type: str + :param message: Message that is associated with the exception. + :type message: str + :param stack_trace: The StackTrace from the exception turned into a string. + :type stack_trace: str + """ + + _attribute_map = { + 'exception_type': {'key': 'exceptionType', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'} + } + + def __init__(self, exception_type=None, message=None, stack_trace=None): + super(DataProviderExceptionDetails, self).__init__() + self.exception_type = exception_type + self.message = message + self.stack_trace = stack_trace diff --git a/vsts/vsts/contributions/v4_1/models/data_provider_query.py b/vsts/vsts/contributions/v4_1/models/data_provider_query.py new file mode 100644 index 00000000..2ca45e9c --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/data_provider_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderQuery(Model): + """DataProviderQuery. + + :param context: Contextual information to pass to the data providers + :type context: :class:`DataProviderContext ` + :param contribution_ids: The contribution ids of the data providers to resolve + :type contribution_ids: list of str + """ + + _attribute_map = { + 'context': {'key': 'context', 'type': 'DataProviderContext'}, + 'contribution_ids': {'key': 'contributionIds', 'type': '[str]'} + } + + def __init__(self, context=None, contribution_ids=None): + super(DataProviderQuery, self).__init__() + self.context = context + self.contribution_ids = contribution_ids diff --git a/vsts/vsts/contributions/v4_1/models/data_provider_result.py b/vsts/vsts/contributions/v4_1/models/data_provider_result.py new file mode 100644 index 00000000..0d9783d5 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/data_provider_result.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataProviderResult(Model): + """DataProviderResult. + + :param client_providers: This is the set of data providers that were requested, but either they were defined as client providers, or as remote providers that failed and may be retried by the client. + :type client_providers: dict + :param data: Property bag of data keyed off of the data provider contribution id + :type data: dict + :param exceptions: Set of exceptions that occurred resolving the data providers. + :type exceptions: dict + :param resolved_providers: List of data providers resolved in the data-provider query + :type resolved_providers: list of :class:`ResolvedDataProvider ` + :param scope_name: Scope name applied to this data provider result. + :type scope_name: str + :param scope_value: Scope value applied to this data provider result. + :type scope_value: str + :param shared_data: Property bag of shared data that was contributed to by any of the individual data providers + :type shared_data: dict + """ + + _attribute_map = { + 'client_providers': {'key': 'clientProviders', 'type': '{ClientDataProviderQuery}'}, + 'data': {'key': 'data', 'type': '{object}'}, + 'exceptions': {'key': 'exceptions', 'type': '{DataProviderExceptionDetails}'}, + 'resolved_providers': {'key': 'resolvedProviders', 'type': '[ResolvedDataProvider]'}, + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'scope_value': {'key': 'scopeValue', 'type': 'str'}, + 'shared_data': {'key': 'sharedData', 'type': '{object}'} + } + + def __init__(self, client_providers=None, data=None, exceptions=None, resolved_providers=None, scope_name=None, scope_value=None, shared_data=None): + super(DataProviderResult, self).__init__() + self.client_providers = client_providers + self.data = data + self.exceptions = exceptions + self.resolved_providers = resolved_providers + self.scope_name = scope_name + self.scope_value = scope_value + self.shared_data = shared_data diff --git a/vsts/vsts/contributions/v4_1/models/extension_event_callback.py b/vsts/vsts/contributions/v4_1/models/extension_event_callback.py new file mode 100644 index 00000000..59ab677a --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/extension_event_callback.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallback(Model): + """ExtensionEventCallback. + + :param uri: The uri of the endpoint that is hit when an event occurs + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, uri=None): + super(ExtensionEventCallback, self).__init__() + self.uri = uri diff --git a/vsts/vsts/contributions/v4_1/models/extension_event_callback_collection.py b/vsts/vsts/contributions/v4_1/models/extension_event_callback_collection.py new file mode 100644 index 00000000..66f88d72 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/extension_event_callback_collection.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallbackCollection(Model): + """ExtensionEventCallbackCollection. + + :param post_disable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension disable has occurred. + :type post_disable: :class:`ExtensionEventCallback ` + :param post_enable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension enable has occurred. + :type post_enable: :class:`ExtensionEventCallback ` + :param post_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install has completed. + :type post_install: :class:`ExtensionEventCallback ` + :param post_uninstall: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension uninstall has occurred. + :type post_uninstall: :class:`ExtensionEventCallback ` + :param post_update: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension update has occurred. + :type post_update: :class:`ExtensionEventCallback ` + :param pre_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install is about to occur. Response indicates whether to proceed or abort. + :type pre_install: :class:`ExtensionEventCallback ` + :param version_check: For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used + :type version_check: :class:`ExtensionEventCallback ` + """ + + _attribute_map = { + 'post_disable': {'key': 'postDisable', 'type': 'ExtensionEventCallback'}, + 'post_enable': {'key': 'postEnable', 'type': 'ExtensionEventCallback'}, + 'post_install': {'key': 'postInstall', 'type': 'ExtensionEventCallback'}, + 'post_uninstall': {'key': 'postUninstall', 'type': 'ExtensionEventCallback'}, + 'post_update': {'key': 'postUpdate', 'type': 'ExtensionEventCallback'}, + 'pre_install': {'key': 'preInstall', 'type': 'ExtensionEventCallback'}, + 'version_check': {'key': 'versionCheck', 'type': 'ExtensionEventCallback'} + } + + def __init__(self, post_disable=None, post_enable=None, post_install=None, post_uninstall=None, post_update=None, pre_install=None, version_check=None): + super(ExtensionEventCallbackCollection, self).__init__() + self.post_disable = post_disable + self.post_enable = post_enable + self.post_install = post_install + self.post_uninstall = post_uninstall + self.post_update = post_update + self.pre_install = pre_install + self.version_check = version_check diff --git a/vsts/vsts/contributions/v4_1/models/extension_file.py b/vsts/vsts/contributions/v4_1/models/extension_file.py new file mode 100644 index 00000000..1b505e97 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/extension_file.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFile(Model): + """ExtensionFile. + + :param asset_type: + :type asset_type: str + :param language: + :type language: str + :param source: + :type source: str + """ + + _attribute_map = { + 'asset_type': {'key': 'assetType', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'} + } + + def __init__(self, asset_type=None, language=None, source=None): + super(ExtensionFile, self).__init__() + self.asset_type = asset_type + self.language = language + self.source = source diff --git a/vsts/vsts/contributions/v4_1/models/extension_licensing.py b/vsts/vsts/contributions/v4_1/models/extension_licensing.py new file mode 100644 index 00000000..e3e28265 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/extension_licensing.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionLicensing(Model): + """ExtensionLicensing. + + :param overrides: A list of contributions which deviate from the default licensing behavior + :type overrides: list of :class:`LicensingOverride ` + """ + + _attribute_map = { + 'overrides': {'key': 'overrides', 'type': '[LicensingOverride]'} + } + + def __init__(self, overrides=None): + super(ExtensionLicensing, self).__init__() + self.overrides = overrides diff --git a/vsts/vsts/contributions/v4_1/models/extension_manifest.py b/vsts/vsts/contributions/v4_1/models/extension_manifest.py new file mode 100644 index 00000000..2b8a5c1e --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/extension_manifest.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionManifest(Model): + """ExtensionManifest. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param constraints: List of shared constraints defined by this extension + :type constraints: list of :class:`ContributionConstraint ` + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution. + :type restricted_to: list of str + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'restricted_to': {'key': 'restrictedTo', 'type': '[str]'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'} + } + + def __init__(self, base_uri=None, constraints=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, restricted_to=None, scopes=None, service_instance_type=None): + super(ExtensionManifest, self).__init__() + self.base_uri = base_uri + self.constraints = constraints + self.contributions = contributions + self.contribution_types = contribution_types + self.demands = demands + self.event_callbacks = event_callbacks + self.fallback_base_uri = fallback_base_uri + self.language = language + self.licensing = licensing + self.manifest_version = manifest_version + self.restricted_to = restricted_to + self.scopes = scopes + self.service_instance_type = service_instance_type diff --git a/vsts/vsts/contributions/v4_1/models/installed_extension.py b/vsts/vsts/contributions/v4_1/models/installed_extension.py new file mode 100644 index 00000000..af0c7ff1 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/installed_extension.py @@ -0,0 +1,100 @@ +# -------------------------------------------------------------------------------------------- +# 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 .extension_manifest import ExtensionManifest + + +class InstalledExtension(ExtensionManifest): + """InstalledExtension. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param constraints: List of shared constraints defined by this extension + :type constraints: list of :class:`ContributionConstraint ` + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution. + :type restricted_to: list of str + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + :param extension_id: The friendly extension id for this extension - unique for a given publisher. + :type extension_id: str + :param extension_name: The display name of the extension. + :type extension_name: str + :param files: This is the set of files available from the extension. + :type files: list of :class:`ExtensionFile ` + :param flags: Extension flags relevant to contribution consumers + :type flags: object + :param install_state: Information about this particular installation of the extension + :type install_state: :class:`InstalledExtensionState ` + :param last_published: This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension. + :type last_published: datetime + :param publisher_id: Unique id of the publisher of this extension + :type publisher_id: str + :param publisher_name: The display name of the publisher + :type publisher_name: str + :param registration_id: Unique id for this extension (the same id is used for all versions of a single extension) + :type registration_id: str + :param version: Version of this extension + :type version: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'restricted_to': {'key': 'restrictedTo', 'type': '[str]'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'install_state': {'key': 'installState', 'type': 'InstalledExtensionState'}, + 'last_published': {'key': 'lastPublished', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, base_uri=None, constraints=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, restricted_to=None, scopes=None, service_instance_type=None, extension_id=None, extension_name=None, files=None, flags=None, install_state=None, last_published=None, publisher_id=None, publisher_name=None, registration_id=None, version=None): + super(InstalledExtension, self).__init__(base_uri=base_uri, constraints=constraints, contributions=contributions, contribution_types=contribution_types, demands=demands, event_callbacks=event_callbacks, fallback_base_uri=fallback_base_uri, language=language, licensing=licensing, manifest_version=manifest_version, restricted_to=restricted_to, scopes=scopes, service_instance_type=service_instance_type) + self.extension_id = extension_id + self.extension_name = extension_name + self.files = files + self.flags = flags + self.install_state = install_state + self.last_published = last_published + self.publisher_id = publisher_id + self.publisher_name = publisher_name + self.registration_id = registration_id + self.version = version diff --git a/vsts/vsts/contributions/v4_1/models/installed_extension_state.py b/vsts/vsts/contributions/v4_1/models/installed_extension_state.py new file mode 100644 index 00000000..30f3c06d --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/installed_extension_state.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionState(Model): + """InstalledExtensionState. + + :param flags: States of an installed extension + :type flags: object + :param installation_issues: List of installation issues + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :param last_updated: The time at which this installation was last updated + :type last_updated: datetime + """ + + _attribute_map = { + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_issues': {'key': 'installationIssues', 'type': '[InstalledExtensionStateIssue]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'} + } + + def __init__(self, flags=None, installation_issues=None, last_updated=None): + super(InstalledExtensionState, self).__init__() + self.flags = flags + self.installation_issues = installation_issues + self.last_updated = last_updated diff --git a/vsts/vsts/contributions/v4_1/models/installed_extension_state_issue.py b/vsts/vsts/contributions/v4_1/models/installed_extension_state_issue.py new file mode 100644 index 00000000..e66bb556 --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/installed_extension_state_issue.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionStateIssue(Model): + """InstalledExtensionStateIssue. + + :param message: The error message + :type message: str + :param source: Source of the installation issue, for example "Demands" + :type source: str + :param type: Installation issue type (Warning, Error) + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, source=None, type=None): + super(InstalledExtensionStateIssue, self).__init__() + self.message = message + self.source = source + self.type = type diff --git a/vsts/vsts/contributions/v4_1/models/licensing_override.py b/vsts/vsts/contributions/v4_1/models/licensing_override.py new file mode 100644 index 00000000..7812d57f --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/licensing_override.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 LicensingOverride(Model): + """LicensingOverride. + + :param behavior: How the inclusion of this contribution should change based on licensing + :type behavior: object + :param id: Fully qualified contribution id which we want to define licensing behavior for + :type id: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, behavior=None, id=None): + super(LicensingOverride, self).__init__() + self.behavior = behavior + self.id = id diff --git a/vsts/vsts/contributions/v4_1/models/resolved_data_provider.py b/vsts/vsts/contributions/v4_1/models/resolved_data_provider.py new file mode 100644 index 00000000..75845c8e --- /dev/null +++ b/vsts/vsts/contributions/v4_1/models/resolved_data_provider.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResolvedDataProvider(Model): + """ResolvedDataProvider. + + :param duration: The total time the data provider took to resolve its data (in milliseconds) + :type duration: number + :param error: + :type error: str + :param id: + :type id: str + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'number'}, + 'error': {'key': 'error', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, duration=None, error=None, id=None): + super(ResolvedDataProvider, self).__init__() + self.duration = duration + self.error = error + self.id = id diff --git a/vsts/vsts/core/v4_0/core_client.py b/vsts/vsts/core/v4_0/core_client.py index 4a5b084b..647e683f 100644 --- a/vsts/vsts/core/v4_0/core_client.py +++ b/vsts/vsts/core/v4_0/core_client.py @@ -18,7 +18,7 @@ class CoreClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(CoreClient, 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) @@ -65,7 +65,7 @@ def get_connected_services(self, project_id, kind=None): """GetConnectedServices. [Preview API] :param str project_id: - :param ConnectedServiceKind kind: + :param str kind: :rtype: [WebApiConnectedService] """ route_values = {} @@ -73,7 +73,7 @@ def get_connected_services(self, project_id, kind=None): route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if kind is not None: - query_parameters['kind'] = self._serialize.query('kind', kind, 'ConnectedServiceKind') + query_parameters['kind'] = self._serialize.query('kind', kind, 'str') response = self._send(http_method='GET', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', version='4.0-preview.1', @@ -258,7 +258,7 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non def get_projects(self, state_filter=None, top=None, skip=None, continuation_token=None): """GetProjects. Get project references with the specified state - :param object state_filter: Filter on team projects in a specific team project state (default: WellFormed). + :param str state_filter: Filter on team projects in a specific team project state (default: WellFormed). :param int top: :param int skip: :param str continuation_token: @@ -266,7 +266,7 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke """ query_parameters = {} if state_filter is not None: - query_parameters['stateFilter'] = self._serialize.query('state_filter', state_filter, 'object') + query_parameters['stateFilter'] = self._serialize.query('state_filter', state_filter, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if skip is not None: diff --git a/vsts/vsts/core/v4_1/core_client.py b/vsts/vsts/core/v4_1/core_client.py index aec44172..2e69d16c 100644 --- a/vsts/vsts/core/v4_1/core_client.py +++ b/vsts/vsts/core/v4_1/core_client.py @@ -18,7 +18,7 @@ class CoreClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(CoreClient, 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) @@ -65,7 +65,7 @@ def get_connected_services(self, project_id, kind=None): """GetConnectedServices. [Preview API] :param str project_id: - :param ConnectedServiceKind kind: + :param str kind: :rtype: [WebApiConnectedService] """ route_values = {} @@ -73,7 +73,7 @@ def get_connected_services(self, project_id, kind=None): route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if kind is not None: - query_parameters['kind'] = self._serialize.query('kind', kind, 'ConnectedServiceKind') + query_parameters['kind'] = self._serialize.query('kind', kind, 'str') response = self._send(http_method='GET', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', version='4.1-preview.1', @@ -82,54 +82,6 @@ def get_connected_services(self, project_id, kind=None): returns_collection=True) return self._deserialize('[WebApiConnectedService]', response) - def create_identity_mru(self, mru_data, mru_name): - """CreateIdentityMru. - [Preview API] - :param :class:` ` mru_data: - :param str mru_name: - """ - route_values = {} - if mru_name is not None: - route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') - content = self._serialize.body(mru_data, 'IdentityData') - self._send(http_method='POST', - location_id='5ead0b70-2572-4697-97e9-f341069a783a', - version='4.1-preview.1', - route_values=route_values, - content=content) - - def get_identity_mru(self, mru_name): - """GetIdentityMru. - [Preview API] - :param str mru_name: - :rtype: [IdentityRef] - """ - route_values = {} - if mru_name is not None: - route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') - response = self._send(http_method='GET', - location_id='5ead0b70-2572-4697-97e9-f341069a783a', - version='4.1-preview.1', - route_values=route_values, - returns_collection=True) - return self._deserialize('[IdentityRef]', response) - - def update_identity_mru(self, mru_data, mru_name): - """UpdateIdentityMru. - [Preview API] - :param :class:` ` mru_data: - :param str mru_name: - """ - route_values = {} - if mru_name is not None: - route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') - content = self._serialize.body(mru_data, 'IdentityData') - self._send(http_method='PATCH', - location_id='5ead0b70-2572-4697-97e9-f341069a783a', - version='4.1-preview.1', - route_values=route_values, - content=content) - def get_team_members_with_extended_properties(self, project_id, team_id, top=None, skip=None): """GetTeamMembersWithExtendedProperties. [Preview API] Get a list of members for a specific team. @@ -259,7 +211,7 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non def get_projects(self, state_filter=None, top=None, skip=None, continuation_token=None): """GetProjects. [Preview API] Get project references with the specified state - :param object state_filter: Filter on team projects in a specific team project state (default: WellFormed). + :param str state_filter: Filter on team projects in a specific team project state (default: WellFormed). :param int top: :param int skip: :param str continuation_token: @@ -267,7 +219,7 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke """ query_parameters = {} if state_filter is not None: - query_parameters['stateFilter'] = self._serialize.query('state_filter', state_filter, 'object') + query_parameters['stateFilter'] = self._serialize.query('state_filter', state_filter, 'str') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if skip is not None: diff --git a/vsts/vsts/core/v4_1/models/__init__.py b/vsts/vsts/core/v4_1/models/__init__.py index a6c2908e..9291542a 100644 --- a/vsts/vsts/core/v4_1/models/__init__.py +++ b/vsts/vsts/core/v4_1/models/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- +from .graph_subject_base import GraphSubjectBase from .identity_data import IdentityData from .identity_ref import IdentityRef from .json_patch_operation import JsonPatchOperation @@ -30,6 +31,7 @@ from .web_api_team_ref import WebApiTeamRef __all__ = [ + 'GraphSubjectBase', 'IdentityData', 'IdentityRef', 'JsonPatchOperation', diff --git a/vsts/vsts/core/v4_1/models/identity_ref.py b/vsts/vsts/core/v4_1/models/identity_ref.py index 40c776c5..c4c35ad5 100644 --- a/vsts/vsts/core/v4_1/models/identity_ref.py +++ b/vsts/vsts/core/v4_1/models/identity_ref.py @@ -6,16 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .graph_subject_base import GraphSubjectBase -class IdentityRef(Model): +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: :type directory_alias: str - :param display_name: - :type display_name: str :param id: :type id: str :param image_url: @@ -30,27 +36,26 @@ class IdentityRef(Model): :type profile_url: str :param unique_name: :type unique_name: str - :param url: - :type url: str """ _attribute_map = { - 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + '_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'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} + 'unique_name': {'key': 'uniqueName', 'type': 'str'} } - def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): - super(IdentityRef, self).__init__() + 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, 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.display_name = display_name self.id = id self.image_url = image_url self.inactive = inactive @@ -58,4 +63,3 @@ def __init__(self, directory_alias=None, display_name=None, id=None, image_url=N self.is_container = is_container self.profile_url = profile_url self.unique_name = unique_name - self.url = url diff --git a/vsts/vsts/core/v4_1/models/web_api_team.py b/vsts/vsts/core/v4_1/models/web_api_team.py index 872de4a1..43906199 100644 --- a/vsts/vsts/core/v4_1/models/web_api_team.py +++ b/vsts/vsts/core/v4_1/models/web_api_team.py @@ -22,6 +22,10 @@ class WebApiTeam(WebApiTeamRef): :type description: str :param identity_url: Identity REST API Url to this team :type identity_url: str + :param project_id: + :type project_id: str + :param project_name: + :type project_name: str """ _attribute_map = { @@ -29,10 +33,14 @@ class WebApiTeam(WebApiTeamRef): 'name': {'key': 'name', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, - 'identity_url': {'key': 'identityUrl', 'type': 'str'} + 'identity_url': {'key': 'identityUrl', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'project_name': {'key': 'projectName', 'type': 'str'} } - def __init__(self, id=None, name=None, url=None, description=None, identity_url=None): + def __init__(self, id=None, name=None, url=None, description=None, identity_url=None, project_id=None, project_name=None): super(WebApiTeam, self).__init__(id=id, name=name, url=url) self.description = description self.identity_url = identity_url + self.project_id = project_id + self.project_name = project_name diff --git a/vsts/vsts/customer_intelligence/v4_0/customer_intelligence_client.py b/vsts/vsts/customer_intelligence/v4_0/customer_intelligence_client.py index 931ada1c..059bbbcd 100644 --- a/vsts/vsts/customer_intelligence/v4_0/customer_intelligence_client.py +++ b/vsts/vsts/customer_intelligence/v4_0/customer_intelligence_client.py @@ -18,7 +18,7 @@ class CustomerIntelligenceClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(CustomerIntelligenceClient, 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) diff --git a/vsts/vsts/customer_intelligence/v4_1/customer_intelligence_client.py b/vsts/vsts/customer_intelligence/v4_1/customer_intelligence_client.py index 22387c81..738f6ecb 100644 --- a/vsts/vsts/customer_intelligence/v4_1/customer_intelligence_client.py +++ b/vsts/vsts/customer_intelligence/v4_1/customer_intelligence_client.py @@ -18,7 +18,7 @@ class CustomerIntelligenceClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(CustomerIntelligenceClient, 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) diff --git a/vsts/vsts/dashboard/__init__.py b/vsts/vsts/dashboard/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/dashboard/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/dashboard/v4_0/__init__.py b/vsts/vsts/dashboard/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/dashboard/v4_0/dashboard_client.py b/vsts/vsts/dashboard/v4_0/dashboard_client.py new file mode 100644 index 00000000..c7de62b2 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/dashboard_client.py @@ -0,0 +1,428 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class DashboardClient(VssClient): + """Dashboard + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(DashboardClient, 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 = '31c84e0a-3ece-48fd-a29d-100849af99ba' + + def create_dashboard(self, dashboard, team_context): + """CreateDashboard. + [Preview API] + :param :class:` ` dashboard: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(dashboard, 'Dashboard') + response = self._send(http_method='POST', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Dashboard', response) + + def delete_dashboard(self, team_context, dashboard_id): + """DeleteDashboard. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + self._send(http_method='DELETE', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.0-preview.2', + route_values=route_values) + + def get_dashboard(self, team_context, dashboard_id): + """GetDashboard. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + response = self._send(http_method='GET', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('Dashboard', response) + + def get_dashboards(self, team_context): + """GetDashboards. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('DashboardGroup', response) + + def replace_dashboard(self, dashboard, team_context, dashboard_id): + """ReplaceDashboard. + [Preview API] + :param :class:` ` dashboard: + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + content = self._serialize.body(dashboard, 'Dashboard') + response = self._send(http_method='PUT', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Dashboard', response) + + def replace_dashboards(self, group, team_context): + """ReplaceDashboards. + [Preview API] + :param :class:` ` group: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(group, 'DashboardGroup') + response = self._send(http_method='PUT', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('DashboardGroup', response) + + def create_widget(self, widget, team_context, dashboard_id): + """CreateWidget. + [Preview API] + :param :class:` ` widget: + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + content = self._serialize.body(widget, 'Widget') + response = self._send(http_method='POST', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Widget', response) + + def delete_widget(self, team_context, dashboard_id, widget_id): + """DeleteWidget. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :param str widget_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + response = self._send(http_method='DELETE', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('Dashboard', response) + + def get_widget(self, team_context, dashboard_id, widget_id): + """GetWidget. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :param str widget_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + response = self._send(http_method='GET', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('Widget', response) + + def replace_widget(self, widget, team_context, dashboard_id, widget_id): + """ReplaceWidget. + [Preview API] + :param :class:` ` widget: + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :param str widget_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + content = self._serialize.body(widget, 'Widget') + response = self._send(http_method='PUT', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Widget', response) + + def update_widget(self, widget, team_context, dashboard_id, widget_id): + """UpdateWidget. + [Preview API] + :param :class:` ` widget: + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :param str widget_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + content = self._serialize.body(widget, 'Widget') + response = self._send(http_method='PATCH', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Widget', response) + + def get_widget_metadata(self, contribution_id): + """GetWidgetMetadata. + [Preview API] + :param str contribution_id: + :rtype: :class:` ` + """ + route_values = {} + if contribution_id is not None: + route_values['contributionId'] = self._serialize.url('contribution_id', contribution_id, 'str') + response = self._send(http_method='GET', + location_id='6b3628d3-e96f-4fc7-b176-50240b03b515', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('WidgetMetadataResponse', response) + + def get_widget_types(self, scope): + """GetWidgetTypes. + [Preview API] Returns available widgets in alphabetical order. + :param str scope: + :rtype: :class:` ` + """ + query_parameters = {} + if scope is not None: + query_parameters['$scope'] = self._serialize.query('scope', scope, 'str') + response = self._send(http_method='GET', + location_id='6b3628d3-e96f-4fc7-b176-50240b03b515', + version='4.0-preview.1', + query_parameters=query_parameters) + return self._deserialize('WidgetTypesResponse', response) + diff --git a/vsts/vsts/dashboard/v4_0/models/__init__.py b/vsts/vsts/dashboard/v4_0/models/__init__.py new file mode 100644 index 00000000..3673bd63 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/__init__.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard import Dashboard +from .dashboard_group import DashboardGroup +from .dashboard_group_entry import DashboardGroupEntry +from .dashboard_group_entry_response import DashboardGroupEntryResponse +from .dashboard_response import DashboardResponse +from .lightbox_options import LightboxOptions +from .reference_links import ReferenceLinks +from .semantic_version import SemanticVersion +from .team_context import TeamContext +from .widget import Widget +from .widget_metadata import WidgetMetadata +from .widget_metadata_response import WidgetMetadataResponse +from .widget_position import WidgetPosition +from .widget_response import WidgetResponse +from .widget_size import WidgetSize +from .widgets_versioned_list import WidgetsVersionedList +from .widget_types_response import WidgetTypesResponse + +__all__ = [ + 'Dashboard', + 'DashboardGroup', + 'DashboardGroupEntry', + 'DashboardGroupEntryResponse', + 'DashboardResponse', + 'LightboxOptions', + 'ReferenceLinks', + 'SemanticVersion', + 'TeamContext', + 'Widget', + 'WidgetMetadata', + 'WidgetMetadataResponse', + 'WidgetPosition', + 'WidgetResponse', + 'WidgetSize', + 'WidgetsVersionedList', + 'WidgetTypesResponse', +] diff --git a/vsts/vsts/dashboard/v4_0/models/dashboard.py b/vsts/vsts/dashboard/v4_0/models/dashboard.py new file mode 100644 index 00000000..455b13df --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/dashboard.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 Dashboard(Model): + """Dashboard. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param eTag: + :type eTag: str + :param id: + :type id: str + :param name: + :type name: str + :param owner_id: Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: + :type position: int + :param refresh_interval: + :type refresh_interval: int + :param url: + :type url: str + :param widgets: + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'} + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(Dashboard, self).__init__() + self._links = _links + self.description = description + self.eTag = eTag + self.id = id + self.name = name + self.owner_id = owner_id + self.position = position + self.refresh_interval = refresh_interval + self.url = url + self.widgets = widgets diff --git a/vsts/vsts/dashboard/v4_0/models/dashboard_group.py b/vsts/vsts/dashboard/v4_0/models/dashboard_group.py new file mode 100644 index 00000000..2b90ece1 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/dashboard_group.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DashboardGroup(Model): + """DashboardGroup. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param dashboard_entries: + :type dashboard_entries: list of :class:`DashboardGroupEntry ` + :param permission: + :type permission: object + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'dashboard_entries': {'key': 'dashboardEntries', 'type': '[DashboardGroupEntry]'}, + 'permission': {'key': 'permission', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, dashboard_entries=None, permission=None, url=None): + super(DashboardGroup, self).__init__() + self._links = _links + self.dashboard_entries = dashboard_entries + self.permission = permission + self.url = url diff --git a/vsts/vsts/dashboard/v4_0/models/dashboard_group_entry.py b/vsts/vsts/dashboard/v4_0/models/dashboard_group_entry.py new file mode 100644 index 00000000..ec496571 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/dashboard_group_entry.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard import Dashboard + + +class DashboardGroupEntry(Dashboard): + """DashboardGroupEntry. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param eTag: + :type eTag: str + :param id: + :type id: str + :param name: + :type name: str + :param owner_id: Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: + :type position: int + :param refresh_interval: + :type refresh_interval: int + :param url: + :type url: str + :param widgets: + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'}, + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardGroupEntry, self).__init__(_links=_links, description=description, eTag=eTag, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) diff --git a/vsts/vsts/dashboard/v4_0/models/dashboard_group_entry_response.py b/vsts/vsts/dashboard/v4_0/models/dashboard_group_entry_response.py new file mode 100644 index 00000000..1f65d586 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/dashboard_group_entry_response.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard_group_entry import DashboardGroupEntry + + +class DashboardGroupEntryResponse(DashboardGroupEntry): + """DashboardGroupEntryResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param eTag: + :type eTag: str + :param id: + :type id: str + :param name: + :type name: str + :param owner_id: Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: + :type position: int + :param refresh_interval: + :type refresh_interval: int + :param url: + :type url: str + :param widgets: + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'}, + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardGroupEntryResponse, self).__init__(_links=_links, description=description, eTag=eTag, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) diff --git a/vsts/vsts/dashboard/v4_0/models/dashboard_response.py b/vsts/vsts/dashboard/v4_0/models/dashboard_response.py new file mode 100644 index 00000000..f5ba6431 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/dashboard_response.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard_group_entry import DashboardGroupEntry + + +class DashboardResponse(DashboardGroupEntry): + """DashboardResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param eTag: + :type eTag: str + :param id: + :type id: str + :param name: + :type name: str + :param owner_id: Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: + :type position: int + :param refresh_interval: + :type refresh_interval: int + :param url: + :type url: str + :param widgets: + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'}, + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardResponse, self).__init__(_links=_links, description=description, eTag=eTag, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) diff --git a/vsts/vsts/dashboard/v4_0/models/lightbox_options.py b/vsts/vsts/dashboard/v4_0/models/lightbox_options.py new file mode 100644 index 00000000..af876067 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/lightbox_options.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 LightboxOptions(Model): + """LightboxOptions. + + :param height: Height of desired lightbox, in pixels + :type height: int + :param resizable: True to allow lightbox resizing, false to disallow lightbox resizing, defaults to false. + :type resizable: bool + :param width: Width of desired lightbox, in pixels + :type width: int + """ + + _attribute_map = { + 'height': {'key': 'height', 'type': 'int'}, + 'resizable': {'key': 'resizable', 'type': 'bool'}, + 'width': {'key': 'width', 'type': 'int'} + } + + def __init__(self, height=None, resizable=None, width=None): + super(LightboxOptions, self).__init__() + self.height = height + self.resizable = resizable + self.width = width diff --git a/vsts/vsts/dashboard/v4_0/models/reference_links.py b/vsts/vsts/dashboard/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/dashboard/v4_0/models/semantic_version.py b/vsts/vsts/dashboard/v4_0/models/semantic_version.py new file mode 100644 index 00000000..a966f509 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/semantic_version.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SemanticVersion(Model): + """SemanticVersion. + + :param major: Major version when you make incompatible API changes + :type major: int + :param minor: Minor version when you add functionality in a backwards-compatible manner + :type minor: int + :param patch: Patch version when you make backwards-compatible bug fixes + :type patch: int + """ + + _attribute_map = { + 'major': {'key': 'major', 'type': 'int'}, + 'minor': {'key': 'minor', 'type': 'int'}, + 'patch': {'key': 'patch', 'type': 'int'} + } + + def __init__(self, major=None, minor=None, patch=None): + super(SemanticVersion, self).__init__() + self.major = major + self.minor = minor + self.patch = patch diff --git a/vsts/vsts/dashboard/v4_0/models/team_context.py b/vsts/vsts/dashboard/v4_0/models/team_context.py new file mode 100644 index 00000000..18418ce7 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/team_context.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamContext(Model): + """TeamContext. + + :param project: The team project Id or name. Ignored if ProjectId is set. + :type project: str + :param project_id: The Team Project ID. Required if Project is not set. + :type project_id: str + :param team: The Team Id or name. Ignored if TeamId is set. + :type team: str + :param team_id: The Team Id + :type team_id: str + """ + + _attribute_map = { + 'project': {'key': 'project', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'team': {'key': 'team', 'type': 'str'}, + 'team_id': {'key': 'teamId', 'type': 'str'} + } + + def __init__(self, project=None, project_id=None, team=None, team_id=None): + super(TeamContext, self).__init__() + self.project = project + self.project_id = project_id + self.team = team + self.team_id = team_id diff --git a/vsts/vsts/dashboard/v4_0/models/widget.py b/vsts/vsts/dashboard/v4_0/models/widget.py new file mode 100644 index 00000000..6416565d --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widget.py @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------- +# 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 Widget(Model): + """Widget. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget + :type allowed_sizes: list of :class:`WidgetSize ` + :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. + :type artifact_id: str + :param configuration_contribution_id: + :type configuration_contribution_id: str + :param configuration_contribution_relative_id: + :type configuration_contribution_relative_id: str + :param content_uri: + :type content_uri: str + :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. + :type contribution_id: str + :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs + :type dashboard: :class:`Dashboard ` + :param eTag: + :type eTag: str + :param id: + :type id: str + :param is_enabled: + :type is_enabled: bool + :param is_name_configurable: + :type is_name_configurable: bool + :param lightbox_options: + :type lightbox_options: :class:`LightboxOptions ` + :param loading_image_url: + :type loading_image_url: str + :param name: + :type name: str + :param position: + :type position: :class:`WidgetPosition ` + :param settings: + :type settings: str + :param settings_version: + :type settings_version: :class:`SemanticVersion ` + :param size: + :type size: :class:`WidgetSize ` + :param type_id: + :type type_id: str + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, + 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, + 'content_uri': {'key': 'contentUri', 'type': 'str'}, + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'dashboard': {'key': 'dashboard', 'type': 'Dashboard'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, + 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, + 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'WidgetPosition'}, + 'settings': {'key': 'settings', 'type': 'str'}, + 'settings_version': {'key': 'settingsVersion', 'type': 'SemanticVersion'}, + 'size': {'key': 'size', 'type': 'WidgetSize'}, + 'type_id': {'key': 'typeId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, allowed_sizes=None, artifact_id=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, content_uri=None, contribution_id=None, dashboard=None, eTag=None, id=None, is_enabled=None, is_name_configurable=None, lightbox_options=None, loading_image_url=None, name=None, position=None, settings=None, settings_version=None, size=None, type_id=None, url=None): + super(Widget, self).__init__() + self._links = _links + self.allowed_sizes = allowed_sizes + self.artifact_id = artifact_id + self.configuration_contribution_id = configuration_contribution_id + self.configuration_contribution_relative_id = configuration_contribution_relative_id + self.content_uri = content_uri + self.contribution_id = contribution_id + self.dashboard = dashboard + self.eTag = eTag + self.id = id + self.is_enabled = is_enabled + self.is_name_configurable = is_name_configurable + self.lightbox_options = lightbox_options + self.loading_image_url = loading_image_url + self.name = name + self.position = position + self.settings = settings + self.settings_version = settings_version + self.size = size + self.type_id = type_id + self.url = url diff --git a/vsts/vsts/dashboard/v4_0/models/widget_metadata.py b/vsts/vsts/dashboard/v4_0/models/widget_metadata.py new file mode 100644 index 00000000..d6dd1f50 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widget_metadata.py @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetMetadata(Model): + """WidgetMetadata. + + :param allowed_sizes: Sizes supported by the Widget. + :type allowed_sizes: list of :class:`WidgetSize ` + :param analytics_service_required: Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available. + :type analytics_service_required: bool + :param catalog_icon_url: Resource for an icon in the widget catalog. + :type catalog_icon_url: str + :param catalog_info_url: Opt-in URL string pointing at widget information. Defaults to extension marketplace URL if omitted + :type catalog_info_url: str + :param configuration_contribution_id: The id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. + :type configuration_contribution_id: str + :param configuration_contribution_relative_id: The relative id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. + :type configuration_contribution_relative_id: str + :param configuration_required: Indicates if the widget requires configuration before being added to dashboard. + :type configuration_required: bool + :param content_uri: Uri for the WidgetFactory to get the widget + :type content_uri: str + :param contribution_id: The id of the underlying contribution defining the supplied Widget. + :type contribution_id: str + :param default_settings: Optional default settings to be copied into widget settings + :type default_settings: str + :param description: Summary information describing the widget. + :type description: str + :param is_enabled: Widgets can be disabled by the app store. We'll need to gracefully handle for: - persistence (Allow) - Requests (Tag as disabled, and provide context) + :type is_enabled: bool + :param is_name_configurable: Opt-out boolean that indicates if the widget supports widget name/title configuration. Widgets ignoring the name should set it to false in the manifest. + :type is_name_configurable: bool + :param is_visible_from_catalog: Opt-out boolean indicating if the widget is hidden from the catalog. For V1, only "pull" model widgets can be provided from the catalog. + :type is_visible_from_catalog: bool + :param lightbox_options: Opt-in lightbox properties + :type lightbox_options: :class:`LightboxOptions ` + :param loading_image_url: Resource for a loading placeholder image on dashboard + :type loading_image_url: str + :param name: User facing name of the widget type. Each widget must use a unique value here. + :type name: str + :param publisher_name: Publisher Name of this kind of widget. + :type publisher_name: str + :param supported_scopes: Data contract required for the widget to function and to work in its container. + :type supported_scopes: list of WidgetScope + :param targets: Contribution target IDs + :type targets: list of str + :param type_id: Dev-facing id of this kind of widget. + :type type_id: str + """ + + _attribute_map = { + 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, + 'analytics_service_required': {'key': 'analyticsServiceRequired', 'type': 'bool'}, + 'catalog_icon_url': {'key': 'catalogIconUrl', 'type': 'str'}, + 'catalog_info_url': {'key': 'catalogInfoUrl', 'type': 'str'}, + 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, + 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, + 'configuration_required': {'key': 'configurationRequired', 'type': 'bool'}, + 'content_uri': {'key': 'contentUri', 'type': 'str'}, + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'default_settings': {'key': 'defaultSettings', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, + 'is_visible_from_catalog': {'key': 'isVisibleFromCatalog', 'type': 'bool'}, + 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, + 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[WidgetScope]'}, + 'targets': {'key': 'targets', 'type': '[str]'}, + 'type_id': {'key': 'typeId', 'type': 'str'} + } + + def __init__(self, allowed_sizes=None, analytics_service_required=None, catalog_icon_url=None, catalog_info_url=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, configuration_required=None, content_uri=None, contribution_id=None, default_settings=None, description=None, is_enabled=None, is_name_configurable=None, is_visible_from_catalog=None, lightbox_options=None, loading_image_url=None, name=None, publisher_name=None, supported_scopes=None, targets=None, type_id=None): + super(WidgetMetadata, self).__init__() + self.allowed_sizes = allowed_sizes + self.analytics_service_required = analytics_service_required + self.catalog_icon_url = catalog_icon_url + self.catalog_info_url = catalog_info_url + self.configuration_contribution_id = configuration_contribution_id + self.configuration_contribution_relative_id = configuration_contribution_relative_id + self.configuration_required = configuration_required + self.content_uri = content_uri + self.contribution_id = contribution_id + self.default_settings = default_settings + self.description = description + self.is_enabled = is_enabled + self.is_name_configurable = is_name_configurable + self.is_visible_from_catalog = is_visible_from_catalog + self.lightbox_options = lightbox_options + self.loading_image_url = loading_image_url + self.name = name + self.publisher_name = publisher_name + self.supported_scopes = supported_scopes + self.targets = targets + self.type_id = type_id diff --git a/vsts/vsts/dashboard/v4_0/models/widget_metadata_response.py b/vsts/vsts/dashboard/v4_0/models/widget_metadata_response.py new file mode 100644 index 00000000..e8b4b718 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widget_metadata_response.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetMetadataResponse(Model): + """WidgetMetadataResponse. + + :param uri: + :type uri: str + :param widget_metadata: + :type widget_metadata: :class:`WidgetMetadata ` + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'widget_metadata': {'key': 'widgetMetadata', 'type': 'WidgetMetadata'} + } + + def __init__(self, uri=None, widget_metadata=None): + super(WidgetMetadataResponse, self).__init__() + self.uri = uri + self.widget_metadata = widget_metadata diff --git a/vsts/vsts/dashboard/v4_0/models/widget_position.py b/vsts/vsts/dashboard/v4_0/models/widget_position.py new file mode 100644 index 00000000..fffa861f --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widget_position.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetPosition(Model): + """WidgetPosition. + + :param column: + :type column: int + :param row: + :type row: int + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'int'}, + 'row': {'key': 'row', 'type': 'int'} + } + + def __init__(self, column=None, row=None): + super(WidgetPosition, self).__init__() + self.column = column + self.row = row diff --git a/vsts/vsts/dashboard/v4_0/models/widget_response.py b/vsts/vsts/dashboard/v4_0/models/widget_response.py new file mode 100644 index 00000000..8f7ca28c --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widget_response.py @@ -0,0 +1,84 @@ +# -------------------------------------------------------------------------------------------- +# 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 .widget import Widget + + +class WidgetResponse(Widget): + """WidgetResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget + :type allowed_sizes: list of :class:`WidgetSize ` + :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. + :type artifact_id: str + :param configuration_contribution_id: + :type configuration_contribution_id: str + :param configuration_contribution_relative_id: + :type configuration_contribution_relative_id: str + :param content_uri: + :type content_uri: str + :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. + :type contribution_id: str + :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs + :type dashboard: :class:`Dashboard ` + :param eTag: + :type eTag: str + :param id: + :type id: str + :param is_enabled: + :type is_enabled: bool + :param is_name_configurable: + :type is_name_configurable: bool + :param lightbox_options: + :type lightbox_options: :class:`LightboxOptions ` + :param loading_image_url: + :type loading_image_url: str + :param name: + :type name: str + :param position: + :type position: :class:`WidgetPosition ` + :param settings: + :type settings: str + :param settings_version: + :type settings_version: :class:`SemanticVersion ` + :param size: + :type size: :class:`WidgetSize ` + :param type_id: + :type type_id: str + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, + 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, + 'content_uri': {'key': 'contentUri', 'type': 'str'}, + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'dashboard': {'key': 'dashboard', 'type': 'Dashboard'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, + 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, + 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'WidgetPosition'}, + 'settings': {'key': 'settings', 'type': 'str'}, + 'settings_version': {'key': 'settingsVersion', 'type': 'SemanticVersion'}, + 'size': {'key': 'size', 'type': 'WidgetSize'}, + 'type_id': {'key': 'typeId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, _links=None, allowed_sizes=None, artifact_id=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, content_uri=None, contribution_id=None, dashboard=None, eTag=None, id=None, is_enabled=None, is_name_configurable=None, lightbox_options=None, loading_image_url=None, name=None, position=None, settings=None, settings_version=None, size=None, type_id=None, url=None): + super(WidgetResponse, self).__init__(_links=_links, allowed_sizes=allowed_sizes, artifact_id=artifact_id, configuration_contribution_id=configuration_contribution_id, configuration_contribution_relative_id=configuration_contribution_relative_id, content_uri=content_uri, contribution_id=contribution_id, dashboard=dashboard, eTag=eTag, id=id, is_enabled=is_enabled, is_name_configurable=is_name_configurable, lightbox_options=lightbox_options, loading_image_url=loading_image_url, name=name, position=position, settings=settings, settings_version=settings_version, size=size, type_id=type_id, url=url) diff --git a/vsts/vsts/dashboard/v4_0/models/widget_size.py b/vsts/vsts/dashboard/v4_0/models/widget_size.py new file mode 100644 index 00000000..36587e24 --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widget_size.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetSize(Model): + """WidgetSize. + + :param column_span: + :type column_span: int + :param row_span: + :type row_span: int + """ + + _attribute_map = { + 'column_span': {'key': 'columnSpan', 'type': 'int'}, + 'row_span': {'key': 'rowSpan', 'type': 'int'} + } + + def __init__(self, column_span=None, row_span=None): + super(WidgetSize, self).__init__() + self.column_span = column_span + self.row_span = row_span diff --git a/vsts/vsts/dashboard/v4_0/models/widget_types_response.py b/vsts/vsts/dashboard/v4_0/models/widget_types_response.py new file mode 100644 index 00000000..b703f37e --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widget_types_response.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetTypesResponse(Model): + """WidgetTypesResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param uri: + :type uri: str + :param widget_types: + :type widget_types: list of :class:`WidgetMetadata ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'widget_types': {'key': 'widgetTypes', 'type': '[WidgetMetadata]'} + } + + def __init__(self, _links=None, uri=None, widget_types=None): + super(WidgetTypesResponse, self).__init__() + self._links = _links + self.uri = uri + self.widget_types = widget_types diff --git a/vsts/vsts/dashboard/v4_0/models/widgets_versioned_list.py b/vsts/vsts/dashboard/v4_0/models/widgets_versioned_list.py new file mode 100644 index 00000000..db67a3aa --- /dev/null +++ b/vsts/vsts/dashboard/v4_0/models/widgets_versioned_list.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetsVersionedList(Model): + """WidgetsVersionedList. + + :param eTag: + :type eTag: list of str + :param widgets: + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + 'eTag': {'key': 'eTag', 'type': '[str]'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'} + } + + def __init__(self, eTag=None, widgets=None): + super(WidgetsVersionedList, self).__init__() + self.eTag = eTag + self.widgets = widgets diff --git a/vsts/vsts/dashboard/v4_1/__init__.py b/vsts/vsts/dashboard/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/dashboard/v4_1/dashboard_client.py b/vsts/vsts/dashboard/v4_1/dashboard_client.py new file mode 100644 index 00000000..945244ed --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/dashboard_client.py @@ -0,0 +1,428 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class DashboardClient(VssClient): + """Dashboard + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(DashboardClient, 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 = '31c84e0a-3ece-48fd-a29d-100849af99ba' + + def create_dashboard(self, dashboard, team_context): + """CreateDashboard. + [Preview API] Create the supplied dashboard. + :param :class:` ` dashboard: The initial state of the dashboard + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(dashboard, 'Dashboard') + response = self._send(http_method='POST', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Dashboard', response) + + def delete_dashboard(self, team_context, dashboard_id): + """DeleteDashboard. + [Preview API] Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard. + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: ID of the dashboard to delete. + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + self._send(http_method='DELETE', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.1-preview.2', + route_values=route_values) + + def get_dashboard(self, team_context, dashboard_id): + """GetDashboard. + [Preview API] Get a dashboard by its ID. + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + response = self._send(http_method='GET', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('Dashboard', response) + + def get_dashboards(self, team_context): + """GetDashboards. + [Preview API] Get a list of dashboards. + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('DashboardGroup', response) + + def replace_dashboard(self, dashboard, team_context, dashboard_id): + """ReplaceDashboard. + [Preview API] Replace configuration for the specified dashboard. + :param :class:` ` dashboard: The Configuration of the dashboard to replace. + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: ID of the dashboard to replace. + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + content = self._serialize.body(dashboard, 'Dashboard') + response = self._send(http_method='PUT', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Dashboard', response) + + def replace_dashboards(self, group, team_context): + """ReplaceDashboards. + [Preview API] Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. + :param :class:` ` group: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(group, 'DashboardGroup') + response = self._send(http_method='PUT', + location_id='454b3e51-2e6e-48d4-ad81-978154089351', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('DashboardGroup', response) + + def create_widget(self, widget, team_context, dashboard_id): + """CreateWidget. + [Preview API] Create a widget on the specified dashboard. + :param :class:` ` widget: State of the widget to add + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: ID of dashboard the widget will be added to. + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + content = self._serialize.body(widget, 'Widget') + response = self._send(http_method='POST', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Widget', response) + + def delete_widget(self, team_context, dashboard_id, widget_id): + """DeleteWidget. + [Preview API] Delete the specified widget. + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: ID of the dashboard containing the widget. + :param str widget_id: ID of the widget to update. + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + response = self._send(http_method='DELETE', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('Dashboard', response) + + def get_widget(self, team_context, dashboard_id, widget_id): + """GetWidget. + [Preview API] Get the current state of the specified widget. + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: ID of the dashboard containing the widget. + :param str widget_id: ID of the widget to read. + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + response = self._send(http_method='GET', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('Widget', response) + + def replace_widget(self, widget, team_context, dashboard_id, widget_id): + """ReplaceWidget. + [Preview API] Override the state of the specified widget. + :param :class:` ` widget: State to be written for the widget. + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: ID of the dashboard containing the widget. + :param str widget_id: ID of the widget to update. + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + content = self._serialize.body(widget, 'Widget') + response = self._send(http_method='PUT', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Widget', response) + + def update_widget(self, widget, team_context, dashboard_id, widget_id): + """UpdateWidget. + [Preview API] Perform a partial update of the specified widget. + :param :class:` ` widget: Description of the widget changes to apply. All non-null fields will be replaced. + :param :class:` ` team_context: The team context for the operation + :param str dashboard_id: ID of the dashboard containing the widget. + :param str widget_id: ID of the widget to update. + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if dashboard_id is not None: + route_values['dashboardId'] = self._serialize.url('dashboard_id', dashboard_id, 'str') + if widget_id is not None: + route_values['widgetId'] = self._serialize.url('widget_id', widget_id, 'str') + content = self._serialize.body(widget, 'Widget') + response = self._send(http_method='PATCH', + location_id='bdcff53a-8355-4172-a00a-40497ea23afc', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('Widget', response) + + def get_widget_metadata(self, contribution_id): + """GetWidgetMetadata. + [Preview API] Get the widget metadata satisfying the specified contribution ID. + :param str contribution_id: The ID of Contribution for the Widget + :rtype: :class:` ` + """ + route_values = {} + if contribution_id is not None: + route_values['contributionId'] = self._serialize.url('contribution_id', contribution_id, 'str') + response = self._send(http_method='GET', + location_id='6b3628d3-e96f-4fc7-b176-50240b03b515', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('WidgetMetadataResponse', response) + + def get_widget_types(self, scope): + """GetWidgetTypes. + [Preview API] Get all available widget metadata in alphabetical order. + :param str scope: + :rtype: :class:` ` + """ + query_parameters = {} + if scope is not None: + query_parameters['$scope'] = self._serialize.query('scope', scope, 'str') + response = self._send(http_method='GET', + location_id='6b3628d3-e96f-4fc7-b176-50240b03b515', + version='4.1-preview.1', + query_parameters=query_parameters) + return self._deserialize('WidgetTypesResponse', response) + diff --git a/vsts/vsts/dashboard/v4_1/models/__init__.py b/vsts/vsts/dashboard/v4_1/models/__init__.py new file mode 100644 index 00000000..3673bd63 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/__init__.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard import Dashboard +from .dashboard_group import DashboardGroup +from .dashboard_group_entry import DashboardGroupEntry +from .dashboard_group_entry_response import DashboardGroupEntryResponse +from .dashboard_response import DashboardResponse +from .lightbox_options import LightboxOptions +from .reference_links import ReferenceLinks +from .semantic_version import SemanticVersion +from .team_context import TeamContext +from .widget import Widget +from .widget_metadata import WidgetMetadata +from .widget_metadata_response import WidgetMetadataResponse +from .widget_position import WidgetPosition +from .widget_response import WidgetResponse +from .widget_size import WidgetSize +from .widgets_versioned_list import WidgetsVersionedList +from .widget_types_response import WidgetTypesResponse + +__all__ = [ + 'Dashboard', + 'DashboardGroup', + 'DashboardGroupEntry', + 'DashboardGroupEntryResponse', + 'DashboardResponse', + 'LightboxOptions', + 'ReferenceLinks', + 'SemanticVersion', + 'TeamContext', + 'Widget', + 'WidgetMetadata', + 'WidgetMetadataResponse', + 'WidgetPosition', + 'WidgetResponse', + 'WidgetSize', + 'WidgetsVersionedList', + 'WidgetTypesResponse', +] diff --git a/vsts/vsts/dashboard/v4_1/models/dashboard.py b/vsts/vsts/dashboard/v4_1/models/dashboard.py new file mode 100644 index 00000000..305faaec --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/dashboard.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 Dashboard(Model): + """Dashboard. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: Description of the dashboard. + :type description: str + :param eTag: Server defined version tracking value, used for edit collision detection. + :type eTag: str + :param id: ID of the Dashboard. Provided by service at creation time. + :type id: str + :param name: Name of the Dashboard. + :type name: str + :param owner_id: ID of the Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. + :type position: int + :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. + :type refresh_interval: int + :param url: + :type url: str + :param widgets: The set of Widgets on the dashboard. + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'} + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(Dashboard, self).__init__() + self._links = _links + self.description = description + self.eTag = eTag + self.id = id + self.name = name + self.owner_id = owner_id + self.position = position + self.refresh_interval = refresh_interval + self.url = url + self.widgets = widgets diff --git a/vsts/vsts/dashboard/v4_1/models/dashboard_group.py b/vsts/vsts/dashboard/v4_1/models/dashboard_group.py new file mode 100644 index 00000000..0e05d0da --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/dashboard_group.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 DashboardGroup(Model): + """DashboardGroup. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param dashboard_entries: A list of Dashboards held by the Dashboard Group + :type dashboard_entries: list of :class:`DashboardGroupEntry ` + :param permission: Deprecated: The old permission model describing the level of permissions for the current team. Pre-M125. + :type permission: object + :param team_dashboard_permission: A permissions bit mask describing the security permissions of the current team for dashboards. When this permission is the value None, use GroupMemberPermission. Permissions are evaluated based on the presence of a value other than None, else the GroupMemberPermission will be saved. + :type team_dashboard_permission: object + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'dashboard_entries': {'key': 'dashboardEntries', 'type': '[DashboardGroupEntry]'}, + 'permission': {'key': 'permission', 'type': 'object'}, + 'team_dashboard_permission': {'key': 'teamDashboardPermission', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, dashboard_entries=None, permission=None, team_dashboard_permission=None, url=None): + super(DashboardGroup, self).__init__() + self._links = _links + self.dashboard_entries = dashboard_entries + self.permission = permission + self.team_dashboard_permission = team_dashboard_permission + self.url = url diff --git a/vsts/vsts/dashboard/v4_1/models/dashboard_group_entry.py b/vsts/vsts/dashboard/v4_1/models/dashboard_group_entry.py new file mode 100644 index 00000000..5c3c9540 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/dashboard_group_entry.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard import Dashboard + + +class DashboardGroupEntry(Dashboard): + """DashboardGroupEntry. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: Description of the dashboard. + :type description: str + :param eTag: Server defined version tracking value, used for edit collision detection. + :type eTag: str + :param id: ID of the Dashboard. Provided by service at creation time. + :type id: str + :param name: Name of the Dashboard. + :type name: str + :param owner_id: ID of the Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. + :type position: int + :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. + :type refresh_interval: int + :param url: + :type url: str + :param widgets: The set of Widgets on the dashboard. + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'}, + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardGroupEntry, self).__init__(_links=_links, description=description, eTag=eTag, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) diff --git a/vsts/vsts/dashboard/v4_1/models/dashboard_group_entry_response.py b/vsts/vsts/dashboard/v4_1/models/dashboard_group_entry_response.py new file mode 100644 index 00000000..7c64a4d4 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/dashboard_group_entry_response.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard_group_entry import DashboardGroupEntry + + +class DashboardGroupEntryResponse(DashboardGroupEntry): + """DashboardGroupEntryResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: Description of the dashboard. + :type description: str + :param eTag: Server defined version tracking value, used for edit collision detection. + :type eTag: str + :param id: ID of the Dashboard. Provided by service at creation time. + :type id: str + :param name: Name of the Dashboard. + :type name: str + :param owner_id: ID of the Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. + :type position: int + :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. + :type refresh_interval: int + :param url: + :type url: str + :param widgets: The set of Widgets on the dashboard. + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'}, + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardGroupEntryResponse, self).__init__(_links=_links, description=description, eTag=eTag, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) diff --git a/vsts/vsts/dashboard/v4_1/models/dashboard_response.py b/vsts/vsts/dashboard/v4_1/models/dashboard_response.py new file mode 100644 index 00000000..42aefba0 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/dashboard_response.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .dashboard_group_entry import DashboardGroupEntry + + +class DashboardResponse(DashboardGroupEntry): + """DashboardResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: Description of the dashboard. + :type description: str + :param eTag: Server defined version tracking value, used for edit collision detection. + :type eTag: str + :param id: ID of the Dashboard. Provided by service at creation time. + :type id: str + :param name: Name of the Dashboard. + :type name: str + :param owner_id: ID of the Owner for a dashboard. For any legacy dashboards, this would be the unique identifier for the team associated with the dashboard. + :type owner_id: str + :param position: Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. + :type position: int + :param refresh_interval: Interval for client to automatically refresh the dashboard. Expressed in minutes. + :type refresh_interval: int + :param url: + :type url: str + :param widgets: The set of Widgets on the dashboard. + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner_id': {'key': 'ownerId', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'refresh_interval': {'key': 'refreshInterval', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'}, + } + + def __init__(self, _links=None, description=None, eTag=None, id=None, name=None, owner_id=None, position=None, refresh_interval=None, url=None, widgets=None): + super(DashboardResponse, self).__init__(_links=_links, description=description, eTag=eTag, id=id, name=name, owner_id=owner_id, position=position, refresh_interval=refresh_interval, url=url, widgets=widgets) diff --git a/vsts/vsts/dashboard/v4_1/models/lightbox_options.py b/vsts/vsts/dashboard/v4_1/models/lightbox_options.py new file mode 100644 index 00000000..af876067 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/lightbox_options.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 LightboxOptions(Model): + """LightboxOptions. + + :param height: Height of desired lightbox, in pixels + :type height: int + :param resizable: True to allow lightbox resizing, false to disallow lightbox resizing, defaults to false. + :type resizable: bool + :param width: Width of desired lightbox, in pixels + :type width: int + """ + + _attribute_map = { + 'height': {'key': 'height', 'type': 'int'}, + 'resizable': {'key': 'resizable', 'type': 'bool'}, + 'width': {'key': 'width', 'type': 'int'} + } + + def __init__(self, height=None, resizable=None, width=None): + super(LightboxOptions, self).__init__() + self.height = height + self.resizable = resizable + self.width = width diff --git a/vsts/vsts/dashboard/v4_1/models/reference_links.py b/vsts/vsts/dashboard/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/dashboard/v4_1/models/semantic_version.py b/vsts/vsts/dashboard/v4_1/models/semantic_version.py new file mode 100644 index 00000000..a966f509 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/semantic_version.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SemanticVersion(Model): + """SemanticVersion. + + :param major: Major version when you make incompatible API changes + :type major: int + :param minor: Minor version when you add functionality in a backwards-compatible manner + :type minor: int + :param patch: Patch version when you make backwards-compatible bug fixes + :type patch: int + """ + + _attribute_map = { + 'major': {'key': 'major', 'type': 'int'}, + 'minor': {'key': 'minor', 'type': 'int'}, + 'patch': {'key': 'patch', 'type': 'int'} + } + + def __init__(self, major=None, minor=None, patch=None): + super(SemanticVersion, self).__init__() + self.major = major + self.minor = minor + self.patch = patch diff --git a/vsts/vsts/dashboard/v4_1/models/team_context.py b/vsts/vsts/dashboard/v4_1/models/team_context.py new file mode 100644 index 00000000..18418ce7 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/team_context.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamContext(Model): + """TeamContext. + + :param project: The team project Id or name. Ignored if ProjectId is set. + :type project: str + :param project_id: The Team Project ID. Required if Project is not set. + :type project_id: str + :param team: The Team Id or name. Ignored if TeamId is set. + :type team: str + :param team_id: The Team Id + :type team_id: str + """ + + _attribute_map = { + 'project': {'key': 'project', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'team': {'key': 'team', 'type': 'str'}, + 'team_id': {'key': 'teamId', 'type': 'str'} + } + + def __init__(self, project=None, project_id=None, team=None, team_id=None): + super(TeamContext, self).__init__() + self.project = project + self.project_id = project_id + self.team = team + self.team_id = team_id diff --git a/vsts/vsts/dashboard/v4_1/models/widget.py b/vsts/vsts/dashboard/v4_1/models/widget.py new file mode 100644 index 00000000..3b4d3450 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widget.py @@ -0,0 +1,109 @@ +# -------------------------------------------------------------------------------------------- +# 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 Widget(Model): + """Widget. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget + :type allowed_sizes: list of :class:`WidgetSize ` + :param are_settings_blocked_for_user: Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user. + :type are_settings_blocked_for_user: bool + :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. + :type artifact_id: str + :param configuration_contribution_id: + :type configuration_contribution_id: str + :param configuration_contribution_relative_id: + :type configuration_contribution_relative_id: str + :param content_uri: + :type content_uri: str + :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. + :type contribution_id: str + :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs + :type dashboard: :class:`Dashboard ` + :param eTag: + :type eTag: str + :param id: + :type id: str + :param is_enabled: + :type is_enabled: bool + :param is_name_configurable: + :type is_name_configurable: bool + :param lightbox_options: + :type lightbox_options: :class:`LightboxOptions ` + :param loading_image_url: + :type loading_image_url: str + :param name: + :type name: str + :param position: + :type position: :class:`WidgetPosition ` + :param settings: + :type settings: str + :param settings_version: + :type settings_version: :class:`SemanticVersion ` + :param size: + :type size: :class:`WidgetSize ` + :param type_id: + :type type_id: str + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, + 'are_settings_blocked_for_user': {'key': 'areSettingsBlockedForUser', 'type': 'bool'}, + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, + 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, + 'content_uri': {'key': 'contentUri', 'type': 'str'}, + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'dashboard': {'key': 'dashboard', 'type': 'Dashboard'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, + 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, + 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'WidgetPosition'}, + 'settings': {'key': 'settings', 'type': 'str'}, + 'settings_version': {'key': 'settingsVersion', 'type': 'SemanticVersion'}, + 'size': {'key': 'size', 'type': 'WidgetSize'}, + 'type_id': {'key': 'typeId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, allowed_sizes=None, are_settings_blocked_for_user=None, artifact_id=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, content_uri=None, contribution_id=None, dashboard=None, eTag=None, id=None, is_enabled=None, is_name_configurable=None, lightbox_options=None, loading_image_url=None, name=None, position=None, settings=None, settings_version=None, size=None, type_id=None, url=None): + super(Widget, self).__init__() + self._links = _links + self.allowed_sizes = allowed_sizes + self.are_settings_blocked_for_user = are_settings_blocked_for_user + self.artifact_id = artifact_id + self.configuration_contribution_id = configuration_contribution_id + self.configuration_contribution_relative_id = configuration_contribution_relative_id + self.content_uri = content_uri + self.contribution_id = contribution_id + self.dashboard = dashboard + self.eTag = eTag + self.id = id + self.is_enabled = is_enabled + self.is_name_configurable = is_name_configurable + self.lightbox_options = lightbox_options + self.loading_image_url = loading_image_url + self.name = name + self.position = position + self.settings = settings + self.settings_version = settings_version + self.size = size + self.type_id = type_id + self.url = url diff --git a/vsts/vsts/dashboard/v4_1/models/widget_metadata.py b/vsts/vsts/dashboard/v4_1/models/widget_metadata.py new file mode 100644 index 00000000..0d9076eb --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widget_metadata.py @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetMetadata(Model): + """WidgetMetadata. + + :param allowed_sizes: Sizes supported by the Widget. + :type allowed_sizes: list of :class:`WidgetSize ` + :param analytics_service_required: Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available. + :type analytics_service_required: bool + :param catalog_icon_url: Resource for an icon in the widget catalog. + :type catalog_icon_url: str + :param catalog_info_url: Opt-in URL string pointing at widget information. Defaults to extension marketplace URL if omitted + :type catalog_info_url: str + :param configuration_contribution_id: The id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. + :type configuration_contribution_id: str + :param configuration_contribution_relative_id: The relative id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. + :type configuration_contribution_relative_id: str + :param configuration_required: Indicates if the widget requires configuration before being added to dashboard. + :type configuration_required: bool + :param content_uri: Uri for the widget content to be loaded from . + :type content_uri: str + :param contribution_id: The id of the underlying contribution defining the supplied Widget. + :type contribution_id: str + :param default_settings: Optional default settings to be copied into widget settings. + :type default_settings: str + :param description: Summary information describing the widget. + :type description: str + :param is_enabled: Widgets can be disabled by the app store. We'll need to gracefully handle for: - persistence (Allow) - Requests (Tag as disabled, and provide context) + :type is_enabled: bool + :param is_name_configurable: Opt-out boolean that indicates if the widget supports widget name/title configuration. Widgets ignoring the name should set it to false in the manifest. + :type is_name_configurable: bool + :param is_visible_from_catalog: Opt-out boolean indicating if the widget is hidden from the catalog. Commonly, this is used to allow developers to disable creation of a deprecated widget. A widget must have a functional default state, or have a configuration experience, in order to be visible from the catalog. + :type is_visible_from_catalog: bool + :param lightbox_options: Opt-in properties for customizing widget presentation in a "lightbox" dialog. + :type lightbox_options: :class:`LightboxOptions ` + :param loading_image_url: Resource for a loading placeholder image on dashboard + :type loading_image_url: str + :param name: User facing name of the widget type. Each widget must use a unique value here. + :type name: str + :param publisher_name: Publisher Name of this kind of widget. + :type publisher_name: str + :param supported_scopes: Data contract required for the widget to function and to work in its container. + :type supported_scopes: list of WidgetScope + :param targets: Contribution target IDs + :type targets: list of str + :param type_id: Deprecated: locally unique developer-facing id of this kind of widget. ContributionId provides a globally unique identifier for widget types. + :type type_id: str + """ + + _attribute_map = { + 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, + 'analytics_service_required': {'key': 'analyticsServiceRequired', 'type': 'bool'}, + 'catalog_icon_url': {'key': 'catalogIconUrl', 'type': 'str'}, + 'catalog_info_url': {'key': 'catalogInfoUrl', 'type': 'str'}, + 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, + 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, + 'configuration_required': {'key': 'configurationRequired', 'type': 'bool'}, + 'content_uri': {'key': 'contentUri', 'type': 'str'}, + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'default_settings': {'key': 'defaultSettings', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, + 'is_visible_from_catalog': {'key': 'isVisibleFromCatalog', 'type': 'bool'}, + 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, + 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[WidgetScope]'}, + 'targets': {'key': 'targets', 'type': '[str]'}, + 'type_id': {'key': 'typeId', 'type': 'str'} + } + + def __init__(self, allowed_sizes=None, analytics_service_required=None, catalog_icon_url=None, catalog_info_url=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, configuration_required=None, content_uri=None, contribution_id=None, default_settings=None, description=None, is_enabled=None, is_name_configurable=None, is_visible_from_catalog=None, lightbox_options=None, loading_image_url=None, name=None, publisher_name=None, supported_scopes=None, targets=None, type_id=None): + super(WidgetMetadata, self).__init__() + self.allowed_sizes = allowed_sizes + self.analytics_service_required = analytics_service_required + self.catalog_icon_url = catalog_icon_url + self.catalog_info_url = catalog_info_url + self.configuration_contribution_id = configuration_contribution_id + self.configuration_contribution_relative_id = configuration_contribution_relative_id + self.configuration_required = configuration_required + self.content_uri = content_uri + self.contribution_id = contribution_id + self.default_settings = default_settings + self.description = description + self.is_enabled = is_enabled + self.is_name_configurable = is_name_configurable + self.is_visible_from_catalog = is_visible_from_catalog + self.lightbox_options = lightbox_options + self.loading_image_url = loading_image_url + self.name = name + self.publisher_name = publisher_name + self.supported_scopes = supported_scopes + self.targets = targets + self.type_id = type_id diff --git a/vsts/vsts/dashboard/v4_1/models/widget_metadata_response.py b/vsts/vsts/dashboard/v4_1/models/widget_metadata_response.py new file mode 100644 index 00000000..1456e9c1 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widget_metadata_response.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetMetadataResponse(Model): + """WidgetMetadataResponse. + + :param uri: + :type uri: str + :param widget_metadata: + :type widget_metadata: :class:`WidgetMetadata ` + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'widget_metadata': {'key': 'widgetMetadata', 'type': 'WidgetMetadata'} + } + + def __init__(self, uri=None, widget_metadata=None): + super(WidgetMetadataResponse, self).__init__() + self.uri = uri + self.widget_metadata = widget_metadata diff --git a/vsts/vsts/dashboard/v4_1/models/widget_position.py b/vsts/vsts/dashboard/v4_1/models/widget_position.py new file mode 100644 index 00000000..fffa861f --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widget_position.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetPosition(Model): + """WidgetPosition. + + :param column: + :type column: int + :param row: + :type row: int + """ + + _attribute_map = { + 'column': {'key': 'column', 'type': 'int'}, + 'row': {'key': 'row', 'type': 'int'} + } + + def __init__(self, column=None, row=None): + super(WidgetPosition, self).__init__() + self.column = column + self.row = row diff --git a/vsts/vsts/dashboard/v4_1/models/widget_response.py b/vsts/vsts/dashboard/v4_1/models/widget_response.py new file mode 100644 index 00000000..7a955db6 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widget_response.py @@ -0,0 +1,87 @@ +# -------------------------------------------------------------------------------------------- +# 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 .widget import Widget + + +class WidgetResponse(Widget): + """WidgetResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param allowed_sizes: Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget + :type allowed_sizes: list of :class:`WidgetSize ` + :param are_settings_blocked_for_user: Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user. + :type are_settings_blocked_for_user: bool + :param artifact_id: Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. + :type artifact_id: str + :param configuration_contribution_id: + :type configuration_contribution_id: str + :param configuration_contribution_relative_id: + :type configuration_contribution_relative_id: str + :param content_uri: + :type content_uri: str + :param contribution_id: The id of the underlying contribution defining the supplied Widget Configuration. + :type contribution_id: str + :param dashboard: Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs + :type dashboard: :class:`Dashboard ` + :param eTag: + :type eTag: str + :param id: + :type id: str + :param is_enabled: + :type is_enabled: bool + :param is_name_configurable: + :type is_name_configurable: bool + :param lightbox_options: + :type lightbox_options: :class:`LightboxOptions ` + :param loading_image_url: + :type loading_image_url: str + :param name: + :type name: str + :param position: + :type position: :class:`WidgetPosition ` + :param settings: + :type settings: str + :param settings_version: + :type settings_version: :class:`SemanticVersion ` + :param size: + :type size: :class:`WidgetSize ` + :param type_id: + :type type_id: str + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allowed_sizes': {'key': 'allowedSizes', 'type': '[WidgetSize]'}, + 'are_settings_blocked_for_user': {'key': 'areSettingsBlockedForUser', 'type': 'bool'}, + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'configuration_contribution_id': {'key': 'configurationContributionId', 'type': 'str'}, + 'configuration_contribution_relative_id': {'key': 'configurationContributionRelativeId', 'type': 'str'}, + 'content_uri': {'key': 'contentUri', 'type': 'str'}, + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'dashboard': {'key': 'dashboard', 'type': 'Dashboard'}, + 'eTag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'is_name_configurable': {'key': 'isNameConfigurable', 'type': 'bool'}, + 'lightbox_options': {'key': 'lightboxOptions', 'type': 'LightboxOptions'}, + 'loading_image_url': {'key': 'loadingImageUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'WidgetPosition'}, + 'settings': {'key': 'settings', 'type': 'str'}, + 'settings_version': {'key': 'settingsVersion', 'type': 'SemanticVersion'}, + 'size': {'key': 'size', 'type': 'WidgetSize'}, + 'type_id': {'key': 'typeId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__(self, _links=None, allowed_sizes=None, are_settings_blocked_for_user=None, artifact_id=None, configuration_contribution_id=None, configuration_contribution_relative_id=None, content_uri=None, contribution_id=None, dashboard=None, eTag=None, id=None, is_enabled=None, is_name_configurable=None, lightbox_options=None, loading_image_url=None, name=None, position=None, settings=None, settings_version=None, size=None, type_id=None, url=None): + super(WidgetResponse, self).__init__(_links=_links, allowed_sizes=allowed_sizes, are_settings_blocked_for_user=are_settings_blocked_for_user, artifact_id=artifact_id, configuration_contribution_id=configuration_contribution_id, configuration_contribution_relative_id=configuration_contribution_relative_id, content_uri=content_uri, contribution_id=contribution_id, dashboard=dashboard, eTag=eTag, id=id, is_enabled=is_enabled, is_name_configurable=is_name_configurable, lightbox_options=lightbox_options, loading_image_url=loading_image_url, name=name, position=position, settings=settings, settings_version=settings_version, size=size, type_id=type_id, url=url) diff --git a/vsts/vsts/dashboard/v4_1/models/widget_size.py b/vsts/vsts/dashboard/v4_1/models/widget_size.py new file mode 100644 index 00000000..20d49831 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widget_size.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetSize(Model): + """WidgetSize. + + :param column_span: The Width of the widget, expressed in dashboard grid columns. + :type column_span: int + :param row_span: The height of the widget, expressed in dashboard grid rows. + :type row_span: int + """ + + _attribute_map = { + 'column_span': {'key': 'columnSpan', 'type': 'int'}, + 'row_span': {'key': 'rowSpan', 'type': 'int'} + } + + def __init__(self, column_span=None, row_span=None): + super(WidgetSize, self).__init__() + self.column_span = column_span + self.row_span = row_span diff --git a/vsts/vsts/dashboard/v4_1/models/widget_types_response.py b/vsts/vsts/dashboard/v4_1/models/widget_types_response.py new file mode 100644 index 00000000..14a08342 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widget_types_response.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetTypesResponse(Model): + """WidgetTypesResponse. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param uri: + :type uri: str + :param widget_types: + :type widget_types: list of :class:`WidgetMetadata ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'widget_types': {'key': 'widgetTypes', 'type': '[WidgetMetadata]'} + } + + def __init__(self, _links=None, uri=None, widget_types=None): + super(WidgetTypesResponse, self).__init__() + self._links = _links + self.uri = uri + self.widget_types = widget_types diff --git a/vsts/vsts/dashboard/v4_1/models/widgets_versioned_list.py b/vsts/vsts/dashboard/v4_1/models/widgets_versioned_list.py new file mode 100644 index 00000000..915252e2 --- /dev/null +++ b/vsts/vsts/dashboard/v4_1/models/widgets_versioned_list.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WidgetsVersionedList(Model): + """WidgetsVersionedList. + + :param eTag: + :type eTag: list of str + :param widgets: + :type widgets: list of :class:`Widget ` + """ + + _attribute_map = { + 'eTag': {'key': 'eTag', 'type': '[str]'}, + 'widgets': {'key': 'widgets', 'type': '[Widget]'} + } + + def __init__(self, eTag=None, widgets=None): + super(WidgetsVersionedList, self).__init__() + self.eTag = eTag + self.widgets = widgets diff --git a/vsts/vsts/exceptions.py b/vsts/vsts/exceptions.py index 90be8fc5..1ef98ccb 100644 --- a/vsts/vsts/exceptions.py +++ b/vsts/vsts/exceptions.py @@ -3,16 +3,11 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from .models.wrapped_exception import WrappedException from msrest.exceptions import ( ClientException, - SerializationError, - DeserializationError, TokenExpiredError, ClientRequestError, AuthenticationError, - HttpOperationError, - ValidationError, ) @@ -36,7 +31,8 @@ def __init__(self, wrapped_exception): self.inner_exception = None if wrapped_exception.inner_exception is not None: self.inner_exception = VstsServiceError(wrapped_exception.inner_exception) - super(VstsServiceError, self).__init__(message=wrapped_exception.message, inner_exception=self.inner_exception) + super(VstsServiceError, self).__init__(message=wrapped_exception.message, + inner_exception=self.inner_exception) self.message = wrapped_exception.message self.exception_id = wrapped_exception.exception_id self.type_name = wrapped_exception.type_name diff --git a/vsts/vsts/extension_management/__init__.py b/vsts/vsts/extension_management/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/extension_management/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/extension_management/v4_0/__init__.py b/vsts/vsts/extension_management/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/extension_management/v4_0/extension_management_client.py b/vsts/vsts/extension_management/v4_0/extension_management_client.py new file mode 100644 index 00000000..f7e75820 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/extension_management_client.py @@ -0,0 +1,552 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ExtensionManagementClient(VssClient): + """ExtensionManagement + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ExtensionManagementClient, 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 = '6c2b0933-3600-42ae-bf8b-93d4f7e83594' + + def get_acquisition_options(self, item_id, test_commerce=None, is_free_or_trial_install=None): + """GetAcquisitionOptions. + [Preview API] + :param str item_id: + :param bool test_commerce: + :param bool is_free_or_trial_install: + :rtype: :class:` ` + """ + query_parameters = {} + if item_id is not None: + query_parameters['itemId'] = self._serialize.query('item_id', item_id, 'str') + if test_commerce is not None: + query_parameters['testCommerce'] = self._serialize.query('test_commerce', test_commerce, 'bool') + if is_free_or_trial_install is not None: + query_parameters['isFreeOrTrialInstall'] = self._serialize.query('is_free_or_trial_install', is_free_or_trial_install, 'bool') + response = self._send(http_method='GET', + location_id='288dff58-d13b-468e-9671-0fb754e9398c', + version='4.0-preview.1', + query_parameters=query_parameters) + return self._deserialize('AcquisitionOptions', response) + + def request_acquisition(self, acquisition_request): + """RequestAcquisition. + [Preview API] + :param :class:` ` acquisition_request: + :rtype: :class:` ` + """ + content = self._serialize.body(acquisition_request, 'ExtensionAcquisitionRequest') + response = self._send(http_method='POST', + location_id='da616457-eed3-4672-92d7-18d21f5c1658', + version='4.0-preview.1', + content=content) + return self._deserialize('ExtensionAcquisitionRequest', response) + + def register_authorization(self, publisher_name, extension_name, registration_id): + """RegisterAuthorization. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str registration_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if registration_id is not None: + route_values['registrationId'] = self._serialize.url('registration_id', registration_id, 'str') + response = self._send(http_method='PUT', + location_id='f21cfc80-d2d2-4248-98bb-7820c74c4606', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ExtensionAuthorization', response) + + def create_document_by_name(self, doc, publisher_name, extension_name, scope_type, scope_value, collection_name): + """CreateDocumentByName. + [Preview API] + :param :class:` ` doc: + :param str publisher_name: + :param str extension_name: + :param str scope_type: + :param str scope_value: + :param str collection_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if scope_type is not None: + route_values['scopeType'] = self._serialize.url('scope_type', scope_type, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + if collection_name is not None: + route_values['collectionName'] = self._serialize.url('collection_name', collection_name, 'str') + content = self._serialize.body(doc, 'object') + response = self._send(http_method='POST', + location_id='bbe06c18-1c8b-4fcd-b9c6-1535aaab8749', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('object', response) + + def delete_document_by_name(self, publisher_name, extension_name, scope_type, scope_value, collection_name, document_id): + """DeleteDocumentByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str scope_type: + :param str scope_value: + :param str collection_name: + :param str document_id: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if scope_type is not None: + route_values['scopeType'] = self._serialize.url('scope_type', scope_type, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + if collection_name is not None: + route_values['collectionName'] = self._serialize.url('collection_name', collection_name, 'str') + if document_id is not None: + route_values['documentId'] = self._serialize.url('document_id', document_id, 'str') + self._send(http_method='DELETE', + location_id='bbe06c18-1c8b-4fcd-b9c6-1535aaab8749', + version='4.0-preview.1', + route_values=route_values) + + def get_document_by_name(self, publisher_name, extension_name, scope_type, scope_value, collection_name, document_id): + """GetDocumentByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str scope_type: + :param str scope_value: + :param str collection_name: + :param str document_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if scope_type is not None: + route_values['scopeType'] = self._serialize.url('scope_type', scope_type, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + if collection_name is not None: + route_values['collectionName'] = self._serialize.url('collection_name', collection_name, 'str') + if document_id is not None: + route_values['documentId'] = self._serialize.url('document_id', document_id, 'str') + response = self._send(http_method='GET', + location_id='bbe06c18-1c8b-4fcd-b9c6-1535aaab8749', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_documents_by_name(self, publisher_name, extension_name, scope_type, scope_value, collection_name): + """GetDocumentsByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str scope_type: + :param str scope_value: + :param str collection_name: + :rtype: [object] + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if scope_type is not None: + route_values['scopeType'] = self._serialize.url('scope_type', scope_type, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + if collection_name is not None: + route_values['collectionName'] = self._serialize.url('collection_name', collection_name, 'str') + response = self._send(http_method='GET', + location_id='bbe06c18-1c8b-4fcd-b9c6-1535aaab8749', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[object]', response) + + def set_document_by_name(self, doc, publisher_name, extension_name, scope_type, scope_value, collection_name): + """SetDocumentByName. + [Preview API] + :param :class:` ` doc: + :param str publisher_name: + :param str extension_name: + :param str scope_type: + :param str scope_value: + :param str collection_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if scope_type is not None: + route_values['scopeType'] = self._serialize.url('scope_type', scope_type, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + if collection_name is not None: + route_values['collectionName'] = self._serialize.url('collection_name', collection_name, 'str') + content = self._serialize.body(doc, 'object') + response = self._send(http_method='PUT', + location_id='bbe06c18-1c8b-4fcd-b9c6-1535aaab8749', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('object', response) + + def update_document_by_name(self, doc, publisher_name, extension_name, scope_type, scope_value, collection_name): + """UpdateDocumentByName. + [Preview API] + :param :class:` ` doc: + :param str publisher_name: + :param str extension_name: + :param str scope_type: + :param str scope_value: + :param str collection_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if scope_type is not None: + route_values['scopeType'] = self._serialize.url('scope_type', scope_type, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + if collection_name is not None: + route_values['collectionName'] = self._serialize.url('collection_name', collection_name, 'str') + content = self._serialize.body(doc, 'object') + response = self._send(http_method='PATCH', + location_id='bbe06c18-1c8b-4fcd-b9c6-1535aaab8749', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('object', response) + + def query_collections_by_name(self, collection_query, publisher_name, extension_name): + """QueryCollectionsByName. + [Preview API] + :param :class:` ` collection_query: + :param str publisher_name: + :param str extension_name: + :rtype: [ExtensionDataCollection] + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(collection_query, 'ExtensionDataCollectionQuery') + response = self._send(http_method='POST', + location_id='56c331f1-ce53-4318-adfd-4db5c52a7a2e', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[ExtensionDataCollection]', response) + + def get_states(self, include_disabled=None, include_errors=None, include_installation_issues=None): + """GetStates. + [Preview API] + :param bool include_disabled: + :param bool include_errors: + :param bool include_installation_issues: + :rtype: [ExtensionState] + """ + query_parameters = {} + if include_disabled is not None: + query_parameters['includeDisabled'] = self._serialize.query('include_disabled', include_disabled, 'bool') + if include_errors is not None: + query_parameters['includeErrors'] = self._serialize.query('include_errors', include_errors, 'bool') + if include_installation_issues is not None: + query_parameters['includeInstallationIssues'] = self._serialize.query('include_installation_issues', include_installation_issues, 'bool') + response = self._send(http_method='GET', + location_id='92755d3d-9a8a-42b3-8a4d-87359fe5aa93', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ExtensionState]', response) + + def query_extensions(self, query): + """QueryExtensions. + [Preview API] + :param :class:` ` query: + :rtype: [InstalledExtension] + """ + content = self._serialize.body(query, 'InstalledExtensionQuery') + response = self._send(http_method='POST', + location_id='046c980f-1345-4ce2-bf85-b46d10ff4cfd', + version='4.0-preview.1', + content=content, + returns_collection=True) + return self._deserialize('[InstalledExtension]', response) + + def get_installed_extensions(self, include_disabled_extensions=None, include_errors=None, asset_types=None, include_installation_issues=None): + """GetInstalledExtensions. + [Preview API] + :param bool include_disabled_extensions: + :param bool include_errors: + :param [str] asset_types: + :param bool include_installation_issues: + :rtype: [InstalledExtension] + """ + query_parameters = {} + if include_disabled_extensions is not None: + query_parameters['includeDisabledExtensions'] = self._serialize.query('include_disabled_extensions', include_disabled_extensions, 'bool') + if include_errors is not None: + query_parameters['includeErrors'] = self._serialize.query('include_errors', include_errors, 'bool') + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + if include_installation_issues is not None: + query_parameters['includeInstallationIssues'] = self._serialize.query('include_installation_issues', include_installation_issues, 'bool') + response = self._send(http_method='GET', + location_id='275424d0-c844-4fe2-bda6-04933a1357d8', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[InstalledExtension]', response) + + def update_installed_extension(self, extension): + """UpdateInstalledExtension. + [Preview API] + :param :class:` ` extension: + :rtype: :class:` ` + """ + content = self._serialize.body(extension, 'InstalledExtension') + response = self._send(http_method='PATCH', + location_id='275424d0-c844-4fe2-bda6-04933a1357d8', + version='4.0-preview.1', + content=content) + return self._deserialize('InstalledExtension', response) + + def get_installed_extension_by_name(self, publisher_name, extension_name, asset_types=None): + """GetInstalledExtensionByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param [str] asset_types: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + response = self._send(http_method='GET', + location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('InstalledExtension', response) + + def install_extension_by_name(self, publisher_name, extension_name, version=None): + """InstallExtensionByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='POST', + location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('InstalledExtension', response) + + def uninstall_extension_by_name(self, publisher_name, extension_name, reason=None, reason_code=None): + """UninstallExtensionByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str reason: + :param str reason_code: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if reason is not None: + query_parameters['reason'] = self._serialize.query('reason', reason, 'str') + if reason_code is not None: + query_parameters['reasonCode'] = self._serialize.query('reason_code', reason_code, 'str') + self._send(http_method='DELETE', + location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_policies(self, user_id): + """GetPolicies. + [Preview API] + :param str user_id: + :rtype: :class:` ` + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + response = self._send(http_method='GET', + location_id='e5cc8c09-407b-4867-8319-2ae3338cbf6f', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('UserExtensionPolicy', response) + + def resolve_request(self, reject_message, publisher_name, extension_name, requester_id, state): + """ResolveRequest. + [Preview API] + :param str reject_message: + :param str publisher_name: + :param str extension_name: + :param str requester_id: + :param str state: + :rtype: int + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if requester_id is not None: + route_values['requesterId'] = self._serialize.url('requester_id', requester_id, 'str') + query_parameters = {} + if state is not None: + query_parameters['state'] = self._serialize.query('state', state, 'str') + content = self._serialize.body(reject_message, 'str') + response = self._send(http_method='PATCH', + location_id='aa93e1f3-511c-4364-8b9c-eb98818f2e0b', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('int', response) + + def get_requests(self): + """GetRequests. + [Preview API] + :rtype: [RequestedExtension] + """ + response = self._send(http_method='GET', + location_id='216b978f-b164-424e-ada2-b77561e842b7', + version='4.0-preview.1', + returns_collection=True) + return self._deserialize('[RequestedExtension]', response) + + def resolve_all_requests(self, reject_message, publisher_name, extension_name, state): + """ResolveAllRequests. + [Preview API] + :param str reject_message: + :param str publisher_name: + :param str extension_name: + :param str state: + :rtype: int + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if state is not None: + query_parameters['state'] = self._serialize.query('state', state, 'str') + content = self._serialize.body(reject_message, 'str') + response = self._send(http_method='PATCH', + location_id='ba93e1f3-511c-4364-8b9c-eb98818f2e0b', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('int', response) + + def delete_request(self, publisher_name, extension_name): + """DeleteRequest. + [Preview API] + :param str publisher_name: + :param str extension_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + self._send(http_method='DELETE', + location_id='f5afca1e-a728-4294-aa2d-4af0173431b5', + version='4.0-preview.1', + route_values=route_values) + + def request_extension(self, publisher_name, extension_name, request_message): + """RequestExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str request_message: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(request_message, 'str') + response = self._send(http_method='POST', + location_id='f5afca1e-a728-4294-aa2d-4af0173431b5', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('RequestedExtension', response) + + def get_token(self): + """GetToken. + [Preview API] + :rtype: str + """ + response = self._send(http_method='GET', + location_id='3a2e24ed-1d6f-4cb2-9f3b-45a96bbfaf50', + version='4.0-preview.1') + return self._deserialize('str', response) + diff --git a/vsts/vsts/extension_management/v4_0/models/__init__.py b/vsts/vsts/extension_management/v4_0/models/__init__.py new file mode 100644 index 00000000..b6ac34af --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/__init__.py @@ -0,0 +1,83 @@ +# -------------------------------------------------------------------------------------------- +# 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 .acquisition_operation import AcquisitionOperation +from .acquisition_operation_disallow_reason import AcquisitionOperationDisallowReason +from .acquisition_options import AcquisitionOptions +from .contribution import Contribution +from .contribution_base import ContributionBase +from .contribution_constraint import ContributionConstraint +from .contribution_property_description import ContributionPropertyDescription +from .contribution_type import ContributionType +from .extension_acquisition_request import ExtensionAcquisitionRequest +from .extension_authorization import ExtensionAuthorization +from .extension_badge import ExtensionBadge +from .extension_data_collection import ExtensionDataCollection +from .extension_data_collection_query import ExtensionDataCollectionQuery +from .extension_event_callback import ExtensionEventCallback +from .extension_event_callback_collection import ExtensionEventCallbackCollection +from .extension_file import ExtensionFile +from .extension_identifier import ExtensionIdentifier +from .extension_licensing import ExtensionLicensing +from .extension_manifest import ExtensionManifest +from .extension_policy import ExtensionPolicy +from .extension_request import ExtensionRequest +from .extension_share import ExtensionShare +from .extension_state import ExtensionState +from .extension_statistic import ExtensionStatistic +from .extension_version import ExtensionVersion +from .identity_ref import IdentityRef +from .installation_target import InstallationTarget +from .installed_extension import InstalledExtension +from .installed_extension_query import InstalledExtensionQuery +from .installed_extension_state import InstalledExtensionState +from .installed_extension_state_issue import InstalledExtensionStateIssue +from .licensing_override import LicensingOverride +from .published_extension import PublishedExtension +from .publisher_facts import PublisherFacts +from .requested_extension import RequestedExtension +from .user_extension_policy import UserExtensionPolicy + +__all__ = [ + 'AcquisitionOperation', + 'AcquisitionOperationDisallowReason', + 'AcquisitionOptions', + 'Contribution', + 'ContributionBase', + 'ContributionConstraint', + 'ContributionPropertyDescription', + 'ContributionType', + 'ExtensionAcquisitionRequest', + 'ExtensionAuthorization', + 'ExtensionBadge', + 'ExtensionDataCollection', + 'ExtensionDataCollectionQuery', + 'ExtensionEventCallback', + 'ExtensionEventCallbackCollection', + 'ExtensionFile', + 'ExtensionIdentifier', + 'ExtensionLicensing', + 'ExtensionManifest', + 'ExtensionPolicy', + 'ExtensionRequest', + 'ExtensionShare', + 'ExtensionState', + 'ExtensionStatistic', + 'ExtensionVersion', + 'IdentityRef', + 'InstallationTarget', + 'InstalledExtension', + 'InstalledExtensionQuery', + 'InstalledExtensionState', + 'InstalledExtensionStateIssue', + 'LicensingOverride', + 'PublishedExtension', + 'PublisherFacts', + 'RequestedExtension', + 'UserExtensionPolicy', +] diff --git a/vsts/vsts/extension_management/v4_0/models/acquisition_operation.py b/vsts/vsts/extension_management/v4_0/models/acquisition_operation.py new file mode 100644 index 00000000..2d9308c9 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/acquisition_operation.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOperation(Model): + """AcquisitionOperation. + + :param operation_state: State of the the AcquisitionOperation for the current user + :type operation_state: object + :param operation_type: AcquisitionOperationType: install, request, buy, etc... + :type operation_type: object + :param reason: Optional reason to justify current state. Typically used with Disallow state. + :type reason: str + :param reasons: List of reasons indicating why the operation is not allowed. + :type reasons: list of :class:`AcquisitionOperationDisallowReason ` + """ + + _attribute_map = { + 'operation_state': {'key': 'operationState', 'type': 'object'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'reasons': {'key': 'reasons', 'type': '[AcquisitionOperationDisallowReason]'} + } + + def __init__(self, operation_state=None, operation_type=None, reason=None, reasons=None): + super(AcquisitionOperation, self).__init__() + self.operation_state = operation_state + self.operation_type = operation_type + self.reason = reason + self.reasons = reasons diff --git a/vsts/vsts/extension_management/v4_0/models/acquisition_operation_disallow_reason.py b/vsts/vsts/extension_management/v4_0/models/acquisition_operation_disallow_reason.py new file mode 100644 index 00000000..565a65a8 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/acquisition_operation_disallow_reason.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOperationDisallowReason(Model): + """AcquisitionOperationDisallowReason. + + :param message: User-friendly message clarifying the reason for disallowance + :type message: str + :param type: Type of reason for disallowance - AlreadyInstalled, UnresolvedDemand, etc. + :type type: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, message=None, type=None): + super(AcquisitionOperationDisallowReason, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/extension_management/v4_0/models/acquisition_options.py b/vsts/vsts/extension_management/v4_0/models/acquisition_options.py new file mode 100644 index 00000000..a232498d --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/acquisition_options.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOptions(Model): + """AcquisitionOptions. + + :param default_operation: Default Operation for the ItemId in this target + :type default_operation: :class:`AcquisitionOperation ` + :param item_id: The item id that this options refer to + :type item_id: str + :param operations: Operations allowed for the ItemId in this target + :type operations: list of :class:`AcquisitionOperation ` + :param target: The target that this options refer to + :type target: str + """ + + _attribute_map = { + 'default_operation': {'key': 'defaultOperation', 'type': 'AcquisitionOperation'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operations': {'key': 'operations', 'type': '[AcquisitionOperation]'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, default_operation=None, item_id=None, operations=None, target=None): + super(AcquisitionOptions, self).__init__() + self.default_operation = default_operation + self.item_id = item_id + self.operations = operations + self.target = target diff --git a/vsts/vsts/extension_management/v4_0/models/contribution.py b/vsts/vsts/extension_management/v4_0/models/contribution.py new file mode 100644 index 00000000..c003d5cc --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/contribution.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class Contribution(ContributionBase): + """Contribution. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param constraints: List of constraints (filters) that should be applied to the availability of this contribution + :type constraints: list of :class:`ContributionConstraint ` + :param includes: Includes is a set of contributions that should have this contribution included in their targets list. + :type includes: list of str + :param properties: Properties/attributes of this contribution + :type properties: :class:`object ` + :param targets: The ids of the contribution(s) that this contribution targets. (parent contributions) + :type targets: list of str + :param type: Id of the Contribution Type + :type type: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'includes': {'key': 'includes', 'type': '[str]'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'targets': {'key': 'targets', 'type': '[str]'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, description=None, id=None, visible_to=None, constraints=None, includes=None, properties=None, targets=None, type=None): + super(Contribution, self).__init__(description=description, id=id, visible_to=visible_to) + self.constraints = constraints + self.includes = includes + self.properties = properties + self.targets = targets + self.type = type diff --git a/vsts/vsts/extension_management/v4_0/models/contribution_base.py b/vsts/vsts/extension_management/v4_0/models/contribution_base.py new file mode 100644 index 00000000..4a2402c0 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/contribution_base.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionBase(Model): + """ContributionBase. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'} + } + + def __init__(self, description=None, id=None, visible_to=None): + super(ContributionBase, self).__init__() + self.description = description + self.id = id + self.visible_to = visible_to diff --git a/vsts/vsts/extension_management/v4_0/models/contribution_constraint.py b/vsts/vsts/extension_management/v4_0/models/contribution_constraint.py new file mode 100644 index 00000000..8c1d903e --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/contribution_constraint.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionConstraint(Model): + """ContributionConstraint. + + :param group: An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included). + :type group: int + :param inverse: If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true) + :type inverse: bool + :param name: Name of the IContributionFilter class + :type name: str + :param properties: Properties that are fed to the contribution filter class + :type properties: :class:`object ` + :param relationships: Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will elimiate the contribution from the tree completely if the constraint is applied. + :type relationships: list of str + """ + + _attribute_map = { + 'group': {'key': 'group', 'type': 'int'}, + 'inverse': {'key': 'inverse', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'relationships': {'key': 'relationships', 'type': '[str]'} + } + + def __init__(self, group=None, inverse=None, name=None, properties=None, relationships=None): + super(ContributionConstraint, self).__init__() + self.group = group + self.inverse = inverse + self.name = name + self.properties = properties + self.relationships = relationships diff --git a/vsts/vsts/extension_management/v4_0/models/contribution_property_description.py b/vsts/vsts/extension_management/v4_0/models/contribution_property_description.py new file mode 100644 index 00000000..d4684adf --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/contribution_property_description.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionPropertyDescription(Model): + """ContributionPropertyDescription. + + :param description: Description of the property + :type description: str + :param name: Name of the property + :type name: str + :param required: True if this property is required + :type required: bool + :param type: The type of value used for this property + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, required=None, type=None): + super(ContributionPropertyDescription, self).__init__() + self.description = description + self.name = name + self.required = required + self.type = type diff --git a/vsts/vsts/extension_management/v4_0/models/contribution_type.py b/vsts/vsts/extension_management/v4_0/models/contribution_type.py new file mode 100644 index 00000000..4eda81f4 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/contribution_type.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class ContributionType(ContributionBase): + """ContributionType. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param indexed: Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type. NOTE: Only TrustedPartners are allowed to specify indexed contribution types. + :type indexed: bool + :param name: Friendly name of the contribution/type + :type name: str + :param properties: Describes the allowed properties for this contribution type + :type properties: dict + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'indexed': {'key': 'indexed', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{ContributionPropertyDescription}'} + } + + def __init__(self, description=None, id=None, visible_to=None, indexed=None, name=None, properties=None): + super(ContributionType, self).__init__(description=description, id=id, visible_to=visible_to) + self.indexed = indexed + self.name = name + self.properties = properties diff --git a/vsts/vsts/extension_management/v4_0/models/extension_acquisition_request.py b/vsts/vsts/extension_management/v4_0/models/extension_acquisition_request.py new file mode 100644 index 00000000..49bfc8e4 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_acquisition_request.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAcquisitionRequest(Model): + """ExtensionAcquisitionRequest. + + :param assignment_type: How the item is being assigned + :type assignment_type: object + :param billing_id: The id of the subscription used for purchase + :type billing_id: str + :param item_id: The marketplace id (publisherName.extensionName) for the item + :type item_id: str + :param operation_type: The type of operation, such as install, request, purchase + :type operation_type: object + :param properties: Additional properties which can be added to the request. + :type properties: :class:`object ` + :param quantity: How many licenses should be purchased + :type quantity: int + """ + + _attribute_map = { + 'assignment_type': {'key': 'assignmentType', 'type': 'object'}, + 'billing_id': {'key': 'billingId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'quantity': {'key': 'quantity', 'type': 'int'} + } + + def __init__(self, assignment_type=None, billing_id=None, item_id=None, operation_type=None, properties=None, quantity=None): + super(ExtensionAcquisitionRequest, self).__init__() + self.assignment_type = assignment_type + self.billing_id = billing_id + self.item_id = item_id + self.operation_type = operation_type + self.properties = properties + self.quantity = quantity diff --git a/vsts/vsts/extension_management/v4_0/models/extension_authorization.py b/vsts/vsts/extension_management/v4_0/models/extension_authorization.py new file mode 100644 index 00000000..d82dac11 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_authorization.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAuthorization(Model): + """ExtensionAuthorization. + + :param id: + :type id: str + :param scopes: + :type scopes: list of str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': '[str]'} + } + + def __init__(self, id=None, scopes=None): + super(ExtensionAuthorization, self).__init__() + self.id = id + self.scopes = scopes diff --git a/vsts/vsts/extension_management/v4_0/models/extension_badge.py b/vsts/vsts/extension_management/v4_0/models/extension_badge.py new file mode 100644 index 00000000..bcb0fa1c --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_badge.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionBadge(Model): + """ExtensionBadge. + + :param description: + :type description: str + :param img_uri: + :type img_uri: str + :param link: + :type link: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'img_uri': {'key': 'imgUri', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'} + } + + def __init__(self, description=None, img_uri=None, link=None): + super(ExtensionBadge, self).__init__() + self.description = description + self.img_uri = img_uri + self.link = link diff --git a/vsts/vsts/extension_management/v4_0/models/extension_data_collection.py b/vsts/vsts/extension_management/v4_0/models/extension_data_collection.py new file mode 100644 index 00000000..c3edc78d --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_data_collection.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDataCollection(Model): + """ExtensionDataCollection. + + :param collection_name: The name of the collection + :type collection_name: str + :param documents: A list of documents belonging to the collection + :type documents: list of :class:`object ` + :param scope_type: The type of the collection's scope, such as Default or User + :type scope_type: str + :param scope_value: The value of the collection's scope, such as Current or Me + :type scope_value: str + """ + + _attribute_map = { + 'collection_name': {'key': 'collectionName', 'type': 'str'}, + 'documents': {'key': 'documents', 'type': '[object]'}, + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'scope_value': {'key': 'scopeValue', 'type': 'str'} + } + + def __init__(self, collection_name=None, documents=None, scope_type=None, scope_value=None): + super(ExtensionDataCollection, self).__init__() + self.collection_name = collection_name + self.documents = documents + self.scope_type = scope_type + self.scope_value = scope_value diff --git a/vsts/vsts/extension_management/v4_0/models/extension_data_collection_query.py b/vsts/vsts/extension_management/v4_0/models/extension_data_collection_query.py new file mode 100644 index 00000000..e558f79d --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_data_collection_query.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDataCollectionQuery(Model): + """ExtensionDataCollectionQuery. + + :param collections: A list of collections to query + :type collections: list of :class:`ExtensionDataCollection ` + """ + + _attribute_map = { + 'collections': {'key': 'collections', 'type': '[ExtensionDataCollection]'} + } + + def __init__(self, collections=None): + super(ExtensionDataCollectionQuery, self).__init__() + self.collections = collections diff --git a/vsts/vsts/extension_management/v4_0/models/extension_event_callback.py b/vsts/vsts/extension_management/v4_0/models/extension_event_callback.py new file mode 100644 index 00000000..59ab677a --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_event_callback.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallback(Model): + """ExtensionEventCallback. + + :param uri: The uri of the endpoint that is hit when an event occurs + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, uri=None): + super(ExtensionEventCallback, self).__init__() + self.uri = uri diff --git a/vsts/vsts/extension_management/v4_0/models/extension_event_callback_collection.py b/vsts/vsts/extension_management/v4_0/models/extension_event_callback_collection.py new file mode 100644 index 00000000..7529b2fc --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_event_callback_collection.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallbackCollection(Model): + """ExtensionEventCallbackCollection. + + :param post_disable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension disable has occurred. + :type post_disable: :class:`ExtensionEventCallback ` + :param post_enable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension enable has occurred. + :type post_enable: :class:`ExtensionEventCallback ` + :param post_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install has completed. + :type post_install: :class:`ExtensionEventCallback ` + :param post_uninstall: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension uninstall has occurred. + :type post_uninstall: :class:`ExtensionEventCallback ` + :param post_update: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension update has occurred. + :type post_update: :class:`ExtensionEventCallback ` + :param pre_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install is about to occur. Response indicates whether to proceed or abort. + :type pre_install: :class:`ExtensionEventCallback ` + :param version_check: For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used + :type version_check: :class:`ExtensionEventCallback ` + """ + + _attribute_map = { + 'post_disable': {'key': 'postDisable', 'type': 'ExtensionEventCallback'}, + 'post_enable': {'key': 'postEnable', 'type': 'ExtensionEventCallback'}, + 'post_install': {'key': 'postInstall', 'type': 'ExtensionEventCallback'}, + 'post_uninstall': {'key': 'postUninstall', 'type': 'ExtensionEventCallback'}, + 'post_update': {'key': 'postUpdate', 'type': 'ExtensionEventCallback'}, + 'pre_install': {'key': 'preInstall', 'type': 'ExtensionEventCallback'}, + 'version_check': {'key': 'versionCheck', 'type': 'ExtensionEventCallback'} + } + + def __init__(self, post_disable=None, post_enable=None, post_install=None, post_uninstall=None, post_update=None, pre_install=None, version_check=None): + super(ExtensionEventCallbackCollection, self).__init__() + self.post_disable = post_disable + self.post_enable = post_enable + self.post_install = post_install + self.post_uninstall = post_uninstall + self.post_update = post_update + self.pre_install = pre_install + self.version_check = version_check diff --git a/vsts/vsts/extension_management/v4_0/models/extension_file.py b/vsts/vsts/extension_management/v4_0/models/extension_file.py new file mode 100644 index 00000000..ba792fd5 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_file.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFile(Model): + """ExtensionFile. + + :param asset_type: + :type asset_type: str + :param content_type: + :type content_type: str + :param file_id: + :type file_id: int + :param is_default: + :type is_default: bool + :param is_public: + :type is_public: bool + :param language: + :type language: str + :param short_description: + :type short_description: str + :param source: + :type source: str + :param version: + :type version: str + """ + + _attribute_map = { + 'asset_type': {'key': 'assetType', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_public': {'key': 'isPublic', 'type': 'bool'}, + 'language': {'key': 'language', 'type': 'str'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, asset_type=None, content_type=None, file_id=None, is_default=None, is_public=None, language=None, short_description=None, source=None, version=None): + super(ExtensionFile, self).__init__() + self.asset_type = asset_type + self.content_type = content_type + self.file_id = file_id + self.is_default = is_default + self.is_public = is_public + self.language = language + self.short_description = short_description + self.source = source + self.version = version diff --git a/vsts/vsts/extension_management/v4_0/models/extension_identifier.py b/vsts/vsts/extension_management/v4_0/models/extension_identifier.py new file mode 100644 index 00000000..ea02ec21 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_identifier.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionIdentifier(Model): + """ExtensionIdentifier. + + :param extension_name: The ExtensionName component part of the fully qualified ExtensionIdentifier + :type extension_name: str + :param publisher_name: The PublisherName component part of the fully qualified ExtensionIdentifier + :type publisher_name: str + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, extension_name=None, publisher_name=None): + super(ExtensionIdentifier, self).__init__() + self.extension_name = extension_name + self.publisher_name = publisher_name diff --git a/vsts/vsts/extension_management/v4_0/models/extension_licensing.py b/vsts/vsts/extension_management/v4_0/models/extension_licensing.py new file mode 100644 index 00000000..9e562c82 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_licensing.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionLicensing(Model): + """ExtensionLicensing. + + :param overrides: A list of contributions which deviate from the default licensing behavior + :type overrides: list of :class:`LicensingOverride ` + """ + + _attribute_map = { + 'overrides': {'key': 'overrides', 'type': '[LicensingOverride]'} + } + + def __init__(self, overrides=None): + super(ExtensionLicensing, self).__init__() + self.overrides = overrides diff --git a/vsts/vsts/extension_management/v4_0/models/extension_manifest.py b/vsts/vsts/extension_management/v4_0/models/extension_manifest.py new file mode 100644 index 00000000..9d0670dd --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_manifest.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionManifest(Model): + """ExtensionManifest. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'} + } + + def __init__(self, base_uri=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, scopes=None, service_instance_type=None): + super(ExtensionManifest, self).__init__() + self.base_uri = base_uri + self.contributions = contributions + self.contribution_types = contribution_types + self.demands = demands + self.event_callbacks = event_callbacks + self.fallback_base_uri = fallback_base_uri + self.language = language + self.licensing = licensing + self.manifest_version = manifest_version + self.scopes = scopes + self.service_instance_type = service_instance_type diff --git a/vsts/vsts/extension_management/v4_0/models/extension_policy.py b/vsts/vsts/extension_management/v4_0/models/extension_policy.py new file mode 100644 index 00000000..ad20f559 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_policy.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionPolicy(Model): + """ExtensionPolicy. + + :param install: Permissions on 'Install' operation + :type install: object + :param request: Permission on 'Request' operation + :type request: object + """ + + _attribute_map = { + 'install': {'key': 'install', 'type': 'object'}, + 'request': {'key': 'request', 'type': 'object'} + } + + def __init__(self, install=None, request=None): + super(ExtensionPolicy, self).__init__() + self.install = install + self.request = request diff --git a/vsts/vsts/extension_management/v4_0/models/extension_request.py b/vsts/vsts/extension_management/v4_0/models/extension_request.py new file mode 100644 index 00000000..9591f2ab --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_request.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionRequest(Model): + """ExtensionRequest. + + :param reject_message: Required message supplied if the request is rejected + :type reject_message: str + :param request_date: Date at which the request was made + :type request_date: datetime + :param requested_by: Represents the user who made the request + :type requested_by: :class:`IdentityRef ` + :param request_message: Optional message supplied by the requester justifying the request + :type request_message: str + :param request_state: Represents the state of the request + :type request_state: object + :param resolve_date: Date at which the request was resolved + :type resolve_date: datetime + :param resolved_by: Represents the user who resolved the request + :type resolved_by: :class:`IdentityRef ` + """ + + _attribute_map = { + 'reject_message': {'key': 'rejectMessage', 'type': 'str'}, + 'request_date': {'key': 'requestDate', 'type': 'iso-8601'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'request_message': {'key': 'requestMessage', 'type': 'str'}, + 'request_state': {'key': 'requestState', 'type': 'object'}, + 'resolve_date': {'key': 'resolveDate', 'type': 'iso-8601'}, + 'resolved_by': {'key': 'resolvedBy', 'type': 'IdentityRef'} + } + + def __init__(self, reject_message=None, request_date=None, requested_by=None, request_message=None, request_state=None, resolve_date=None, resolved_by=None): + super(ExtensionRequest, self).__init__() + self.reject_message = reject_message + self.request_date = request_date + self.requested_by = requested_by + self.request_message = request_message + self.request_state = request_state + self.resolve_date = resolve_date + self.resolved_by = resolved_by diff --git a/vsts/vsts/extension_management/v4_0/models/extension_share.py b/vsts/vsts/extension_management/v4_0/models/extension_share.py new file mode 100644 index 00000000..acc81ef0 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_share.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionShare(Model): + """ExtensionShare. + + :param id: + :type id: str + :param name: + :type name: str + :param type: + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None): + super(ExtensionShare, self).__init__() + self.id = id + self.name = name + self.type = type diff --git a/vsts/vsts/extension_management/v4_0/models/extension_state.py b/vsts/vsts/extension_management/v4_0/models/extension_state.py new file mode 100644 index 00000000..9118bdb8 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_state.py @@ -0,0 +1,46 @@ +# -------------------------------------------------------------------------------------------- +# 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 .installed_extension_state import InstalledExtensionState + + +class ExtensionState(InstalledExtensionState): + """ExtensionState. + + :param flags: States of an installed extension + :type flags: object + :param installation_issues: List of installation issues + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :param last_updated: The time at which this installation was last updated + :type last_updated: datetime + :param extension_name: + :type extension_name: str + :param last_version_check: The time at which the version was last checked + :type last_version_check: datetime + :param publisher_name: + :type publisher_name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_issues': {'key': 'installationIssues', 'type': '[InstalledExtensionStateIssue]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'last_version_check': {'key': 'lastVersionCheck', 'type': 'iso-8601'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, flags=None, installation_issues=None, last_updated=None, extension_name=None, last_version_check=None, publisher_name=None, version=None): + super(ExtensionState, self).__init__(flags=flags, installation_issues=installation_issues, last_updated=last_updated) + self.extension_name = extension_name + self.last_version_check = last_version_check + self.publisher_name = publisher_name + self.version = version diff --git a/vsts/vsts/extension_management/v4_0/models/extension_statistic.py b/vsts/vsts/extension_management/v4_0/models/extension_statistic.py new file mode 100644 index 00000000..11fc6704 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_statistic.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionStatistic(Model): + """ExtensionStatistic. + + :param statistic_name: + :type statistic_name: str + :param value: + :type value: number + """ + + _attribute_map = { + 'statistic_name': {'key': 'statisticName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'number'} + } + + def __init__(self, statistic_name=None, value=None): + super(ExtensionStatistic, self).__init__() + self.statistic_name = statistic_name + self.value = value diff --git a/vsts/vsts/extension_management/v4_0/models/extension_version.py b/vsts/vsts/extension_management/v4_0/models/extension_version.py new file mode 100644 index 00000000..b2cf8be7 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/extension_version.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionVersion(Model): + """ExtensionVersion. + + :param asset_uri: + :type asset_uri: str + :param badges: + :type badges: list of :class:`ExtensionBadge ` + :param fallback_asset_uri: + :type fallback_asset_uri: str + :param files: + :type files: list of :class:`ExtensionFile ` + :param flags: + :type flags: object + :param last_updated: + :type last_updated: datetime + :param properties: + :type properties: list of { key: str; value: str } + :param validation_result_message: + :type validation_result_message: str + :param version: + :type version: str + :param version_description: + :type version_description: str + """ + + _attribute_map = { + 'asset_uri': {'key': 'assetUri', 'type': 'str'}, + 'badges': {'key': 'badges', 'type': '[ExtensionBadge]'}, + 'fallback_asset_uri': {'key': 'fallbackAssetUri', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'properties': {'key': 'properties', 'type': '[{ key: str; value: str }]'}, + 'validation_result_message': {'key': 'validationResultMessage', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'version_description': {'key': 'versionDescription', 'type': 'str'} + } + + def __init__(self, asset_uri=None, badges=None, fallback_asset_uri=None, files=None, flags=None, last_updated=None, properties=None, validation_result_message=None, version=None, version_description=None): + super(ExtensionVersion, self).__init__() + self.asset_uri = asset_uri + self.badges = badges + self.fallback_asset_uri = fallback_asset_uri + self.files = files + self.flags = flags + self.last_updated = last_updated + self.properties = properties + self.validation_result_message = validation_result_message + self.version = version + self.version_description = version_description diff --git a/vsts/vsts/extension_management/v4_0/models/identity_ref.py b/vsts/vsts/extension_management/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/extension_management/v4_0/models/installation_target.py b/vsts/vsts/extension_management/v4_0/models/installation_target.py new file mode 100644 index 00000000..572aaae0 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/installation_target.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstallationTarget(Model): + """InstallationTarget. + + :param max_inclusive: + :type max_inclusive: bool + :param max_version: + :type max_version: str + :param min_inclusive: + :type min_inclusive: bool + :param min_version: + :type min_version: str + :param target: + :type target: str + :param target_version: + :type target_version: str + """ + + _attribute_map = { + 'max_inclusive': {'key': 'maxInclusive', 'type': 'bool'}, + 'max_version': {'key': 'maxVersion', 'type': 'str'}, + 'min_inclusive': {'key': 'minInclusive', 'type': 'bool'}, + 'min_version': {'key': 'minVersion', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'} + } + + def __init__(self, max_inclusive=None, max_version=None, min_inclusive=None, min_version=None, target=None, target_version=None): + super(InstallationTarget, self).__init__() + self.max_inclusive = max_inclusive + self.max_version = max_version + self.min_inclusive = min_inclusive + self.min_version = min_version + self.target = target + self.target_version = target_version diff --git a/vsts/vsts/extension_management/v4_0/models/installed_extension.py b/vsts/vsts/extension_management/v4_0/models/installed_extension.py new file mode 100644 index 00000000..08230147 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/installed_extension.py @@ -0,0 +1,94 @@ +# -------------------------------------------------------------------------------------------- +# 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 .extension_manifest import ExtensionManifest + + +class InstalledExtension(ExtensionManifest): + """InstalledExtension. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + :param extension_id: The friendly extension id for this extension - unique for a given publisher. + :type extension_id: str + :param extension_name: The display name of the extension. + :type extension_name: str + :param files: This is the set of files available from the extension. + :type files: list of :class:`ExtensionFile ` + :param flags: Extension flags relevant to contribution consumers + :type flags: object + :param install_state: Information about this particular installation of the extension + :type install_state: :class:`InstalledExtensionState ` + :param last_published: This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension. + :type last_published: datetime + :param publisher_id: Unique id of the publisher of this extension + :type publisher_id: str + :param publisher_name: The display name of the publisher + :type publisher_name: str + :param registration_id: Unique id for this extension (the same id is used for all versions of a single extension) + :type registration_id: str + :param version: Version of this extension + :type version: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'install_state': {'key': 'installState', 'type': 'InstalledExtensionState'}, + 'last_published': {'key': 'lastPublished', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, base_uri=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, scopes=None, service_instance_type=None, extension_id=None, extension_name=None, files=None, flags=None, install_state=None, last_published=None, publisher_id=None, publisher_name=None, registration_id=None, version=None): + super(InstalledExtension, self).__init__(base_uri=base_uri, contributions=contributions, contribution_types=contribution_types, demands=demands, event_callbacks=event_callbacks, fallback_base_uri=fallback_base_uri, language=language, licensing=licensing, manifest_version=manifest_version, scopes=scopes, service_instance_type=service_instance_type) + self.extension_id = extension_id + self.extension_name = extension_name + self.files = files + self.flags = flags + self.install_state = install_state + self.last_published = last_published + self.publisher_id = publisher_id + self.publisher_name = publisher_name + self.registration_id = registration_id + self.version = version diff --git a/vsts/vsts/extension_management/v4_0/models/installed_extension_query.py b/vsts/vsts/extension_management/v4_0/models/installed_extension_query.py new file mode 100644 index 00000000..9f039b7d --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/installed_extension_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionQuery(Model): + """InstalledExtensionQuery. + + :param asset_types: + :type asset_types: list of str + :param monikers: + :type monikers: list of :class:`ExtensionIdentifier ` + """ + + _attribute_map = { + 'asset_types': {'key': 'assetTypes', 'type': '[str]'}, + 'monikers': {'key': 'monikers', 'type': '[ExtensionIdentifier]'} + } + + def __init__(self, asset_types=None, monikers=None): + super(InstalledExtensionQuery, self).__init__() + self.asset_types = asset_types + self.monikers = monikers diff --git a/vsts/vsts/extension_management/v4_0/models/installed_extension_state.py b/vsts/vsts/extension_management/v4_0/models/installed_extension_state.py new file mode 100644 index 00000000..25f06af7 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/installed_extension_state.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionState(Model): + """InstalledExtensionState. + + :param flags: States of an installed extension + :type flags: object + :param installation_issues: List of installation issues + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :param last_updated: The time at which this installation was last updated + :type last_updated: datetime + """ + + _attribute_map = { + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_issues': {'key': 'installationIssues', 'type': '[InstalledExtensionStateIssue]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'} + } + + def __init__(self, flags=None, installation_issues=None, last_updated=None): + super(InstalledExtensionState, self).__init__() + self.flags = flags + self.installation_issues = installation_issues + self.last_updated = last_updated diff --git a/vsts/vsts/extension_management/v4_0/models/installed_extension_state_issue.py b/vsts/vsts/extension_management/v4_0/models/installed_extension_state_issue.py new file mode 100644 index 00000000..e66bb556 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/installed_extension_state_issue.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionStateIssue(Model): + """InstalledExtensionStateIssue. + + :param message: The error message + :type message: str + :param source: Source of the installation issue, for example "Demands" + :type source: str + :param type: Installation issue type (Warning, Error) + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, source=None, type=None): + super(InstalledExtensionStateIssue, self).__init__() + self.message = message + self.source = source + self.type = type diff --git a/vsts/vsts/extension_management/v4_0/models/licensing_override.py b/vsts/vsts/extension_management/v4_0/models/licensing_override.py new file mode 100644 index 00000000..7812d57f --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/licensing_override.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 LicensingOverride(Model): + """LicensingOverride. + + :param behavior: How the inclusion of this contribution should change based on licensing + :type behavior: object + :param id: Fully qualified contribution id which we want to define licensing behavior for + :type id: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, behavior=None, id=None): + super(LicensingOverride, self).__init__() + self.behavior = behavior + self.id = id diff --git a/vsts/vsts/extension_management/v4_0/models/published_extension.py b/vsts/vsts/extension_management/v4_0/models/published_extension.py new file mode 100644 index 00000000..b3b93814 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/published_extension.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishedExtension(Model): + """PublishedExtension. + + :param categories: + :type categories: list of str + :param deployment_type: + :type deployment_type: object + :param display_name: + :type display_name: str + :param extension_id: + :type extension_id: str + :param extension_name: + :type extension_name: str + :param flags: + :type flags: object + :param installation_targets: + :type installation_targets: list of :class:`InstallationTarget ` + :param last_updated: + :type last_updated: datetime + :param long_description: + :type long_description: str + :param published_date: Date on which the extension was first uploaded. + :type published_date: datetime + :param publisher: + :type publisher: :class:`PublisherFacts ` + :param release_date: Date on which the extension first went public. + :type release_date: datetime + :param shared_with: + :type shared_with: list of :class:`ExtensionShare ` + :param short_description: + :type short_description: str + :param statistics: + :type statistics: list of :class:`ExtensionStatistic ` + :param tags: + :type tags: list of str + :param versions: + :type versions: list of :class:`ExtensionVersion ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'object'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'long_description': {'key': 'longDescription', 'type': 'str'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'publisher': {'key': 'publisher', 'type': 'PublisherFacts'}, + 'release_date': {'key': 'releaseDate', 'type': 'iso-8601'}, + 'shared_with': {'key': 'sharedWith', 'type': '[ExtensionShare]'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': '[ExtensionStatistic]'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'versions': {'key': 'versions', 'type': '[ExtensionVersion]'} + } + + def __init__(self, categories=None, deployment_type=None, display_name=None, extension_id=None, extension_name=None, flags=None, installation_targets=None, last_updated=None, long_description=None, published_date=None, publisher=None, release_date=None, shared_with=None, short_description=None, statistics=None, tags=None, versions=None): + super(PublishedExtension, self).__init__() + self.categories = categories + self.deployment_type = deployment_type + self.display_name = display_name + self.extension_id = extension_id + self.extension_name = extension_name + self.flags = flags + self.installation_targets = installation_targets + self.last_updated = last_updated + self.long_description = long_description + self.published_date = published_date + self.publisher = publisher + self.release_date = release_date + self.shared_with = shared_with + self.short_description = short_description + self.statistics = statistics + self.tags = tags + self.versions = versions diff --git a/vsts/vsts/extension_management/v4_0/models/publisher_facts.py b/vsts/vsts/extension_management/v4_0/models/publisher_facts.py new file mode 100644 index 00000000..979b6d8d --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/publisher_facts.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherFacts(Model): + """PublisherFacts. + + :param display_name: + :type display_name: str + :param flags: + :type flags: object + :param publisher_id: + :type publisher_id: str + :param publisher_name: + :type publisher_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, display_name=None, flags=None, publisher_id=None, publisher_name=None): + super(PublisherFacts, self).__init__() + self.display_name = display_name + self.flags = flags + self.publisher_id = publisher_id + self.publisher_name = publisher_name diff --git a/vsts/vsts/extension_management/v4_0/models/requested_extension.py b/vsts/vsts/extension_management/v4_0/models/requested_extension.py new file mode 100644 index 00000000..00759b10 --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/requested_extension.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 RequestedExtension(Model): + """RequestedExtension. + + :param extension_name: The unique name of the extension + :type extension_name: str + :param extension_requests: A list of each request for the extension + :type extension_requests: list of :class:`ExtensionRequest ` + :param publisher_display_name: DisplayName of the publisher that owns the extension being published. + :type publisher_display_name: str + :param publisher_name: Represents the Publisher of the requested extension + :type publisher_name: str + :param request_count: The total number of requests for an extension + :type request_count: int + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'extension_requests': {'key': 'extensionRequests', 'type': '[ExtensionRequest]'}, + 'publisher_display_name': {'key': 'publisherDisplayName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'request_count': {'key': 'requestCount', 'type': 'int'} + } + + def __init__(self, extension_name=None, extension_requests=None, publisher_display_name=None, publisher_name=None, request_count=None): + super(RequestedExtension, self).__init__() + self.extension_name = extension_name + self.extension_requests = extension_requests + self.publisher_display_name = publisher_display_name + self.publisher_name = publisher_name + self.request_count = request_count diff --git a/vsts/vsts/extension_management/v4_0/models/user_extension_policy.py b/vsts/vsts/extension_management/v4_0/models/user_extension_policy.py new file mode 100644 index 00000000..363caa7d --- /dev/null +++ b/vsts/vsts/extension_management/v4_0/models/user_extension_policy.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 UserExtensionPolicy(Model): + """UserExtensionPolicy. + + :param display_name: User display name that this policy refers to + :type display_name: str + :param permissions: The extension policy applied to the user + :type permissions: :class:`ExtensionPolicy ` + :param user_id: User id that this policy refers to + :type user_id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'ExtensionPolicy'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, display_name=None, permissions=None, user_id=None): + super(UserExtensionPolicy, self).__init__() + self.display_name = display_name + self.permissions = permissions + self.user_id = user_id diff --git a/vsts/vsts/extension_management/v4_1/__init__.py b/vsts/vsts/extension_management/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/extension_management/v4_1/extension_management_client.py b/vsts/vsts/extension_management/v4_1/extension_management_client.py new file mode 100644 index 00000000..e65c29f5 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/extension_management_client.py @@ -0,0 +1,135 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ExtensionManagementClient(VssClient): + """ExtensionManagement + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ExtensionManagementClient, 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 = '6c2b0933-3600-42ae-bf8b-93d4f7e83594' + + def get_installed_extensions(self, include_disabled_extensions=None, include_errors=None, asset_types=None, include_installation_issues=None): + """GetInstalledExtensions. + [Preview API] List the installed extensions in the account / project collection. + :param bool include_disabled_extensions: If true (the default), include disabled extensions in the results. + :param bool include_errors: If true, include installed extensions with errors. + :param [str] asset_types: + :param bool include_installation_issues: + :rtype: [InstalledExtension] + """ + query_parameters = {} + if include_disabled_extensions is not None: + query_parameters['includeDisabledExtensions'] = self._serialize.query('include_disabled_extensions', include_disabled_extensions, 'bool') + if include_errors is not None: + query_parameters['includeErrors'] = self._serialize.query('include_errors', include_errors, 'bool') + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + if include_installation_issues is not None: + query_parameters['includeInstallationIssues'] = self._serialize.query('include_installation_issues', include_installation_issues, 'bool') + response = self._send(http_method='GET', + location_id='275424d0-c844-4fe2-bda6-04933a1357d8', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[InstalledExtension]', response) + + def update_installed_extension(self, extension): + """UpdateInstalledExtension. + [Preview API] Update an installed extension. Typically this API is used to enable or disable an extension. + :param :class:` ` extension: + :rtype: :class:` ` + """ + content = self._serialize.body(extension, 'InstalledExtension') + response = self._send(http_method='PATCH', + location_id='275424d0-c844-4fe2-bda6-04933a1357d8', + version='4.1-preview.1', + content=content) + return self._deserialize('InstalledExtension', response) + + def get_installed_extension_by_name(self, publisher_name, extension_name, asset_types=None): + """GetInstalledExtensionByName. + [Preview API] Get an installed extension by its publisher and extension name. + :param str publisher_name: Name of the publisher. Example: "fabrikam". + :param str extension_name: Name of the extension. Example: "ops-tools". + :param [str] asset_types: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if asset_types is not None: + asset_types = ":".join(asset_types) + query_parameters['assetTypes'] = self._serialize.query('asset_types', asset_types, 'str') + response = self._send(http_method='GET', + location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('InstalledExtension', response) + + def install_extension_by_name(self, publisher_name, extension_name, version=None): + """InstallExtensionByName. + [Preview API] Install the specified extension into the account / project collection. + :param str publisher_name: Name of the publisher. Example: "fabrikam". + :param str extension_name: Name of the extension. Example: "ops-tools". + :param str version: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='POST', + location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('InstalledExtension', response) + + def uninstall_extension_by_name(self, publisher_name, extension_name, reason=None, reason_code=None): + """UninstallExtensionByName. + [Preview API] Uninstall the specified extension from the account / project collection. + :param str publisher_name: Name of the publisher. Example: "fabrikam". + :param str extension_name: Name of the extension. Example: "ops-tools". + :param str reason: + :param str reason_code: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if reason is not None: + query_parameters['reason'] = self._serialize.query('reason', reason, 'str') + if reason_code is not None: + query_parameters['reasonCode'] = self._serialize.query('reason_code', reason_code, 'str') + self._send(http_method='DELETE', + location_id='fb0da285-f23e-4b56-8b53-3ef5f9f6de66', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + diff --git a/vsts/vsts/extension_management/v4_1/models/__init__.py b/vsts/vsts/extension_management/v4_1/models/__init__.py new file mode 100644 index 00000000..a7e852a0 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/__init__.py @@ -0,0 +1,87 @@ +# -------------------------------------------------------------------------------------------- +# 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 .acquisition_operation import AcquisitionOperation +from .acquisition_operation_disallow_reason import AcquisitionOperationDisallowReason +from .acquisition_options import AcquisitionOptions +from .contribution import Contribution +from .contribution_base import ContributionBase +from .contribution_constraint import ContributionConstraint +from .contribution_property_description import ContributionPropertyDescription +from .contribution_type import ContributionType +from .extension_acquisition_request import ExtensionAcquisitionRequest +from .extension_authorization import ExtensionAuthorization +from .extension_badge import ExtensionBadge +from .extension_data_collection import ExtensionDataCollection +from .extension_data_collection_query import ExtensionDataCollectionQuery +from .extension_event_callback import ExtensionEventCallback +from .extension_event_callback_collection import ExtensionEventCallbackCollection +from .extension_file import ExtensionFile +from .extension_identifier import ExtensionIdentifier +from .extension_licensing import ExtensionLicensing +from .extension_manifest import ExtensionManifest +from .extension_policy import ExtensionPolicy +from .extension_request import ExtensionRequest +from .extension_share import ExtensionShare +from .extension_state import ExtensionState +from .extension_statistic import ExtensionStatistic +from .extension_version import ExtensionVersion +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .installation_target import InstallationTarget +from .installed_extension import InstalledExtension +from .installed_extension_query import InstalledExtensionQuery +from .installed_extension_state import InstalledExtensionState +from .installed_extension_state_issue import InstalledExtensionStateIssue +from .licensing_override import LicensingOverride +from .published_extension import PublishedExtension +from .publisher_facts import PublisherFacts +from .reference_links import ReferenceLinks +from .requested_extension import RequestedExtension +from .user_extension_policy import UserExtensionPolicy + +__all__ = [ + 'AcquisitionOperation', + 'AcquisitionOperationDisallowReason', + 'AcquisitionOptions', + 'Contribution', + 'ContributionBase', + 'ContributionConstraint', + 'ContributionPropertyDescription', + 'ContributionType', + 'ExtensionAcquisitionRequest', + 'ExtensionAuthorization', + 'ExtensionBadge', + 'ExtensionDataCollection', + 'ExtensionDataCollectionQuery', + 'ExtensionEventCallback', + 'ExtensionEventCallbackCollection', + 'ExtensionFile', + 'ExtensionIdentifier', + 'ExtensionLicensing', + 'ExtensionManifest', + 'ExtensionPolicy', + 'ExtensionRequest', + 'ExtensionShare', + 'ExtensionState', + 'ExtensionStatistic', + 'ExtensionVersion', + 'GraphSubjectBase', + 'IdentityRef', + 'InstallationTarget', + 'InstalledExtension', + 'InstalledExtensionQuery', + 'InstalledExtensionState', + 'InstalledExtensionStateIssue', + 'LicensingOverride', + 'PublishedExtension', + 'PublisherFacts', + 'ReferenceLinks', + 'RequestedExtension', + 'UserExtensionPolicy', +] diff --git a/vsts/vsts/extension_management/v4_1/models/acquisition_operation.py b/vsts/vsts/extension_management/v4_1/models/acquisition_operation.py new file mode 100644 index 00000000..ecaf3f13 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/acquisition_operation.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOperation(Model): + """AcquisitionOperation. + + :param operation_state: State of the the AcquisitionOperation for the current user + :type operation_state: object + :param operation_type: AcquisitionOperationType: install, request, buy, etc... + :type operation_type: object + :param reason: Optional reason to justify current state. Typically used with Disallow state. + :type reason: str + :param reasons: List of reasons indicating why the operation is not allowed. + :type reasons: list of :class:`AcquisitionOperationDisallowReason ` + """ + + _attribute_map = { + 'operation_state': {'key': 'operationState', 'type': 'object'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'reasons': {'key': 'reasons', 'type': '[AcquisitionOperationDisallowReason]'} + } + + def __init__(self, operation_state=None, operation_type=None, reason=None, reasons=None): + super(AcquisitionOperation, self).__init__() + self.operation_state = operation_state + self.operation_type = operation_type + self.reason = reason + self.reasons = reasons diff --git a/vsts/vsts/extension_management/v4_1/models/acquisition_operation_disallow_reason.py b/vsts/vsts/extension_management/v4_1/models/acquisition_operation_disallow_reason.py new file mode 100644 index 00000000..565a65a8 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/acquisition_operation_disallow_reason.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOperationDisallowReason(Model): + """AcquisitionOperationDisallowReason. + + :param message: User-friendly message clarifying the reason for disallowance + :type message: str + :param type: Type of reason for disallowance - AlreadyInstalled, UnresolvedDemand, etc. + :type type: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, message=None, type=None): + super(AcquisitionOperationDisallowReason, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/extension_management/v4_1/models/acquisition_options.py b/vsts/vsts/extension_management/v4_1/models/acquisition_options.py new file mode 100644 index 00000000..715ddc83 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/acquisition_options.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOptions(Model): + """AcquisitionOptions. + + :param default_operation: Default Operation for the ItemId in this target + :type default_operation: :class:`AcquisitionOperation ` + :param item_id: The item id that this options refer to + :type item_id: str + :param operations: Operations allowed for the ItemId in this target + :type operations: list of :class:`AcquisitionOperation ` + :param properties: Additional properties which can be added to the request. + :type properties: :class:`object ` + :param target: The target that this options refer to + :type target: str + """ + + _attribute_map = { + 'default_operation': {'key': 'defaultOperation', 'type': 'AcquisitionOperation'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operations': {'key': 'operations', 'type': '[AcquisitionOperation]'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, default_operation=None, item_id=None, operations=None, properties=None, target=None): + super(AcquisitionOptions, self).__init__() + self.default_operation = default_operation + self.item_id = item_id + self.operations = operations + self.properties = properties + self.target = target diff --git a/vsts/vsts/extension_management/v4_1/models/contribution.py b/vsts/vsts/extension_management/v4_1/models/contribution.py new file mode 100644 index 00000000..ff967faf --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/contribution.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class Contribution(ContributionBase): + """Contribution. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param constraints: List of constraints (filters) that should be applied to the availability of this contribution + :type constraints: list of :class:`ContributionConstraint ` + :param includes: Includes is a set of contributions that should have this contribution included in their targets list. + :type includes: list of str + :param properties: Properties/attributes of this contribution + :type properties: :class:`object ` + :param restricted_to: List of demanded claims in order for the user to see this contribution (like anonymous, public, member...). + :type restricted_to: list of str + :param targets: The ids of the contribution(s) that this contribution targets. (parent contributions) + :type targets: list of str + :param type: Id of the Contribution Type + :type type: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'includes': {'key': 'includes', 'type': '[str]'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'restricted_to': {'key': 'restrictedTo', 'type': '[str]'}, + 'targets': {'key': 'targets', 'type': '[str]'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, description=None, id=None, visible_to=None, constraints=None, includes=None, properties=None, restricted_to=None, targets=None, type=None): + super(Contribution, self).__init__(description=description, id=id, visible_to=visible_to) + self.constraints = constraints + self.includes = includes + self.properties = properties + self.restricted_to = restricted_to + self.targets = targets + self.type = type diff --git a/vsts/vsts/extension_management/v4_1/models/contribution_base.py b/vsts/vsts/extension_management/v4_1/models/contribution_base.py new file mode 100644 index 00000000..4a2402c0 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/contribution_base.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionBase(Model): + """ContributionBase. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'} + } + + def __init__(self, description=None, id=None, visible_to=None): + super(ContributionBase, self).__init__() + self.description = description + self.id = id + self.visible_to = visible_to diff --git a/vsts/vsts/extension_management/v4_1/models/contribution_constraint.py b/vsts/vsts/extension_management/v4_1/models/contribution_constraint.py new file mode 100644 index 00000000..0791c5dd --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/contribution_constraint.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionConstraint(Model): + """ContributionConstraint. + + :param group: An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included). + :type group: int + :param id: Fully qualified identifier of a shared constraint + :type id: str + :param inverse: If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true) + :type inverse: bool + :param name: Name of the IContributionFilter plugin + :type name: str + :param properties: Properties that are fed to the contribution filter class + :type properties: :class:`object ` + :param relationships: Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will elimiate the contribution from the tree completely if the constraint is applied. + :type relationships: list of str + """ + + _attribute_map = { + 'group': {'key': 'group', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inverse': {'key': 'inverse', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'relationships': {'key': 'relationships', 'type': '[str]'} + } + + def __init__(self, group=None, id=None, inverse=None, name=None, properties=None, relationships=None): + super(ContributionConstraint, self).__init__() + self.group = group + self.id = id + self.inverse = inverse + self.name = name + self.properties = properties + self.relationships = relationships diff --git a/vsts/vsts/extension_management/v4_1/models/contribution_property_description.py b/vsts/vsts/extension_management/v4_1/models/contribution_property_description.py new file mode 100644 index 00000000..d4684adf --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/contribution_property_description.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributionPropertyDescription(Model): + """ContributionPropertyDescription. + + :param description: Description of the property + :type description: str + :param name: Name of the property + :type name: str + :param required: True if this property is required + :type required: bool + :param type: The type of value used for this property + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, required=None, type=None): + super(ContributionPropertyDescription, self).__init__() + self.description = description + self.name = name + self.required = required + self.type = type diff --git a/vsts/vsts/extension_management/v4_1/models/contribution_type.py b/vsts/vsts/extension_management/v4_1/models/contribution_type.py new file mode 100644 index 00000000..4eda81f4 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/contribution_type.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contribution_base import ContributionBase + + +class ContributionType(ContributionBase): + """ContributionType. + + :param description: Description of the contribution/type + :type description: str + :param id: Fully qualified identifier of the contribution/type + :type id: str + :param visible_to: VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + :type visible_to: list of str + :param indexed: Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type. NOTE: Only TrustedPartners are allowed to specify indexed contribution types. + :type indexed: bool + :param name: Friendly name of the contribution/type + :type name: str + :param properties: Describes the allowed properties for this contribution type + :type properties: dict + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'visible_to': {'key': 'visibleTo', 'type': '[str]'}, + 'indexed': {'key': 'indexed', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{ContributionPropertyDescription}'} + } + + def __init__(self, description=None, id=None, visible_to=None, indexed=None, name=None, properties=None): + super(ContributionType, self).__init__(description=description, id=id, visible_to=visible_to) + self.indexed = indexed + self.name = name + self.properties = properties diff --git a/vsts/vsts/extension_management/v4_1/models/extension_acquisition_request.py b/vsts/vsts/extension_management/v4_1/models/extension_acquisition_request.py new file mode 100644 index 00000000..f0cc015d --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_acquisition_request.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAcquisitionRequest(Model): + """ExtensionAcquisitionRequest. + + :param assignment_type: How the item is being assigned + :type assignment_type: object + :param billing_id: The id of the subscription used for purchase + :type billing_id: str + :param item_id: The marketplace id (publisherName.extensionName) for the item + :type item_id: str + :param operation_type: The type of operation, such as install, request, purchase + :type operation_type: object + :param properties: Additional properties which can be added to the request. + :type properties: :class:`object ` + :param quantity: How many licenses should be purchased + :type quantity: int + """ + + _attribute_map = { + 'assignment_type': {'key': 'assignmentType', 'type': 'object'}, + 'billing_id': {'key': 'billingId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'quantity': {'key': 'quantity', 'type': 'int'} + } + + def __init__(self, assignment_type=None, billing_id=None, item_id=None, operation_type=None, properties=None, quantity=None): + super(ExtensionAcquisitionRequest, self).__init__() + self.assignment_type = assignment_type + self.billing_id = billing_id + self.item_id = item_id + self.operation_type = operation_type + self.properties = properties + self.quantity = quantity diff --git a/vsts/vsts/extension_management/v4_1/models/extension_authorization.py b/vsts/vsts/extension_management/v4_1/models/extension_authorization.py new file mode 100644 index 00000000..d82dac11 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_authorization.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAuthorization(Model): + """ExtensionAuthorization. + + :param id: + :type id: str + :param scopes: + :type scopes: list of str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': '[str]'} + } + + def __init__(self, id=None, scopes=None): + super(ExtensionAuthorization, self).__init__() + self.id = id + self.scopes = scopes diff --git a/vsts/vsts/extension_management/v4_1/models/extension_badge.py b/vsts/vsts/extension_management/v4_1/models/extension_badge.py new file mode 100644 index 00000000..bcb0fa1c --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_badge.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionBadge(Model): + """ExtensionBadge. + + :param description: + :type description: str + :param img_uri: + :type img_uri: str + :param link: + :type link: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'img_uri': {'key': 'imgUri', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'} + } + + def __init__(self, description=None, img_uri=None, link=None): + super(ExtensionBadge, self).__init__() + self.description = description + self.img_uri = img_uri + self.link = link diff --git a/vsts/vsts/extension_management/v4_1/models/extension_data_collection.py b/vsts/vsts/extension_management/v4_1/models/extension_data_collection.py new file mode 100644 index 00000000..353af0e8 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_data_collection.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDataCollection(Model): + """ExtensionDataCollection. + + :param collection_name: The name of the collection + :type collection_name: str + :param documents: A list of documents belonging to the collection + :type documents: list of :class:`object ` + :param scope_type: The type of the collection's scope, such as Default or User + :type scope_type: str + :param scope_value: The value of the collection's scope, such as Current or Me + :type scope_value: str + """ + + _attribute_map = { + 'collection_name': {'key': 'collectionName', 'type': 'str'}, + 'documents': {'key': 'documents', 'type': '[object]'}, + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'scope_value': {'key': 'scopeValue', 'type': 'str'} + } + + def __init__(self, collection_name=None, documents=None, scope_type=None, scope_value=None): + super(ExtensionDataCollection, self).__init__() + self.collection_name = collection_name + self.documents = documents + self.scope_type = scope_type + self.scope_value = scope_value diff --git a/vsts/vsts/extension_management/v4_1/models/extension_data_collection_query.py b/vsts/vsts/extension_management/v4_1/models/extension_data_collection_query.py new file mode 100644 index 00000000..b22d0358 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_data_collection_query.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDataCollectionQuery(Model): + """ExtensionDataCollectionQuery. + + :param collections: A list of collections to query + :type collections: list of :class:`ExtensionDataCollection ` + """ + + _attribute_map = { + 'collections': {'key': 'collections', 'type': '[ExtensionDataCollection]'} + } + + def __init__(self, collections=None): + super(ExtensionDataCollectionQuery, self).__init__() + self.collections = collections diff --git a/vsts/vsts/extension_management/v4_1/models/extension_event_callback.py b/vsts/vsts/extension_management/v4_1/models/extension_event_callback.py new file mode 100644 index 00000000..59ab677a --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_event_callback.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallback(Model): + """ExtensionEventCallback. + + :param uri: The uri of the endpoint that is hit when an event occurs + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, uri=None): + super(ExtensionEventCallback, self).__init__() + self.uri = uri diff --git a/vsts/vsts/extension_management/v4_1/models/extension_event_callback_collection.py b/vsts/vsts/extension_management/v4_1/models/extension_event_callback_collection.py new file mode 100644 index 00000000..2f9be062 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_event_callback_collection.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEventCallbackCollection(Model): + """ExtensionEventCallbackCollection. + + :param post_disable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension disable has occurred. + :type post_disable: :class:`ExtensionEventCallback ` + :param post_enable: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension enable has occurred. + :type post_enable: :class:`ExtensionEventCallback ` + :param post_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install has completed. + :type post_install: :class:`ExtensionEventCallback ` + :param post_uninstall: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension uninstall has occurred. + :type post_uninstall: :class:`ExtensionEventCallback ` + :param post_update: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension update has occurred. + :type post_update: :class:`ExtensionEventCallback ` + :param pre_install: Optional. Defines an endpoint that gets called via a POST reqeust to notify that an extension install is about to occur. Response indicates whether to proceed or abort. + :type pre_install: :class:`ExtensionEventCallback ` + :param version_check: For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used + :type version_check: :class:`ExtensionEventCallback ` + """ + + _attribute_map = { + 'post_disable': {'key': 'postDisable', 'type': 'ExtensionEventCallback'}, + 'post_enable': {'key': 'postEnable', 'type': 'ExtensionEventCallback'}, + 'post_install': {'key': 'postInstall', 'type': 'ExtensionEventCallback'}, + 'post_uninstall': {'key': 'postUninstall', 'type': 'ExtensionEventCallback'}, + 'post_update': {'key': 'postUpdate', 'type': 'ExtensionEventCallback'}, + 'pre_install': {'key': 'preInstall', 'type': 'ExtensionEventCallback'}, + 'version_check': {'key': 'versionCheck', 'type': 'ExtensionEventCallback'} + } + + def __init__(self, post_disable=None, post_enable=None, post_install=None, post_uninstall=None, post_update=None, pre_install=None, version_check=None): + super(ExtensionEventCallbackCollection, self).__init__() + self.post_disable = post_disable + self.post_enable = post_enable + self.post_install = post_install + self.post_uninstall = post_uninstall + self.post_update = post_update + self.pre_install = pre_install + self.version_check = version_check diff --git a/vsts/vsts/extension_management/v4_1/models/extension_file.py b/vsts/vsts/extension_management/v4_1/models/extension_file.py new file mode 100644 index 00000000..1b505e97 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_file.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFile(Model): + """ExtensionFile. + + :param asset_type: + :type asset_type: str + :param language: + :type language: str + :param source: + :type source: str + """ + + _attribute_map = { + 'asset_type': {'key': 'assetType', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'} + } + + def __init__(self, asset_type=None, language=None, source=None): + super(ExtensionFile, self).__init__() + self.asset_type = asset_type + self.language = language + self.source = source diff --git a/vsts/vsts/extension_management/v4_1/models/extension_identifier.py b/vsts/vsts/extension_management/v4_1/models/extension_identifier.py new file mode 100644 index 00000000..ea02ec21 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_identifier.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionIdentifier(Model): + """ExtensionIdentifier. + + :param extension_name: The ExtensionName component part of the fully qualified ExtensionIdentifier + :type extension_name: str + :param publisher_name: The PublisherName component part of the fully qualified ExtensionIdentifier + :type publisher_name: str + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, extension_name=None, publisher_name=None): + super(ExtensionIdentifier, self).__init__() + self.extension_name = extension_name + self.publisher_name = publisher_name diff --git a/vsts/vsts/extension_management/v4_1/models/extension_licensing.py b/vsts/vsts/extension_management/v4_1/models/extension_licensing.py new file mode 100644 index 00000000..59422d20 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_licensing.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionLicensing(Model): + """ExtensionLicensing. + + :param overrides: A list of contributions which deviate from the default licensing behavior + :type overrides: list of :class:`LicensingOverride ` + """ + + _attribute_map = { + 'overrides': {'key': 'overrides', 'type': '[LicensingOverride]'} + } + + def __init__(self, overrides=None): + super(ExtensionLicensing, self).__init__() + self.overrides = overrides diff --git a/vsts/vsts/extension_management/v4_1/models/extension_manifest.py b/vsts/vsts/extension_management/v4_1/models/extension_manifest.py new file mode 100644 index 00000000..46be29c9 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_manifest.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionManifest(Model): + """ExtensionManifest. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param constraints: List of shared constraints defined by this extension + :type constraints: list of :class:`ContributionConstraint ` + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution. + :type restricted_to: list of str + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'restricted_to': {'key': 'restrictedTo', 'type': '[str]'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'} + } + + def __init__(self, base_uri=None, constraints=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, restricted_to=None, scopes=None, service_instance_type=None): + super(ExtensionManifest, self).__init__() + self.base_uri = base_uri + self.constraints = constraints + self.contributions = contributions + self.contribution_types = contribution_types + self.demands = demands + self.event_callbacks = event_callbacks + self.fallback_base_uri = fallback_base_uri + self.language = language + self.licensing = licensing + self.manifest_version = manifest_version + self.restricted_to = restricted_to + self.scopes = scopes + self.service_instance_type = service_instance_type diff --git a/vsts/vsts/extension_management/v4_1/models/extension_policy.py b/vsts/vsts/extension_management/v4_1/models/extension_policy.py new file mode 100644 index 00000000..ad20f559 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_policy.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionPolicy(Model): + """ExtensionPolicy. + + :param install: Permissions on 'Install' operation + :type install: object + :param request: Permission on 'Request' operation + :type request: object + """ + + _attribute_map = { + 'install': {'key': 'install', 'type': 'object'}, + 'request': {'key': 'request', 'type': 'object'} + } + + def __init__(self, install=None, request=None): + super(ExtensionPolicy, self).__init__() + self.install = install + self.request = request diff --git a/vsts/vsts/extension_management/v4_1/models/extension_request.py b/vsts/vsts/extension_management/v4_1/models/extension_request.py new file mode 100644 index 00000000..472c4312 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_request.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionRequest(Model): + """ExtensionRequest. + + :param reject_message: Required message supplied if the request is rejected + :type reject_message: str + :param request_date: Date at which the request was made + :type request_date: datetime + :param requested_by: Represents the user who made the request + :type requested_by: :class:`IdentityRef ` + :param request_message: Optional message supplied by the requester justifying the request + :type request_message: str + :param request_state: Represents the state of the request + :type request_state: object + :param resolve_date: Date at which the request was resolved + :type resolve_date: datetime + :param resolved_by: Represents the user who resolved the request + :type resolved_by: :class:`IdentityRef ` + """ + + _attribute_map = { + 'reject_message': {'key': 'rejectMessage', 'type': 'str'}, + 'request_date': {'key': 'requestDate', 'type': 'iso-8601'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'request_message': {'key': 'requestMessage', 'type': 'str'}, + 'request_state': {'key': 'requestState', 'type': 'object'}, + 'resolve_date': {'key': 'resolveDate', 'type': 'iso-8601'}, + 'resolved_by': {'key': 'resolvedBy', 'type': 'IdentityRef'} + } + + def __init__(self, reject_message=None, request_date=None, requested_by=None, request_message=None, request_state=None, resolve_date=None, resolved_by=None): + super(ExtensionRequest, self).__init__() + self.reject_message = reject_message + self.request_date = request_date + self.requested_by = requested_by + self.request_message = request_message + self.request_state = request_state + self.resolve_date = resolve_date + self.resolved_by = resolved_by diff --git a/vsts/vsts/extension_management/v4_1/models/extension_share.py b/vsts/vsts/extension_management/v4_1/models/extension_share.py new file mode 100644 index 00000000..acc81ef0 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_share.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionShare(Model): + """ExtensionShare. + + :param id: + :type id: str + :param name: + :type name: str + :param type: + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None): + super(ExtensionShare, self).__init__() + self.id = id + self.name = name + self.type = type diff --git a/vsts/vsts/extension_management/v4_1/models/extension_state.py b/vsts/vsts/extension_management/v4_1/models/extension_state.py new file mode 100644 index 00000000..b7e288b9 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_state.py @@ -0,0 +1,46 @@ +# -------------------------------------------------------------------------------------------- +# 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 .installed_extension_state import InstalledExtensionState + + +class ExtensionState(InstalledExtensionState): + """ExtensionState. + + :param flags: States of an installed extension + :type flags: object + :param installation_issues: List of installation issues + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :param last_updated: The time at which this installation was last updated + :type last_updated: datetime + :param extension_name: + :type extension_name: str + :param last_version_check: The time at which the version was last checked + :type last_version_check: datetime + :param publisher_name: + :type publisher_name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_issues': {'key': 'installationIssues', 'type': '[InstalledExtensionStateIssue]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'last_version_check': {'key': 'lastVersionCheck', 'type': 'iso-8601'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, flags=None, installation_issues=None, last_updated=None, extension_name=None, last_version_check=None, publisher_name=None, version=None): + super(ExtensionState, self).__init__(flags=flags, installation_issues=installation_issues, last_updated=last_updated) + self.extension_name = extension_name + self.last_version_check = last_version_check + self.publisher_name = publisher_name + self.version = version diff --git a/vsts/vsts/extension_management/v4_1/models/extension_statistic.py b/vsts/vsts/extension_management/v4_1/models/extension_statistic.py new file mode 100644 index 00000000..11fc6704 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_statistic.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionStatistic(Model): + """ExtensionStatistic. + + :param statistic_name: + :type statistic_name: str + :param value: + :type value: number + """ + + _attribute_map = { + 'statistic_name': {'key': 'statisticName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'number'} + } + + def __init__(self, statistic_name=None, value=None): + super(ExtensionStatistic, self).__init__() + self.statistic_name = statistic_name + self.value = value diff --git a/vsts/vsts/extension_management/v4_1/models/extension_version.py b/vsts/vsts/extension_management/v4_1/models/extension_version.py new file mode 100644 index 00000000..56b83e88 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/extension_version.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionVersion(Model): + """ExtensionVersion. + + :param asset_uri: + :type asset_uri: str + :param badges: + :type badges: list of :class:`ExtensionBadge ` + :param fallback_asset_uri: + :type fallback_asset_uri: str + :param files: + :type files: list of :class:`ExtensionFile ` + :param flags: + :type flags: object + :param last_updated: + :type last_updated: datetime + :param properties: + :type properties: list of { key: str; value: str } + :param validation_result_message: + :type validation_result_message: str + :param version: + :type version: str + :param version_description: + :type version_description: str + """ + + _attribute_map = { + 'asset_uri': {'key': 'assetUri', 'type': 'str'}, + 'badges': {'key': 'badges', 'type': '[ExtensionBadge]'}, + 'fallback_asset_uri': {'key': 'fallbackAssetUri', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'properties': {'key': 'properties', 'type': '[{ key: str; value: str }]'}, + 'validation_result_message': {'key': 'validationResultMessage', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'version_description': {'key': 'versionDescription', 'type': 'str'} + } + + def __init__(self, asset_uri=None, badges=None, fallback_asset_uri=None, files=None, flags=None, last_updated=None, properties=None, validation_result_message=None, version=None, version_description=None): + super(ExtensionVersion, self).__init__() + self.asset_uri = asset_uri + self.badges = badges + self.fallback_asset_uri = fallback_asset_uri + self.files = files + self.flags = flags + self.last_updated = last_updated + self.properties = properties + self.validation_result_message = validation_result_message + self.version = version + self.version_description = version_description diff --git a/vsts/vsts/extension_management/v4_1/models/identity_ref.py b/vsts/vsts/extension_management/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/extension_management/v4_1/models/installation_target.py b/vsts/vsts/extension_management/v4_1/models/installation_target.py new file mode 100644 index 00000000..4d622d4a --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/installation_target.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstallationTarget(Model): + """InstallationTarget. + + :param target: + :type target: str + :param target_version: + :type target_version: str + """ + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'} + } + + def __init__(self, target=None, target_version=None): + super(InstallationTarget, self).__init__() + self.target = target + self.target_version = target_version diff --git a/vsts/vsts/extension_management/v4_1/models/installed_extension.py b/vsts/vsts/extension_management/v4_1/models/installed_extension.py new file mode 100644 index 00000000..27297904 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/installed_extension.py @@ -0,0 +1,100 @@ +# -------------------------------------------------------------------------------------------- +# 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 .extension_manifest import ExtensionManifest + + +class InstalledExtension(ExtensionManifest): + """InstalledExtension. + + :param base_uri: Uri used as base for other relative uri's defined in extension + :type base_uri: str + :param constraints: List of shared constraints defined by this extension + :type constraints: list of :class:`ContributionConstraint ` + :param contributions: List of contributions made by this extension + :type contributions: list of :class:`Contribution ` + :param contribution_types: List of contribution types defined by this extension + :type contribution_types: list of :class:`ContributionType ` + :param demands: List of explicit demands required by this extension + :type demands: list of str + :param event_callbacks: Collection of endpoints that get called when particular extension events occur + :type event_callbacks: :class:`ExtensionEventCallbackCollection ` + :param fallback_base_uri: Secondary location that can be used as base for other relative uri's defined in extension + :type fallback_base_uri: str + :param language: Language Culture Name set by the Gallery + :type language: str + :param licensing: How this extension behaves with respect to licensing + :type licensing: :class:`ExtensionLicensing ` + :param manifest_version: Version of the extension manifest format/content + :type manifest_version: number + :param restricted_to: Default user claims applied to all contributions (except the ones which have been speficied restrictedTo explicitly) to control the visibility of a contribution. + :type restricted_to: list of str + :param scopes: List of all oauth scopes required by this extension + :type scopes: list of str + :param service_instance_type: The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + :type service_instance_type: str + :param extension_id: The friendly extension id for this extension - unique for a given publisher. + :type extension_id: str + :param extension_name: The display name of the extension. + :type extension_name: str + :param files: This is the set of files available from the extension. + :type files: list of :class:`ExtensionFile ` + :param flags: Extension flags relevant to contribution consumers + :type flags: object + :param install_state: Information about this particular installation of the extension + :type install_state: :class:`InstalledExtensionState ` + :param last_published: This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension. + :type last_published: datetime + :param publisher_id: Unique id of the publisher of this extension + :type publisher_id: str + :param publisher_name: The display name of the publisher + :type publisher_name: str + :param registration_id: Unique id for this extension (the same id is used for all versions of a single extension) + :type registration_id: str + :param version: Version of this extension + :type version: str + """ + + _attribute_map = { + 'base_uri': {'key': 'baseUri', 'type': 'str'}, + 'constraints': {'key': 'constraints', 'type': '[ContributionConstraint]'}, + 'contributions': {'key': 'contributions', 'type': '[Contribution]'}, + 'contribution_types': {'key': 'contributionTypes', 'type': '[ContributionType]'}, + 'demands': {'key': 'demands', 'type': '[str]'}, + 'event_callbacks': {'key': 'eventCallbacks', 'type': 'ExtensionEventCallbackCollection'}, + 'fallback_base_uri': {'key': 'fallbackBaseUri', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'licensing': {'key': 'licensing', 'type': 'ExtensionLicensing'}, + 'manifest_version': {'key': 'manifestVersion', 'type': 'number'}, + 'restricted_to': {'key': 'restrictedTo', 'type': '[str]'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'install_state': {'key': 'installState', 'type': 'InstalledExtensionState'}, + 'last_published': {'key': 'lastPublished', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'registration_id': {'key': 'registrationId', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, base_uri=None, constraints=None, contributions=None, contribution_types=None, demands=None, event_callbacks=None, fallback_base_uri=None, language=None, licensing=None, manifest_version=None, restricted_to=None, scopes=None, service_instance_type=None, extension_id=None, extension_name=None, files=None, flags=None, install_state=None, last_published=None, publisher_id=None, publisher_name=None, registration_id=None, version=None): + super(InstalledExtension, self).__init__(base_uri=base_uri, constraints=constraints, contributions=contributions, contribution_types=contribution_types, demands=demands, event_callbacks=event_callbacks, fallback_base_uri=fallback_base_uri, language=language, licensing=licensing, manifest_version=manifest_version, restricted_to=restricted_to, scopes=scopes, service_instance_type=service_instance_type) + self.extension_id = extension_id + self.extension_name = extension_name + self.files = files + self.flags = flags + self.install_state = install_state + self.last_published = last_published + self.publisher_id = publisher_id + self.publisher_name = publisher_name + self.registration_id = registration_id + self.version = version diff --git a/vsts/vsts/extension_management/v4_1/models/installed_extension_query.py b/vsts/vsts/extension_management/v4_1/models/installed_extension_query.py new file mode 100644 index 00000000..8b1bafdb --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/installed_extension_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionQuery(Model): + """InstalledExtensionQuery. + + :param asset_types: + :type asset_types: list of str + :param monikers: + :type monikers: list of :class:`ExtensionIdentifier ` + """ + + _attribute_map = { + 'asset_types': {'key': 'assetTypes', 'type': '[str]'}, + 'monikers': {'key': 'monikers', 'type': '[ExtensionIdentifier]'} + } + + def __init__(self, asset_types=None, monikers=None): + super(InstalledExtensionQuery, self).__init__() + self.asset_types = asset_types + self.monikers = monikers diff --git a/vsts/vsts/extension_management/v4_1/models/installed_extension_state.py b/vsts/vsts/extension_management/v4_1/models/installed_extension_state.py new file mode 100644 index 00000000..fe748304 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/installed_extension_state.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionState(Model): + """InstalledExtensionState. + + :param flags: States of an installed extension + :type flags: object + :param installation_issues: List of installation issues + :type installation_issues: list of :class:`InstalledExtensionStateIssue ` + :param last_updated: The time at which this installation was last updated + :type last_updated: datetime + """ + + _attribute_map = { + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_issues': {'key': 'installationIssues', 'type': '[InstalledExtensionStateIssue]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'} + } + + def __init__(self, flags=None, installation_issues=None, last_updated=None): + super(InstalledExtensionState, self).__init__() + self.flags = flags + self.installation_issues = installation_issues + self.last_updated = last_updated diff --git a/vsts/vsts/extension_management/v4_1/models/installed_extension_state_issue.py b/vsts/vsts/extension_management/v4_1/models/installed_extension_state_issue.py new file mode 100644 index 00000000..e66bb556 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/installed_extension_state_issue.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstalledExtensionStateIssue(Model): + """InstalledExtensionStateIssue. + + :param message: The error message + :type message: str + :param source: Source of the installation issue, for example "Demands" + :type source: str + :param type: Installation issue type (Warning, Error) + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, source=None, type=None): + super(InstalledExtensionStateIssue, self).__init__() + self.message = message + self.source = source + self.type = type diff --git a/vsts/vsts/extension_management/v4_1/models/licensing_override.py b/vsts/vsts/extension_management/v4_1/models/licensing_override.py new file mode 100644 index 00000000..7812d57f --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/licensing_override.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 LicensingOverride(Model): + """LicensingOverride. + + :param behavior: How the inclusion of this contribution should change based on licensing + :type behavior: object + :param id: Fully qualified contribution id which we want to define licensing behavior for + :type id: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, behavior=None, id=None): + super(LicensingOverride, self).__init__() + self.behavior = behavior + self.id = id diff --git a/vsts/vsts/extension_management/v4_1/models/published_extension.py b/vsts/vsts/extension_management/v4_1/models/published_extension.py new file mode 100644 index 00000000..c31aa66a --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/published_extension.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishedExtension(Model): + """PublishedExtension. + + :param categories: + :type categories: list of str + :param deployment_type: + :type deployment_type: object + :param display_name: + :type display_name: str + :param extension_id: + :type extension_id: str + :param extension_name: + :type extension_name: str + :param flags: + :type flags: object + :param installation_targets: + :type installation_targets: list of :class:`InstallationTarget ` + :param last_updated: + :type last_updated: datetime + :param long_description: + :type long_description: str + :param published_date: Date on which the extension was first uploaded. + :type published_date: datetime + :param publisher: + :type publisher: :class:`PublisherFacts ` + :param release_date: Date on which the extension first went public. + :type release_date: datetime + :param shared_with: + :type shared_with: list of :class:`ExtensionShare ` + :param short_description: + :type short_description: str + :param statistics: + :type statistics: list of :class:`ExtensionStatistic ` + :param tags: + :type tags: list of str + :param versions: + :type versions: list of :class:`ExtensionVersion ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'object'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'long_description': {'key': 'longDescription', 'type': 'str'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'publisher': {'key': 'publisher', 'type': 'PublisherFacts'}, + 'release_date': {'key': 'releaseDate', 'type': 'iso-8601'}, + 'shared_with': {'key': 'sharedWith', 'type': '[ExtensionShare]'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': '[ExtensionStatistic]'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'versions': {'key': 'versions', 'type': '[ExtensionVersion]'} + } + + def __init__(self, categories=None, deployment_type=None, display_name=None, extension_id=None, extension_name=None, flags=None, installation_targets=None, last_updated=None, long_description=None, published_date=None, publisher=None, release_date=None, shared_with=None, short_description=None, statistics=None, tags=None, versions=None): + super(PublishedExtension, self).__init__() + self.categories = categories + self.deployment_type = deployment_type + self.display_name = display_name + self.extension_id = extension_id + self.extension_name = extension_name + self.flags = flags + self.installation_targets = installation_targets + self.last_updated = last_updated + self.long_description = long_description + self.published_date = published_date + self.publisher = publisher + self.release_date = release_date + self.shared_with = shared_with + self.short_description = short_description + self.statistics = statistics + self.tags = tags + self.versions = versions diff --git a/vsts/vsts/extension_management/v4_1/models/publisher_facts.py b/vsts/vsts/extension_management/v4_1/models/publisher_facts.py new file mode 100644 index 00000000..979b6d8d --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/publisher_facts.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherFacts(Model): + """PublisherFacts. + + :param display_name: + :type display_name: str + :param flags: + :type flags: object + :param publisher_id: + :type publisher_id: str + :param publisher_name: + :type publisher_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, display_name=None, flags=None, publisher_id=None, publisher_name=None): + super(PublisherFacts, self).__init__() + self.display_name = display_name + self.flags = flags + self.publisher_id = publisher_id + self.publisher_name = publisher_name diff --git a/vsts/vsts/extension_management/v4_1/models/requested_extension.py b/vsts/vsts/extension_management/v4_1/models/requested_extension.py new file mode 100644 index 00000000..6b951240 --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/requested_extension.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 RequestedExtension(Model): + """RequestedExtension. + + :param extension_name: The unique name of the extension + :type extension_name: str + :param extension_requests: A list of each request for the extension + :type extension_requests: list of :class:`ExtensionRequest ` + :param publisher_display_name: DisplayName of the publisher that owns the extension being published. + :type publisher_display_name: str + :param publisher_name: Represents the Publisher of the requested extension + :type publisher_name: str + :param request_count: The total number of requests for an extension + :type request_count: int + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'extension_requests': {'key': 'extensionRequests', 'type': '[ExtensionRequest]'}, + 'publisher_display_name': {'key': 'publisherDisplayName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'request_count': {'key': 'requestCount', 'type': 'int'} + } + + def __init__(self, extension_name=None, extension_requests=None, publisher_display_name=None, publisher_name=None, request_count=None): + super(RequestedExtension, self).__init__() + self.extension_name = extension_name + self.extension_requests = extension_requests + self.publisher_display_name = publisher_display_name + self.publisher_name = publisher_name + self.request_count = request_count diff --git a/vsts/vsts/extension_management/v4_1/models/user_extension_policy.py b/vsts/vsts/extension_management/v4_1/models/user_extension_policy.py new file mode 100644 index 00000000..cf4b9e5d --- /dev/null +++ b/vsts/vsts/extension_management/v4_1/models/user_extension_policy.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 UserExtensionPolicy(Model): + """UserExtensionPolicy. + + :param display_name: User display name that this policy refers to + :type display_name: str + :param permissions: The extension policy applied to the user + :type permissions: :class:`ExtensionPolicy ` + :param user_id: User id that this policy refers to + :type user_id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'ExtensionPolicy'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, display_name=None, permissions=None, user_id=None): + super(UserExtensionPolicy, self).__init__() + self.display_name = display_name + self.permissions = permissions + self.user_id = user_id diff --git a/vsts/vsts/feature_availability/__init__.py b/vsts/vsts/feature_availability/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/feature_availability/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/feature_availability/v4_0/__init__.py b/vsts/vsts/feature_availability/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/feature_availability/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/feature_availability/v4_0/feature_availability_client.py b/vsts/vsts/feature_availability/v4_0/feature_availability_client.py new file mode 100644 index 00000000..8c8087d6 --- /dev/null +++ b/vsts/vsts/feature_availability/v4_0/feature_availability_client.py @@ -0,0 +1,127 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class FeatureAvailabilityClient(VssClient): + """FeatureAvailability + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(FeatureAvailabilityClient, 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 get_all_feature_flags(self, user_email=None): + """GetAllFeatureFlags. + [Preview API] Retrieve a listing of all feature flags and their current states for a user + :param str user_email: The email of the user to check + :rtype: [FeatureFlag] + """ + query_parameters = {} + if user_email is not None: + query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[FeatureFlag]', response) + + def get_feature_flag_by_name(self, name): + """GetFeatureFlagByName. + [Preview API] Retrieve information on a single feature flag and its current states + :param str name: The name of the feature to retrieve + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('FeatureFlag', response) + + def get_feature_flag_by_name_and_user_email(self, name, user_email): + """GetFeatureFlagByNameAndUserEmail. + [Preview API] Retrieve information on a single feature flag and its current states for a user + :param str name: The name of the feature to retrieve + :param str user_email: The email of the user to check + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + query_parameters = {} + if user_email is not None: + query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('FeatureFlag', response) + + def get_feature_flag_by_name_and_user_id(self, name, user_id): + """GetFeatureFlagByNameAndUserId. + [Preview API] Retrieve information on a single feature flag and its current states for a user + :param str name: The name of the feature to retrieve + :param str user_id: The id of the user to check + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + query_parameters = {} + if user_id is not None: + query_parameters['userId'] = self._serialize.query('user_id', user_id, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('FeatureFlag', response) + + def update_feature_flag(self, state, name, user_email=None, check_feature_exists=None, set_at_application_level_also=None): + """UpdateFeatureFlag. + [Preview API] Change the state of an individual feature flag for a name + :param :class:` ` state: State that should be set + :param str name: The name of the feature to change + :param str user_email: + :param bool check_feature_exists: Checks if the feature exists before setting the state + :param bool set_at_application_level_also: + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + query_parameters = {} + if user_email is not None: + query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str') + if check_feature_exists is not None: + query_parameters['checkFeatureExists'] = self._serialize.query('check_feature_exists', check_feature_exists, 'bool') + if set_at_application_level_also is not None: + query_parameters['setAtApplicationLevelAlso'] = self._serialize.query('set_at_application_level_also', set_at_application_level_also, 'bool') + content = self._serialize.body(state, 'FeatureFlagPatch') + response = self._send(http_method='PATCH', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('FeatureFlag', response) + diff --git a/vsts/vsts/feature_availability/v4_0/models/__init__.py b/vsts/vsts/feature_availability/v4_0/models/__init__.py new file mode 100644 index 00000000..926dca8c --- /dev/null +++ b/vsts/vsts/feature_availability/v4_0/models/__init__.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# 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 .feature_flag import FeatureFlag +from .feature_flag_patch import FeatureFlagPatch + +__all__ = [ + 'FeatureFlag', + 'FeatureFlagPatch', +] diff --git a/vsts/vsts/feature_availability/v4_0/models/feature_flag.py b/vsts/vsts/feature_availability/v4_0/models/feature_flag.py new file mode 100644 index 00000000..96a70eab --- /dev/null +++ b/vsts/vsts/feature_availability/v4_0/models/feature_flag.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 FeatureFlag(Model): + """FeatureFlag. + + :param description: + :type description: str + :param effective_state: + :type effective_state: str + :param explicit_state: + :type explicit_state: str + :param name: + :type name: str + :param uri: + :type uri: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'effective_state': {'key': 'effectiveState', 'type': 'str'}, + 'explicit_state': {'key': 'explicitState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, description=None, effective_state=None, explicit_state=None, name=None, uri=None): + super(FeatureFlag, self).__init__() + self.description = description + self.effective_state = effective_state + self.explicit_state = explicit_state + self.name = name + self.uri = uri diff --git a/vsts/vsts/feature_availability/v4_0/models/feature_flag_patch.py b/vsts/vsts/feature_availability/v4_0/models/feature_flag_patch.py new file mode 100644 index 00000000..3eb826e6 --- /dev/null +++ b/vsts/vsts/feature_availability/v4_0/models/feature_flag_patch.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 FeatureFlagPatch(Model): + """FeatureFlagPatch. + + :param state: + :type state: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'} + } + + def __init__(self, state=None): + super(FeatureFlagPatch, self).__init__() + self.state = state diff --git a/vsts/vsts/feature_availability/v4_1/__init__.py b/vsts/vsts/feature_availability/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/feature_availability/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/feature_availability/v4_1/feature_availability_client.py b/vsts/vsts/feature_availability/v4_1/feature_availability_client.py new file mode 100644 index 00000000..49298b5f --- /dev/null +++ b/vsts/vsts/feature_availability/v4_1/feature_availability_client.py @@ -0,0 +1,127 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class FeatureAvailabilityClient(VssClient): + """FeatureAvailability + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(FeatureAvailabilityClient, 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 get_all_feature_flags(self, user_email=None): + """GetAllFeatureFlags. + [Preview API] Retrieve a listing of all feature flags and their current states for a user + :param str user_email: The email of the user to check + :rtype: [FeatureFlag] + """ + query_parameters = {} + if user_email is not None: + query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[FeatureFlag]', response) + + def get_feature_flag_by_name(self, name): + """GetFeatureFlagByName. + [Preview API] Retrieve information on a single feature flag and its current states + :param str name: The name of the feature to retrieve + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('FeatureFlag', response) + + def get_feature_flag_by_name_and_user_email(self, name, user_email): + """GetFeatureFlagByNameAndUserEmail. + [Preview API] Retrieve information on a single feature flag and its current states for a user + :param str name: The name of the feature to retrieve + :param str user_email: The email of the user to check + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + query_parameters = {} + if user_email is not None: + query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('FeatureFlag', response) + + def get_feature_flag_by_name_and_user_id(self, name, user_id): + """GetFeatureFlagByNameAndUserId. + [Preview API] Retrieve information on a single feature flag and its current states for a user + :param str name: The name of the feature to retrieve + :param str user_id: The id of the user to check + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + query_parameters = {} + if user_id is not None: + query_parameters['userId'] = self._serialize.query('user_id', user_id, 'str') + response = self._send(http_method='GET', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('FeatureFlag', response) + + def update_feature_flag(self, state, name, user_email=None, check_feature_exists=None, set_at_application_level_also=None): + """UpdateFeatureFlag. + [Preview API] Change the state of an individual feature flag for a name + :param :class:` ` state: State that should be set + :param str name: The name of the feature to change + :param str user_email: + :param bool check_feature_exists: Checks if the feature exists before setting the state + :param bool set_at_application_level_also: + :rtype: :class:` ` + """ + route_values = {} + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + query_parameters = {} + if user_email is not None: + query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str') + if check_feature_exists is not None: + query_parameters['checkFeatureExists'] = self._serialize.query('check_feature_exists', check_feature_exists, 'bool') + if set_at_application_level_also is not None: + query_parameters['setAtApplicationLevelAlso'] = self._serialize.query('set_at_application_level_also', set_at_application_level_also, 'bool') + content = self._serialize.body(state, 'FeatureFlagPatch') + response = self._send(http_method='PATCH', + location_id='3e2b80f8-9e6f-441e-8393-005610692d9c', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('FeatureFlag', response) + diff --git a/vsts/vsts/feature_availability/v4_1/models/__init__.py b/vsts/vsts/feature_availability/v4_1/models/__init__.py new file mode 100644 index 00000000..926dca8c --- /dev/null +++ b/vsts/vsts/feature_availability/v4_1/models/__init__.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# 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 .feature_flag import FeatureFlag +from .feature_flag_patch import FeatureFlagPatch + +__all__ = [ + 'FeatureFlag', + 'FeatureFlagPatch', +] diff --git a/vsts/vsts/feature_availability/v4_1/models/feature_flag.py b/vsts/vsts/feature_availability/v4_1/models/feature_flag.py new file mode 100644 index 00000000..96a70eab --- /dev/null +++ b/vsts/vsts/feature_availability/v4_1/models/feature_flag.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 FeatureFlag(Model): + """FeatureFlag. + + :param description: + :type description: str + :param effective_state: + :type effective_state: str + :param explicit_state: + :type explicit_state: str + :param name: + :type name: str + :param uri: + :type uri: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'effective_state': {'key': 'effectiveState', 'type': 'str'}, + 'explicit_state': {'key': 'explicitState', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, description=None, effective_state=None, explicit_state=None, name=None, uri=None): + super(FeatureFlag, self).__init__() + self.description = description + self.effective_state = effective_state + self.explicit_state = explicit_state + self.name = name + self.uri = uri diff --git a/vsts/vsts/feature_availability/v4_1/models/feature_flag_patch.py b/vsts/vsts/feature_availability/v4_1/models/feature_flag_patch.py new file mode 100644 index 00000000..3eb826e6 --- /dev/null +++ b/vsts/vsts/feature_availability/v4_1/models/feature_flag_patch.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 FeatureFlagPatch(Model): + """FeatureFlagPatch. + + :param state: + :type state: str + """ + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'} + } + + def __init__(self, state=None): + super(FeatureFlagPatch, self).__init__() + self.state = state diff --git a/vsts/vsts/feature_management/__init__.py b/vsts/vsts/feature_management/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/feature_management/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/feature_management/v4_0/__init__.py b/vsts/vsts/feature_management/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/feature_management/v4_0/feature_management_client.py b/vsts/vsts/feature_management/v4_0/feature_management_client.py new file mode 100644 index 00000000..0cf79e1b --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/feature_management_client.py @@ -0,0 +1,219 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class FeatureManagementClient(VssClient): + """FeatureManagement + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(FeatureManagementClient, 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 get_feature(self, feature_id): + """GetFeature. + [Preview API] Get a specific feature by its id + :param str feature_id: The contribution id of the feature + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + response = self._send(http_method='GET', + location_id='c4209f25-7a27-41dd-9f04-06080c7b6afd', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ContributedFeature', response) + + def get_features(self, target_contribution_id=None): + """GetFeatures. + [Preview API] Get a list of all defined features + :param str target_contribution_id: Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution. + :rtype: [ContributedFeature] + """ + query_parameters = {} + if target_contribution_id is not None: + query_parameters['targetContributionId'] = self._serialize.query('target_contribution_id', target_contribution_id, 'str') + response = self._send(http_method='GET', + location_id='c4209f25-7a27-41dd-9f04-06080c7b6afd', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ContributedFeature]', response) + + def get_feature_state(self, feature_id, user_scope): + """GetFeatureState. + [Preview API] Get the state of the specified feature for the given user/all-users scope + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + response = self._send(http_method='GET', + location_id='98911314-3f9b-4eaf-80e8-83900d8e85d9', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ContributedFeatureState', response) + + def set_feature_state(self, feature, feature_id, user_scope, reason=None, reason_code=None): + """SetFeatureState. + [Preview API] Set the state of a feature + :param :class:` ` feature: Posted feature state object. Should specify the effective value. + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + :param str reason: Reason for changing the state + :param str reason_code: Short reason code + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + query_parameters = {} + if reason is not None: + query_parameters['reason'] = self._serialize.query('reason', reason, 'str') + if reason_code is not None: + query_parameters['reasonCode'] = self._serialize.query('reason_code', reason_code, 'str') + content = self._serialize.body(feature, 'ContributedFeatureState') + response = self._send(http_method='PATCH', + location_id='98911314-3f9b-4eaf-80e8-83900d8e85d9', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('ContributedFeatureState', response) + + def get_feature_state_for_scope(self, feature_id, user_scope, scope_name, scope_value): + """GetFeatureStateForScope. + [Preview API] Get the state of the specified feature for the given named scope + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + :param str scope_name: Scope at which to get the feature setting for (e.g. "project" or "team") + :param str scope_value: Value of the scope (e.g. the project or team id) + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if scope_name is not None: + route_values['scopeName'] = self._serialize.url('scope_name', scope_name, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + response = self._send(http_method='GET', + location_id='dd291e43-aa9f-4cee-8465-a93c78e414a4', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ContributedFeatureState', response) + + def set_feature_state_for_scope(self, feature, feature_id, user_scope, scope_name, scope_value, reason=None, reason_code=None): + """SetFeatureStateForScope. + [Preview API] Set the state of a feature at a specific scope + :param :class:` ` feature: Posted feature state object. Should specify the effective value. + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + :param str scope_name: Scope at which to get the feature setting for (e.g. "project" or "team") + :param str scope_value: Value of the scope (e.g. the project or team id) + :param str reason: Reason for changing the state + :param str reason_code: Short reason code + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if scope_name is not None: + route_values['scopeName'] = self._serialize.url('scope_name', scope_name, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + query_parameters = {} + if reason is not None: + query_parameters['reason'] = self._serialize.query('reason', reason, 'str') + if reason_code is not None: + query_parameters['reasonCode'] = self._serialize.query('reason_code', reason_code, 'str') + content = self._serialize.body(feature, 'ContributedFeatureState') + response = self._send(http_method='PATCH', + location_id='dd291e43-aa9f-4cee-8465-a93c78e414a4', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('ContributedFeatureState', response) + + def query_feature_states(self, query): + """QueryFeatureStates. + [Preview API] Get the effective state for a list of feature ids + :param :class:` ` query: Features to query along with current scope values + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'ContributedFeatureStateQuery') + response = self._send(http_method='POST', + location_id='2b4486ad-122b-400c-ae65-17b6672c1f9d', + version='4.0-preview.1', + content=content) + return self._deserialize('ContributedFeatureStateQuery', response) + + def query_feature_states_for_default_scope(self, query, user_scope): + """QueryFeatureStatesForDefaultScope. + [Preview API] Get the states of the specified features for the default scope + :param :class:` ` query: Query describing the features to query. + :param str user_scope: + :rtype: :class:` ` + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + content = self._serialize.body(query, 'ContributedFeatureStateQuery') + response = self._send(http_method='POST', + location_id='3f810f28-03e2-4239-b0bc-788add3005e5', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ContributedFeatureStateQuery', response) + + def query_feature_states_for_named_scope(self, query, user_scope, scope_name, scope_value): + """QueryFeatureStatesForNamedScope. + [Preview API] Get the states of the specified features for the specific named scope + :param :class:` ` query: Query describing the features to query. + :param str user_scope: + :param str scope_name: + :param str scope_value: + :rtype: :class:` ` + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if scope_name is not None: + route_values['scopeName'] = self._serialize.url('scope_name', scope_name, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + content = self._serialize.body(query, 'ContributedFeatureStateQuery') + response = self._send(http_method='POST', + location_id='f29e997b-c2da-4d15-8380-765788a1a74c', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ContributedFeatureStateQuery', response) + diff --git a/vsts/vsts/feature_management/v4_0/models/__init__.py b/vsts/vsts/feature_management/v4_0/models/__init__.py new file mode 100644 index 00000000..a5e7f615 --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/models/__init__.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contributed_feature import ContributedFeature +from .contributed_feature_setting_scope import ContributedFeatureSettingScope +from .contributed_feature_state import ContributedFeatureState +from .contributed_feature_state_query import ContributedFeatureStateQuery +from .contributed_feature_value_rule import ContributedFeatureValueRule +from .reference_links import ReferenceLinks + +__all__ = [ + 'ContributedFeature', + 'ContributedFeatureSettingScope', + 'ContributedFeatureState', + 'ContributedFeatureStateQuery', + 'ContributedFeatureValueRule', + 'ReferenceLinks', +] diff --git a/vsts/vsts/feature_management/v4_0/models/contributed_feature.py b/vsts/vsts/feature_management/v4_0/models/contributed_feature.py new file mode 100644 index 00000000..f709a16a --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/models/contributed_feature.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeature(Model): + """ContributedFeature. + + :param _links: Named links describing the feature + :type _links: :class:`ReferenceLinks ` + :param default_state: If true, the feature is enabled unless overridden at some scope + :type default_state: bool + :param default_value_rules: Rules for setting the default value if not specified by any setting/scope. Evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) + :type default_value_rules: list of :class:`ContributedFeatureValueRule ` + :param description: The description of the feature + :type description: str + :param id: The full contribution id of the feature + :type id: str + :param name: The friendly name of the feature + :type name: str + :param override_rules: Rules for overriding a feature value. These rules are run before explicit user/host state values are checked. They are evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) + :type override_rules: list of :class:`ContributedFeatureValueRule ` + :param scopes: The scopes/levels at which settings can set the enabled/disabled state of this feature + :type scopes: list of :class:`ContributedFeatureSettingScope ` + :param service_instance_type: The service instance id of the service that owns this feature + :type service_instance_type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'default_state': {'key': 'defaultState', 'type': 'bool'}, + 'default_value_rules': {'key': 'defaultValueRules', 'type': '[ContributedFeatureValueRule]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'override_rules': {'key': 'overrideRules', 'type': '[ContributedFeatureValueRule]'}, + 'scopes': {'key': 'scopes', 'type': '[ContributedFeatureSettingScope]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'} + } + + def __init__(self, _links=None, default_state=None, default_value_rules=None, description=None, id=None, name=None, override_rules=None, scopes=None, service_instance_type=None): + super(ContributedFeature, self).__init__() + self._links = _links + self.default_state = default_state + self.default_value_rules = default_value_rules + self.description = description + self.id = id + self.name = name + self.override_rules = override_rules + self.scopes = scopes + self.service_instance_type = service_instance_type diff --git a/vsts/vsts/feature_management/v4_0/models/contributed_feature_setting_scope.py b/vsts/vsts/feature_management/v4_0/models/contributed_feature_setting_scope.py new file mode 100644 index 00000000..9366312e --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/models/contributed_feature_setting_scope.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureSettingScope(Model): + """ContributedFeatureSettingScope. + + :param setting_scope: The name of the settings scope to use when reading/writing the setting + :type setting_scope: str + :param user_scoped: Whether this is a user-scope or this is a host-wide (all users) setting + :type user_scoped: bool + """ + + _attribute_map = { + 'setting_scope': {'key': 'settingScope', 'type': 'str'}, + 'user_scoped': {'key': 'userScoped', 'type': 'bool'} + } + + def __init__(self, setting_scope=None, user_scoped=None): + super(ContributedFeatureSettingScope, self).__init__() + self.setting_scope = setting_scope + self.user_scoped = user_scoped diff --git a/vsts/vsts/feature_management/v4_0/models/contributed_feature_state.py b/vsts/vsts/feature_management/v4_0/models/contributed_feature_state.py new file mode 100644 index 00000000..aeeee1e8 --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/models/contributed_feature_state.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureState(Model): + """ContributedFeatureState. + + :param feature_id: The full contribution id of the feature + :type feature_id: str + :param scope: The scope at which this state applies + :type scope: :class:`ContributedFeatureSettingScope ` + :param state: The current state of this feature + :type state: object + """ + + _attribute_map = { + 'feature_id': {'key': 'featureId', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'ContributedFeatureSettingScope'}, + 'state': {'key': 'state', 'type': 'object'} + } + + def __init__(self, feature_id=None, scope=None, state=None): + super(ContributedFeatureState, self).__init__() + self.feature_id = feature_id + self.scope = scope + self.state = state diff --git a/vsts/vsts/feature_management/v4_0/models/contributed_feature_state_query.py b/vsts/vsts/feature_management/v4_0/models/contributed_feature_state_query.py new file mode 100644 index 00000000..97191e09 --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/models/contributed_feature_state_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureStateQuery(Model): + """ContributedFeatureStateQuery. + + :param feature_ids: The list of feature ids to query + :type feature_ids: list of str + :param feature_states: The query result containing the current feature states for each of the queried feature ids + :type feature_states: dict + :param scope_values: A dictionary of scope values (project name, etc.) to use in the query (if querying across scopes) + :type scope_values: dict + """ + + _attribute_map = { + 'feature_ids': {'key': 'featureIds', 'type': '[str]'}, + 'feature_states': {'key': 'featureStates', 'type': '{ContributedFeatureState}'}, + 'scope_values': {'key': 'scopeValues', 'type': '{str}'} + } + + def __init__(self, feature_ids=None, feature_states=None, scope_values=None): + super(ContributedFeatureStateQuery, self).__init__() + self.feature_ids = feature_ids + self.feature_states = feature_states + self.scope_values = scope_values diff --git a/vsts/vsts/feature_management/v4_0/models/contributed_feature_value_rule.py b/vsts/vsts/feature_management/v4_0/models/contributed_feature_value_rule.py new file mode 100644 index 00000000..ea654f08 --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/models/contributed_feature_value_rule.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureValueRule(Model): + """ContributedFeatureValueRule. + + :param name: Name of the IContributedFeatureValuePlugin to run + :type name: str + :param properties: Properties to feed to the IContributedFeatureValuePlugin + :type properties: dict + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'} + } + + def __init__(self, name=None, properties=None): + super(ContributedFeatureValueRule, self).__init__() + self.name = name + self.properties = properties diff --git a/vsts/vsts/feature_management/v4_0/models/reference_links.py b/vsts/vsts/feature_management/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/feature_management/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/feature_management/v4_1/__init__.py b/vsts/vsts/feature_management/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/feature_management/v4_1/feature_management_client.py b/vsts/vsts/feature_management/v4_1/feature_management_client.py new file mode 100644 index 00000000..8da2eebd --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/feature_management_client.py @@ -0,0 +1,219 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class FeatureManagementClient(VssClient): + """FeatureManagement + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(FeatureManagementClient, 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 get_feature(self, feature_id): + """GetFeature. + [Preview API] Get a specific feature by its id + :param str feature_id: The contribution id of the feature + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + response = self._send(http_method='GET', + location_id='c4209f25-7a27-41dd-9f04-06080c7b6afd', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ContributedFeature', response) + + def get_features(self, target_contribution_id=None): + """GetFeatures. + [Preview API] Get a list of all defined features + :param str target_contribution_id: Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution. + :rtype: [ContributedFeature] + """ + query_parameters = {} + if target_contribution_id is not None: + query_parameters['targetContributionId'] = self._serialize.query('target_contribution_id', target_contribution_id, 'str') + response = self._send(http_method='GET', + location_id='c4209f25-7a27-41dd-9f04-06080c7b6afd', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ContributedFeature]', response) + + def get_feature_state(self, feature_id, user_scope): + """GetFeatureState. + [Preview API] Get the state of the specified feature for the given user/all-users scope + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + response = self._send(http_method='GET', + location_id='98911314-3f9b-4eaf-80e8-83900d8e85d9', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ContributedFeatureState', response) + + def set_feature_state(self, feature, feature_id, user_scope, reason=None, reason_code=None): + """SetFeatureState. + [Preview API] Set the state of a feature + :param :class:` ` feature: Posted feature state object. Should specify the effective value. + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + :param str reason: Reason for changing the state + :param str reason_code: Short reason code + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + query_parameters = {} + if reason is not None: + query_parameters['reason'] = self._serialize.query('reason', reason, 'str') + if reason_code is not None: + query_parameters['reasonCode'] = self._serialize.query('reason_code', reason_code, 'str') + content = self._serialize.body(feature, 'ContributedFeatureState') + response = self._send(http_method='PATCH', + location_id='98911314-3f9b-4eaf-80e8-83900d8e85d9', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('ContributedFeatureState', response) + + def get_feature_state_for_scope(self, feature_id, user_scope, scope_name, scope_value): + """GetFeatureStateForScope. + [Preview API] Get the state of the specified feature for the given named scope + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + :param str scope_name: Scope at which to get the feature setting for (e.g. "project" or "team") + :param str scope_value: Value of the scope (e.g. the project or team id) + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if scope_name is not None: + route_values['scopeName'] = self._serialize.url('scope_name', scope_name, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + response = self._send(http_method='GET', + location_id='dd291e43-aa9f-4cee-8465-a93c78e414a4', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ContributedFeatureState', response) + + def set_feature_state_for_scope(self, feature, feature_id, user_scope, scope_name, scope_value, reason=None, reason_code=None): + """SetFeatureStateForScope. + [Preview API] Set the state of a feature at a specific scope + :param :class:` ` feature: Posted feature state object. Should specify the effective value. + :param str feature_id: Contribution id of the feature + :param str user_scope: User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + :param str scope_name: Scope at which to get the feature setting for (e.g. "project" or "team") + :param str scope_value: Value of the scope (e.g. the project or team id) + :param str reason: Reason for changing the state + :param str reason_code: Short reason code + :rtype: :class:` ` + """ + route_values = {} + if feature_id is not None: + route_values['featureId'] = self._serialize.url('feature_id', feature_id, 'str') + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if scope_name is not None: + route_values['scopeName'] = self._serialize.url('scope_name', scope_name, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + query_parameters = {} + if reason is not None: + query_parameters['reason'] = self._serialize.query('reason', reason, 'str') + if reason_code is not None: + query_parameters['reasonCode'] = self._serialize.query('reason_code', reason_code, 'str') + content = self._serialize.body(feature, 'ContributedFeatureState') + response = self._send(http_method='PATCH', + location_id='dd291e43-aa9f-4cee-8465-a93c78e414a4', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('ContributedFeatureState', response) + + def query_feature_states(self, query): + """QueryFeatureStates. + [Preview API] Get the effective state for a list of feature ids + :param :class:` ` query: Features to query along with current scope values + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'ContributedFeatureStateQuery') + response = self._send(http_method='POST', + location_id='2b4486ad-122b-400c-ae65-17b6672c1f9d', + version='4.1-preview.1', + content=content) + return self._deserialize('ContributedFeatureStateQuery', response) + + def query_feature_states_for_default_scope(self, query, user_scope): + """QueryFeatureStatesForDefaultScope. + [Preview API] Get the states of the specified features for the default scope + :param :class:` ` query: Query describing the features to query. + :param str user_scope: + :rtype: :class:` ` + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + content = self._serialize.body(query, 'ContributedFeatureStateQuery') + response = self._send(http_method='POST', + location_id='3f810f28-03e2-4239-b0bc-788add3005e5', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ContributedFeatureStateQuery', response) + + def query_feature_states_for_named_scope(self, query, user_scope, scope_name, scope_value): + """QueryFeatureStatesForNamedScope. + [Preview API] Get the states of the specified features for the specific named scope + :param :class:` ` query: Query describing the features to query. + :param str user_scope: + :param str scope_name: + :param str scope_value: + :rtype: :class:` ` + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if scope_name is not None: + route_values['scopeName'] = self._serialize.url('scope_name', scope_name, 'str') + if scope_value is not None: + route_values['scopeValue'] = self._serialize.url('scope_value', scope_value, 'str') + content = self._serialize.body(query, 'ContributedFeatureStateQuery') + response = self._send(http_method='POST', + location_id='f29e997b-c2da-4d15-8380-765788a1a74c', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ContributedFeatureStateQuery', response) + diff --git a/vsts/vsts/feature_management/v4_1/models/__init__.py b/vsts/vsts/feature_management/v4_1/models/__init__.py new file mode 100644 index 00000000..a5e7f615 --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/models/__init__.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 .contributed_feature import ContributedFeature +from .contributed_feature_setting_scope import ContributedFeatureSettingScope +from .contributed_feature_state import ContributedFeatureState +from .contributed_feature_state_query import ContributedFeatureStateQuery +from .contributed_feature_value_rule import ContributedFeatureValueRule +from .reference_links import ReferenceLinks + +__all__ = [ + 'ContributedFeature', + 'ContributedFeatureSettingScope', + 'ContributedFeatureState', + 'ContributedFeatureStateQuery', + 'ContributedFeatureValueRule', + 'ReferenceLinks', +] diff --git a/vsts/vsts/feature_management/v4_1/models/contributed_feature.py b/vsts/vsts/feature_management/v4_1/models/contributed_feature.py new file mode 100644 index 00000000..9bd35b24 --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/models/contributed_feature.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeature(Model): + """ContributedFeature. + + :param _links: Named links describing the feature + :type _links: :class:`ReferenceLinks ` + :param default_state: If true, the feature is enabled unless overridden at some scope + :type default_state: bool + :param default_value_rules: Rules for setting the default value if not specified by any setting/scope. Evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) + :type default_value_rules: list of :class:`ContributedFeatureValueRule ` + :param description: The description of the feature + :type description: str + :param id: The full contribution id of the feature + :type id: str + :param name: The friendly name of the feature + :type name: str + :param override_rules: Rules for overriding a feature value. These rules are run before explicit user/host state values are checked. They are evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) + :type override_rules: list of :class:`ContributedFeatureValueRule ` + :param scopes: The scopes/levels at which settings can set the enabled/disabled state of this feature + :type scopes: list of :class:`ContributedFeatureSettingScope ` + :param service_instance_type: The service instance id of the service that owns this feature + :type service_instance_type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'default_state': {'key': 'defaultState', 'type': 'bool'}, + 'default_value_rules': {'key': 'defaultValueRules', 'type': '[ContributedFeatureValueRule]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'override_rules': {'key': 'overrideRules', 'type': '[ContributedFeatureValueRule]'}, + 'scopes': {'key': 'scopes', 'type': '[ContributedFeatureSettingScope]'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'} + } + + def __init__(self, _links=None, default_state=None, default_value_rules=None, description=None, id=None, name=None, override_rules=None, scopes=None, service_instance_type=None): + super(ContributedFeature, self).__init__() + self._links = _links + self.default_state = default_state + self.default_value_rules = default_value_rules + self.description = description + self.id = id + self.name = name + self.override_rules = override_rules + self.scopes = scopes + self.service_instance_type = service_instance_type diff --git a/vsts/vsts/feature_management/v4_1/models/contributed_feature_setting_scope.py b/vsts/vsts/feature_management/v4_1/models/contributed_feature_setting_scope.py new file mode 100644 index 00000000..9366312e --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/models/contributed_feature_setting_scope.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureSettingScope(Model): + """ContributedFeatureSettingScope. + + :param setting_scope: The name of the settings scope to use when reading/writing the setting + :type setting_scope: str + :param user_scoped: Whether this is a user-scope or this is a host-wide (all users) setting + :type user_scoped: bool + """ + + _attribute_map = { + 'setting_scope': {'key': 'settingScope', 'type': 'str'}, + 'user_scoped': {'key': 'userScoped', 'type': 'bool'} + } + + def __init__(self, setting_scope=None, user_scoped=None): + super(ContributedFeatureSettingScope, self).__init__() + self.setting_scope = setting_scope + self.user_scoped = user_scoped diff --git a/vsts/vsts/feature_management/v4_1/models/contributed_feature_state.py b/vsts/vsts/feature_management/v4_1/models/contributed_feature_state.py new file mode 100644 index 00000000..2e4f7e09 --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/models/contributed_feature_state.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureState(Model): + """ContributedFeatureState. + + :param feature_id: The full contribution id of the feature + :type feature_id: str + :param overridden: True if the effective state was set by an override rule (indicating that the state cannot be managed by the end user) + :type overridden: bool + :param reason: Reason that the state was set (by a plugin/rule). + :type reason: str + :param scope: The scope at which this state applies + :type scope: :class:`ContributedFeatureSettingScope ` + :param state: The current state of this feature + :type state: object + """ + + _attribute_map = { + 'feature_id': {'key': 'featureId', 'type': 'str'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'ContributedFeatureSettingScope'}, + 'state': {'key': 'state', 'type': 'object'} + } + + def __init__(self, feature_id=None, overridden=None, reason=None, scope=None, state=None): + super(ContributedFeatureState, self).__init__() + self.feature_id = feature_id + self.overridden = overridden + self.reason = reason + self.scope = scope + self.state = state diff --git a/vsts/vsts/feature_management/v4_1/models/contributed_feature_state_query.py b/vsts/vsts/feature_management/v4_1/models/contributed_feature_state_query.py new file mode 100644 index 00000000..97191e09 --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/models/contributed_feature_state_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureStateQuery(Model): + """ContributedFeatureStateQuery. + + :param feature_ids: The list of feature ids to query + :type feature_ids: list of str + :param feature_states: The query result containing the current feature states for each of the queried feature ids + :type feature_states: dict + :param scope_values: A dictionary of scope values (project name, etc.) to use in the query (if querying across scopes) + :type scope_values: dict + """ + + _attribute_map = { + 'feature_ids': {'key': 'featureIds', 'type': '[str]'}, + 'feature_states': {'key': 'featureStates', 'type': '{ContributedFeatureState}'}, + 'scope_values': {'key': 'scopeValues', 'type': '{str}'} + } + + def __init__(self, feature_ids=None, feature_states=None, scope_values=None): + super(ContributedFeatureStateQuery, self).__init__() + self.feature_ids = feature_ids + self.feature_states = feature_states + self.scope_values = scope_values diff --git a/vsts/vsts/feature_management/v4_1/models/contributed_feature_value_rule.py b/vsts/vsts/feature_management/v4_1/models/contributed_feature_value_rule.py new file mode 100644 index 00000000..ea654f08 --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/models/contributed_feature_value_rule.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ContributedFeatureValueRule(Model): + """ContributedFeatureValueRule. + + :param name: Name of the IContributedFeatureValuePlugin to run + :type name: str + :param properties: Properties to feed to the IContributedFeatureValuePlugin + :type properties: dict + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'} + } + + def __init__(self, name=None, properties=None): + super(ContributedFeatureValueRule, self).__init__() + self.name = name + self.properties = properties diff --git a/vsts/vsts/feature_management/v4_1/models/reference_links.py b/vsts/vsts/feature_management/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/feature_management/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/file_container/__init__.py b/vsts/vsts/file_container/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/file_container/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/file_container/v4_0/__init__.py b/vsts/vsts/file_container/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/file_container/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/file_container/v4_0/file_container_client.py b/vsts/vsts/file_container/v4_0/file_container_client.py new file mode 100644 index 00000000..8b98c374 --- /dev/null +++ b/vsts/vsts/file_container/v4_0/file_container_client.py @@ -0,0 +1,130 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class FileContainerClient(VssClient): + """FileContainer + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(FileContainerClient, 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_items(self, items, container_id, scope=None): + """CreateItems. + [Preview API] Creates the specified items in in the referenced container. + :param :class:` ` items: + :param int container_id: + :param str scope: A guid representing the scope of the container. This is often the project id. + :rtype: [FileContainerItem] + """ + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'int') + query_parameters = {} + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + content = self._serialize.body(items, 'VssJsonCollectionWrapper') + response = self._send(http_method='POST', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[FileContainerItem]', response) + + def delete_item(self, container_id, item_path, scope=None): + """DeleteItem. + [Preview API] Deletes the specified items in a container. + :param long container_id: Container Id. + :param str item_path: Path to delete. + :param str scope: A guid representing the scope of the container. This is often the project id. + """ + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'long') + query_parameters = {} + if item_path is not None: + query_parameters['itemPath'] = self._serialize.query('item_path', item_path, 'str') + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + self._send(http_method='DELETE', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters) + + def get_containers(self, scope=None, artifact_uris=None): + """GetContainers. + [Preview API] Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + :param str scope: A guid representing the scope of the container. This is often the project id. + :param str artifact_uris: + :rtype: [FileContainer] + """ + query_parameters = {} + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + if artifact_uris is not None: + query_parameters['artifactUris'] = self._serialize.query('artifact_uris', artifact_uris, 'str') + response = self._send(http_method='GET', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.0-preview.4', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[FileContainer]', response) + + def get_items(self, container_id, scope=None, item_path=None, metadata=None, format=None, download_file_name=None, include_download_tickets=None, is_shallow=None): + """GetItems. + [Preview API] + :param long container_id: + :param str scope: + :param str item_path: + :param bool metadata: + :param str format: + :param str download_file_name: + :param bool include_download_tickets: + :param bool is_shallow: + :rtype: [FileContainerItem] + """ + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'long') + query_parameters = {} + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + if item_path is not None: + query_parameters['itemPath'] = self._serialize.query('item_path', item_path, 'str') + if metadata is not None: + query_parameters['metadata'] = self._serialize.query('metadata', metadata, 'bool') + if format is not None: + query_parameters['$format'] = self._serialize.query('format', format, 'str') + if download_file_name is not None: + query_parameters['downloadFileName'] = self._serialize.query('download_file_name', download_file_name, 'str') + if include_download_tickets is not None: + query_parameters['includeDownloadTickets'] = self._serialize.query('include_download_tickets', include_download_tickets, 'bool') + if is_shallow is not None: + query_parameters['isShallow'] = self._serialize.query('is_shallow', is_shallow, 'bool') + response = self._send(http_method='GET', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[FileContainerItem]', response) + diff --git a/vsts/vsts/file_container/v4_0/models/__init__.py b/vsts/vsts/file_container/v4_0/models/__init__.py new file mode 100644 index 00000000..09bce04e --- /dev/null +++ b/vsts/vsts/file_container/v4_0/models/__init__.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# 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 .file_container import FileContainer +from .file_container_item import FileContainerItem + +__all__ = [ + 'FileContainer', + 'FileContainerItem', +] diff --git a/vsts/vsts/file_container/v4_0/models/file_container.py b/vsts/vsts/file_container/v4_0/models/file_container.py new file mode 100644 index 00000000..977d427e --- /dev/null +++ b/vsts/vsts/file_container/v4_0/models/file_container.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 FileContainer(Model): + """FileContainer. + + :param artifact_uri: Uri of the artifact associated with the container. + :type artifact_uri: str + :param content_location: Download Url for the content of this item. + :type content_location: str + :param created_by: Owner. + :type created_by: str + :param date_created: Creation date. + :type date_created: datetime + :param description: Description. + :type description: str + :param id: Id. + :type id: long + :param item_location: Location of the item resource. + :type item_location: str + :param locator_path: ItemStore Locator for this container. + :type locator_path: str + :param name: Name. + :type name: str + :param options: Options the container can have. + :type options: object + :param scope_identifier: Project Id. + :type scope_identifier: str + :param security_token: Security token of the artifact associated with the container. + :type security_token: str + :param signing_key_id: Identifier of the optional encryption key. + :type signing_key_id: str + :param size: Total size of the files in bytes. + :type size: long + """ + + _attribute_map = { + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'content_location': {'key': 'contentLocation', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'long'}, + 'item_location': {'key': 'itemLocation', 'type': 'str'}, + 'locator_path': {'key': 'locatorPath', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'object'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'security_token': {'key': 'securityToken', 'type': 'str'}, + 'signing_key_id': {'key': 'signingKeyId', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'} + } + + def __init__(self, artifact_uri=None, content_location=None, created_by=None, date_created=None, description=None, id=None, item_location=None, locator_path=None, name=None, options=None, scope_identifier=None, security_token=None, signing_key_id=None, size=None): + super(FileContainer, self).__init__() + self.artifact_uri = artifact_uri + self.content_location = content_location + self.created_by = created_by + self.date_created = date_created + self.description = description + self.id = id + self.item_location = item_location + self.locator_path = locator_path + self.name = name + self.options = options + self.scope_identifier = scope_identifier + self.security_token = security_token + self.signing_key_id = signing_key_id + self.size = size diff --git a/vsts/vsts/file_container/v4_0/models/file_container_item.py b/vsts/vsts/file_container/v4_0/models/file_container_item.py new file mode 100644 index 00000000..e53626c5 --- /dev/null +++ b/vsts/vsts/file_container/v4_0/models/file_container_item.py @@ -0,0 +1,93 @@ +# -------------------------------------------------------------------------------------------- +# 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 FileContainerItem(Model): + """FileContainerItem. + + :param container_id: Container Id. + :type container_id: long + :param content_id: + :type content_id: list of number + :param content_location: Download Url for the content of this item. + :type content_location: str + :param created_by: Creator. + :type created_by: str + :param date_created: Creation date. + :type date_created: datetime + :param date_last_modified: Last modified date. + :type date_last_modified: datetime + :param file_encoding: Encoding of the file. Zero if not a file. + :type file_encoding: int + :param file_hash: Hash value of the file. Null if not a file. + :type file_hash: list of number + :param file_id: Id of the file content. + :type file_id: int + :param file_length: Length of the file. Zero if not of a file. + :type file_length: long + :param file_type: Type of the file. Zero if not a file. + :type file_type: int + :param item_location: Location of the item resource. + :type item_location: str + :param item_type: Type of the item: Folder, File or String. + :type item_type: object + :param last_modified_by: Modifier. + :type last_modified_by: str + :param path: Unique path that identifies the item. + :type path: str + :param scope_identifier: Project Id. + :type scope_identifier: str + :param status: Status of the item: Created or Pending Upload. + :type status: object + :param ticket: + :type ticket: str + """ + + _attribute_map = { + 'container_id': {'key': 'containerId', 'type': 'long'}, + 'content_id': {'key': 'contentId', 'type': '[number]'}, + 'content_location': {'key': 'contentLocation', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'date_last_modified': {'key': 'dateLastModified', 'type': 'iso-8601'}, + 'file_encoding': {'key': 'fileEncoding', 'type': 'int'}, + 'file_hash': {'key': 'fileHash', 'type': '[number]'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, + 'file_length': {'key': 'fileLength', 'type': 'long'}, + 'file_type': {'key': 'fileType', 'type': 'int'}, + 'item_location': {'key': 'itemLocation', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'object'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'ticket': {'key': 'ticket', 'type': 'str'} + } + + def __init__(self, container_id=None, content_id=None, content_location=None, created_by=None, date_created=None, date_last_modified=None, file_encoding=None, file_hash=None, file_id=None, file_length=None, file_type=None, item_location=None, item_type=None, last_modified_by=None, path=None, scope_identifier=None, status=None, ticket=None): + super(FileContainerItem, self).__init__() + self.container_id = container_id + self.content_id = content_id + self.content_location = content_location + self.created_by = created_by + self.date_created = date_created + self.date_last_modified = date_last_modified + self.file_encoding = file_encoding + self.file_hash = file_hash + self.file_id = file_id + self.file_length = file_length + self.file_type = file_type + self.item_location = item_location + self.item_type = item_type + self.last_modified_by = last_modified_by + self.path = path + self.scope_identifier = scope_identifier + self.status = status + self.ticket = ticket diff --git a/vsts/vsts/file_container/v4_1/__init__.py b/vsts/vsts/file_container/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/file_container/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/file_container/v4_1/file_container_client.py b/vsts/vsts/file_container/v4_1/file_container_client.py new file mode 100644 index 00000000..e145b81b --- /dev/null +++ b/vsts/vsts/file_container/v4_1/file_container_client.py @@ -0,0 +1,130 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class FileContainerClient(VssClient): + """FileContainer + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(FileContainerClient, 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_items(self, items, container_id, scope=None): + """CreateItems. + [Preview API] Creates the specified items in in the referenced container. + :param :class:` ` items: + :param int container_id: + :param str scope: A guid representing the scope of the container. This is often the project id. + :rtype: [FileContainerItem] + """ + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'int') + query_parameters = {} + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + content = self._serialize.body(items, 'VssJsonCollectionWrapper') + response = self._send(http_method='POST', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.1-preview.4', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[FileContainerItem]', response) + + def delete_item(self, container_id, item_path, scope=None): + """DeleteItem. + [Preview API] Deletes the specified items in a container. + :param long container_id: Container Id. + :param str item_path: Path to delete. + :param str scope: A guid representing the scope of the container. This is often the project id. + """ + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'long') + query_parameters = {} + if item_path is not None: + query_parameters['itemPath'] = self._serialize.query('item_path', item_path, 'str') + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + self._send(http_method='DELETE', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.1-preview.4', + route_values=route_values, + query_parameters=query_parameters) + + def get_containers(self, scope=None, artifact_uris=None): + """GetContainers. + [Preview API] Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + :param str scope: A guid representing the scope of the container. This is often the project id. + :param str artifact_uris: + :rtype: [FileContainer] + """ + query_parameters = {} + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + if artifact_uris is not None: + query_parameters['artifactUris'] = self._serialize.query('artifact_uris', artifact_uris, 'str') + response = self._send(http_method='GET', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.1-preview.4', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[FileContainer]', response) + + def get_items(self, container_id, scope=None, item_path=None, metadata=None, format=None, download_file_name=None, include_download_tickets=None, is_shallow=None): + """GetItems. + [Preview API] + :param long container_id: + :param str scope: + :param str item_path: + :param bool metadata: + :param str format: + :param str download_file_name: + :param bool include_download_tickets: + :param bool is_shallow: + :rtype: [FileContainerItem] + """ + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'long') + query_parameters = {} + if scope is not None: + query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + if item_path is not None: + query_parameters['itemPath'] = self._serialize.query('item_path', item_path, 'str') + if metadata is not None: + query_parameters['metadata'] = self._serialize.query('metadata', metadata, 'bool') + if format is not None: + query_parameters['$format'] = self._serialize.query('format', format, 'str') + if download_file_name is not None: + query_parameters['downloadFileName'] = self._serialize.query('download_file_name', download_file_name, 'str') + if include_download_tickets is not None: + query_parameters['includeDownloadTickets'] = self._serialize.query('include_download_tickets', include_download_tickets, 'bool') + if is_shallow is not None: + query_parameters['isShallow'] = self._serialize.query('is_shallow', is_shallow, 'bool') + response = self._send(http_method='GET', + location_id='e4f5c81e-e250-447b-9fef-bd48471bea5e', + version='4.1-preview.4', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[FileContainerItem]', response) + diff --git a/vsts/vsts/file_container/v4_1/models/__init__.py b/vsts/vsts/file_container/v4_1/models/__init__.py new file mode 100644 index 00000000..09bce04e --- /dev/null +++ b/vsts/vsts/file_container/v4_1/models/__init__.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# 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 .file_container import FileContainer +from .file_container_item import FileContainerItem + +__all__ = [ + 'FileContainer', + 'FileContainerItem', +] diff --git a/vsts/vsts/file_container/v4_1/models/file_container.py b/vsts/vsts/file_container/v4_1/models/file_container.py new file mode 100644 index 00000000..977d427e --- /dev/null +++ b/vsts/vsts/file_container/v4_1/models/file_container.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 FileContainer(Model): + """FileContainer. + + :param artifact_uri: Uri of the artifact associated with the container. + :type artifact_uri: str + :param content_location: Download Url for the content of this item. + :type content_location: str + :param created_by: Owner. + :type created_by: str + :param date_created: Creation date. + :type date_created: datetime + :param description: Description. + :type description: str + :param id: Id. + :type id: long + :param item_location: Location of the item resource. + :type item_location: str + :param locator_path: ItemStore Locator for this container. + :type locator_path: str + :param name: Name. + :type name: str + :param options: Options the container can have. + :type options: object + :param scope_identifier: Project Id. + :type scope_identifier: str + :param security_token: Security token of the artifact associated with the container. + :type security_token: str + :param signing_key_id: Identifier of the optional encryption key. + :type signing_key_id: str + :param size: Total size of the files in bytes. + :type size: long + """ + + _attribute_map = { + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'content_location': {'key': 'contentLocation', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'long'}, + 'item_location': {'key': 'itemLocation', 'type': 'str'}, + 'locator_path': {'key': 'locatorPath', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': 'object'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'security_token': {'key': 'securityToken', 'type': 'str'}, + 'signing_key_id': {'key': 'signingKeyId', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'} + } + + def __init__(self, artifact_uri=None, content_location=None, created_by=None, date_created=None, description=None, id=None, item_location=None, locator_path=None, name=None, options=None, scope_identifier=None, security_token=None, signing_key_id=None, size=None): + super(FileContainer, self).__init__() + self.artifact_uri = artifact_uri + self.content_location = content_location + self.created_by = created_by + self.date_created = date_created + self.description = description + self.id = id + self.item_location = item_location + self.locator_path = locator_path + self.name = name + self.options = options + self.scope_identifier = scope_identifier + self.security_token = security_token + self.signing_key_id = signing_key_id + self.size = size diff --git a/vsts/vsts/file_container/v4_1/models/file_container_item.py b/vsts/vsts/file_container/v4_1/models/file_container_item.py new file mode 100644 index 00000000..e53626c5 --- /dev/null +++ b/vsts/vsts/file_container/v4_1/models/file_container_item.py @@ -0,0 +1,93 @@ +# -------------------------------------------------------------------------------------------- +# 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 FileContainerItem(Model): + """FileContainerItem. + + :param container_id: Container Id. + :type container_id: long + :param content_id: + :type content_id: list of number + :param content_location: Download Url for the content of this item. + :type content_location: str + :param created_by: Creator. + :type created_by: str + :param date_created: Creation date. + :type date_created: datetime + :param date_last_modified: Last modified date. + :type date_last_modified: datetime + :param file_encoding: Encoding of the file. Zero if not a file. + :type file_encoding: int + :param file_hash: Hash value of the file. Null if not a file. + :type file_hash: list of number + :param file_id: Id of the file content. + :type file_id: int + :param file_length: Length of the file. Zero if not of a file. + :type file_length: long + :param file_type: Type of the file. Zero if not a file. + :type file_type: int + :param item_location: Location of the item resource. + :type item_location: str + :param item_type: Type of the item: Folder, File or String. + :type item_type: object + :param last_modified_by: Modifier. + :type last_modified_by: str + :param path: Unique path that identifies the item. + :type path: str + :param scope_identifier: Project Id. + :type scope_identifier: str + :param status: Status of the item: Created or Pending Upload. + :type status: object + :param ticket: + :type ticket: str + """ + + _attribute_map = { + 'container_id': {'key': 'containerId', 'type': 'long'}, + 'content_id': {'key': 'contentId', 'type': '[number]'}, + 'content_location': {'key': 'contentLocation', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'date_last_modified': {'key': 'dateLastModified', 'type': 'iso-8601'}, + 'file_encoding': {'key': 'fileEncoding', 'type': 'int'}, + 'file_hash': {'key': 'fileHash', 'type': '[number]'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, + 'file_length': {'key': 'fileLength', 'type': 'long'}, + 'file_type': {'key': 'fileType', 'type': 'int'}, + 'item_location': {'key': 'itemLocation', 'type': 'str'}, + 'item_type': {'key': 'itemType', 'type': 'object'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'ticket': {'key': 'ticket', 'type': 'str'} + } + + def __init__(self, container_id=None, content_id=None, content_location=None, created_by=None, date_created=None, date_last_modified=None, file_encoding=None, file_hash=None, file_id=None, file_length=None, file_type=None, item_location=None, item_type=None, last_modified_by=None, path=None, scope_identifier=None, status=None, ticket=None): + super(FileContainerItem, self).__init__() + self.container_id = container_id + self.content_id = content_id + self.content_location = content_location + self.created_by = created_by + self.date_created = date_created + self.date_last_modified = date_last_modified + self.file_encoding = file_encoding + self.file_hash = file_hash + self.file_id = file_id + self.file_length = file_length + self.file_type = file_type + self.item_location = item_location + self.item_type = item_type + self.last_modified_by = last_modified_by + self.path = path + self.scope_identifier = scope_identifier + self.status = status + self.ticket = ticket diff --git a/vsts/vsts/gallery/__init__.py b/vsts/vsts/gallery/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/gallery/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/gallery/v4_0/__init__.py b/vsts/vsts/gallery/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/gallery/v4_0/gallery_client.py b/vsts/vsts/gallery/v4_0/gallery_client.py new file mode 100644 index 00000000..3b63fa6e --- /dev/null +++ b/vsts/vsts/gallery/v4_0/gallery_client.py @@ -0,0 +1,1332 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class GalleryClient(VssClient): + """Gallery + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(GalleryClient, 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 = '69d21c00-f135-441b-b5ce-3626378e0819' + + def share_extension_by_id(self, extension_id, account_name): + """ShareExtensionById. + [Preview API] + :param str extension_id: + :param str account_name: + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='POST', + location_id='1f19631b-a0b4-4a03-89c2-d79785d24360', + version='4.0-preview.1', + route_values=route_values) + + def unshare_extension_by_id(self, extension_id, account_name): + """UnshareExtensionById. + [Preview API] + :param str extension_id: + :param str account_name: + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='DELETE', + location_id='1f19631b-a0b4-4a03-89c2-d79785d24360', + version='4.0-preview.1', + route_values=route_values) + + def share_extension(self, publisher_name, extension_name, account_name): + """ShareExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str account_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='POST', + location_id='a1e66d8f-f5de-4d16-8309-91a4e015ee46', + version='4.0-preview.1', + route_values=route_values) + + def unshare_extension(self, publisher_name, extension_name, account_name): + """UnshareExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str account_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='DELETE', + location_id='a1e66d8f-f5de-4d16-8309-91a4e015ee46', + version='4.0-preview.1', + route_values=route_values) + + def get_acquisition_options(self, item_id, installation_target, test_commerce=None, is_free_or_trial_install=None): + """GetAcquisitionOptions. + [Preview API] + :param str item_id: + :param str installation_target: + :param bool test_commerce: + :param bool is_free_or_trial_install: + :rtype: :class:` ` + """ + route_values = {} + if item_id is not None: + route_values['itemId'] = self._serialize.url('item_id', item_id, 'str') + query_parameters = {} + if installation_target is not None: + query_parameters['installationTarget'] = self._serialize.query('installation_target', installation_target, 'str') + if test_commerce is not None: + query_parameters['testCommerce'] = self._serialize.query('test_commerce', test_commerce, 'bool') + if is_free_or_trial_install is not None: + query_parameters['isFreeOrTrialInstall'] = self._serialize.query('is_free_or_trial_install', is_free_or_trial_install, 'bool') + response = self._send(http_method='GET', + location_id='9d0a0105-075e-4760-aa15-8bcf54d1bd7d', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AcquisitionOptions', response) + + def request_acquisition(self, acquisition_request): + """RequestAcquisition. + [Preview API] + :param :class:` ` acquisition_request: + :rtype: :class:` ` + """ + content = self._serialize.body(acquisition_request, 'ExtensionAcquisitionRequest') + response = self._send(http_method='POST', + location_id='3adb1f2d-e328-446e-be73-9f6d98071c45', + version='4.0-preview.1', + content=content) + return self._deserialize('ExtensionAcquisitionRequest', response) + + def get_asset_by_name(self, publisher_name, extension_name, version, asset_type, account_token=None, accept_default=None): + """GetAssetByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str asset_type: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='7529171f-a002-4180-93ba-685f358a0482', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_asset(self, extension_id, version, asset_type, account_token=None, accept_default=None): + """GetAsset. + [Preview API] + :param str extension_id: + :param str version: + :param str asset_type: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='5d545f3d-ef47-488b-8be3-f5ee1517856c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_asset_authenticated(self, publisher_name, extension_name, version, asset_type, account_token=None): + """GetAssetAuthenticated. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str asset_type: + :param str account_token: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + response = self._send(http_method='GET', + location_id='506aff36-2622-4f70-8063-77cce6366d20', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def associate_azure_publisher(self, publisher_name, azure_publisher_id): + """AssociateAzurePublisher. + [Preview API] + :param str publisher_name: + :param str azure_publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + query_parameters = {} + if azure_publisher_id is not None: + query_parameters['azurePublisherId'] = self._serialize.query('azure_publisher_id', azure_publisher_id, 'str') + response = self._send(http_method='PUT', + location_id='efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AzurePublisher', response) + + def query_associated_azure_publisher(self, publisher_name): + """QueryAssociatedAzurePublisher. + [Preview API] + :param str publisher_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + response = self._send(http_method='GET', + location_id='efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('AzurePublisher', response) + + def get_categories(self, languages=None): + """GetCategories. + [Preview API] + :param str languages: + :rtype: [str] + """ + query_parameters = {} + if languages is not None: + query_parameters['languages'] = self._serialize.query('languages', languages, 'str') + response = self._send(http_method='GET', + location_id='e0a5a71e-3ac3-43a0-ae7d-0bb5c3046a2a', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_category_details(self, category_name, languages=None, product=None): + """GetCategoryDetails. + [Preview API] + :param str category_name: + :param str languages: + :param str product: + :rtype: :class:` ` + """ + route_values = {} + if category_name is not None: + route_values['categoryName'] = self._serialize.url('category_name', category_name, 'str') + query_parameters = {} + if languages is not None: + query_parameters['languages'] = self._serialize.query('languages', languages, 'str') + if product is not None: + query_parameters['product'] = self._serialize.query('product', product, 'str') + response = self._send(http_method='GET', + location_id='75d3c04d-84d2-4973-acd2-22627587dabc', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CategoriesResult', response) + + def get_category_tree(self, product, category_id, lcid=None, source=None, product_version=None, skus=None, sub_skus=None): + """GetCategoryTree. + [Preview API] + :param str product: + :param str category_id: + :param int lcid: + :param str source: + :param str product_version: + :param str skus: + :param str sub_skus: + :rtype: :class:` ` + """ + route_values = {} + if product is not None: + route_values['product'] = self._serialize.url('product', product, 'str') + if category_id is not None: + route_values['categoryId'] = self._serialize.url('category_id', category_id, 'str') + query_parameters = {} + if lcid is not None: + query_parameters['lcid'] = self._serialize.query('lcid', lcid, 'int') + if source is not None: + query_parameters['source'] = self._serialize.query('source', source, 'str') + if product_version is not None: + query_parameters['productVersion'] = self._serialize.query('product_version', product_version, 'str') + if skus is not None: + query_parameters['skus'] = self._serialize.query('skus', skus, 'str') + if sub_skus is not None: + query_parameters['subSkus'] = self._serialize.query('sub_skus', sub_skus, 'str') + response = self._send(http_method='GET', + location_id='1102bb42-82b0-4955-8d8a-435d6b4cedd3', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProductCategory', response) + + def get_root_categories(self, product, lcid=None, source=None, product_version=None, skus=None, sub_skus=None): + """GetRootCategories. + [Preview API] + :param str product: + :param int lcid: + :param str source: + :param str product_version: + :param str skus: + :param str sub_skus: + :rtype: :class:` ` + """ + route_values = {} + if product is not None: + route_values['product'] = self._serialize.url('product', product, 'str') + query_parameters = {} + if lcid is not None: + query_parameters['lcid'] = self._serialize.query('lcid', lcid, 'int') + if source is not None: + query_parameters['source'] = self._serialize.query('source', source, 'str') + if product_version is not None: + query_parameters['productVersion'] = self._serialize.query('product_version', product_version, 'str') + if skus is not None: + query_parameters['skus'] = self._serialize.query('skus', skus, 'str') + if sub_skus is not None: + query_parameters['subSkus'] = self._serialize.query('sub_skus', sub_skus, 'str') + response = self._send(http_method='GET', + location_id='31fba831-35b2-46f6-a641-d05de5a877d8', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProductCategoriesResult', response) + + def get_certificate(self, publisher_name, extension_name, version=None): + """GetCertificate. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='GET', + location_id='e905ad6a-3f1f-4d08-9f6d-7d357ff8b7d0', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_extension_events(self, publisher_name, extension_name, count=None, after_date=None, include=None, include_property=None): + """GetExtensionEvents. + [Preview API] Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence. + :param str publisher_name: Name of the publisher + :param str extension_name: Name of the extension + :param int count: Count of events to fetch, applies to each event type. + :param datetime after_date: Fetch events that occurred on or after this date + :param str include: Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events + :param str include_property: Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + if include is not None: + query_parameters['include'] = self._serialize.query('include', include, 'str') + if include_property is not None: + query_parameters['includeProperty'] = self._serialize.query('include_property', include_property, 'str') + response = self._send(http_method='GET', + location_id='3d13c499-2168-4d06-bef4-14aba185dcd5', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ExtensionEvents', response) + + def publish_extension_events(self, extension_events): + """PublishExtensionEvents. + [Preview API] API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension. + :param [ExtensionEvents] extension_events: + """ + content = self._serialize.body(extension_events, '[ExtensionEvents]') + self._send(http_method='POST', + location_id='0bf2bd3a-70e0-4d5d-8bf7-bd4a9c2ab6e7', + version='4.0-preview.1', + content=content) + + def query_extensions(self, extension_query, account_token=None): + """QueryExtensions. + [Preview API] + :param :class:` ` extension_query: + :param str account_token: + :rtype: :class:` ` + """ + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + content = self._serialize.body(extension_query, 'ExtensionQuery') + response = self._send(http_method='POST', + location_id='eb9d5ee1-6d43-456b-b80e-8a96fbc014b6', + version='4.0-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('ExtensionQueryResult', response) + + def create_extension(self, upload_stream): + """CreateExtension. + [Preview API] + :param object upload_stream: Stream to upload + :rtype: :class:` ` + """ + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.0-preview.2', + content=content, + media_type='application/octet-stream') + return self._deserialize('PublishedExtension', response) + + def delete_extension_by_id(self, extension_id, version=None): + """DeleteExtensionById. + [Preview API] + :param str extension_id: + :param str version: + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + self._send(http_method='DELETE', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + + def get_extension_by_id(self, extension_id, version=None, flags=None): + """GetExtensionById. + [Preview API] + :param str extension_id: + :param str version: + :param str flags: + :rtype: :class:` ` + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'str') + response = self._send(http_method='GET', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('PublishedExtension', response) + + def update_extension_by_id(self, extension_id): + """UpdateExtensionById. + [Preview API] + :param str extension_id: + :rtype: :class:` ` + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='PUT', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('PublishedExtension', response) + + def create_extension_with_publisher(self, upload_stream, publisher_name): + """CreateExtensionWithPublisher. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.0-preview.2', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('PublishedExtension', response) + + def delete_extension(self, publisher_name, extension_name, version=None): + """DeleteExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + self._send(http_method='DELETE', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + + def get_extension(self, publisher_name, extension_name, version=None, flags=None, account_token=None): + """GetExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str flags: + :param str account_token: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'str') + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + response = self._send(http_method='GET', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('PublishedExtension', response) + + def update_extension(self, upload_stream, publisher_name, extension_name): + """UpdateExtension. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param str extension_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.0-preview.2', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('PublishedExtension', response) + + def update_extension_properties(self, publisher_name, extension_name, flags): + """UpdateExtensionProperties. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str flags: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'str') + response = self._send(http_method='PATCH', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('PublishedExtension', response) + + def extension_validator(self, azure_rest_api_request_model): + """ExtensionValidator. + [Preview API] + :param :class:` ` azure_rest_api_request_model: + """ + content = self._serialize.body(azure_rest_api_request_model, 'AzureRestApiRequestModel') + self._send(http_method='POST', + location_id='05e8a5e1-8c59-4c2c-8856-0ff087d1a844', + version='4.0-preview.1', + content=content) + + def send_notifications(self, notification_data): + """SendNotifications. + [Preview API] Send Notification + :param :class:` ` notification_data: Denoting the data needed to send notification + """ + content = self._serialize.body(notification_data, 'NotificationsData') + self._send(http_method='POST', + location_id='eab39817-413c-4602-a49f-07ad00844980', + version='4.0-preview.1', + content=content) + + def get_package(self, publisher_name, extension_name, version, account_token=None, accept_default=None): + """GetPackage. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='7cb576f8-1cae-4c4b-b7b1-e4af5759e965', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_asset_with_token(self, publisher_name, extension_name, version, asset_type, asset_token=None, account_token=None, accept_default=None): + """GetAssetWithToken. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str asset_type: + :param str asset_token: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + if asset_token is not None: + route_values['assetToken'] = self._serialize.url('asset_token', asset_token, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='364415a1-0077-4a41-a7a0-06edd4497492', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def query_publishers(self, publisher_query): + """QueryPublishers. + [Preview API] + :param :class:` ` publisher_query: + :rtype: :class:` ` + """ + content = self._serialize.body(publisher_query, 'PublisherQuery') + response = self._send(http_method='POST', + location_id='2ad6ee0a-b53f-4034-9d1d-d009fda1212e', + version='4.0-preview.1', + content=content) + return self._deserialize('PublisherQueryResult', response) + + def create_publisher(self, publisher): + """CreatePublisher. + [Preview API] + :param :class:` ` publisher: + :rtype: :class:` ` + """ + content = self._serialize.body(publisher, 'Publisher') + response = self._send(http_method='POST', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.0-preview.1', + content=content) + return self._deserialize('Publisher', response) + + def delete_publisher(self, publisher_name): + """DeletePublisher. + [Preview API] + :param str publisher_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + self._send(http_method='DELETE', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.0-preview.1', + route_values=route_values) + + def get_publisher(self, publisher_name, flags=None): + """GetPublisher. + [Preview API] + :param str publisher_name: + :param int flags: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + query_parameters = {} + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Publisher', response) + + def update_publisher(self, publisher, publisher_name): + """UpdatePublisher. + [Preview API] + :param :class:` ` publisher: + :param str publisher_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + content = self._serialize.body(publisher, 'Publisher') + response = self._send(http_method='PUT', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Publisher', response) + + def get_questions(self, publisher_name, extension_name, count=None, page=None, after_date=None): + """GetQuestions. + [Preview API] Returns a list of questions with their responses associated with an extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param int count: Number of questions to retrieve (defaults to 10). + :param int page: Page number from which set of questions are to be retrieved. + :param datetime after_date: If provided, results questions are returned which were posted after this date + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if page is not None: + query_parameters['page'] = self._serialize.query('page', page, 'int') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='c010d03d-812c-4ade-ae07-c1862475eda5', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('QuestionsResult', response) + + def report_question(self, concern, pub_name, ext_name, question_id): + """ReportQuestion. + [Preview API] Flags a concern with an existing question for an extension. + :param :class:` ` concern: User reported concern with a question for the extension. + :param str pub_name: Name of the publisher who published the extension. + :param str ext_name: Name of the extension. + :param long question_id: Identifier of the question to be updated for the extension. + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + content = self._serialize.body(concern, 'Concern') + response = self._send(http_method='POST', + location_id='784910cd-254a-494d-898b-0728549b2f10', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Concern', response) + + def create_question(self, question, publisher_name, extension_name): + """CreateQuestion. + [Preview API] Creates a new question for an extension. + :param :class:` ` question: Question to be created for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(question, 'Question') + response = self._send(http_method='POST', + location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Question', response) + + def delete_question(self, publisher_name, extension_name, question_id): + """DeleteQuestion. + [Preview API] Deletes an existing question and all its associated responses for an extension. (soft delete) + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question to be deleted for the extension. + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + self._send(http_method='DELETE', + location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', + version='4.0-preview.1', + route_values=route_values) + + def update_question(self, question, publisher_name, extension_name, question_id): + """UpdateQuestion. + [Preview API] Updates an existing question for an extension. + :param :class:` ` question: Updated question to be set for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question to be updated for the extension. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + content = self._serialize.body(question, 'Question') + response = self._send(http_method='PATCH', + location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Question', response) + + def create_response(self, response, publisher_name, extension_name, question_id): + """CreateResponse. + [Preview API] Creates a new response for a given question for an extension. + :param :class:` ` response: Response to be created for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question for which response is to be created for the extension. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + content = self._serialize.body(response, 'Response') + response = self._send(http_method='POST', + location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Response', response) + + def delete_response(self, publisher_name, extension_name, question_id, response_id): + """DeleteResponse. + [Preview API] Deletes a response for an extension. (soft delete) + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifies the question whose response is to be deleted. + :param long response_id: Identifies the response to be deleted. + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + if response_id is not None: + route_values['responseId'] = self._serialize.url('response_id', response_id, 'long') + self._send(http_method='DELETE', + location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', + version='4.0-preview.1', + route_values=route_values) + + def update_response(self, response, publisher_name, extension_name, question_id, response_id): + """UpdateResponse. + [Preview API] Updates an existing response for a given question for an extension. + :param :class:` ` response: Updated response to be set for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question for which response is to be updated for the extension. + :param long response_id: Identifier of the response which has to be updated. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + if response_id is not None: + route_values['responseId'] = self._serialize.url('response_id', response_id, 'long') + content = self._serialize.body(response, 'Response') + response = self._send(http_method='PATCH', + location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Response', response) + + def get_extension_reports(self, publisher_name, extension_name, days=None, count=None, after_date=None): + """GetExtensionReports. + [Preview API] Returns extension reports + :param str publisher_name: Name of the publisher who published the extension + :param str extension_name: Name of the extension + :param int days: Last n days report. If afterDate and days are specified, days will take priority + :param int count: Number of events to be returned + :param datetime after_date: Use if you want to fetch events newer than the specified date + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if days is not None: + query_parameters['days'] = self._serialize.query('days', days, 'int') + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='79e0c74f-157f-437e-845f-74fbb4121d4c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_reviews(self, publisher_name, extension_name, count=None, filter_options=None, before_date=None, after_date=None): + """GetReviews. + [Preview API] Returns a list of reviews associated with an extension + :param str publisher_name: Name of the publisher who published the extension + :param str extension_name: Name of the extension + :param int count: Number of reviews to retrieve (defaults to 5) + :param str filter_options: FilterOptions to filter out empty reviews etcetera, defaults to none + :param datetime before_date: Use if you want to fetch reviews older than the specified date, defaults to null + :param datetime after_date: Use if you want to fetch reviews newer than the specified date, defaults to null + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if filter_options is not None: + query_parameters['filterOptions'] = self._serialize.query('filter_options', filter_options, 'str') + if before_date is not None: + query_parameters['beforeDate'] = self._serialize.query('before_date', before_date, 'iso-8601') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='5b3f819f-f247-42ad-8c00-dd9ab9ab246d', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReviewsResult', response) + + def get_reviews_summary(self, pub_name, ext_name, before_date=None, after_date=None): + """GetReviewsSummary. + [Preview API] Returns a summary of the reviews + :param str pub_name: Name of the publisher who published the extension + :param str ext_name: Name of the extension + :param datetime before_date: Use if you want to fetch summary of reviews older than the specified date, defaults to null + :param datetime after_date: Use if you want to fetch summary of reviews newer than the specified date, defaults to null + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + query_parameters = {} + if before_date is not None: + query_parameters['beforeDate'] = self._serialize.query('before_date', before_date, 'iso-8601') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='b7b44e21-209e-48f0-ae78-04727fc37d77', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReviewSummary', response) + + def create_review(self, review, pub_name, ext_name): + """CreateReview. + [Preview API] Creates a new review for an extension + :param :class:` ` review: Review to be created for the extension + :param str pub_name: Name of the publisher who published the extension + :param str ext_name: Name of the extension + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + content = self._serialize.body(review, 'Review') + response = self._send(http_method='POST', + location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Review', response) + + def delete_review(self, pub_name, ext_name, review_id): + """DeleteReview. + [Preview API] Deletes a review + :param str pub_name: Name of the pubilsher who published the extension + :param str ext_name: Name of the extension + :param long review_id: Id of the review which needs to be updated + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + if review_id is not None: + route_values['reviewId'] = self._serialize.url('review_id', review_id, 'long') + self._send(http_method='DELETE', + location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', + version='4.0-preview.1', + route_values=route_values) + + def update_review(self, review_patch, pub_name, ext_name, review_id): + """UpdateReview. + [Preview API] Updates or Flags a review + :param :class:` ` review_patch: ReviewPatch object which contains the changes to be applied to the review + :param str pub_name: Name of the pubilsher who published the extension + :param str ext_name: Name of the extension + :param long review_id: Id of the review which needs to be updated + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + if review_id is not None: + route_values['reviewId'] = self._serialize.url('review_id', review_id, 'long') + content = self._serialize.body(review_patch, 'ReviewPatch') + response = self._send(http_method='PATCH', + location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ReviewPatch', response) + + def create_category(self, category): + """CreateCategory. + [Preview API] + :param :class:` ` category: + :rtype: :class:` ` + """ + content = self._serialize.body(category, 'ExtensionCategory') + response = self._send(http_method='POST', + location_id='476531a3-7024-4516-a76a-ed64d3008ad6', + version='4.0-preview.1', + content=content) + return self._deserialize('ExtensionCategory', response) + + def get_gallery_user_settings(self, user_scope, key=None): + """GetGalleryUserSettings. + [Preview API] Get all setting entries for the given user/all-users scope + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + :param str key: Optional key under which to filter all the entries + :rtype: {object} + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if key is not None: + route_values['key'] = self._serialize.url('key', key, 'str') + response = self._send(http_method='GET', + location_id='9b75ece3-7960-401c-848b-148ac01ca350', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('{object}', response) + + def set_gallery_user_settings(self, entries, user_scope): + """SetGalleryUserSettings. + [Preview API] Set all setting entries for the given user/all-users scope + :param {object} entries: A key-value pair of all settings that need to be set + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + content = self._serialize.body(entries, '{object}') + self._send(http_method='PATCH', + location_id='9b75ece3-7960-401c-848b-148ac01ca350', + version='4.0-preview.1', + route_values=route_values, + content=content) + + def generate_key(self, key_type, expire_current_seconds=None): + """GenerateKey. + [Preview API] + :param str key_type: + :param int expire_current_seconds: + """ + route_values = {} + if key_type is not None: + route_values['keyType'] = self._serialize.url('key_type', key_type, 'str') + query_parameters = {} + if expire_current_seconds is not None: + query_parameters['expireCurrentSeconds'] = self._serialize.query('expire_current_seconds', expire_current_seconds, 'int') + self._send(http_method='POST', + location_id='92ed5cf4-c38b-465a-9059-2f2fb7c624b5', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_signing_key(self, key_type): + """GetSigningKey. + [Preview API] + :param str key_type: + :rtype: str + """ + route_values = {} + if key_type is not None: + route_values['keyType'] = self._serialize.url('key_type', key_type, 'str') + response = self._send(http_method='GET', + location_id='92ed5cf4-c38b-465a-9059-2f2fb7c624b5', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('str', response) + + def update_extension_statistics(self, extension_statistics_update, publisher_name, extension_name): + """UpdateExtensionStatistics. + [Preview API] + :param :class:` ` extension_statistics_update: + :param str publisher_name: + :param str extension_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(extension_statistics_update, 'ExtensionStatisticUpdate') + self._send(http_method='PATCH', + location_id='a0ea3204-11e9-422d-a9ca-45851cc41400', + version='4.0-preview.1', + route_values=route_values, + content=content) + + def get_extension_daily_stats(self, publisher_name, extension_name, days=None, aggregate=None, after_date=None): + """GetExtensionDailyStats. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param int days: + :param str aggregate: + :param datetime after_date: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if days is not None: + query_parameters['days'] = self._serialize.query('days', days, 'int') + if aggregate is not None: + query_parameters['aggregate'] = self._serialize.query('aggregate', aggregate, 'str') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='ae06047e-51c5-4fb4-ab65-7be488544416', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ExtensionDailyStats', response) + + def get_extension_daily_stats_anonymous(self, publisher_name, extension_name, version): + """GetExtensionDailyStatsAnonymous. + [Preview API] This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats. + :param str publisher_name: Name of the publisher + :param str extension_name: Name of the extension + :param str version: Version of the extension + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='GET', + location_id='4fa7adb6-ca65-4075-a232-5f28323288ea', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ExtensionDailyStats', response) + + def increment_extension_daily_stat(self, publisher_name, extension_name, version, stat_type): + """IncrementExtensionDailyStat. + [Preview API] Increments a daily statistic associated with the extension + :param str publisher_name: Name of the publisher + :param str extension_name: Name of the extension + :param str version: Version of the extension + :param str stat_type: Type of stat to increment + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + query_parameters = {} + if stat_type is not None: + query_parameters['statType'] = self._serialize.query('stat_type', stat_type, 'str') + self._send(http_method='POST', + location_id='4fa7adb6-ca65-4075-a232-5f28323288ea', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_verification_log(self, publisher_name, extension_name, version): + """GetVerificationLog. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='GET', + location_id='c5523abe-b843-437f-875b-5833064efe4d', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + diff --git a/vsts/vsts/gallery/v4_0/models/__init__.py b/vsts/vsts/gallery/v4_0/models/__init__.py new file mode 100644 index 00000000..129f227d --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/__init__.py @@ -0,0 +1,115 @@ +# -------------------------------------------------------------------------------------------- +# 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 .acquisition_operation import AcquisitionOperation +from .acquisition_options import AcquisitionOptions +from .answers import Answers +from .asset_details import AssetDetails +from .azure_publisher import AzurePublisher +from .azure_rest_api_request_model import AzureRestApiRequestModel +from .categories_result import CategoriesResult +from .category_language_title import CategoryLanguageTitle +from .concern import Concern +from .event_counts import EventCounts +from .extension_acquisition_request import ExtensionAcquisitionRequest +from .extension_badge import ExtensionBadge +from .extension_category import ExtensionCategory +from .extension_daily_stat import ExtensionDailyStat +from .extension_daily_stats import ExtensionDailyStats +from .extension_event import ExtensionEvent +from .extension_events import ExtensionEvents +from .extension_file import ExtensionFile +from .extension_filter_result import ExtensionFilterResult +from .extension_filter_result_metadata import ExtensionFilterResultMetadata +from .extension_package import ExtensionPackage +from .extension_query import ExtensionQuery +from .extension_query_result import ExtensionQueryResult +from .extension_share import ExtensionShare +from .extension_statistic import ExtensionStatistic +from .extension_statistic_update import ExtensionStatisticUpdate +from .extension_version import ExtensionVersion +from .filter_criteria import FilterCriteria +from .installation_target import InstallationTarget +from .metadata_item import MetadataItem +from .notifications_data import NotificationsData +from .product_categories_result import ProductCategoriesResult +from .product_category import ProductCategory +from .published_extension import PublishedExtension +from .publisher import Publisher +from .publisher_facts import PublisherFacts +from .publisher_filter_result import PublisherFilterResult +from .publisher_query import PublisherQuery +from .publisher_query_result import PublisherQueryResult +from .qn_aItem import QnAItem +from .query_filter import QueryFilter +from .question import Question +from .questions_result import QuestionsResult +from .rating_count_per_rating import RatingCountPerRating +from .response import Response +from .review import Review +from .review_patch import ReviewPatch +from .review_reply import ReviewReply +from .reviews_result import ReviewsResult +from .review_summary import ReviewSummary +from .user_identity_ref import UserIdentityRef +from .user_reported_concern import UserReportedConcern + +__all__ = [ + 'AcquisitionOperation', + 'AcquisitionOptions', + 'Answers', + 'AssetDetails', + 'AzurePublisher', + 'AzureRestApiRequestModel', + 'CategoriesResult', + 'CategoryLanguageTitle', + 'Concern', + 'EventCounts', + 'ExtensionAcquisitionRequest', + 'ExtensionBadge', + 'ExtensionCategory', + 'ExtensionDailyStat', + 'ExtensionDailyStats', + 'ExtensionEvent', + 'ExtensionEvents', + 'ExtensionFile', + 'ExtensionFilterResult', + 'ExtensionFilterResultMetadata', + 'ExtensionPackage', + 'ExtensionQuery', + 'ExtensionQueryResult', + 'ExtensionShare', + 'ExtensionStatistic', + 'ExtensionStatisticUpdate', + 'ExtensionVersion', + 'FilterCriteria', + 'InstallationTarget', + 'MetadataItem', + 'NotificationsData', + 'ProductCategoriesResult', + 'ProductCategory', + 'PublishedExtension', + 'Publisher', + 'PublisherFacts', + 'PublisherFilterResult', + 'PublisherQuery', + 'PublisherQueryResult', + 'QnAItem', + 'QueryFilter', + 'Question', + 'QuestionsResult', + 'RatingCountPerRating', + 'Response', + 'Review', + 'ReviewPatch', + 'ReviewReply', + 'ReviewsResult', + 'ReviewSummary', + 'UserIdentityRef', + 'UserReportedConcern', +] diff --git a/vsts/vsts/gallery/v4_0/models/acquisition_operation.py b/vsts/vsts/gallery/v4_0/models/acquisition_operation.py new file mode 100644 index 00000000..bd2e4ef2 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/acquisition_operation.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOperation(Model): + """AcquisitionOperation. + + :param operation_state: State of the the AcquisitionOperation for the current user + :type operation_state: object + :param operation_type: AcquisitionOperationType: install, request, buy, etc... + :type operation_type: object + :param reason: Optional reason to justify current state. Typically used with Disallow state. + :type reason: str + """ + + _attribute_map = { + 'operation_state': {'key': 'operationState', 'type': 'object'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'str'} + } + + def __init__(self, operation_state=None, operation_type=None, reason=None): + super(AcquisitionOperation, self).__init__() + self.operation_state = operation_state + self.operation_type = operation_type + self.reason = reason diff --git a/vsts/vsts/gallery/v4_0/models/acquisition_options.py b/vsts/vsts/gallery/v4_0/models/acquisition_options.py new file mode 100644 index 00000000..e3af2e91 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/acquisition_options.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOptions(Model): + """AcquisitionOptions. + + :param default_operation: Default Operation for the ItemId in this target + :type default_operation: :class:`AcquisitionOperation ` + :param item_id: The item id that this options refer to + :type item_id: str + :param operations: Operations allowed for the ItemId in this target + :type operations: list of :class:`AcquisitionOperation ` + :param target: The target that this options refer to + :type target: str + """ + + _attribute_map = { + 'default_operation': {'key': 'defaultOperation', 'type': 'AcquisitionOperation'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operations': {'key': 'operations', 'type': '[AcquisitionOperation]'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, default_operation=None, item_id=None, operations=None, target=None): + super(AcquisitionOptions, self).__init__() + self.default_operation = default_operation + self.item_id = item_id + self.operations = operations + self.target = target diff --git a/vsts/vsts/gallery/v4_0/models/answers.py b/vsts/vsts/gallery/v4_0/models/answers.py new file mode 100644 index 00000000..0f9a70e0 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/answers.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Answers(Model): + """Answers. + + :param vSMarketplace_extension_name: Gets or sets the vs marketplace extension name + :type vSMarketplace_extension_name: str + :param vSMarketplace_publisher_name: Gets or sets the vs marketplace publsiher name + :type vSMarketplace_publisher_name: str + """ + + _attribute_map = { + 'vSMarketplace_extension_name': {'key': 'vSMarketplaceExtensionName', 'type': 'str'}, + 'vSMarketplace_publisher_name': {'key': 'vSMarketplacePublisherName', 'type': 'str'} + } + + def __init__(self, vSMarketplace_extension_name=None, vSMarketplace_publisher_name=None): + super(Answers, self).__init__() + self.vSMarketplace_extension_name = vSMarketplace_extension_name + self.vSMarketplace_publisher_name = vSMarketplace_publisher_name diff --git a/vsts/vsts/gallery/v4_0/models/asset_details.py b/vsts/vsts/gallery/v4_0/models/asset_details.py new file mode 100644 index 00000000..7117e138 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/asset_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AssetDetails(Model): + """AssetDetails. + + :param answers: Gets or sets the Answers, which contains vs marketplace extension name and publisher name + :type answers: :class:`Answers ` + :param publisher_natural_identifier: Gets or sets the VS publisher Id + :type publisher_natural_identifier: str + """ + + _attribute_map = { + 'answers': {'key': 'answers', 'type': 'Answers'}, + 'publisher_natural_identifier': {'key': 'publisherNaturalIdentifier', 'type': 'str'} + } + + def __init__(self, answers=None, publisher_natural_identifier=None): + super(AssetDetails, self).__init__() + self.answers = answers + self.publisher_natural_identifier = publisher_natural_identifier diff --git a/vsts/vsts/gallery/v4_0/models/azure_publisher.py b/vsts/vsts/gallery/v4_0/models/azure_publisher.py new file mode 100644 index 00000000..26b6240c --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/azure_publisher.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzurePublisher(Model): + """AzurePublisher. + + :param azure_publisher_id: + :type azure_publisher_id: str + :param publisher_name: + :type publisher_name: str + """ + + _attribute_map = { + 'azure_publisher_id': {'key': 'azurePublisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, azure_publisher_id=None, publisher_name=None): + super(AzurePublisher, self).__init__() + self.azure_publisher_id = azure_publisher_id + self.publisher_name = publisher_name diff --git a/vsts/vsts/gallery/v4_0/models/azure_rest_api_request_model.py b/vsts/vsts/gallery/v4_0/models/azure_rest_api_request_model.py new file mode 100644 index 00000000..f0b8a542 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/azure_rest_api_request_model.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzureRestApiRequestModel(Model): + """AzureRestApiRequestModel. + + :param asset_details: Gets or sets the Asset details + :type asset_details: :class:`AssetDetails ` + :param asset_id: Gets or sets the asset id + :type asset_id: str + :param asset_version: Gets or sets the asset version + :type asset_version: long + :param customer_support_email: Gets or sets the customer support email + :type customer_support_email: str + :param integration_contact_email: Gets or sets the integration contact email + :type integration_contact_email: str + :param operation: Gets or sets the asset version + :type operation: str + :param plan_id: Gets or sets the plan identifier if any. + :type plan_id: str + :param publisher_id: Gets or sets the publisher id + :type publisher_id: str + :param type: Gets or sets the resource type + :type type: str + """ + + _attribute_map = { + 'asset_details': {'key': 'assetDetails', 'type': 'AssetDetails'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'asset_version': {'key': 'assetVersion', 'type': 'long'}, + 'customer_support_email': {'key': 'customerSupportEmail', 'type': 'str'}, + 'integration_contact_email': {'key': 'integrationContactEmail', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, asset_details=None, asset_id=None, asset_version=None, customer_support_email=None, integration_contact_email=None, operation=None, plan_id=None, publisher_id=None, type=None): + super(AzureRestApiRequestModel, self).__init__() + self.asset_details = asset_details + self.asset_id = asset_id + self.asset_version = asset_version + self.customer_support_email = customer_support_email + self.integration_contact_email = integration_contact_email + self.operation = operation + self.plan_id = plan_id + self.publisher_id = publisher_id + self.type = type diff --git a/vsts/vsts/gallery/v4_0/models/categories_result.py b/vsts/vsts/gallery/v4_0/models/categories_result.py new file mode 100644 index 00000000..0d861115 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/categories_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 CategoriesResult(Model): + """CategoriesResult. + + :param categories: + :type categories: list of :class:`ExtensionCategory ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ExtensionCategory]'} + } + + def __init__(self, categories=None): + super(CategoriesResult, self).__init__() + self.categories = categories diff --git a/vsts/vsts/gallery/v4_0/models/category_language_title.py b/vsts/vsts/gallery/v4_0/models/category_language_title.py new file mode 100644 index 00000000..af873077 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/category_language_title.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CategoryLanguageTitle(Model): + """CategoryLanguageTitle. + + :param lang: The language for which the title is applicable + :type lang: str + :param lcid: The language culture id of the lang parameter + :type lcid: int + :param title: Actual title to be shown on the UI + :type title: str + """ + + _attribute_map = { + 'lang': {'key': 'lang', 'type': 'str'}, + 'lcid': {'key': 'lcid', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, lang=None, lcid=None, title=None): + super(CategoryLanguageTitle, self).__init__() + self.lang = lang + self.lcid = lcid + self.title = title diff --git a/vsts/vsts/gallery/v4_0/models/concern.py b/vsts/vsts/gallery/v4_0/models/concern.py new file mode 100644 index 00000000..ebab8a2a --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/concern.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------------------------- +# 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 .qn_aItem import QnAItem + + +class Concern(QnAItem): + """Concern. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + :param category: Category of the concern + :type category: object + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'}, + 'category': {'key': 'category', 'type': 'object'} + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None, category=None): + super(Concern, self).__init__(created_date=created_date, id=id, status=status, text=text, updated_date=updated_date, user=user) + self.category = category diff --git a/vsts/vsts/gallery/v4_0/models/event_counts.py b/vsts/vsts/gallery/v4_0/models/event_counts.py new file mode 100644 index 00000000..dc65473e --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/event_counts.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventCounts(Model): + """EventCounts. + + :param average_rating: Average rating on the day for extension + :type average_rating: number + :param buy_count: Number of times the extension was bought in hosted scenario (applies only to VSTS extensions) + :type buy_count: int + :param connected_buy_count: Number of times the extension was bought in connected scenario (applies only to VSTS extensions) + :type connected_buy_count: int + :param connected_install_count: Number of times the extension was installed in connected scenario (applies only to VSTS extensions) + :type connected_install_count: int + :param install_count: Number of times the extension was installed + :type install_count: long + :param try_count: Number of times the extension was installed as a trial (applies only to VSTS extensions) + :type try_count: int + :param uninstall_count: Number of times the extension was uninstalled (applies only to VSTS extensions) + :type uninstall_count: int + :param web_download_count: Number of times the extension was downloaded (applies to VSTS extensions and VSCode marketplace click installs) + :type web_download_count: long + :param web_page_views: Number of detail page views + :type web_page_views: long + """ + + _attribute_map = { + 'average_rating': {'key': 'averageRating', 'type': 'number'}, + 'buy_count': {'key': 'buyCount', 'type': 'int'}, + 'connected_buy_count': {'key': 'connectedBuyCount', 'type': 'int'}, + 'connected_install_count': {'key': 'connectedInstallCount', 'type': 'int'}, + 'install_count': {'key': 'installCount', 'type': 'long'}, + 'try_count': {'key': 'tryCount', 'type': 'int'}, + 'uninstall_count': {'key': 'uninstallCount', 'type': 'int'}, + 'web_download_count': {'key': 'webDownloadCount', 'type': 'long'}, + 'web_page_views': {'key': 'webPageViews', 'type': 'long'} + } + + def __init__(self, average_rating=None, buy_count=None, connected_buy_count=None, connected_install_count=None, install_count=None, try_count=None, uninstall_count=None, web_download_count=None, web_page_views=None): + super(EventCounts, self).__init__() + self.average_rating = average_rating + self.buy_count = buy_count + self.connected_buy_count = connected_buy_count + self.connected_install_count = connected_install_count + self.install_count = install_count + self.try_count = try_count + self.uninstall_count = uninstall_count + self.web_download_count = web_download_count + self.web_page_views = web_page_views diff --git a/vsts/vsts/gallery/v4_0/models/extension_acquisition_request.py b/vsts/vsts/gallery/v4_0/models/extension_acquisition_request.py new file mode 100644 index 00000000..593b33e0 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_acquisition_request.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAcquisitionRequest(Model): + """ExtensionAcquisitionRequest. + + :param assignment_type: How the item is being assigned + :type assignment_type: object + :param billing_id: The id of the subscription used for purchase + :type billing_id: str + :param item_id: The marketplace id (publisherName.extensionName) for the item + :type item_id: str + :param operation_type: The type of operation, such as install, request, purchase + :type operation_type: object + :param properties: Additional properties which can be added to the request. + :type properties: :class:`object ` + :param quantity: How many licenses should be purchased + :type quantity: int + :param targets: A list of target guids where the item should be acquired (installed, requested, etc.), such as account id + :type targets: list of str + """ + + _attribute_map = { + 'assignment_type': {'key': 'assignmentType', 'type': 'object'}, + 'billing_id': {'key': 'billingId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'quantity': {'key': 'quantity', 'type': 'int'}, + 'targets': {'key': 'targets', 'type': '[str]'} + } + + def __init__(self, assignment_type=None, billing_id=None, item_id=None, operation_type=None, properties=None, quantity=None, targets=None): + super(ExtensionAcquisitionRequest, self).__init__() + self.assignment_type = assignment_type + self.billing_id = billing_id + self.item_id = item_id + self.operation_type = operation_type + self.properties = properties + self.quantity = quantity + self.targets = targets diff --git a/vsts/vsts/gallery/v4_0/models/extension_badge.py b/vsts/vsts/gallery/v4_0/models/extension_badge.py new file mode 100644 index 00000000..bcb0fa1c --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_badge.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionBadge(Model): + """ExtensionBadge. + + :param description: + :type description: str + :param img_uri: + :type img_uri: str + :param link: + :type link: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'img_uri': {'key': 'imgUri', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'} + } + + def __init__(self, description=None, img_uri=None, link=None): + super(ExtensionBadge, self).__init__() + self.description = description + self.img_uri = img_uri + self.link = link diff --git a/vsts/vsts/gallery/v4_0/models/extension_category.py b/vsts/vsts/gallery/v4_0/models/extension_category.py new file mode 100644 index 00000000..6fda47d4 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_category.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionCategory(Model): + """ExtensionCategory. + + :param associated_products: The name of the products with which this category is associated to. + :type associated_products: list of str + :param category_id: + :type category_id: int + :param category_name: This is the internal name for a category + :type category_name: str + :param language: This parameter is obsolete. Refer to LanguageTitles for langauge specific titles + :type language: str + :param language_titles: The list of all the titles of this category in various languages + :type language_titles: list of :class:`CategoryLanguageTitle ` + :param parent_category_name: This is the internal name of the parent if this is associated with a parent + :type parent_category_name: str + """ + + _attribute_map = { + 'associated_products': {'key': 'associatedProducts', 'type': '[str]'}, + 'category_id': {'key': 'categoryId', 'type': 'int'}, + 'category_name': {'key': 'categoryName', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'language_titles': {'key': 'languageTitles', 'type': '[CategoryLanguageTitle]'}, + 'parent_category_name': {'key': 'parentCategoryName', 'type': 'str'} + } + + def __init__(self, associated_products=None, category_id=None, category_name=None, language=None, language_titles=None, parent_category_name=None): + super(ExtensionCategory, self).__init__() + self.associated_products = associated_products + self.category_id = category_id + self.category_name = category_name + self.language = language + self.language_titles = language_titles + self.parent_category_name = parent_category_name diff --git a/vsts/vsts/gallery/v4_0/models/extension_daily_stat.py b/vsts/vsts/gallery/v4_0/models/extension_daily_stat.py new file mode 100644 index 00000000..cda19c87 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_daily_stat.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDailyStat(Model): + """ExtensionDailyStat. + + :param counts: Stores the event counts + :type counts: :class:`EventCounts ` + :param extended_stats: Generic key/value pair to store extended statistics. Used for sending paid extension stats like Upgrade, Downgrade, Cancel trend etc. + :type extended_stats: dict + :param statistic_date: Timestamp of this data point + :type statistic_date: datetime + :param version: Version of the extension + :type version: str + """ + + _attribute_map = { + 'counts': {'key': 'counts', 'type': 'EventCounts'}, + 'extended_stats': {'key': 'extendedStats', 'type': '{object}'}, + 'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, counts=None, extended_stats=None, statistic_date=None, version=None): + super(ExtensionDailyStat, self).__init__() + self.counts = counts + self.extended_stats = extended_stats + self.statistic_date = statistic_date + self.version = version diff --git a/vsts/vsts/gallery/v4_0/models/extension_daily_stats.py b/vsts/vsts/gallery/v4_0/models/extension_daily_stats.py new file mode 100644 index 00000000..4d654b65 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_daily_stats.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDailyStats(Model): + """ExtensionDailyStats. + + :param daily_stats: List of extension statistics data points + :type daily_stats: list of :class:`ExtensionDailyStat ` + :param extension_id: Id of the extension, this will never be sent back to the client. For internal use only. + :type extension_id: str + :param extension_name: Name of the extension + :type extension_name: str + :param publisher_name: Name of the publisher + :type publisher_name: str + :param stat_count: Count of stats + :type stat_count: int + """ + + _attribute_map = { + 'daily_stats': {'key': 'dailyStats', 'type': '[ExtensionDailyStat]'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'stat_count': {'key': 'statCount', 'type': 'int'} + } + + def __init__(self, daily_stats=None, extension_id=None, extension_name=None, publisher_name=None, stat_count=None): + super(ExtensionDailyStats, self).__init__() + self.daily_stats = daily_stats + self.extension_id = extension_id + self.extension_name = extension_name + self.publisher_name = publisher_name + self.stat_count = stat_count diff --git a/vsts/vsts/gallery/v4_0/models/extension_event.py b/vsts/vsts/gallery/v4_0/models/extension_event.py new file mode 100644 index 00000000..be955bb4 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_event.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEvent(Model): + """ExtensionEvent. + + :param id: Id which identifies each data point uniquely + :type id: long + :param properties: + :type properties: :class:`object ` + :param statistic_date: Timestamp of when the event occurred + :type statistic_date: datetime + :param version: Version of the extension + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, properties=None, statistic_date=None, version=None): + super(ExtensionEvent, self).__init__() + self.id = id + self.properties = properties + self.statistic_date = statistic_date + self.version = version diff --git a/vsts/vsts/gallery/v4_0/models/extension_events.py b/vsts/vsts/gallery/v4_0/models/extension_events.py new file mode 100644 index 00000000..e63f0c32 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_events.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEvents(Model): + """ExtensionEvents. + + :param events: Generic container for events data. The dictionary key denotes the type of event and the list contains properties related to that event + :type events: dict + :param extension_id: Id of the extension, this will never be sent back to the client. This field will mainly be used when EMS calls into Gallery REST API to update install/uninstall events for various extensions in one go. + :type extension_id: str + :param extension_name: Name of the extension + :type extension_name: str + :param publisher_name: Name of the publisher + :type publisher_name: str + """ + + _attribute_map = { + 'events': {'key': 'events', 'type': '{[ExtensionEvent]}'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, events=None, extension_id=None, extension_name=None, publisher_name=None): + super(ExtensionEvents, self).__init__() + self.events = events + self.extension_id = extension_id + self.extension_name = extension_name + self.publisher_name = publisher_name diff --git a/vsts/vsts/gallery/v4_0/models/extension_file.py b/vsts/vsts/gallery/v4_0/models/extension_file.py new file mode 100644 index 00000000..ba792fd5 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_file.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFile(Model): + """ExtensionFile. + + :param asset_type: + :type asset_type: str + :param content_type: + :type content_type: str + :param file_id: + :type file_id: int + :param is_default: + :type is_default: bool + :param is_public: + :type is_public: bool + :param language: + :type language: str + :param short_description: + :type short_description: str + :param source: + :type source: str + :param version: + :type version: str + """ + + _attribute_map = { + 'asset_type': {'key': 'assetType', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_public': {'key': 'isPublic', 'type': 'bool'}, + 'language': {'key': 'language', 'type': 'str'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, asset_type=None, content_type=None, file_id=None, is_default=None, is_public=None, language=None, short_description=None, source=None, version=None): + super(ExtensionFile, self).__init__() + self.asset_type = asset_type + self.content_type = content_type + self.file_id = file_id + self.is_default = is_default + self.is_public = is_public + self.language = language + self.short_description = short_description + self.source = source + self.version = version diff --git a/vsts/vsts/gallery/v4_0/models/extension_filter_result.py b/vsts/vsts/gallery/v4_0/models/extension_filter_result.py new file mode 100644 index 00000000..02bbaea8 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_filter_result.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFilterResult(Model): + """ExtensionFilterResult. + + :param extensions: This is the set of appplications that matched the query filter supplied. + :type extensions: list of :class:`PublishedExtension ` + :param paging_token: The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results. + :type paging_token: str + :param result_metadata: This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results + :type result_metadata: list of :class:`ExtensionFilterResultMetadata ` + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[PublishedExtension]'}, + 'paging_token': {'key': 'pagingToken', 'type': 'str'}, + 'result_metadata': {'key': 'resultMetadata', 'type': '[ExtensionFilterResultMetadata]'} + } + + def __init__(self, extensions=None, paging_token=None, result_metadata=None): + super(ExtensionFilterResult, self).__init__() + self.extensions = extensions + self.paging_token = paging_token + self.result_metadata = result_metadata diff --git a/vsts/vsts/gallery/v4_0/models/extension_filter_result_metadata.py b/vsts/vsts/gallery/v4_0/models/extension_filter_result_metadata.py new file mode 100644 index 00000000..9ef9cfa9 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_filter_result_metadata.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFilterResultMetadata(Model): + """ExtensionFilterResultMetadata. + + :param metadata_items: The metadata items for the category + :type metadata_items: list of :class:`MetadataItem ` + :param metadata_type: Defines the category of metadata items + :type metadata_type: str + """ + + _attribute_map = { + 'metadata_items': {'key': 'metadataItems', 'type': '[MetadataItem]'}, + 'metadata_type': {'key': 'metadataType', 'type': 'str'} + } + + def __init__(self, metadata_items=None, metadata_type=None): + super(ExtensionFilterResultMetadata, self).__init__() + self.metadata_items = metadata_items + self.metadata_type = metadata_type diff --git a/vsts/vsts/gallery/v4_0/models/extension_package.py b/vsts/vsts/gallery/v4_0/models/extension_package.py new file mode 100644 index 00000000..384cdb0a --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_package.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionPackage(Model): + """ExtensionPackage. + + :param extension_manifest: Base 64 encoded extension package + :type extension_manifest: str + """ + + _attribute_map = { + 'extension_manifest': {'key': 'extensionManifest', 'type': 'str'} + } + + def __init__(self, extension_manifest=None): + super(ExtensionPackage, self).__init__() + self.extension_manifest = extension_manifest diff --git a/vsts/vsts/gallery/v4_0/models/extension_query.py b/vsts/vsts/gallery/v4_0/models/extension_query.py new file mode 100644 index 00000000..cb319743 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionQuery(Model): + """ExtensionQuery. + + :param asset_types: When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned. + :type asset_types: list of str + :param filters: Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + :type filters: list of :class:`QueryFilter ` + :param flags: The Flags are used to deterine which set of information the caller would like returned for the matched extensions. + :type flags: object + """ + + _attribute_map = { + 'asset_types': {'key': 'assetTypes', 'type': '[str]'}, + 'filters': {'key': 'filters', 'type': '[QueryFilter]'}, + 'flags': {'key': 'flags', 'type': 'object'} + } + + def __init__(self, asset_types=None, filters=None, flags=None): + super(ExtensionQuery, self).__init__() + self.asset_types = asset_types + self.filters = filters + self.flags = flags diff --git a/vsts/vsts/gallery/v4_0/models/extension_query_result.py b/vsts/vsts/gallery/v4_0/models/extension_query_result.py new file mode 100644 index 00000000..424cec9c --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_query_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionQueryResult(Model): + """ExtensionQueryResult. + + :param results: For each filter supplied in the query, a filter result will be returned in the query result. + :type results: list of :class:`ExtensionFilterResult ` + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[ExtensionFilterResult]'} + } + + def __init__(self, results=None): + super(ExtensionQueryResult, self).__init__() + self.results = results diff --git a/vsts/vsts/gallery/v4_0/models/extension_share.py b/vsts/vsts/gallery/v4_0/models/extension_share.py new file mode 100644 index 00000000..acc81ef0 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_share.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionShare(Model): + """ExtensionShare. + + :param id: + :type id: str + :param name: + :type name: str + :param type: + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None): + super(ExtensionShare, self).__init__() + self.id = id + self.name = name + self.type = type diff --git a/vsts/vsts/gallery/v4_0/models/extension_statistic.py b/vsts/vsts/gallery/v4_0/models/extension_statistic.py new file mode 100644 index 00000000..11fc6704 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_statistic.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionStatistic(Model): + """ExtensionStatistic. + + :param statistic_name: + :type statistic_name: str + :param value: + :type value: number + """ + + _attribute_map = { + 'statistic_name': {'key': 'statisticName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'number'} + } + + def __init__(self, statistic_name=None, value=None): + super(ExtensionStatistic, self).__init__() + self.statistic_name = statistic_name + self.value = value diff --git a/vsts/vsts/gallery/v4_0/models/extension_statistic_update.py b/vsts/vsts/gallery/v4_0/models/extension_statistic_update.py new file mode 100644 index 00000000..3152877e --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_statistic_update.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionStatisticUpdate(Model): + """ExtensionStatisticUpdate. + + :param extension_name: + :type extension_name: str + :param operation: + :type operation: object + :param publisher_name: + :type publisher_name: str + :param statistic: + :type statistic: :class:`ExtensionStatistic ` + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'object'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'statistic': {'key': 'statistic', 'type': 'ExtensionStatistic'} + } + + def __init__(self, extension_name=None, operation=None, publisher_name=None, statistic=None): + super(ExtensionStatisticUpdate, self).__init__() + self.extension_name = extension_name + self.operation = operation + self.publisher_name = publisher_name + self.statistic = statistic diff --git a/vsts/vsts/gallery/v4_0/models/extension_version.py b/vsts/vsts/gallery/v4_0/models/extension_version.py new file mode 100644 index 00000000..aa660e03 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/extension_version.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionVersion(Model): + """ExtensionVersion. + + :param asset_uri: + :type asset_uri: str + :param badges: + :type badges: list of :class:`ExtensionBadge ` + :param fallback_asset_uri: + :type fallback_asset_uri: str + :param files: + :type files: list of :class:`ExtensionFile ` + :param flags: + :type flags: object + :param last_updated: + :type last_updated: datetime + :param properties: + :type properties: list of { key: str; value: str } + :param validation_result_message: + :type validation_result_message: str + :param version: + :type version: str + :param version_description: + :type version_description: str + """ + + _attribute_map = { + 'asset_uri': {'key': 'assetUri', 'type': 'str'}, + 'badges': {'key': 'badges', 'type': '[ExtensionBadge]'}, + 'fallback_asset_uri': {'key': 'fallbackAssetUri', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'properties': {'key': 'properties', 'type': '[{ key: str; value: str }]'}, + 'validation_result_message': {'key': 'validationResultMessage', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'version_description': {'key': 'versionDescription', 'type': 'str'} + } + + def __init__(self, asset_uri=None, badges=None, fallback_asset_uri=None, files=None, flags=None, last_updated=None, properties=None, validation_result_message=None, version=None, version_description=None): + super(ExtensionVersion, self).__init__() + self.asset_uri = asset_uri + self.badges = badges + self.fallback_asset_uri = fallback_asset_uri + self.files = files + self.flags = flags + self.last_updated = last_updated + self.properties = properties + self.validation_result_message = validation_result_message + self.version = version + self.version_description = version_description diff --git a/vsts/vsts/gallery/v4_0/models/filter_criteria.py b/vsts/vsts/gallery/v4_0/models/filter_criteria.py new file mode 100644 index 00000000..7002c78e --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/filter_criteria.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 FilterCriteria(Model): + """FilterCriteria. + + :param filter_type: + :type filter_type: int + :param value: The value used in the match based on the filter type. + :type value: str + """ + + _attribute_map = { + 'filter_type': {'key': 'filterType', 'type': 'int'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, filter_type=None, value=None): + super(FilterCriteria, self).__init__() + self.filter_type = filter_type + self.value = value diff --git a/vsts/vsts/gallery/v4_0/models/installation_target.py b/vsts/vsts/gallery/v4_0/models/installation_target.py new file mode 100644 index 00000000..572aaae0 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/installation_target.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstallationTarget(Model): + """InstallationTarget. + + :param max_inclusive: + :type max_inclusive: bool + :param max_version: + :type max_version: str + :param min_inclusive: + :type min_inclusive: bool + :param min_version: + :type min_version: str + :param target: + :type target: str + :param target_version: + :type target_version: str + """ + + _attribute_map = { + 'max_inclusive': {'key': 'maxInclusive', 'type': 'bool'}, + 'max_version': {'key': 'maxVersion', 'type': 'str'}, + 'min_inclusive': {'key': 'minInclusive', 'type': 'bool'}, + 'min_version': {'key': 'minVersion', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'} + } + + def __init__(self, max_inclusive=None, max_version=None, min_inclusive=None, min_version=None, target=None, target_version=None): + super(InstallationTarget, self).__init__() + self.max_inclusive = max_inclusive + self.max_version = max_version + self.min_inclusive = min_inclusive + self.min_version = min_version + self.target = target + self.target_version = target_version diff --git a/vsts/vsts/gallery/v4_0/models/metadata_item.py b/vsts/vsts/gallery/v4_0/models/metadata_item.py new file mode 100644 index 00000000..c2a8bd96 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/metadata_item.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetadataItem(Model): + """MetadataItem. + + :param count: The count of the metadata item + :type count: int + :param name: The name of the metadata item + :type name: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, count=None, name=None): + super(MetadataItem, self).__init__() + self.count = count + self.name = name diff --git a/vsts/vsts/gallery/v4_0/models/notifications_data.py b/vsts/vsts/gallery/v4_0/models/notifications_data.py new file mode 100644 index 00000000..6decf547 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/notifications_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationsData(Model): + """NotificationsData. + + :param data: Notification data needed + :type data: dict + :param identities: List of users who should get the notification + :type identities: dict + :param type: Type of Mail Notification.Can be Qna , review or CustomerContact + :type type: object + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'identities': {'key': 'identities', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, data=None, identities=None, type=None): + super(NotificationsData, self).__init__() + self.data = data + self.identities = identities + self.type = type diff --git a/vsts/vsts/gallery/v4_0/models/product_categories_result.py b/vsts/vsts/gallery/v4_0/models/product_categories_result.py new file mode 100644 index 00000000..2ea2955b --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/product_categories_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProductCategoriesResult(Model): + """ProductCategoriesResult. + + :param categories: + :type categories: list of :class:`ProductCategory ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ProductCategory]'} + } + + def __init__(self, categories=None): + super(ProductCategoriesResult, self).__init__() + self.categories = categories diff --git a/vsts/vsts/gallery/v4_0/models/product_category.py b/vsts/vsts/gallery/v4_0/models/product_category.py new file mode 100644 index 00000000..20083775 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/product_category.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProductCategory(Model): + """ProductCategory. + + :param children: + :type children: list of :class:`ProductCategory ` + :param has_children: Indicator whether this is a leaf or there are children under this category + :type has_children: bool + :param id: Individual Guid of the Category + :type id: str + :param title: Category Title in the requested language + :type title: str + """ + + _attribute_map = { + 'children': {'key': 'children', 'type': '[ProductCategory]'}, + 'has_children': {'key': 'hasChildren', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, children=None, has_children=None, id=None, title=None): + super(ProductCategory, self).__init__() + self.children = children + self.has_children = has_children + self.id = id + self.title = title diff --git a/vsts/vsts/gallery/v4_0/models/published_extension.py b/vsts/vsts/gallery/v4_0/models/published_extension.py new file mode 100644 index 00000000..19e6caf1 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/published_extension.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishedExtension(Model): + """PublishedExtension. + + :param categories: + :type categories: list of str + :param deployment_type: + :type deployment_type: object + :param display_name: + :type display_name: str + :param extension_id: + :type extension_id: str + :param extension_name: + :type extension_name: str + :param flags: + :type flags: object + :param installation_targets: + :type installation_targets: list of :class:`InstallationTarget ` + :param last_updated: + :type last_updated: datetime + :param long_description: + :type long_description: str + :param published_date: Date on which the extension was first uploaded. + :type published_date: datetime + :param publisher: + :type publisher: :class:`PublisherFacts ` + :param release_date: Date on which the extension first went public. + :type release_date: datetime + :param shared_with: + :type shared_with: list of :class:`ExtensionShare ` + :param short_description: + :type short_description: str + :param statistics: + :type statistics: list of :class:`ExtensionStatistic ` + :param tags: + :type tags: list of str + :param versions: + :type versions: list of :class:`ExtensionVersion ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'object'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'long_description': {'key': 'longDescription', 'type': 'str'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'publisher': {'key': 'publisher', 'type': 'PublisherFacts'}, + 'release_date': {'key': 'releaseDate', 'type': 'iso-8601'}, + 'shared_with': {'key': 'sharedWith', 'type': '[ExtensionShare]'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': '[ExtensionStatistic]'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'versions': {'key': 'versions', 'type': '[ExtensionVersion]'} + } + + def __init__(self, categories=None, deployment_type=None, display_name=None, extension_id=None, extension_name=None, flags=None, installation_targets=None, last_updated=None, long_description=None, published_date=None, publisher=None, release_date=None, shared_with=None, short_description=None, statistics=None, tags=None, versions=None): + super(PublishedExtension, self).__init__() + self.categories = categories + self.deployment_type = deployment_type + self.display_name = display_name + self.extension_id = extension_id + self.extension_name = extension_name + self.flags = flags + self.installation_targets = installation_targets + self.last_updated = last_updated + self.long_description = long_description + self.published_date = published_date + self.publisher = publisher + self.release_date = release_date + self.shared_with = shared_with + self.short_description = short_description + self.statistics = statistics + self.tags = tags + self.versions = versions diff --git a/vsts/vsts/gallery/v4_0/models/publisher.py b/vsts/vsts/gallery/v4_0/models/publisher.py new file mode 100644 index 00000000..6850a11a --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/publisher.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 Publisher(Model): + """Publisher. + + :param display_name: + :type display_name: str + :param email_address: + :type email_address: list of str + :param extensions: + :type extensions: list of :class:`PublishedExtension ` + :param flags: + :type flags: object + :param last_updated: + :type last_updated: datetime + :param long_description: + :type long_description: str + :param publisher_id: + :type publisher_id: str + :param publisher_name: + :type publisher_name: str + :param short_description: + :type short_description: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': '[str]'}, + 'extensions': {'key': 'extensions', 'type': '[PublishedExtension]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'long_description': {'key': 'longDescription', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'} + } + + def __init__(self, display_name=None, email_address=None, extensions=None, flags=None, last_updated=None, long_description=None, publisher_id=None, publisher_name=None, short_description=None): + super(Publisher, self).__init__() + self.display_name = display_name + self.email_address = email_address + self.extensions = extensions + self.flags = flags + self.last_updated = last_updated + self.long_description = long_description + self.publisher_id = publisher_id + self.publisher_name = publisher_name + self.short_description = short_description diff --git a/vsts/vsts/gallery/v4_0/models/publisher_facts.py b/vsts/vsts/gallery/v4_0/models/publisher_facts.py new file mode 100644 index 00000000..979b6d8d --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/publisher_facts.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherFacts(Model): + """PublisherFacts. + + :param display_name: + :type display_name: str + :param flags: + :type flags: object + :param publisher_id: + :type publisher_id: str + :param publisher_name: + :type publisher_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, display_name=None, flags=None, publisher_id=None, publisher_name=None): + super(PublisherFacts, self).__init__() + self.display_name = display_name + self.flags = flags + self.publisher_id = publisher_id + self.publisher_name = publisher_name diff --git a/vsts/vsts/gallery/v4_0/models/publisher_filter_result.py b/vsts/vsts/gallery/v4_0/models/publisher_filter_result.py new file mode 100644 index 00000000..3637cdff --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/publisher_filter_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherFilterResult(Model): + """PublisherFilterResult. + + :param publishers: This is the set of appplications that matched the query filter supplied. + :type publishers: list of :class:`Publisher ` + """ + + _attribute_map = { + 'publishers': {'key': 'publishers', 'type': '[Publisher]'} + } + + def __init__(self, publishers=None): + super(PublisherFilterResult, self).__init__() + self.publishers = publishers diff --git a/vsts/vsts/gallery/v4_0/models/publisher_query.py b/vsts/vsts/gallery/v4_0/models/publisher_query.py new file mode 100644 index 00000000..06b16a75 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/publisher_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherQuery(Model): + """PublisherQuery. + + :param filters: Each filter is a unique query and will have matching set of publishers returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + :type filters: list of :class:`QueryFilter ` + :param flags: The Flags are used to deterine which set of information the caller would like returned for the matched publishers. + :type flags: object + """ + + _attribute_map = { + 'filters': {'key': 'filters', 'type': '[QueryFilter]'}, + 'flags': {'key': 'flags', 'type': 'object'} + } + + def __init__(self, filters=None, flags=None): + super(PublisherQuery, self).__init__() + self.filters = filters + self.flags = flags diff --git a/vsts/vsts/gallery/v4_0/models/publisher_query_result.py b/vsts/vsts/gallery/v4_0/models/publisher_query_result.py new file mode 100644 index 00000000..345da4e3 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/publisher_query_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherQueryResult(Model): + """PublisherQueryResult. + + :param results: For each filter supplied in the query, a filter result will be returned in the query result. + :type results: list of :class:`PublisherFilterResult ` + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PublisherFilterResult]'} + } + + def __init__(self, results=None): + super(PublisherQueryResult, self).__init__() + self.results = results diff --git a/vsts/vsts/gallery/v4_0/models/qn_aItem.py b/vsts/vsts/gallery/v4_0/models/qn_aItem.py new file mode 100644 index 00000000..4b081f4b --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/qn_aItem.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 QnAItem(Model): + """QnAItem. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'} + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None): + super(QnAItem, self).__init__() + self.created_date = created_date + self.id = id + self.status = status + self.text = text + self.updated_date = updated_date + self.user = user diff --git a/vsts/vsts/gallery/v4_0/models/query_filter.py b/vsts/vsts/gallery/v4_0/models/query_filter.py new file mode 100644 index 00000000..df36e671 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/query_filter.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 QueryFilter(Model): + """QueryFilter. + + :param criteria: The filter values define the set of values in this query. They are applied based on the QueryFilterType. + :type criteria: list of :class:`FilterCriteria ` + :param direction: The PagingDirection is applied to a paging token if one exists. If not the direction is ignored, and Forward from the start of the resultset is used. Direction should be left out of the request unless a paging token is used to help prevent future issues. + :type direction: object + :param page_number: The page number requested by the user. If not provided 1 is assumed by default. + :type page_number: int + :param page_size: The page size defines the number of results the caller wants for this filter. The count can't exceed the overall query size limits. + :type page_size: int + :param paging_token: The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embeded in the token. + :type paging_token: str + :param sort_by: Defines the type of sorting to be applied on the results. The page slice is cut of the sorted results only. + :type sort_by: int + :param sort_order: Defines the order of sorting, 1 for Ascending, 2 for Descending, else default ordering based on the SortBy value + :type sort_order: int + """ + + _attribute_map = { + 'criteria': {'key': 'criteria', 'type': '[FilterCriteria]'}, + 'direction': {'key': 'direction', 'type': 'object'}, + 'page_number': {'key': 'pageNumber', 'type': 'int'}, + 'page_size': {'key': 'pageSize', 'type': 'int'}, + 'paging_token': {'key': 'pagingToken', 'type': 'str'}, + 'sort_by': {'key': 'sortBy', 'type': 'int'}, + 'sort_order': {'key': 'sortOrder', 'type': 'int'} + } + + def __init__(self, criteria=None, direction=None, page_number=None, page_size=None, paging_token=None, sort_by=None, sort_order=None): + super(QueryFilter, self).__init__() + self.criteria = criteria + self.direction = direction + self.page_number = page_number + self.page_size = page_size + self.paging_token = paging_token + self.sort_by = sort_by + self.sort_order = sort_order diff --git a/vsts/vsts/gallery/v4_0/models/question.py b/vsts/vsts/gallery/v4_0/models/question.py new file mode 100644 index 00000000..e81fbbb9 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/question.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------------------------- +# 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 .qn_aItem import QnAItem + + +class Question(QnAItem): + """Question. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + :param responses: List of answers in for the question / thread + :type responses: list of :class:`Response ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'}, + 'responses': {'key': 'responses', 'type': '[Response]'} + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None, responses=None): + super(Question, self).__init__(created_date=created_date, id=id, status=status, text=text, updated_date=updated_date, user=user) + self.responses = responses diff --git a/vsts/vsts/gallery/v4_0/models/questions_result.py b/vsts/vsts/gallery/v4_0/models/questions_result.py new file mode 100644 index 00000000..fb12ed60 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/questions_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 QuestionsResult(Model): + """QuestionsResult. + + :param has_more_questions: Flag indicating if there are more QnA threads to be shown (for paging) + :type has_more_questions: bool + :param questions: List of the QnA threads + :type questions: list of :class:`Question ` + """ + + _attribute_map = { + 'has_more_questions': {'key': 'hasMoreQuestions', 'type': 'bool'}, + 'questions': {'key': 'questions', 'type': '[Question]'} + } + + def __init__(self, has_more_questions=None, questions=None): + super(QuestionsResult, self).__init__() + self.has_more_questions = has_more_questions + self.questions = questions diff --git a/vsts/vsts/gallery/v4_0/models/rating_count_per_rating.py b/vsts/vsts/gallery/v4_0/models/rating_count_per_rating.py new file mode 100644 index 00000000..4c6b6461 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/rating_count_per_rating.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 RatingCountPerRating(Model): + """RatingCountPerRating. + + :param rating: Rating value + :type rating: number + :param rating_count: Count of total ratings + :type rating_count: long + """ + + _attribute_map = { + 'rating': {'key': 'rating', 'type': 'number'}, + 'rating_count': {'key': 'ratingCount', 'type': 'long'} + } + + def __init__(self, rating=None, rating_count=None): + super(RatingCountPerRating, self).__init__() + self.rating = rating + self.rating_count = rating_count diff --git a/vsts/vsts/gallery/v4_0/models/response.py b/vsts/vsts/gallery/v4_0/models/response.py new file mode 100644 index 00000000..627fba8d --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/response.py @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------------------------- +# 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 .qn_aItem import QnAItem + + +class Response(QnAItem): + """Response. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'}, + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None): + super(Response, self).__init__(created_date=created_date, id=id, status=status, text=text, updated_date=updated_date, user=user) diff --git a/vsts/vsts/gallery/v4_0/models/review.py b/vsts/vsts/gallery/v4_0/models/review.py new file mode 100644 index 00000000..2b521429 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/review.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 Review(Model): + """Review. + + :param admin_reply: Admin Reply, if any, for this review + :type admin_reply: :class:`ReviewReply ` + :param id: Unique identifier of a review item + :type id: long + :param is_deleted: Flag for soft deletion + :type is_deleted: bool + :param is_ignored: + :type is_ignored: bool + :param product_version: Version of the product for which review was submitted + :type product_version: str + :param rating: Rating procided by the user + :type rating: number + :param reply: Reply, if any, for this review + :type reply: :class:`ReviewReply ` + :param text: Text description of the review + :type text: str + :param title: Title of the review + :type title: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user_display_name: Name of the user + :type user_display_name: str + :param user_id: Id of the user who submitted the review + :type user_id: str + """ + + _attribute_map = { + 'admin_reply': {'key': 'adminReply', 'type': 'ReviewReply'}, + 'id': {'key': 'id', 'type': 'long'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'is_ignored': {'key': 'isIgnored', 'type': 'bool'}, + 'product_version': {'key': 'productVersion', 'type': 'str'}, + 'rating': {'key': 'rating', 'type': 'number'}, + 'reply': {'key': 'reply', 'type': 'ReviewReply'}, + 'text': {'key': 'text', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user_display_name': {'key': 'userDisplayName', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, admin_reply=None, id=None, is_deleted=None, is_ignored=None, product_version=None, rating=None, reply=None, text=None, title=None, updated_date=None, user_display_name=None, user_id=None): + super(Review, self).__init__() + self.admin_reply = admin_reply + self.id = id + self.is_deleted = is_deleted + self.is_ignored = is_ignored + self.product_version = product_version + self.rating = rating + self.reply = reply + self.text = text + self.title = title + self.updated_date = updated_date + self.user_display_name = user_display_name + self.user_id = user_id diff --git a/vsts/vsts/gallery/v4_0/models/review_patch.py b/vsts/vsts/gallery/v4_0/models/review_patch.py new file mode 100644 index 00000000..52e988fd --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/review_patch.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewPatch(Model): + """ReviewPatch. + + :param operation: Denotes the patch operation type + :type operation: object + :param reported_concern: Use when patch operation is FlagReview + :type reported_concern: :class:`UserReportedConcern ` + :param review_item: Use when patch operation is EditReview + :type review_item: :class:`Review ` + """ + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'object'}, + 'reported_concern': {'key': 'reportedConcern', 'type': 'UserReportedConcern'}, + 'review_item': {'key': 'reviewItem', 'type': 'Review'} + } + + def __init__(self, operation=None, reported_concern=None, review_item=None): + super(ReviewPatch, self).__init__() + self.operation = operation + self.reported_concern = reported_concern + self.review_item = review_item diff --git a/vsts/vsts/gallery/v4_0/models/review_reply.py b/vsts/vsts/gallery/v4_0/models/review_reply.py new file mode 100644 index 00000000..bcf4f5a7 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/review_reply.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewReply(Model): + """ReviewReply. + + :param id: Id of the reply + :type id: long + :param is_deleted: Flag for soft deletion + :type is_deleted: bool + :param product_version: Version of the product when the reply was submitted or updated + :type product_version: str + :param reply_text: Content of the reply + :type reply_text: str + :param review_id: Id of the review, to which this reply belongs + :type review_id: long + :param title: Title of the reply + :type title: str + :param updated_date: Date the reply was submitted or updated + :type updated_date: datetime + :param user_id: Id of the user who left the reply + :type user_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'product_version': {'key': 'productVersion', 'type': 'str'}, + 'reply_text': {'key': 'replyText', 'type': 'str'}, + 'review_id': {'key': 'reviewId', 'type': 'long'}, + 'title': {'key': 'title', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, id=None, is_deleted=None, product_version=None, reply_text=None, review_id=None, title=None, updated_date=None, user_id=None): + super(ReviewReply, self).__init__() + self.id = id + self.is_deleted = is_deleted + self.product_version = product_version + self.reply_text = reply_text + self.review_id = review_id + self.title = title + self.updated_date = updated_date + self.user_id = user_id diff --git a/vsts/vsts/gallery/v4_0/models/review_summary.py b/vsts/vsts/gallery/v4_0/models/review_summary.py new file mode 100644 index 00000000..4b32e329 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/review_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewSummary(Model): + """ReviewSummary. + + :param average_rating: Average Rating + :type average_rating: number + :param rating_count: Count of total ratings + :type rating_count: long + :param rating_split: Split of count accross rating + :type rating_split: list of :class:`RatingCountPerRating ` + """ + + _attribute_map = { + 'average_rating': {'key': 'averageRating', 'type': 'number'}, + 'rating_count': {'key': 'ratingCount', 'type': 'long'}, + 'rating_split': {'key': 'ratingSplit', 'type': '[RatingCountPerRating]'} + } + + def __init__(self, average_rating=None, rating_count=None, rating_split=None): + super(ReviewSummary, self).__init__() + self.average_rating = average_rating + self.rating_count = rating_count + self.rating_split = rating_split diff --git a/vsts/vsts/gallery/v4_0/models/reviews_result.py b/vsts/vsts/gallery/v4_0/models/reviews_result.py new file mode 100644 index 00000000..3d579678 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/reviews_result.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewsResult(Model): + """ReviewsResult. + + :param has_more_reviews: Flag indicating if there are more reviews to be shown (for paging) + :type has_more_reviews: bool + :param reviews: List of reviews + :type reviews: list of :class:`Review ` + :param total_review_count: Count of total review items + :type total_review_count: long + """ + + _attribute_map = { + 'has_more_reviews': {'key': 'hasMoreReviews', 'type': 'bool'}, + 'reviews': {'key': 'reviews', 'type': '[Review]'}, + 'total_review_count': {'key': 'totalReviewCount', 'type': 'long'} + } + + def __init__(self, has_more_reviews=None, reviews=None, total_review_count=None): + super(ReviewsResult, self).__init__() + self.has_more_reviews = has_more_reviews + self.reviews = reviews + self.total_review_count = total_review_count diff --git a/vsts/vsts/gallery/v4_0/models/user_identity_ref.py b/vsts/vsts/gallery/v4_0/models/user_identity_ref.py new file mode 100644 index 00000000..d70a734d --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/user_identity_ref.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 UserIdentityRef(Model): + """UserIdentityRef. + + :param display_name: User display name + :type display_name: str + :param id: User VSID + :type id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, display_name=None, id=None): + super(UserIdentityRef, self).__init__() + self.display_name = display_name + self.id = id diff --git a/vsts/vsts/gallery/v4_0/models/user_reported_concern.py b/vsts/vsts/gallery/v4_0/models/user_reported_concern.py new file mode 100644 index 00000000..739c0b76 --- /dev/null +++ b/vsts/vsts/gallery/v4_0/models/user_reported_concern.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 UserReportedConcern(Model): + """UserReportedConcern. + + :param category: Category of the concern + :type category: object + :param concern_text: User comment associated with the report + :type concern_text: str + :param review_id: Id of the review which was reported + :type review_id: long + :param submitted_date: Date the report was submitted + :type submitted_date: datetime + :param user_id: Id of the user who reported a review + :type user_id: str + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'object'}, + 'concern_text': {'key': 'concernText', 'type': 'str'}, + 'review_id': {'key': 'reviewId', 'type': 'long'}, + 'submitted_date': {'key': 'submittedDate', 'type': 'iso-8601'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, category=None, concern_text=None, review_id=None, submitted_date=None, user_id=None): + super(UserReportedConcern, self).__init__() + self.category = category + self.concern_text = concern_text + self.review_id = review_id + self.submitted_date = submitted_date + self.user_id = user_id diff --git a/vsts/vsts/gallery/v4_1/__init__.py b/vsts/vsts/gallery/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/gallery/v4_1/gallery_client.py b/vsts/vsts/gallery/v4_1/gallery_client.py new file mode 100644 index 00000000..42e3abb9 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/gallery_client.py @@ -0,0 +1,1629 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class GalleryClient(VssClient): + """Gallery + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(GalleryClient, 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 = '69d21c00-f135-441b-b5ce-3626378e0819' + + def share_extension_by_id(self, extension_id, account_name): + """ShareExtensionById. + [Preview API] + :param str extension_id: + :param str account_name: + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='POST', + location_id='1f19631b-a0b4-4a03-89c2-d79785d24360', + version='4.1-preview.1', + route_values=route_values) + + def unshare_extension_by_id(self, extension_id, account_name): + """UnshareExtensionById. + [Preview API] + :param str extension_id: + :param str account_name: + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='DELETE', + location_id='1f19631b-a0b4-4a03-89c2-d79785d24360', + version='4.1-preview.1', + route_values=route_values) + + def share_extension(self, publisher_name, extension_name, account_name): + """ShareExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str account_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='POST', + location_id='a1e66d8f-f5de-4d16-8309-91a4e015ee46', + version='4.1-preview.1', + route_values=route_values) + + def unshare_extension(self, publisher_name, extension_name, account_name): + """UnshareExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str account_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if account_name is not None: + route_values['accountName'] = self._serialize.url('account_name', account_name, 'str') + self._send(http_method='DELETE', + location_id='a1e66d8f-f5de-4d16-8309-91a4e015ee46', + version='4.1-preview.1', + route_values=route_values) + + def get_acquisition_options(self, item_id, installation_target, test_commerce=None, is_free_or_trial_install=None): + """GetAcquisitionOptions. + [Preview API] + :param str item_id: + :param str installation_target: + :param bool test_commerce: + :param bool is_free_or_trial_install: + :rtype: :class:` ` + """ + route_values = {} + if item_id is not None: + route_values['itemId'] = self._serialize.url('item_id', item_id, 'str') + query_parameters = {} + if installation_target is not None: + query_parameters['installationTarget'] = self._serialize.query('installation_target', installation_target, 'str') + if test_commerce is not None: + query_parameters['testCommerce'] = self._serialize.query('test_commerce', test_commerce, 'bool') + if is_free_or_trial_install is not None: + query_parameters['isFreeOrTrialInstall'] = self._serialize.query('is_free_or_trial_install', is_free_or_trial_install, 'bool') + response = self._send(http_method='GET', + location_id='9d0a0105-075e-4760-aa15-8bcf54d1bd7d', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AcquisitionOptions', response) + + def request_acquisition(self, acquisition_request): + """RequestAcquisition. + [Preview API] + :param :class:` ` acquisition_request: + :rtype: :class:` ` + """ + content = self._serialize.body(acquisition_request, 'ExtensionAcquisitionRequest') + response = self._send(http_method='POST', + location_id='3adb1f2d-e328-446e-be73-9f6d98071c45', + version='4.1-preview.1', + content=content) + return self._deserialize('ExtensionAcquisitionRequest', response) + + def get_asset_by_name(self, publisher_name, extension_name, version, asset_type, account_token=None, accept_default=None): + """GetAssetByName. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str asset_type: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='7529171f-a002-4180-93ba-685f358a0482', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_asset(self, extension_id, version, asset_type, account_token=None, accept_default=None): + """GetAsset. + [Preview API] + :param str extension_id: + :param str version: + :param str asset_type: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='5d545f3d-ef47-488b-8be3-f5ee1517856c', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_asset_authenticated(self, publisher_name, extension_name, version, asset_type, account_token=None): + """GetAssetAuthenticated. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str asset_type: + :param str account_token: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + response = self._send(http_method='GET', + location_id='506aff36-2622-4f70-8063-77cce6366d20', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def associate_azure_publisher(self, publisher_name, azure_publisher_id): + """AssociateAzurePublisher. + [Preview API] + :param str publisher_name: + :param str azure_publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + query_parameters = {} + if azure_publisher_id is not None: + query_parameters['azurePublisherId'] = self._serialize.query('azure_publisher_id', azure_publisher_id, 'str') + response = self._send(http_method='PUT', + location_id='efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AzurePublisher', response) + + def query_associated_azure_publisher(self, publisher_name): + """QueryAssociatedAzurePublisher. + [Preview API] + :param str publisher_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + response = self._send(http_method='GET', + location_id='efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('AzurePublisher', response) + + def get_categories(self, languages=None): + """GetCategories. + [Preview API] + :param str languages: + :rtype: [str] + """ + query_parameters = {} + if languages is not None: + query_parameters['languages'] = self._serialize.query('languages', languages, 'str') + response = self._send(http_method='GET', + location_id='e0a5a71e-3ac3-43a0-ae7d-0bb5c3046a2a', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_category_details(self, category_name, languages=None, product=None): + """GetCategoryDetails. + [Preview API] + :param str category_name: + :param str languages: + :param str product: + :rtype: :class:` ` + """ + route_values = {} + if category_name is not None: + route_values['categoryName'] = self._serialize.url('category_name', category_name, 'str') + query_parameters = {} + if languages is not None: + query_parameters['languages'] = self._serialize.query('languages', languages, 'str') + if product is not None: + query_parameters['product'] = self._serialize.query('product', product, 'str') + response = self._send(http_method='GET', + location_id='75d3c04d-84d2-4973-acd2-22627587dabc', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CategoriesResult', response) + + def get_category_tree(self, product, category_id, lcid=None, source=None, product_version=None, skus=None, sub_skus=None): + """GetCategoryTree. + [Preview API] + :param str product: + :param str category_id: + :param int lcid: + :param str source: + :param str product_version: + :param str skus: + :param str sub_skus: + :rtype: :class:` ` + """ + route_values = {} + if product is not None: + route_values['product'] = self._serialize.url('product', product, 'str') + if category_id is not None: + route_values['categoryId'] = self._serialize.url('category_id', category_id, 'str') + query_parameters = {} + if lcid is not None: + query_parameters['lcid'] = self._serialize.query('lcid', lcid, 'int') + if source is not None: + query_parameters['source'] = self._serialize.query('source', source, 'str') + if product_version is not None: + query_parameters['productVersion'] = self._serialize.query('product_version', product_version, 'str') + if skus is not None: + query_parameters['skus'] = self._serialize.query('skus', skus, 'str') + if sub_skus is not None: + query_parameters['subSkus'] = self._serialize.query('sub_skus', sub_skus, 'str') + response = self._send(http_method='GET', + location_id='1102bb42-82b0-4955-8d8a-435d6b4cedd3', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProductCategory', response) + + def get_root_categories(self, product, lcid=None, source=None, product_version=None, skus=None, sub_skus=None): + """GetRootCategories. + [Preview API] + :param str product: + :param int lcid: + :param str source: + :param str product_version: + :param str skus: + :param str sub_skus: + :rtype: :class:` ` + """ + route_values = {} + if product is not None: + route_values['product'] = self._serialize.url('product', product, 'str') + query_parameters = {} + if lcid is not None: + query_parameters['lcid'] = self._serialize.query('lcid', lcid, 'int') + if source is not None: + query_parameters['source'] = self._serialize.query('source', source, 'str') + if product_version is not None: + query_parameters['productVersion'] = self._serialize.query('product_version', product_version, 'str') + if skus is not None: + query_parameters['skus'] = self._serialize.query('skus', skus, 'str') + if sub_skus is not None: + query_parameters['subSkus'] = self._serialize.query('sub_skus', sub_skus, 'str') + response = self._send(http_method='GET', + location_id='31fba831-35b2-46f6-a641-d05de5a877d8', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProductCategoriesResult', response) + + def get_certificate(self, publisher_name, extension_name, version=None): + """GetCertificate. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='GET', + location_id='e905ad6a-3f1f-4d08-9f6d-7d357ff8b7d0', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def create_draft_for_edit_extension(self, publisher_name, extension_name): + """CreateDraftForEditExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + response = self._send(http_method='POST', + location_id='02b33873-4e61-496e-83a2-59d1df46b7d8', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ExtensionDraft', response) + + def perform_edit_extension_draft_operation(self, draft_patch, publisher_name, extension_name, draft_id): + """PerformEditExtensionDraftOperation. + [Preview API] + :param :class:` ` draft_patch: + :param str publisher_name: + :param str extension_name: + :param str draft_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + content = self._serialize.body(draft_patch, 'ExtensionDraftPatch') + response = self._send(http_method='PATCH', + location_id='02b33873-4e61-496e-83a2-59d1df46b7d8', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ExtensionDraft', response) + + def update_payload_in_draft_for_edit_extension(self, upload_stream, publisher_name, extension_name, draft_id, file_name=None): + """UpdatePayloadInDraftForEditExtension. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param str extension_name: + :param str draft_id: + :param String file_name: Header to pass the filename of the uploaded data + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='02b33873-4e61-496e-83a2-59d1df46b7d8', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('ExtensionDraft', response) + + def add_asset_for_edit_extension_draft(self, upload_stream, publisher_name, extension_name, draft_id, asset_type): + """AddAssetForEditExtensionDraft. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param str extension_name: + :param str draft_id: + :param str asset_type: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='f1db9c47-6619-4998-a7e5-d7f9f41a4617', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('ExtensionDraftAsset', response) + + def create_draft_for_new_extension(self, upload_stream, publisher_name, product, file_name=None): + """CreateDraftForNewExtension. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param String product: Header to pass the product type of the payload file + :param String file_name: Header to pass the filename of the uploaded data + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='b3ab127d-ebb9-4d22-b611-4e09593c8d79', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('ExtensionDraft', response) + + def perform_new_extension_draft_operation(self, draft_patch, publisher_name, draft_id): + """PerformNewExtensionDraftOperation. + [Preview API] + :param :class:` ` draft_patch: + :param str publisher_name: + :param str draft_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + content = self._serialize.body(draft_patch, 'ExtensionDraftPatch') + response = self._send(http_method='PATCH', + location_id='b3ab127d-ebb9-4d22-b611-4e09593c8d79', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ExtensionDraft', response) + + def update_payload_in_draft_for_new_extension(self, upload_stream, publisher_name, draft_id, file_name=None): + """UpdatePayloadInDraftForNewExtension. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param str draft_id: + :param String file_name: Header to pass the filename of the uploaded data + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='b3ab127d-ebb9-4d22-b611-4e09593c8d79', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('ExtensionDraft', response) + + def add_asset_for_new_extension_draft(self, upload_stream, publisher_name, draft_id, asset_type): + """AddAssetForNewExtensionDraft. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param str draft_id: + :param str asset_type: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('ExtensionDraftAsset', response) + + def get_asset_from_edit_extension_draft(self, publisher_name, draft_id, asset_type, extension_name): + """GetAssetFromEditExtensionDraft. + [Preview API] + :param str publisher_name: + :param str draft_id: + :param str asset_type: + :param str extension_name: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + query_parameters = {} + if extension_name is not None: + query_parameters['extensionName'] = self._serialize.query('extension_name', extension_name, 'str') + response = self._send(http_method='GET', + location_id='88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_asset_from_new_extension_draft(self, publisher_name, draft_id, asset_type): + """GetAssetFromNewExtensionDraft. + [Preview API] + :param str publisher_name: + :param str draft_id: + :param str asset_type: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if draft_id is not None: + route_values['draftId'] = self._serialize.url('draft_id', draft_id, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + response = self._send(http_method='GET', + location_id='88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_extension_events(self, publisher_name, extension_name, count=None, after_date=None, include=None, include_property=None): + """GetExtensionEvents. + [Preview API] Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence. + :param str publisher_name: Name of the publisher + :param str extension_name: Name of the extension + :param int count: Count of events to fetch, applies to each event type. + :param datetime after_date: Fetch events that occurred on or after this date + :param str include: Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events + :param str include_property: Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + if include is not None: + query_parameters['include'] = self._serialize.query('include', include, 'str') + if include_property is not None: + query_parameters['includeProperty'] = self._serialize.query('include_property', include_property, 'str') + response = self._send(http_method='GET', + location_id='3d13c499-2168-4d06-bef4-14aba185dcd5', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ExtensionEvents', response) + + def publish_extension_events(self, extension_events): + """PublishExtensionEvents. + [Preview API] API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension. + :param [ExtensionEvents] extension_events: + """ + content = self._serialize.body(extension_events, '[ExtensionEvents]') + self._send(http_method='POST', + location_id='0bf2bd3a-70e0-4d5d-8bf7-bd4a9c2ab6e7', + version='4.1-preview.1', + content=content) + + def query_extensions(self, extension_query, account_token=None): + """QueryExtensions. + [Preview API] + :param :class:` ` extension_query: + :param str account_token: + :rtype: :class:` ` + """ + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + content = self._serialize.body(extension_query, 'ExtensionQuery') + response = self._send(http_method='POST', + location_id='eb9d5ee1-6d43-456b-b80e-8a96fbc014b6', + version='4.1-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('ExtensionQueryResult', response) + + def create_extension(self, upload_stream): + """CreateExtension. + [Preview API] + :param object upload_stream: Stream to upload + :rtype: :class:` ` + """ + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.1-preview.2', + content=content, + media_type='application/octet-stream') + return self._deserialize('PublishedExtension', response) + + def delete_extension_by_id(self, extension_id, version=None): + """DeleteExtensionById. + [Preview API] + :param str extension_id: + :param str version: + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + self._send(http_method='DELETE', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + + def get_extension_by_id(self, extension_id, version=None, flags=None): + """GetExtensionById. + [Preview API] + :param str extension_id: + :param str version: + :param str flags: + :rtype: :class:` ` + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'str') + response = self._send(http_method='GET', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('PublishedExtension', response) + + def update_extension_by_id(self, extension_id): + """UpdateExtensionById. + [Preview API] + :param str extension_id: + :rtype: :class:` ` + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='PUT', + location_id='a41192c8-9525-4b58-bc86-179fa549d80d', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('PublishedExtension', response) + + def create_extension_with_publisher(self, upload_stream, publisher_name): + """CreateExtensionWithPublisher. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.1-preview.2', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('PublishedExtension', response) + + def delete_extension(self, publisher_name, extension_name, version=None): + """DeleteExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + self._send(http_method='DELETE', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + + def get_extension(self, publisher_name, extension_name, version=None, flags=None, account_token=None): + """GetExtension. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str flags: + :param str account_token: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if version is not None: + query_parameters['version'] = self._serialize.query('version', version, 'str') + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'str') + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + response = self._send(http_method='GET', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('PublishedExtension', response) + + def update_extension(self, upload_stream, publisher_name, extension_name): + """UpdateExtension. + [Preview API] + :param object upload_stream: Stream to upload + :param str publisher_name: + :param str extension_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.1-preview.2', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('PublishedExtension', response) + + def update_extension_properties(self, publisher_name, extension_name, flags): + """UpdateExtensionProperties. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str flags: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'str') + response = self._send(http_method='PATCH', + location_id='e11ea35a-16fe-4b80-ab11-c4cab88a0966', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('PublishedExtension', response) + + def extension_validator(self, azure_rest_api_request_model): + """ExtensionValidator. + [Preview API] + :param :class:` ` azure_rest_api_request_model: + """ + content = self._serialize.body(azure_rest_api_request_model, 'AzureRestApiRequestModel') + self._send(http_method='POST', + location_id='05e8a5e1-8c59-4c2c-8856-0ff087d1a844', + version='4.1-preview.1', + content=content) + + def send_notifications(self, notification_data): + """SendNotifications. + [Preview API] Send Notification + :param :class:` ` notification_data: Denoting the data needed to send notification + """ + content = self._serialize.body(notification_data, 'NotificationsData') + self._send(http_method='POST', + location_id='eab39817-413c-4602-a49f-07ad00844980', + version='4.1-preview.1', + content=content) + + def get_package(self, publisher_name, extension_name, version, account_token=None, accept_default=None): + """GetPackage. + [Preview API] This endpoint gets hit when you download a VSTS extension from the Web UI + :param str publisher_name: + :param str extension_name: + :param str version: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='7cb576f8-1cae-4c4b-b7b1-e4af5759e965', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_asset_with_token(self, publisher_name, extension_name, version, asset_type, asset_token=None, account_token=None, accept_default=None): + """GetAssetWithToken. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :param str asset_type: + :param str asset_token: + :param str account_token: + :param bool accept_default: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + if asset_type is not None: + route_values['assetType'] = self._serialize.url('asset_type', asset_type, 'str') + if asset_token is not None: + route_values['assetToken'] = self._serialize.url('asset_token', asset_token, 'str') + query_parameters = {} + if account_token is not None: + query_parameters['accountToken'] = self._serialize.query('account_token', account_token, 'str') + if accept_default is not None: + query_parameters['acceptDefault'] = self._serialize.query('accept_default', accept_default, 'bool') + response = self._send(http_method='GET', + location_id='364415a1-0077-4a41-a7a0-06edd4497492', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def delete_publisher_asset(self, publisher_name, asset_type=None): + """DeletePublisherAsset. + [Preview API] Delete publisher asset like logo + :param str publisher_name: Internal name of the publisher + :param str asset_type: Type of asset. Default value is 'logo'. + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + query_parameters = {} + if asset_type is not None: + query_parameters['assetType'] = self._serialize.query('asset_type', asset_type, 'str') + self._send(http_method='DELETE', + location_id='21143299-34f9-4c62-8ca8-53da691192f9', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_publisher_asset(self, publisher_name, asset_type=None): + """GetPublisherAsset. + [Preview API] Get publisher asset like logo as a stream + :param str publisher_name: Internal name of the publisher + :param str asset_type: Type of asset. Default value is 'logo'. + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + query_parameters = {} + if asset_type is not None: + query_parameters['assetType'] = self._serialize.query('asset_type', asset_type, 'str') + response = self._send(http_method='GET', + location_id='21143299-34f9-4c62-8ca8-53da691192f9', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def update_publisher_asset(self, upload_stream, publisher_name, asset_type=None, file_name=None): + """UpdatePublisherAsset. + [Preview API] Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values. + :param object upload_stream: Stream to upload + :param str publisher_name: Internal name of the publisher + :param str asset_type: Type of asset. Default value is 'logo'. + :param String file_name: Header to pass the filename of the uploaded data + :rtype: {str} + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + query_parameters = {} + if asset_type is not None: + query_parameters['assetType'] = self._serialize.query('asset_type', asset_type, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='21143299-34f9-4c62-8ca8-53da691192f9', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + media_type='application/octet-stream', + returns_collection=True) + return self._deserialize('{str}', response) + + def query_publishers(self, publisher_query): + """QueryPublishers. + [Preview API] + :param :class:` ` publisher_query: + :rtype: :class:` ` + """ + content = self._serialize.body(publisher_query, 'PublisherQuery') + response = self._send(http_method='POST', + location_id='2ad6ee0a-b53f-4034-9d1d-d009fda1212e', + version='4.1-preview.1', + content=content) + return self._deserialize('PublisherQueryResult', response) + + def create_publisher(self, publisher): + """CreatePublisher. + [Preview API] + :param :class:` ` publisher: + :rtype: :class:` ` + """ + content = self._serialize.body(publisher, 'Publisher') + response = self._send(http_method='POST', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.1-preview.1', + content=content) + return self._deserialize('Publisher', response) + + def delete_publisher(self, publisher_name): + """DeletePublisher. + [Preview API] + :param str publisher_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + self._send(http_method='DELETE', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.1-preview.1', + route_values=route_values) + + def get_publisher(self, publisher_name, flags=None): + """GetPublisher. + [Preview API] + :param str publisher_name: + :param int flags: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + query_parameters = {} + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Publisher', response) + + def update_publisher(self, publisher, publisher_name): + """UpdatePublisher. + [Preview API] + :param :class:` ` publisher: + :param str publisher_name: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + content = self._serialize.body(publisher, 'Publisher') + response = self._send(http_method='PUT', + location_id='4ddec66a-e4f6-4f5d-999e-9e77710d7ff4', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Publisher', response) + + def get_questions(self, publisher_name, extension_name, count=None, page=None, after_date=None): + """GetQuestions. + [Preview API] Returns a list of questions with their responses associated with an extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param int count: Number of questions to retrieve (defaults to 10). + :param int page: Page number from which set of questions are to be retrieved. + :param datetime after_date: If provided, results questions are returned which were posted after this date + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if page is not None: + query_parameters['page'] = self._serialize.query('page', page, 'int') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='c010d03d-812c-4ade-ae07-c1862475eda5', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('QuestionsResult', response) + + def report_question(self, concern, pub_name, ext_name, question_id): + """ReportQuestion. + [Preview API] Flags a concern with an existing question for an extension. + :param :class:` ` concern: User reported concern with a question for the extension. + :param str pub_name: Name of the publisher who published the extension. + :param str ext_name: Name of the extension. + :param long question_id: Identifier of the question to be updated for the extension. + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + content = self._serialize.body(concern, 'Concern') + response = self._send(http_method='POST', + location_id='784910cd-254a-494d-898b-0728549b2f10', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Concern', response) + + def create_question(self, question, publisher_name, extension_name): + """CreateQuestion. + [Preview API] Creates a new question for an extension. + :param :class:` ` question: Question to be created for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(question, 'Question') + response = self._send(http_method='POST', + location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Question', response) + + def delete_question(self, publisher_name, extension_name, question_id): + """DeleteQuestion. + [Preview API] Deletes an existing question and all its associated responses for an extension. (soft delete) + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question to be deleted for the extension. + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + self._send(http_method='DELETE', + location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', + version='4.1-preview.1', + route_values=route_values) + + def update_question(self, question, publisher_name, extension_name, question_id): + """UpdateQuestion. + [Preview API] Updates an existing question for an extension. + :param :class:` ` question: Updated question to be set for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question to be updated for the extension. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + content = self._serialize.body(question, 'Question') + response = self._send(http_method='PATCH', + location_id='6d1d9741-eca8-4701-a3a5-235afc82dfa4', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Question', response) + + def create_response(self, response, publisher_name, extension_name, question_id): + """CreateResponse. + [Preview API] Creates a new response for a given question for an extension. + :param :class:` ` response: Response to be created for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question for which response is to be created for the extension. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + content = self._serialize.body(response, 'Response') + response = self._send(http_method='POST', + location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Response', response) + + def delete_response(self, publisher_name, extension_name, question_id, response_id): + """DeleteResponse. + [Preview API] Deletes a response for an extension. (soft delete) + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifies the question whose response is to be deleted. + :param long response_id: Identifies the response to be deleted. + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + if response_id is not None: + route_values['responseId'] = self._serialize.url('response_id', response_id, 'long') + self._send(http_method='DELETE', + location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', + version='4.1-preview.1', + route_values=route_values) + + def update_response(self, response, publisher_name, extension_name, question_id, response_id): + """UpdateResponse. + [Preview API] Updates an existing response for a given question for an extension. + :param :class:` ` response: Updated response to be set for the extension. + :param str publisher_name: Name of the publisher who published the extension. + :param str extension_name: Name of the extension. + :param long question_id: Identifier of the question for which response is to be updated for the extension. + :param long response_id: Identifier of the response which has to be updated. + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if question_id is not None: + route_values['questionId'] = self._serialize.url('question_id', question_id, 'long') + if response_id is not None: + route_values['responseId'] = self._serialize.url('response_id', response_id, 'long') + content = self._serialize.body(response, 'Response') + response = self._send(http_method='PATCH', + location_id='7f8ae5e0-46b0-438f-b2e8-13e8513517bd', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Response', response) + + def get_extension_reports(self, publisher_name, extension_name, days=None, count=None, after_date=None): + """GetExtensionReports. + [Preview API] Returns extension reports + :param str publisher_name: Name of the publisher who published the extension + :param str extension_name: Name of the extension + :param int days: Last n days report. If afterDate and days are specified, days will take priority + :param int count: Number of events to be returned + :param datetime after_date: Use if you want to fetch events newer than the specified date + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if days is not None: + query_parameters['days'] = self._serialize.query('days', days, 'int') + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='79e0c74f-157f-437e-845f-74fbb4121d4c', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_reviews(self, publisher_name, extension_name, count=None, filter_options=None, before_date=None, after_date=None): + """GetReviews. + [Preview API] Returns a list of reviews associated with an extension + :param str publisher_name: Name of the publisher who published the extension + :param str extension_name: Name of the extension + :param int count: Number of reviews to retrieve (defaults to 5) + :param str filter_options: FilterOptions to filter out empty reviews etcetera, defaults to none + :param datetime before_date: Use if you want to fetch reviews older than the specified date, defaults to null + :param datetime after_date: Use if you want to fetch reviews newer than the specified date, defaults to null + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + if filter_options is not None: + query_parameters['filterOptions'] = self._serialize.query('filter_options', filter_options, 'str') + if before_date is not None: + query_parameters['beforeDate'] = self._serialize.query('before_date', before_date, 'iso-8601') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='5b3f819f-f247-42ad-8c00-dd9ab9ab246d', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReviewsResult', response) + + def get_reviews_summary(self, pub_name, ext_name, before_date=None, after_date=None): + """GetReviewsSummary. + [Preview API] Returns a summary of the reviews + :param str pub_name: Name of the publisher who published the extension + :param str ext_name: Name of the extension + :param datetime before_date: Use if you want to fetch summary of reviews older than the specified date, defaults to null + :param datetime after_date: Use if you want to fetch summary of reviews newer than the specified date, defaults to null + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + query_parameters = {} + if before_date is not None: + query_parameters['beforeDate'] = self._serialize.query('before_date', before_date, 'iso-8601') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='b7b44e21-209e-48f0-ae78-04727fc37d77', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReviewSummary', response) + + def create_review(self, review, pub_name, ext_name): + """CreateReview. + [Preview API] Creates a new review for an extension + :param :class:` ` review: Review to be created for the extension + :param str pub_name: Name of the publisher who published the extension + :param str ext_name: Name of the extension + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + content = self._serialize.body(review, 'Review') + response = self._send(http_method='POST', + location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Review', response) + + def delete_review(self, pub_name, ext_name, review_id): + """DeleteReview. + [Preview API] Deletes a review + :param str pub_name: Name of the pubilsher who published the extension + :param str ext_name: Name of the extension + :param long review_id: Id of the review which needs to be updated + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + if review_id is not None: + route_values['reviewId'] = self._serialize.url('review_id', review_id, 'long') + self._send(http_method='DELETE', + location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', + version='4.1-preview.1', + route_values=route_values) + + def update_review(self, review_patch, pub_name, ext_name, review_id): + """UpdateReview. + [Preview API] Updates or Flags a review + :param :class:` ` review_patch: ReviewPatch object which contains the changes to be applied to the review + :param str pub_name: Name of the pubilsher who published the extension + :param str ext_name: Name of the extension + :param long review_id: Id of the review which needs to be updated + :rtype: :class:` ` + """ + route_values = {} + if pub_name is not None: + route_values['pubName'] = self._serialize.url('pub_name', pub_name, 'str') + if ext_name is not None: + route_values['extName'] = self._serialize.url('ext_name', ext_name, 'str') + if review_id is not None: + route_values['reviewId'] = self._serialize.url('review_id', review_id, 'long') + content = self._serialize.body(review_patch, 'ReviewPatch') + response = self._send(http_method='PATCH', + location_id='e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ReviewPatch', response) + + def create_category(self, category): + """CreateCategory. + [Preview API] + :param :class:` ` category: + :rtype: :class:` ` + """ + content = self._serialize.body(category, 'ExtensionCategory') + response = self._send(http_method='POST', + location_id='476531a3-7024-4516-a76a-ed64d3008ad6', + version='4.1-preview.1', + content=content) + return self._deserialize('ExtensionCategory', response) + + def get_gallery_user_settings(self, user_scope, key=None): + """GetGalleryUserSettings. + [Preview API] Get all setting entries for the given user/all-users scope + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + :param str key: Optional key under which to filter all the entries + :rtype: {object} + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + if key is not None: + route_values['key'] = self._serialize.url('key', key, 'str') + response = self._send(http_method='GET', + location_id='9b75ece3-7960-401c-848b-148ac01ca350', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('{object}', response) + + def set_gallery_user_settings(self, entries, user_scope): + """SetGalleryUserSettings. + [Preview API] Set all setting entries for the given user/all-users scope + :param {object} entries: A key-value pair of all settings that need to be set + :param str user_scope: User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + """ + route_values = {} + if user_scope is not None: + route_values['userScope'] = self._serialize.url('user_scope', user_scope, 'str') + content = self._serialize.body(entries, '{object}') + self._send(http_method='PATCH', + location_id='9b75ece3-7960-401c-848b-148ac01ca350', + version='4.1-preview.1', + route_values=route_values, + content=content) + + def generate_key(self, key_type, expire_current_seconds=None): + """GenerateKey. + [Preview API] + :param str key_type: + :param int expire_current_seconds: + """ + route_values = {} + if key_type is not None: + route_values['keyType'] = self._serialize.url('key_type', key_type, 'str') + query_parameters = {} + if expire_current_seconds is not None: + query_parameters['expireCurrentSeconds'] = self._serialize.query('expire_current_seconds', expire_current_seconds, 'int') + self._send(http_method='POST', + location_id='92ed5cf4-c38b-465a-9059-2f2fb7c624b5', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_signing_key(self, key_type): + """GetSigningKey. + [Preview API] + :param str key_type: + :rtype: str + """ + route_values = {} + if key_type is not None: + route_values['keyType'] = self._serialize.url('key_type', key_type, 'str') + response = self._send(http_method='GET', + location_id='92ed5cf4-c38b-465a-9059-2f2fb7c624b5', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('str', response) + + def update_extension_statistics(self, extension_statistics_update, publisher_name, extension_name): + """UpdateExtensionStatistics. + [Preview API] + :param :class:` ` extension_statistics_update: + :param str publisher_name: + :param str extension_name: + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + content = self._serialize.body(extension_statistics_update, 'ExtensionStatisticUpdate') + self._send(http_method='PATCH', + location_id='a0ea3204-11e9-422d-a9ca-45851cc41400', + version='4.1-preview.1', + route_values=route_values, + content=content) + + def get_extension_daily_stats(self, publisher_name, extension_name, days=None, aggregate=None, after_date=None): + """GetExtensionDailyStats. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param int days: + :param str aggregate: + :param datetime after_date: + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + query_parameters = {} + if days is not None: + query_parameters['days'] = self._serialize.query('days', days, 'int') + if aggregate is not None: + query_parameters['aggregate'] = self._serialize.query('aggregate', aggregate, 'str') + if after_date is not None: + query_parameters['afterDate'] = self._serialize.query('after_date', after_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='ae06047e-51c5-4fb4-ab65-7be488544416', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ExtensionDailyStats', response) + + def get_extension_daily_stats_anonymous(self, publisher_name, extension_name, version): + """GetExtensionDailyStatsAnonymous. + [Preview API] This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats. + :param str publisher_name: Name of the publisher + :param str extension_name: Name of the extension + :param str version: Version of the extension + :rtype: :class:` ` + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='GET', + location_id='4fa7adb6-ca65-4075-a232-5f28323288ea', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ExtensionDailyStats', response) + + def increment_extension_daily_stat(self, publisher_name, extension_name, version, stat_type): + """IncrementExtensionDailyStat. + [Preview API] Increments a daily statistic associated with the extension + :param str publisher_name: Name of the publisher + :param str extension_name: Name of the extension + :param str version: Version of the extension + :param str stat_type: Type of stat to increment + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + query_parameters = {} + if stat_type is not None: + query_parameters['statType'] = self._serialize.query('stat_type', stat_type, 'str') + self._send(http_method='POST', + location_id='4fa7adb6-ca65-4075-a232-5f28323288ea', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_verification_log(self, publisher_name, extension_name, version): + """GetVerificationLog. + [Preview API] + :param str publisher_name: + :param str extension_name: + :param str version: + :rtype: object + """ + route_values = {} + if publisher_name is not None: + route_values['publisherName'] = self._serialize.url('publisher_name', publisher_name, 'str') + if extension_name is not None: + route_values['extensionName'] = self._serialize.url('extension_name', extension_name, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='GET', + location_id='c5523abe-b843-437f-875b-5833064efe4d', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + diff --git a/vsts/vsts/gallery/v4_1/models/__init__.py b/vsts/vsts/gallery/v4_1/models/__init__.py new file mode 100644 index 00000000..39d656a4 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/__init__.py @@ -0,0 +1,129 @@ +# -------------------------------------------------------------------------------------------- +# 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 .acquisition_operation import AcquisitionOperation +from .acquisition_options import AcquisitionOptions +from .answers import Answers +from .asset_details import AssetDetails +from .azure_publisher import AzurePublisher +from .azure_rest_api_request_model import AzureRestApiRequestModel +from .categories_result import CategoriesResult +from .category_language_title import CategoryLanguageTitle +from .concern import Concern +from .event_counts import EventCounts +from .extension_acquisition_request import ExtensionAcquisitionRequest +from .extension_badge import ExtensionBadge +from .extension_category import ExtensionCategory +from .extension_daily_stat import ExtensionDailyStat +from .extension_daily_stats import ExtensionDailyStats +from .extension_draft import ExtensionDraft +from .extension_draft_asset import ExtensionDraftAsset +from .extension_draft_patch import ExtensionDraftPatch +from .extension_event import ExtensionEvent +from .extension_events import ExtensionEvents +from .extension_file import ExtensionFile +from .extension_filter_result import ExtensionFilterResult +from .extension_filter_result_metadata import ExtensionFilterResultMetadata +from .extension_package import ExtensionPackage +from .extension_payload import ExtensionPayload +from .extension_query import ExtensionQuery +from .extension_query_result import ExtensionQueryResult +from .extension_share import ExtensionShare +from .extension_statistic import ExtensionStatistic +from .extension_statistic_update import ExtensionStatisticUpdate +from .extension_version import ExtensionVersion +from .filter_criteria import FilterCriteria +from .installation_target import InstallationTarget +from .metadata_item import MetadataItem +from .notifications_data import NotificationsData +from .product_categories_result import ProductCategoriesResult +from .product_category import ProductCategory +from .published_extension import PublishedExtension +from .publisher import Publisher +from .publisher_base import PublisherBase +from .publisher_facts import PublisherFacts +from .publisher_filter_result import PublisherFilterResult +from .publisher_query import PublisherQuery +from .publisher_query_result import PublisherQueryResult +from .qn_aItem import QnAItem +from .query_filter import QueryFilter +from .question import Question +from .questions_result import QuestionsResult +from .rating_count_per_rating import RatingCountPerRating +from .reference_links import ReferenceLinks +from .response import Response +from .review import Review +from .review_patch import ReviewPatch +from .review_reply import ReviewReply +from .reviews_result import ReviewsResult +from .review_summary import ReviewSummary +from .unpackaged_extension_data import UnpackagedExtensionData +from .user_identity_ref import UserIdentityRef +from .user_reported_concern import UserReportedConcern + +__all__ = [ + 'AcquisitionOperation', + 'AcquisitionOptions', + 'Answers', + 'AssetDetails', + 'AzurePublisher', + 'AzureRestApiRequestModel', + 'CategoriesResult', + 'CategoryLanguageTitle', + 'Concern', + 'EventCounts', + 'ExtensionAcquisitionRequest', + 'ExtensionBadge', + 'ExtensionCategory', + 'ExtensionDailyStat', + 'ExtensionDailyStats', + 'ExtensionDraft', + 'ExtensionDraftAsset', + 'ExtensionDraftPatch', + 'ExtensionEvent', + 'ExtensionEvents', + 'ExtensionFile', + 'ExtensionFilterResult', + 'ExtensionFilterResultMetadata', + 'ExtensionPackage', + 'ExtensionPayload', + 'ExtensionQuery', + 'ExtensionQueryResult', + 'ExtensionShare', + 'ExtensionStatistic', + 'ExtensionStatisticUpdate', + 'ExtensionVersion', + 'FilterCriteria', + 'InstallationTarget', + 'MetadataItem', + 'NotificationsData', + 'ProductCategoriesResult', + 'ProductCategory', + 'PublishedExtension', + 'Publisher', + 'PublisherBase', + 'PublisherFacts', + 'PublisherFilterResult', + 'PublisherQuery', + 'PublisherQueryResult', + 'QnAItem', + 'QueryFilter', + 'Question', + 'QuestionsResult', + 'RatingCountPerRating', + 'ReferenceLinks', + 'Response', + 'Review', + 'ReviewPatch', + 'ReviewReply', + 'ReviewsResult', + 'ReviewSummary', + 'UnpackagedExtensionData', + 'UserIdentityRef', + 'UserReportedConcern', +] diff --git a/vsts/vsts/gallery/v4_1/models/acquisition_operation.py b/vsts/vsts/gallery/v4_1/models/acquisition_operation.py new file mode 100644 index 00000000..bd2e4ef2 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/acquisition_operation.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOperation(Model): + """AcquisitionOperation. + + :param operation_state: State of the the AcquisitionOperation for the current user + :type operation_state: object + :param operation_type: AcquisitionOperationType: install, request, buy, etc... + :type operation_type: object + :param reason: Optional reason to justify current state. Typically used with Disallow state. + :type reason: str + """ + + _attribute_map = { + 'operation_state': {'key': 'operationState', 'type': 'object'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'str'} + } + + def __init__(self, operation_state=None, operation_type=None, reason=None): + super(AcquisitionOperation, self).__init__() + self.operation_state = operation_state + self.operation_type = operation_type + self.reason = reason diff --git a/vsts/vsts/gallery/v4_1/models/acquisition_options.py b/vsts/vsts/gallery/v4_1/models/acquisition_options.py new file mode 100644 index 00000000..4010a168 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/acquisition_options.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AcquisitionOptions(Model): + """AcquisitionOptions. + + :param default_operation: Default Operation for the ItemId in this target + :type default_operation: :class:`AcquisitionOperation ` + :param item_id: The item id that this options refer to + :type item_id: str + :param operations: Operations allowed for the ItemId in this target + :type operations: list of :class:`AcquisitionOperation ` + :param target: The target that this options refer to + :type target: str + """ + + _attribute_map = { + 'default_operation': {'key': 'defaultOperation', 'type': 'AcquisitionOperation'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operations': {'key': 'operations', 'type': '[AcquisitionOperation]'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, default_operation=None, item_id=None, operations=None, target=None): + super(AcquisitionOptions, self).__init__() + self.default_operation = default_operation + self.item_id = item_id + self.operations = operations + self.target = target diff --git a/vsts/vsts/gallery/v4_1/models/answers.py b/vsts/vsts/gallery/v4_1/models/answers.py new file mode 100644 index 00000000..0f9a70e0 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/answers.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Answers(Model): + """Answers. + + :param vSMarketplace_extension_name: Gets or sets the vs marketplace extension name + :type vSMarketplace_extension_name: str + :param vSMarketplace_publisher_name: Gets or sets the vs marketplace publsiher name + :type vSMarketplace_publisher_name: str + """ + + _attribute_map = { + 'vSMarketplace_extension_name': {'key': 'vSMarketplaceExtensionName', 'type': 'str'}, + 'vSMarketplace_publisher_name': {'key': 'vSMarketplacePublisherName', 'type': 'str'} + } + + def __init__(self, vSMarketplace_extension_name=None, vSMarketplace_publisher_name=None): + super(Answers, self).__init__() + self.vSMarketplace_extension_name = vSMarketplace_extension_name + self.vSMarketplace_publisher_name = vSMarketplace_publisher_name diff --git a/vsts/vsts/gallery/v4_1/models/asset_details.py b/vsts/vsts/gallery/v4_1/models/asset_details.py new file mode 100644 index 00000000..a6b0c8a9 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/asset_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AssetDetails(Model): + """AssetDetails. + + :param answers: Gets or sets the Answers, which contains vs marketplace extension name and publisher name + :type answers: :class:`Answers ` + :param publisher_natural_identifier: Gets or sets the VS publisher Id + :type publisher_natural_identifier: str + """ + + _attribute_map = { + 'answers': {'key': 'answers', 'type': 'Answers'}, + 'publisher_natural_identifier': {'key': 'publisherNaturalIdentifier', 'type': 'str'} + } + + def __init__(self, answers=None, publisher_natural_identifier=None): + super(AssetDetails, self).__init__() + self.answers = answers + self.publisher_natural_identifier = publisher_natural_identifier diff --git a/vsts/vsts/gallery/v4_1/models/azure_publisher.py b/vsts/vsts/gallery/v4_1/models/azure_publisher.py new file mode 100644 index 00000000..26b6240c --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/azure_publisher.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzurePublisher(Model): + """AzurePublisher. + + :param azure_publisher_id: + :type azure_publisher_id: str + :param publisher_name: + :type publisher_name: str + """ + + _attribute_map = { + 'azure_publisher_id': {'key': 'azurePublisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, azure_publisher_id=None, publisher_name=None): + super(AzurePublisher, self).__init__() + self.azure_publisher_id = azure_publisher_id + self.publisher_name = publisher_name diff --git a/vsts/vsts/gallery/v4_1/models/azure_rest_api_request_model.py b/vsts/vsts/gallery/v4_1/models/azure_rest_api_request_model.py new file mode 100644 index 00000000..cde6c199 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/azure_rest_api_request_model.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzureRestApiRequestModel(Model): + """AzureRestApiRequestModel. + + :param asset_details: Gets or sets the Asset details + :type asset_details: :class:`AssetDetails ` + :param asset_id: Gets or sets the asset id + :type asset_id: str + :param asset_version: Gets or sets the asset version + :type asset_version: long + :param customer_support_email: Gets or sets the customer support email + :type customer_support_email: str + :param integration_contact_email: Gets or sets the integration contact email + :type integration_contact_email: str + :param operation: Gets or sets the asset version + :type operation: str + :param plan_id: Gets or sets the plan identifier if any. + :type plan_id: str + :param publisher_id: Gets or sets the publisher id + :type publisher_id: str + :param type: Gets or sets the resource type + :type type: str + """ + + _attribute_map = { + 'asset_details': {'key': 'assetDetails', 'type': 'AssetDetails'}, + 'asset_id': {'key': 'assetId', 'type': 'str'}, + 'asset_version': {'key': 'assetVersion', 'type': 'long'}, + 'customer_support_email': {'key': 'customerSupportEmail', 'type': 'str'}, + 'integration_contact_email': {'key': 'integrationContactEmail', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, asset_details=None, asset_id=None, asset_version=None, customer_support_email=None, integration_contact_email=None, operation=None, plan_id=None, publisher_id=None, type=None): + super(AzureRestApiRequestModel, self).__init__() + self.asset_details = asset_details + self.asset_id = asset_id + self.asset_version = asset_version + self.customer_support_email = customer_support_email + self.integration_contact_email = integration_contact_email + self.operation = operation + self.plan_id = plan_id + self.publisher_id = publisher_id + self.type = type diff --git a/vsts/vsts/gallery/v4_1/models/categories_result.py b/vsts/vsts/gallery/v4_1/models/categories_result.py new file mode 100644 index 00000000..35d47965 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/categories_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 CategoriesResult(Model): + """CategoriesResult. + + :param categories: + :type categories: list of :class:`ExtensionCategory ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ExtensionCategory]'} + } + + def __init__(self, categories=None): + super(CategoriesResult, self).__init__() + self.categories = categories diff --git a/vsts/vsts/gallery/v4_1/models/category_language_title.py b/vsts/vsts/gallery/v4_1/models/category_language_title.py new file mode 100644 index 00000000..af873077 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/category_language_title.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CategoryLanguageTitle(Model): + """CategoryLanguageTitle. + + :param lang: The language for which the title is applicable + :type lang: str + :param lcid: The language culture id of the lang parameter + :type lcid: int + :param title: Actual title to be shown on the UI + :type title: str + """ + + _attribute_map = { + 'lang': {'key': 'lang', 'type': 'str'}, + 'lcid': {'key': 'lcid', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, lang=None, lcid=None, title=None): + super(CategoryLanguageTitle, self).__init__() + self.lang = lang + self.lcid = lcid + self.title = title diff --git a/vsts/vsts/gallery/v4_1/models/concern.py b/vsts/vsts/gallery/v4_1/models/concern.py new file mode 100644 index 00000000..e57c4a17 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/concern.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------------------------- +# 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 .qn_aItem import QnAItem + + +class Concern(QnAItem): + """Concern. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + :param category: Category of the concern + :type category: object + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'}, + 'category': {'key': 'category', 'type': 'object'} + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None, category=None): + super(Concern, self).__init__(created_date=created_date, id=id, status=status, text=text, updated_date=updated_date, user=user) + self.category = category diff --git a/vsts/vsts/gallery/v4_1/models/event_counts.py b/vsts/vsts/gallery/v4_1/models/event_counts.py new file mode 100644 index 00000000..dc65473e --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/event_counts.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventCounts(Model): + """EventCounts. + + :param average_rating: Average rating on the day for extension + :type average_rating: number + :param buy_count: Number of times the extension was bought in hosted scenario (applies only to VSTS extensions) + :type buy_count: int + :param connected_buy_count: Number of times the extension was bought in connected scenario (applies only to VSTS extensions) + :type connected_buy_count: int + :param connected_install_count: Number of times the extension was installed in connected scenario (applies only to VSTS extensions) + :type connected_install_count: int + :param install_count: Number of times the extension was installed + :type install_count: long + :param try_count: Number of times the extension was installed as a trial (applies only to VSTS extensions) + :type try_count: int + :param uninstall_count: Number of times the extension was uninstalled (applies only to VSTS extensions) + :type uninstall_count: int + :param web_download_count: Number of times the extension was downloaded (applies to VSTS extensions and VSCode marketplace click installs) + :type web_download_count: long + :param web_page_views: Number of detail page views + :type web_page_views: long + """ + + _attribute_map = { + 'average_rating': {'key': 'averageRating', 'type': 'number'}, + 'buy_count': {'key': 'buyCount', 'type': 'int'}, + 'connected_buy_count': {'key': 'connectedBuyCount', 'type': 'int'}, + 'connected_install_count': {'key': 'connectedInstallCount', 'type': 'int'}, + 'install_count': {'key': 'installCount', 'type': 'long'}, + 'try_count': {'key': 'tryCount', 'type': 'int'}, + 'uninstall_count': {'key': 'uninstallCount', 'type': 'int'}, + 'web_download_count': {'key': 'webDownloadCount', 'type': 'long'}, + 'web_page_views': {'key': 'webPageViews', 'type': 'long'} + } + + def __init__(self, average_rating=None, buy_count=None, connected_buy_count=None, connected_install_count=None, install_count=None, try_count=None, uninstall_count=None, web_download_count=None, web_page_views=None): + super(EventCounts, self).__init__() + self.average_rating = average_rating + self.buy_count = buy_count + self.connected_buy_count = connected_buy_count + self.connected_install_count = connected_install_count + self.install_count = install_count + self.try_count = try_count + self.uninstall_count = uninstall_count + self.web_download_count = web_download_count + self.web_page_views = web_page_views diff --git a/vsts/vsts/gallery/v4_1/models/extension_acquisition_request.py b/vsts/vsts/gallery/v4_1/models/extension_acquisition_request.py new file mode 100644 index 00000000..f5faa45c --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_acquisition_request.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAcquisitionRequest(Model): + """ExtensionAcquisitionRequest. + + :param assignment_type: How the item is being assigned + :type assignment_type: object + :param billing_id: The id of the subscription used for purchase + :type billing_id: str + :param item_id: The marketplace id (publisherName.extensionName) for the item + :type item_id: str + :param operation_type: The type of operation, such as install, request, purchase + :type operation_type: object + :param properties: Additional properties which can be added to the request. + :type properties: :class:`object ` + :param quantity: How many licenses should be purchased + :type quantity: int + :param targets: A list of target guids where the item should be acquired (installed, requested, etc.), such as account id + :type targets: list of str + """ + + _attribute_map = { + 'assignment_type': {'key': 'assignmentType', 'type': 'object'}, + 'billing_id': {'key': 'billingId', 'type': 'str'}, + 'item_id': {'key': 'itemId', 'type': 'str'}, + 'operation_type': {'key': 'operationType', 'type': 'object'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'quantity': {'key': 'quantity', 'type': 'int'}, + 'targets': {'key': 'targets', 'type': '[str]'} + } + + def __init__(self, assignment_type=None, billing_id=None, item_id=None, operation_type=None, properties=None, quantity=None, targets=None): + super(ExtensionAcquisitionRequest, self).__init__() + self.assignment_type = assignment_type + self.billing_id = billing_id + self.item_id = item_id + self.operation_type = operation_type + self.properties = properties + self.quantity = quantity + self.targets = targets diff --git a/vsts/vsts/gallery/v4_1/models/extension_badge.py b/vsts/vsts/gallery/v4_1/models/extension_badge.py new file mode 100644 index 00000000..bcb0fa1c --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_badge.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionBadge(Model): + """ExtensionBadge. + + :param description: + :type description: str + :param img_uri: + :type img_uri: str + :param link: + :type link: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'img_uri': {'key': 'imgUri', 'type': 'str'}, + 'link': {'key': 'link', 'type': 'str'} + } + + def __init__(self, description=None, img_uri=None, link=None): + super(ExtensionBadge, self).__init__() + self.description = description + self.img_uri = img_uri + self.link = link diff --git a/vsts/vsts/gallery/v4_1/models/extension_category.py b/vsts/vsts/gallery/v4_1/models/extension_category.py new file mode 100644 index 00000000..f95a77e2 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_category.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionCategory(Model): + """ExtensionCategory. + + :param associated_products: The name of the products with which this category is associated to. + :type associated_products: list of str + :param category_id: + :type category_id: int + :param category_name: This is the internal name for a category + :type category_name: str + :param language: This parameter is obsolete. Refer to LanguageTitles for langauge specific titles + :type language: str + :param language_titles: The list of all the titles of this category in various languages + :type language_titles: list of :class:`CategoryLanguageTitle ` + :param parent_category_name: This is the internal name of the parent if this is associated with a parent + :type parent_category_name: str + """ + + _attribute_map = { + 'associated_products': {'key': 'associatedProducts', 'type': '[str]'}, + 'category_id': {'key': 'categoryId', 'type': 'int'}, + 'category_name': {'key': 'categoryName', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'language_titles': {'key': 'languageTitles', 'type': '[CategoryLanguageTitle]'}, + 'parent_category_name': {'key': 'parentCategoryName', 'type': 'str'} + } + + def __init__(self, associated_products=None, category_id=None, category_name=None, language=None, language_titles=None, parent_category_name=None): + super(ExtensionCategory, self).__init__() + self.associated_products = associated_products + self.category_id = category_id + self.category_name = category_name + self.language = language + self.language_titles = language_titles + self.parent_category_name = parent_category_name diff --git a/vsts/vsts/gallery/v4_1/models/extension_daily_stat.py b/vsts/vsts/gallery/v4_1/models/extension_daily_stat.py new file mode 100644 index 00000000..97d2d15e --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_daily_stat.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDailyStat(Model): + """ExtensionDailyStat. + + :param counts: Stores the event counts + :type counts: :class:`EventCounts ` + :param extended_stats: Generic key/value pair to store extended statistics. Used for sending paid extension stats like Upgrade, Downgrade, Cancel trend etc. + :type extended_stats: dict + :param statistic_date: Timestamp of this data point + :type statistic_date: datetime + :param version: Version of the extension + :type version: str + """ + + _attribute_map = { + 'counts': {'key': 'counts', 'type': 'EventCounts'}, + 'extended_stats': {'key': 'extendedStats', 'type': '{object}'}, + 'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, counts=None, extended_stats=None, statistic_date=None, version=None): + super(ExtensionDailyStat, self).__init__() + self.counts = counts + self.extended_stats = extended_stats + self.statistic_date = statistic_date + self.version = version diff --git a/vsts/vsts/gallery/v4_1/models/extension_daily_stats.py b/vsts/vsts/gallery/v4_1/models/extension_daily_stats.py new file mode 100644 index 00000000..068a7efa --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_daily_stats.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDailyStats(Model): + """ExtensionDailyStats. + + :param daily_stats: List of extension statistics data points + :type daily_stats: list of :class:`ExtensionDailyStat ` + :param extension_id: Id of the extension, this will never be sent back to the client. For internal use only. + :type extension_id: str + :param extension_name: Name of the extension + :type extension_name: str + :param publisher_name: Name of the publisher + :type publisher_name: str + :param stat_count: Count of stats + :type stat_count: int + """ + + _attribute_map = { + 'daily_stats': {'key': 'dailyStats', 'type': '[ExtensionDailyStat]'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'stat_count': {'key': 'statCount', 'type': 'int'} + } + + def __init__(self, daily_stats=None, extension_id=None, extension_name=None, publisher_name=None, stat_count=None): + super(ExtensionDailyStats, self).__init__() + self.daily_stats = daily_stats + self.extension_id = extension_id + self.extension_name = extension_name + self.publisher_name = publisher_name + self.stat_count = stat_count diff --git a/vsts/vsts/gallery/v4_1/models/extension_draft.py b/vsts/vsts/gallery/v4_1/models/extension_draft.py new file mode 100644 index 00000000..b7618003 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_draft.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDraft(Model): + """ExtensionDraft. + + :param assets: + :type assets: list of :class:`ExtensionDraftAsset ` + :param created_date: + :type created_date: datetime + :param draft_state: + :type draft_state: object + :param extension_name: + :type extension_name: str + :param id: + :type id: str + :param last_updated: + :type last_updated: datetime + :param payload: + :type payload: :class:`ExtensionPayload ` + :param product: + :type product: str + :param publisher_name: + :type publisher_name: str + :param validation_errors: + :type validation_errors: list of { key: str; value: str } + :param validation_warnings: + :type validation_warnings: list of { key: str; value: str } + """ + + _attribute_map = { + 'assets': {'key': 'assets', 'type': '[ExtensionDraftAsset]'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'draft_state': {'key': 'draftState', 'type': 'object'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'payload': {'key': 'payload', 'type': 'ExtensionPayload'}, + 'product': {'key': 'product', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[{ key: str; value: str }]'}, + 'validation_warnings': {'key': 'validationWarnings', 'type': '[{ key: str; value: str }]'} + } + + def __init__(self, assets=None, created_date=None, draft_state=None, extension_name=None, id=None, last_updated=None, payload=None, product=None, publisher_name=None, validation_errors=None, validation_warnings=None): + super(ExtensionDraft, self).__init__() + self.assets = assets + self.created_date = created_date + self.draft_state = draft_state + self.extension_name = extension_name + self.id = id + self.last_updated = last_updated + self.payload = payload + self.product = product + self.publisher_name = publisher_name + self.validation_errors = validation_errors + self.validation_warnings = validation_warnings diff --git a/vsts/vsts/gallery/v4_1/models/extension_draft_asset.py b/vsts/vsts/gallery/v4_1/models/extension_draft_asset.py new file mode 100644 index 00000000..695659a0 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_draft_asset.py @@ -0,0 +1,30 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from .extension_file import ExtensionFile + + +class ExtensionDraftAsset(ExtensionFile): + """ExtensionDraftAsset. + + :param asset_type: + :type asset_type: str + :param language: + :type language: str + :param source: + :type source: str + """ + + _attribute_map = { + 'asset_type': {'key': 'assetType', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + } + + def __init__(self, asset_type=None, language=None, source=None): + super(ExtensionDraftAsset, self).__init__(asset_type=asset_type, language=language, source=source) diff --git a/vsts/vsts/gallery/v4_1/models/extension_draft_patch.py b/vsts/vsts/gallery/v4_1/models/extension_draft_patch.py new file mode 100644 index 00000000..ccccb24d --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_draft_patch.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionDraftPatch(Model): + """ExtensionDraftPatch. + + :param extension_data: + :type extension_data: :class:`UnpackagedExtensionData ` + :param operation: + :type operation: object + """ + + _attribute_map = { + 'extension_data': {'key': 'extensionData', 'type': 'UnpackagedExtensionData'}, + 'operation': {'key': 'operation', 'type': 'object'} + } + + def __init__(self, extension_data=None, operation=None): + super(ExtensionDraftPatch, self).__init__() + self.extension_data = extension_data + self.operation = operation diff --git a/vsts/vsts/gallery/v4_1/models/extension_event.py b/vsts/vsts/gallery/v4_1/models/extension_event.py new file mode 100644 index 00000000..64ad2b04 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_event.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEvent(Model): + """ExtensionEvent. + + :param id: Id which identifies each data point uniquely + :type id: long + :param properties: + :type properties: :class:`object ` + :param statistic_date: Timestamp of when the event occurred + :type statistic_date: datetime + :param version: Version of the extension + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'statistic_date': {'key': 'statisticDate', 'type': 'iso-8601'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, properties=None, statistic_date=None, version=None): + super(ExtensionEvent, self).__init__() + self.id = id + self.properties = properties + self.statistic_date = statistic_date + self.version = version diff --git a/vsts/vsts/gallery/v4_1/models/extension_events.py b/vsts/vsts/gallery/v4_1/models/extension_events.py new file mode 100644 index 00000000..e63f0c32 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_events.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionEvents(Model): + """ExtensionEvents. + + :param events: Generic container for events data. The dictionary key denotes the type of event and the list contains properties related to that event + :type events: dict + :param extension_id: Id of the extension, this will never be sent back to the client. This field will mainly be used when EMS calls into Gallery REST API to update install/uninstall events for various extensions in one go. + :type extension_id: str + :param extension_name: Name of the extension + :type extension_name: str + :param publisher_name: Name of the publisher + :type publisher_name: str + """ + + _attribute_map = { + 'events': {'key': 'events', 'type': '{[ExtensionEvent]}'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, events=None, extension_id=None, extension_name=None, publisher_name=None): + super(ExtensionEvents, self).__init__() + self.events = events + self.extension_id = extension_id + self.extension_name = extension_name + self.publisher_name = publisher_name diff --git a/vsts/vsts/gallery/v4_1/models/extension_file.py b/vsts/vsts/gallery/v4_1/models/extension_file.py new file mode 100644 index 00000000..1b505e97 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_file.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFile(Model): + """ExtensionFile. + + :param asset_type: + :type asset_type: str + :param language: + :type language: str + :param source: + :type source: str + """ + + _attribute_map = { + 'asset_type': {'key': 'assetType', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'} + } + + def __init__(self, asset_type=None, language=None, source=None): + super(ExtensionFile, self).__init__() + self.asset_type = asset_type + self.language = language + self.source = source diff --git a/vsts/vsts/gallery/v4_1/models/extension_filter_result.py b/vsts/vsts/gallery/v4_1/models/extension_filter_result.py new file mode 100644 index 00000000..80fe7546 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_filter_result.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFilterResult(Model): + """ExtensionFilterResult. + + :param extensions: This is the set of appplications that matched the query filter supplied. + :type extensions: list of :class:`PublishedExtension ` + :param paging_token: The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results. + :type paging_token: str + :param result_metadata: This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results + :type result_metadata: list of :class:`ExtensionFilterResultMetadata ` + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[PublishedExtension]'}, + 'paging_token': {'key': 'pagingToken', 'type': 'str'}, + 'result_metadata': {'key': 'resultMetadata', 'type': '[ExtensionFilterResultMetadata]'} + } + + def __init__(self, extensions=None, paging_token=None, result_metadata=None): + super(ExtensionFilterResult, self).__init__() + self.extensions = extensions + self.paging_token = paging_token + self.result_metadata = result_metadata diff --git a/vsts/vsts/gallery/v4_1/models/extension_filter_result_metadata.py b/vsts/vsts/gallery/v4_1/models/extension_filter_result_metadata.py new file mode 100644 index 00000000..cf43173b --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_filter_result_metadata.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionFilterResultMetadata(Model): + """ExtensionFilterResultMetadata. + + :param metadata_items: The metadata items for the category + :type metadata_items: list of :class:`MetadataItem ` + :param metadata_type: Defines the category of metadata items + :type metadata_type: str + """ + + _attribute_map = { + 'metadata_items': {'key': 'metadataItems', 'type': '[MetadataItem]'}, + 'metadata_type': {'key': 'metadataType', 'type': 'str'} + } + + def __init__(self, metadata_items=None, metadata_type=None): + super(ExtensionFilterResultMetadata, self).__init__() + self.metadata_items = metadata_items + self.metadata_type = metadata_type diff --git a/vsts/vsts/gallery/v4_1/models/extension_package.py b/vsts/vsts/gallery/v4_1/models/extension_package.py new file mode 100644 index 00000000..384cdb0a --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_package.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionPackage(Model): + """ExtensionPackage. + + :param extension_manifest: Base 64 encoded extension package + :type extension_manifest: str + """ + + _attribute_map = { + 'extension_manifest': {'key': 'extensionManifest', 'type': 'str'} + } + + def __init__(self, extension_manifest=None): + super(ExtensionPackage, self).__init__() + self.extension_manifest = extension_manifest diff --git a/vsts/vsts/gallery/v4_1/models/extension_payload.py b/vsts/vsts/gallery/v4_1/models/extension_payload.py new file mode 100644 index 00000000..e742a825 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_payload.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionPayload(Model): + """ExtensionPayload. + + :param description: + :type description: str + :param display_name: + :type display_name: str + :param file_name: + :type file_name: str + :param installation_targets: + :type installation_targets: list of :class:`InstallationTarget ` + :param is_signed_by_microsoft: + :type is_signed_by_microsoft: bool + :param is_valid: + :type is_valid: bool + :param metadata: + :type metadata: list of { key: str; value: str } + :param type: + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'}, + 'is_signed_by_microsoft': {'key': 'isSignedByMicrosoft', 'type': 'bool'}, + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'metadata': {'key': 'metadata', 'type': '[{ key: str; value: str }]'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, display_name=None, file_name=None, installation_targets=None, is_signed_by_microsoft=None, is_valid=None, metadata=None, type=None): + super(ExtensionPayload, self).__init__() + self.description = description + self.display_name = display_name + self.file_name = file_name + self.installation_targets = installation_targets + self.is_signed_by_microsoft = is_signed_by_microsoft + self.is_valid = is_valid + self.metadata = metadata + self.type = type diff --git a/vsts/vsts/gallery/v4_1/models/extension_query.py b/vsts/vsts/gallery/v4_1/models/extension_query.py new file mode 100644 index 00000000..f50ffb23 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionQuery(Model): + """ExtensionQuery. + + :param asset_types: When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned. + :type asset_types: list of str + :param filters: Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + :type filters: list of :class:`QueryFilter ` + :param flags: The Flags are used to deterine which set of information the caller would like returned for the matched extensions. + :type flags: object + """ + + _attribute_map = { + 'asset_types': {'key': 'assetTypes', 'type': '[str]'}, + 'filters': {'key': 'filters', 'type': '[QueryFilter]'}, + 'flags': {'key': 'flags', 'type': 'object'} + } + + def __init__(self, asset_types=None, filters=None, flags=None): + super(ExtensionQuery, self).__init__() + self.asset_types = asset_types + self.filters = filters + self.flags = flags diff --git a/vsts/vsts/gallery/v4_1/models/extension_query_result.py b/vsts/vsts/gallery/v4_1/models/extension_query_result.py new file mode 100644 index 00000000..4daa1a57 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_query_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionQueryResult(Model): + """ExtensionQueryResult. + + :param results: For each filter supplied in the query, a filter result will be returned in the query result. + :type results: list of :class:`ExtensionFilterResult ` + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[ExtensionFilterResult]'} + } + + def __init__(self, results=None): + super(ExtensionQueryResult, self).__init__() + self.results = results diff --git a/vsts/vsts/gallery/v4_1/models/extension_share.py b/vsts/vsts/gallery/v4_1/models/extension_share.py new file mode 100644 index 00000000..acc81ef0 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_share.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionShare(Model): + """ExtensionShare. + + :param id: + :type id: str + :param name: + :type name: str + :param type: + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None): + super(ExtensionShare, self).__init__() + self.id = id + self.name = name + self.type = type diff --git a/vsts/vsts/gallery/v4_1/models/extension_statistic.py b/vsts/vsts/gallery/v4_1/models/extension_statistic.py new file mode 100644 index 00000000..11fc6704 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_statistic.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionStatistic(Model): + """ExtensionStatistic. + + :param statistic_name: + :type statistic_name: str + :param value: + :type value: number + """ + + _attribute_map = { + 'statistic_name': {'key': 'statisticName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'number'} + } + + def __init__(self, statistic_name=None, value=None): + super(ExtensionStatistic, self).__init__() + self.statistic_name = statistic_name + self.value = value diff --git a/vsts/vsts/gallery/v4_1/models/extension_statistic_update.py b/vsts/vsts/gallery/v4_1/models/extension_statistic_update.py new file mode 100644 index 00000000..82adba31 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_statistic_update.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionStatisticUpdate(Model): + """ExtensionStatisticUpdate. + + :param extension_name: + :type extension_name: str + :param operation: + :type operation: object + :param publisher_name: + :type publisher_name: str + :param statistic: + :type statistic: :class:`ExtensionStatistic ` + """ + + _attribute_map = { + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'object'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'statistic': {'key': 'statistic', 'type': 'ExtensionStatistic'} + } + + def __init__(self, extension_name=None, operation=None, publisher_name=None, statistic=None): + super(ExtensionStatisticUpdate, self).__init__() + self.extension_name = extension_name + self.operation = operation + self.publisher_name = publisher_name + self.statistic = statistic diff --git a/vsts/vsts/gallery/v4_1/models/extension_version.py b/vsts/vsts/gallery/v4_1/models/extension_version.py new file mode 100644 index 00000000..256768eb --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/extension_version.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionVersion(Model): + """ExtensionVersion. + + :param asset_uri: + :type asset_uri: str + :param badges: + :type badges: list of :class:`ExtensionBadge ` + :param fallback_asset_uri: + :type fallback_asset_uri: str + :param files: + :type files: list of :class:`ExtensionFile ` + :param flags: + :type flags: object + :param last_updated: + :type last_updated: datetime + :param properties: + :type properties: list of { key: str; value: str } + :param validation_result_message: + :type validation_result_message: str + :param version: + :type version: str + :param version_description: + :type version_description: str + """ + + _attribute_map = { + 'asset_uri': {'key': 'assetUri', 'type': 'str'}, + 'badges': {'key': 'badges', 'type': '[ExtensionBadge]'}, + 'fallback_asset_uri': {'key': 'fallbackAssetUri', 'type': 'str'}, + 'files': {'key': 'files', 'type': '[ExtensionFile]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'properties': {'key': 'properties', 'type': '[{ key: str; value: str }]'}, + 'validation_result_message': {'key': 'validationResultMessage', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + 'version_description': {'key': 'versionDescription', 'type': 'str'} + } + + def __init__(self, asset_uri=None, badges=None, fallback_asset_uri=None, files=None, flags=None, last_updated=None, properties=None, validation_result_message=None, version=None, version_description=None): + super(ExtensionVersion, self).__init__() + self.asset_uri = asset_uri + self.badges = badges + self.fallback_asset_uri = fallback_asset_uri + self.files = files + self.flags = flags + self.last_updated = last_updated + self.properties = properties + self.validation_result_message = validation_result_message + self.version = version + self.version_description = version_description diff --git a/vsts/vsts/gallery/v4_1/models/filter_criteria.py b/vsts/vsts/gallery/v4_1/models/filter_criteria.py new file mode 100644 index 00000000..7002c78e --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/filter_criteria.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 FilterCriteria(Model): + """FilterCriteria. + + :param filter_type: + :type filter_type: int + :param value: The value used in the match based on the filter type. + :type value: str + """ + + _attribute_map = { + 'filter_type': {'key': 'filterType', 'type': 'int'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, filter_type=None, value=None): + super(FilterCriteria, self).__init__() + self.filter_type = filter_type + self.value = value diff --git a/vsts/vsts/gallery/v4_1/models/installation_target.py b/vsts/vsts/gallery/v4_1/models/installation_target.py new file mode 100644 index 00000000..4d622d4a --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/installation_target.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 InstallationTarget(Model): + """InstallationTarget. + + :param target: + :type target: str + :param target_version: + :type target_version: str + """ + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'} + } + + def __init__(self, target=None, target_version=None): + super(InstallationTarget, self).__init__() + self.target = target + self.target_version = target_version diff --git a/vsts/vsts/gallery/v4_1/models/metadata_item.py b/vsts/vsts/gallery/v4_1/models/metadata_item.py new file mode 100644 index 00000000..c2a8bd96 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/metadata_item.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetadataItem(Model): + """MetadataItem. + + :param count: The count of the metadata item + :type count: int + :param name: The name of the metadata item + :type name: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, count=None, name=None): + super(MetadataItem, self).__init__() + self.count = count + self.name = name diff --git a/vsts/vsts/gallery/v4_1/models/notifications_data.py b/vsts/vsts/gallery/v4_1/models/notifications_data.py new file mode 100644 index 00000000..6decf547 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/notifications_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationsData(Model): + """NotificationsData. + + :param data: Notification data needed + :type data: dict + :param identities: List of users who should get the notification + :type identities: dict + :param type: Type of Mail Notification.Can be Qna , review or CustomerContact + :type type: object + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'identities': {'key': 'identities', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, data=None, identities=None, type=None): + super(NotificationsData, self).__init__() + self.data = data + self.identities = identities + self.type = type diff --git a/vsts/vsts/gallery/v4_1/models/product_categories_result.py b/vsts/vsts/gallery/v4_1/models/product_categories_result.py new file mode 100644 index 00000000..3c2b7201 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/product_categories_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProductCategoriesResult(Model): + """ProductCategoriesResult. + + :param categories: + :type categories: list of :class:`ProductCategory ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ProductCategory]'} + } + + def __init__(self, categories=None): + super(ProductCategoriesResult, self).__init__() + self.categories = categories diff --git a/vsts/vsts/gallery/v4_1/models/product_category.py b/vsts/vsts/gallery/v4_1/models/product_category.py new file mode 100644 index 00000000..b157ca81 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/product_category.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProductCategory(Model): + """ProductCategory. + + :param children: + :type children: list of :class:`ProductCategory ` + :param has_children: Indicator whether this is a leaf or there are children under this category + :type has_children: bool + :param id: Individual Guid of the Category + :type id: str + :param title: Category Title in the requested language + :type title: str + """ + + _attribute_map = { + 'children': {'key': 'children', 'type': '[ProductCategory]'}, + 'has_children': {'key': 'hasChildren', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, children=None, has_children=None, id=None, title=None): + super(ProductCategory, self).__init__() + self.children = children + self.has_children = has_children + self.id = id + self.title = title diff --git a/vsts/vsts/gallery/v4_1/models/published_extension.py b/vsts/vsts/gallery/v4_1/models/published_extension.py new file mode 100644 index 00000000..00dd659e --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/published_extension.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishedExtension(Model): + """PublishedExtension. + + :param categories: + :type categories: list of str + :param deployment_type: + :type deployment_type: object + :param display_name: + :type display_name: str + :param extension_id: + :type extension_id: str + :param extension_name: + :type extension_name: str + :param flags: + :type flags: object + :param installation_targets: + :type installation_targets: list of :class:`InstallationTarget ` + :param last_updated: + :type last_updated: datetime + :param long_description: + :type long_description: str + :param published_date: Date on which the extension was first uploaded. + :type published_date: datetime + :param publisher: + :type publisher: :class:`PublisherFacts ` + :param release_date: Date on which the extension first went public. + :type release_date: datetime + :param shared_with: + :type shared_with: list of :class:`ExtensionShare ` + :param short_description: + :type short_description: str + :param statistics: + :type statistics: list of :class:`ExtensionStatistic ` + :param tags: + :type tags: list of str + :param versions: + :type versions: list of :class:`ExtensionVersion ` + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'object'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'long_description': {'key': 'longDescription', 'type': 'str'}, + 'published_date': {'key': 'publishedDate', 'type': 'iso-8601'}, + 'publisher': {'key': 'publisher', 'type': 'PublisherFacts'}, + 'release_date': {'key': 'releaseDate', 'type': 'iso-8601'}, + 'shared_with': {'key': 'sharedWith', 'type': '[ExtensionShare]'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': '[ExtensionStatistic]'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'versions': {'key': 'versions', 'type': '[ExtensionVersion]'} + } + + def __init__(self, categories=None, deployment_type=None, display_name=None, extension_id=None, extension_name=None, flags=None, installation_targets=None, last_updated=None, long_description=None, published_date=None, publisher=None, release_date=None, shared_with=None, short_description=None, statistics=None, tags=None, versions=None): + super(PublishedExtension, self).__init__() + self.categories = categories + self.deployment_type = deployment_type + self.display_name = display_name + self.extension_id = extension_id + self.extension_name = extension_name + self.flags = flags + self.installation_targets = installation_targets + self.last_updated = last_updated + self.long_description = long_description + self.published_date = published_date + self.publisher = publisher + self.release_date = release_date + self.shared_with = shared_with + self.short_description = short_description + self.statistics = statistics + self.tags = tags + self.versions = versions diff --git a/vsts/vsts/gallery/v4_1/models/publisher.py b/vsts/vsts/gallery/v4_1/models/publisher.py new file mode 100644 index 00000000..e9bdf8cc --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/publisher.py @@ -0,0 +1,52 @@ +# -------------------------------------------------------------------------------------------- +# 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 .publisher_base import PublisherBase + + +class Publisher(PublisherBase): + """Publisher. + + :param display_name: + :type display_name: str + :param email_address: + :type email_address: list of str + :param extensions: + :type extensions: list of :class:`PublishedExtension ` + :param flags: + :type flags: object + :param last_updated: + :type last_updated: datetime + :param long_description: + :type long_description: str + :param publisher_id: + :type publisher_id: str + :param publisher_name: + :type publisher_name: str + :param short_description: + :type short_description: str + :param _links: + :type _links: :class:`ReferenceLinks ` + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': '[str]'}, + 'extensions': {'key': 'extensions', 'type': '[PublishedExtension]'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'}, + 'long_description': {'key': 'longDescription', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'short_description': {'key': 'shortDescription', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'} + } + + def __init__(self, display_name=None, email_address=None, extensions=None, flags=None, last_updated=None, long_description=None, publisher_id=None, publisher_name=None, short_description=None, _links=None): + super(Publisher, self).__init__(display_name=display_name, email_address=email_address, extensions=extensions, flags=flags, last_updated=last_updated, long_description=long_description, publisher_id=publisher_id, publisher_name=publisher_name, short_description=short_description) + self._links = _links diff --git a/vsts/vsts/gallery/v4_1/models/publisher_facts.py b/vsts/vsts/gallery/v4_1/models/publisher_facts.py new file mode 100644 index 00000000..979b6d8d --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/publisher_facts.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherFacts(Model): + """PublisherFacts. + + :param display_name: + :type display_name: str + :param flags: + :type flags: object + :param publisher_id: + :type publisher_id: str + :param publisher_name: + :type publisher_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'} + } + + def __init__(self, display_name=None, flags=None, publisher_id=None, publisher_name=None): + super(PublisherFacts, self).__init__() + self.display_name = display_name + self.flags = flags + self.publisher_id = publisher_id + self.publisher_name = publisher_name diff --git a/vsts/vsts/gallery/v4_1/models/publisher_filter_result.py b/vsts/vsts/gallery/v4_1/models/publisher_filter_result.py new file mode 100644 index 00000000..734b014a --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/publisher_filter_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherFilterResult(Model): + """PublisherFilterResult. + + :param publishers: This is the set of appplications that matched the query filter supplied. + :type publishers: list of :class:`Publisher ` + """ + + _attribute_map = { + 'publishers': {'key': 'publishers', 'type': '[Publisher]'} + } + + def __init__(self, publishers=None): + super(PublisherFilterResult, self).__init__() + self.publishers = publishers diff --git a/vsts/vsts/gallery/v4_1/models/publisher_query.py b/vsts/vsts/gallery/v4_1/models/publisher_query.py new file mode 100644 index 00000000..5cef13f1 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/publisher_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherQuery(Model): + """PublisherQuery. + + :param filters: Each filter is a unique query and will have matching set of publishers returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + :type filters: list of :class:`QueryFilter ` + :param flags: The Flags are used to deterine which set of information the caller would like returned for the matched publishers. + :type flags: object + """ + + _attribute_map = { + 'filters': {'key': 'filters', 'type': '[QueryFilter]'}, + 'flags': {'key': 'flags', 'type': 'object'} + } + + def __init__(self, filters=None, flags=None): + super(PublisherQuery, self).__init__() + self.filters = filters + self.flags = flags diff --git a/vsts/vsts/gallery/v4_1/models/publisher_query_result.py b/vsts/vsts/gallery/v4_1/models/publisher_query_result.py new file mode 100644 index 00000000..34f74a80 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/publisher_query_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherQueryResult(Model): + """PublisherQueryResult. + + :param results: For each filter supplied in the query, a filter result will be returned in the query result. + :type results: list of :class:`PublisherFilterResult ` + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[PublisherFilterResult]'} + } + + def __init__(self, results=None): + super(PublisherQueryResult, self).__init__() + self.results = results diff --git a/vsts/vsts/gallery/v4_1/models/qn_aItem.py b/vsts/vsts/gallery/v4_1/models/qn_aItem.py new file mode 100644 index 00000000..f7f5981c --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/qn_aItem.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 QnAItem(Model): + """QnAItem. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'} + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None): + super(QnAItem, self).__init__() + self.created_date = created_date + self.id = id + self.status = status + self.text = text + self.updated_date = updated_date + self.user = user diff --git a/vsts/vsts/gallery/v4_1/models/query_filter.py b/vsts/vsts/gallery/v4_1/models/query_filter.py new file mode 100644 index 00000000..3d560edf --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/query_filter.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 QueryFilter(Model): + """QueryFilter. + + :param criteria: The filter values define the set of values in this query. They are applied based on the QueryFilterType. + :type criteria: list of :class:`FilterCriteria ` + :param direction: The PagingDirection is applied to a paging token if one exists. If not the direction is ignored, and Forward from the start of the resultset is used. Direction should be left out of the request unless a paging token is used to help prevent future issues. + :type direction: object + :param page_number: The page number requested by the user. If not provided 1 is assumed by default. + :type page_number: int + :param page_size: The page size defines the number of results the caller wants for this filter. The count can't exceed the overall query size limits. + :type page_size: int + :param paging_token: The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embeded in the token. + :type paging_token: str + :param sort_by: Defines the type of sorting to be applied on the results. The page slice is cut of the sorted results only. + :type sort_by: int + :param sort_order: Defines the order of sorting, 1 for Ascending, 2 for Descending, else default ordering based on the SortBy value + :type sort_order: int + """ + + _attribute_map = { + 'criteria': {'key': 'criteria', 'type': '[FilterCriteria]'}, + 'direction': {'key': 'direction', 'type': 'object'}, + 'page_number': {'key': 'pageNumber', 'type': 'int'}, + 'page_size': {'key': 'pageSize', 'type': 'int'}, + 'paging_token': {'key': 'pagingToken', 'type': 'str'}, + 'sort_by': {'key': 'sortBy', 'type': 'int'}, + 'sort_order': {'key': 'sortOrder', 'type': 'int'} + } + + def __init__(self, criteria=None, direction=None, page_number=None, page_size=None, paging_token=None, sort_by=None, sort_order=None): + super(QueryFilter, self).__init__() + self.criteria = criteria + self.direction = direction + self.page_number = page_number + self.page_size = page_size + self.paging_token = paging_token + self.sort_by = sort_by + self.sort_order = sort_order diff --git a/vsts/vsts/gallery/v4_1/models/question.py b/vsts/vsts/gallery/v4_1/models/question.py new file mode 100644 index 00000000..d7a43ea5 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/question.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------------------------- +# 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 .qn_aItem import QnAItem + + +class Question(QnAItem): + """Question. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + :param responses: List of answers in for the question / thread + :type responses: list of :class:`Response ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'}, + 'responses': {'key': 'responses', 'type': '[Response]'} + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None, responses=None): + super(Question, self).__init__(created_date=created_date, id=id, status=status, text=text, updated_date=updated_date, user=user) + self.responses = responses diff --git a/vsts/vsts/gallery/v4_1/models/questions_result.py b/vsts/vsts/gallery/v4_1/models/questions_result.py new file mode 100644 index 00000000..edb5fb37 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/questions_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 QuestionsResult(Model): + """QuestionsResult. + + :param has_more_questions: Flag indicating if there are more QnA threads to be shown (for paging) + :type has_more_questions: bool + :param questions: List of the QnA threads + :type questions: list of :class:`Question ` + """ + + _attribute_map = { + 'has_more_questions': {'key': 'hasMoreQuestions', 'type': 'bool'}, + 'questions': {'key': 'questions', 'type': '[Question]'} + } + + def __init__(self, has_more_questions=None, questions=None): + super(QuestionsResult, self).__init__() + self.has_more_questions = has_more_questions + self.questions = questions diff --git a/vsts/vsts/gallery/v4_1/models/rating_count_per_rating.py b/vsts/vsts/gallery/v4_1/models/rating_count_per_rating.py new file mode 100644 index 00000000..4c6b6461 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/rating_count_per_rating.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 RatingCountPerRating(Model): + """RatingCountPerRating. + + :param rating: Rating value + :type rating: number + :param rating_count: Count of total ratings + :type rating_count: long + """ + + _attribute_map = { + 'rating': {'key': 'rating', 'type': 'number'}, + 'rating_count': {'key': 'ratingCount', 'type': 'long'} + } + + def __init__(self, rating=None, rating_count=None): + super(RatingCountPerRating, self).__init__() + self.rating = rating + self.rating_count = rating_count diff --git a/vsts/vsts/gallery/v4_1/models/response.py b/vsts/vsts/gallery/v4_1/models/response.py new file mode 100644 index 00000000..d5535dc1 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/response.py @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------------------------- +# 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 .qn_aItem import QnAItem + + +class Response(QnAItem): + """Response. + + :param created_date: Time when the review was first created + :type created_date: datetime + :param id: Unique identifier of a QnA item + :type id: long + :param status: Get status of item + :type status: object + :param text: Text description of the QnA item + :type text: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user: User details for the item. + :type user: :class:`UserIdentityRef ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'status': {'key': 'status', 'type': 'object'}, + 'text': {'key': 'text', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user': {'key': 'user', 'type': 'UserIdentityRef'}, + } + + def __init__(self, created_date=None, id=None, status=None, text=None, updated_date=None, user=None): + super(Response, self).__init__(created_date=created_date, id=id, status=status, text=text, updated_date=updated_date, user=user) diff --git a/vsts/vsts/gallery/v4_1/models/review.py b/vsts/vsts/gallery/v4_1/models/review.py new file mode 100644 index 00000000..b044c784 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/review.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 Review(Model): + """Review. + + :param admin_reply: Admin Reply, if any, for this review + :type admin_reply: :class:`ReviewReply ` + :param id: Unique identifier of a review item + :type id: long + :param is_deleted: Flag for soft deletion + :type is_deleted: bool + :param is_ignored: + :type is_ignored: bool + :param product_version: Version of the product for which review was submitted + :type product_version: str + :param rating: Rating procided by the user + :type rating: number + :param reply: Reply, if any, for this review + :type reply: :class:`ReviewReply ` + :param text: Text description of the review + :type text: str + :param title: Title of the review + :type title: str + :param updated_date: Time when the review was edited/updated + :type updated_date: datetime + :param user_display_name: Name of the user + :type user_display_name: str + :param user_id: Id of the user who submitted the review + :type user_id: str + """ + + _attribute_map = { + 'admin_reply': {'key': 'adminReply', 'type': 'ReviewReply'}, + 'id': {'key': 'id', 'type': 'long'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'is_ignored': {'key': 'isIgnored', 'type': 'bool'}, + 'product_version': {'key': 'productVersion', 'type': 'str'}, + 'rating': {'key': 'rating', 'type': 'number'}, + 'reply': {'key': 'reply', 'type': 'ReviewReply'}, + 'text': {'key': 'text', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user_display_name': {'key': 'userDisplayName', 'type': 'str'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, admin_reply=None, id=None, is_deleted=None, is_ignored=None, product_version=None, rating=None, reply=None, text=None, title=None, updated_date=None, user_display_name=None, user_id=None): + super(Review, self).__init__() + self.admin_reply = admin_reply + self.id = id + self.is_deleted = is_deleted + self.is_ignored = is_ignored + self.product_version = product_version + self.rating = rating + self.reply = reply + self.text = text + self.title = title + self.updated_date = updated_date + self.user_display_name = user_display_name + self.user_id = user_id diff --git a/vsts/vsts/gallery/v4_1/models/review_patch.py b/vsts/vsts/gallery/v4_1/models/review_patch.py new file mode 100644 index 00000000..3540826e --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/review_patch.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewPatch(Model): + """ReviewPatch. + + :param operation: Denotes the patch operation type + :type operation: object + :param reported_concern: Use when patch operation is FlagReview + :type reported_concern: :class:`UserReportedConcern ` + :param review_item: Use when patch operation is EditReview + :type review_item: :class:`Review ` + """ + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'object'}, + 'reported_concern': {'key': 'reportedConcern', 'type': 'UserReportedConcern'}, + 'review_item': {'key': 'reviewItem', 'type': 'Review'} + } + + def __init__(self, operation=None, reported_concern=None, review_item=None): + super(ReviewPatch, self).__init__() + self.operation = operation + self.reported_concern = reported_concern + self.review_item = review_item diff --git a/vsts/vsts/gallery/v4_1/models/review_reply.py b/vsts/vsts/gallery/v4_1/models/review_reply.py new file mode 100644 index 00000000..bcf4f5a7 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/review_reply.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewReply(Model): + """ReviewReply. + + :param id: Id of the reply + :type id: long + :param is_deleted: Flag for soft deletion + :type is_deleted: bool + :param product_version: Version of the product when the reply was submitted or updated + :type product_version: str + :param reply_text: Content of the reply + :type reply_text: str + :param review_id: Id of the review, to which this reply belongs + :type review_id: long + :param title: Title of the reply + :type title: str + :param updated_date: Date the reply was submitted or updated + :type updated_date: datetime + :param user_id: Id of the user who left the reply + :type user_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'long'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'product_version': {'key': 'productVersion', 'type': 'str'}, + 'reply_text': {'key': 'replyText', 'type': 'str'}, + 'review_id': {'key': 'reviewId', 'type': 'long'}, + 'title': {'key': 'title', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, id=None, is_deleted=None, product_version=None, reply_text=None, review_id=None, title=None, updated_date=None, user_id=None): + super(ReviewReply, self).__init__() + self.id = id + self.is_deleted = is_deleted + self.product_version = product_version + self.reply_text = reply_text + self.review_id = review_id + self.title = title + self.updated_date = updated_date + self.user_id = user_id diff --git a/vsts/vsts/gallery/v4_1/models/review_summary.py b/vsts/vsts/gallery/v4_1/models/review_summary.py new file mode 100644 index 00000000..971d7479 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/review_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewSummary(Model): + """ReviewSummary. + + :param average_rating: Average Rating + :type average_rating: number + :param rating_count: Count of total ratings + :type rating_count: long + :param rating_split: Split of count accross rating + :type rating_split: list of :class:`RatingCountPerRating ` + """ + + _attribute_map = { + 'average_rating': {'key': 'averageRating', 'type': 'number'}, + 'rating_count': {'key': 'ratingCount', 'type': 'long'}, + 'rating_split': {'key': 'ratingSplit', 'type': '[RatingCountPerRating]'} + } + + def __init__(self, average_rating=None, rating_count=None, rating_split=None): + super(ReviewSummary, self).__init__() + self.average_rating = average_rating + self.rating_count = rating_count + self.rating_split = rating_split diff --git a/vsts/vsts/gallery/v4_1/models/reviews_result.py b/vsts/vsts/gallery/v4_1/models/reviews_result.py new file mode 100644 index 00000000..b10b0f76 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/reviews_result.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReviewsResult(Model): + """ReviewsResult. + + :param has_more_reviews: Flag indicating if there are more reviews to be shown (for paging) + :type has_more_reviews: bool + :param reviews: List of reviews + :type reviews: list of :class:`Review ` + :param total_review_count: Count of total review items + :type total_review_count: long + """ + + _attribute_map = { + 'has_more_reviews': {'key': 'hasMoreReviews', 'type': 'bool'}, + 'reviews': {'key': 'reviews', 'type': '[Review]'}, + 'total_review_count': {'key': 'totalReviewCount', 'type': 'long'} + } + + def __init__(self, has_more_reviews=None, reviews=None, total_review_count=None): + super(ReviewsResult, self).__init__() + self.has_more_reviews = has_more_reviews + self.reviews = reviews + self.total_review_count = total_review_count diff --git a/vsts/vsts/gallery/v4_1/models/unpackaged_extension_data.py b/vsts/vsts/gallery/v4_1/models/unpackaged_extension_data.py new file mode 100644 index 00000000..df42d073 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/unpackaged_extension_data.py @@ -0,0 +1,85 @@ +# -------------------------------------------------------------------------------------------- +# 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 UnpackagedExtensionData(Model): + """UnpackagedExtensionData. + + :param categories: + :type categories: list of str + :param description: + :type description: str + :param display_name: + :type display_name: str + :param draft_id: + :type draft_id: str + :param extension_name: + :type extension_name: str + :param installation_targets: + :type installation_targets: list of :class:`InstallationTarget ` + :param is_converted_to_markdown: + :type is_converted_to_markdown: bool + :param pricing_category: + :type pricing_category: str + :param product: + :type product: str + :param publisher_name: + :type publisher_name: str + :param qn_aEnabled: + :type qn_aEnabled: bool + :param referral_url: + :type referral_url: str + :param repository_url: + :type repository_url: str + :param tags: + :type tags: list of str + :param version: + :type version: str + :param vsix_id: + :type vsix_id: str + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'draft_id': {'key': 'draftId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'installation_targets': {'key': 'installationTargets', 'type': '[InstallationTarget]'}, + 'is_converted_to_markdown': {'key': 'isConvertedToMarkdown', 'type': 'bool'}, + 'pricing_category': {'key': 'pricingCategory', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'publisher_name': {'key': 'publisherName', 'type': 'str'}, + 'qn_aEnabled': {'key': 'qnAEnabled', 'type': 'bool'}, + 'referral_url': {'key': 'referralUrl', 'type': 'str'}, + 'repository_url': {'key': 'repositoryUrl', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'version': {'key': 'version', 'type': 'str'}, + 'vsix_id': {'key': 'vsixId', 'type': 'str'} + } + + def __init__(self, categories=None, description=None, display_name=None, draft_id=None, extension_name=None, installation_targets=None, is_converted_to_markdown=None, pricing_category=None, product=None, publisher_name=None, qn_aEnabled=None, referral_url=None, repository_url=None, tags=None, version=None, vsix_id=None): + super(UnpackagedExtensionData, self).__init__() + self.categories = categories + self.description = description + self.display_name = display_name + self.draft_id = draft_id + self.extension_name = extension_name + self.installation_targets = installation_targets + self.is_converted_to_markdown = is_converted_to_markdown + self.pricing_category = pricing_category + self.product = product + self.publisher_name = publisher_name + self.qn_aEnabled = qn_aEnabled + self.referral_url = referral_url + self.repository_url = repository_url + self.tags = tags + self.version = version + self.vsix_id = vsix_id diff --git a/vsts/vsts/gallery/v4_1/models/user_identity_ref.py b/vsts/vsts/gallery/v4_1/models/user_identity_ref.py new file mode 100644 index 00000000..d70a734d --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/user_identity_ref.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 UserIdentityRef(Model): + """UserIdentityRef. + + :param display_name: User display name + :type display_name: str + :param id: User VSID + :type id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, display_name=None, id=None): + super(UserIdentityRef, self).__init__() + self.display_name = display_name + self.id = id diff --git a/vsts/vsts/gallery/v4_1/models/user_reported_concern.py b/vsts/vsts/gallery/v4_1/models/user_reported_concern.py new file mode 100644 index 00000000..739c0b76 --- /dev/null +++ b/vsts/vsts/gallery/v4_1/models/user_reported_concern.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 UserReportedConcern(Model): + """UserReportedConcern. + + :param category: Category of the concern + :type category: object + :param concern_text: User comment associated with the report + :type concern_text: str + :param review_id: Id of the review which was reported + :type review_id: long + :param submitted_date: Date the report was submitted + :type submitted_date: datetime + :param user_id: Id of the user who reported a review + :type user_id: str + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'object'}, + 'concern_text': {'key': 'concernText', 'type': 'str'}, + 'review_id': {'key': 'reviewId', 'type': 'long'}, + 'submitted_date': {'key': 'submittedDate', 'type': 'iso-8601'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, category=None, concern_text=None, review_id=None, submitted_date=None, user_id=None): + super(UserReportedConcern, self).__init__() + self.category = category + self.concern_text = concern_text + self.review_id = review_id + self.submitted_date = submitted_date + self.user_id = user_id diff --git a/vsts/vsts/git/v4_0/git_client.py b/vsts/vsts/git/v4_0/git_client.py index 57d0e0a7..7297d096 100644 --- a/vsts/vsts/git/v4_0/git_client.py +++ b/vsts/vsts/git/v4_0/git_client.py @@ -18,7 +18,7 @@ class GitClient(GitClientBase): """ def __init__(self, base_url=None, creds=None): - GitClientBase.__init__(self, base_url, creds) + super(GitClient, self).__init__(base_url, creds) def get_vsts_info(self, relative_remote_url): request = ClientRequest() diff --git a/vsts/vsts/git/v4_0/git_client_base.py b/vsts/vsts/git/v4_0/git_client_base.py index ad4c3bad..9a3e63ad 100644 --- a/vsts/vsts/git/v4_0/git_client_base.py +++ b/vsts/vsts/git/v4_0/git_client_base.py @@ -18,7 +18,7 @@ class GitClientBase(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(GitClientBase, 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) @@ -783,7 +783,7 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion :param str path: :param str project: Project ID or project name :param str scope_path: - :param VersionControlRecursionType recursion_level: + :param str recursion_level: :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: @@ -801,7 +801,7 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -829,7 +829,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r :param str path: :param str project: Project ID or project name :param str scope_path: - :param VersionControlRecursionType recursion_level: + :param str recursion_level: :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: @@ -847,7 +847,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -874,7 +874,7 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve :param str repository_id: :param str project: Project ID or project name :param str scope_path: - :param VersionControlRecursionType recursion_level: + :param str recursion_level: :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: @@ -891,7 +891,7 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -922,7 +922,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu :param str path: :param str project: Project ID or project name :param str scope_path: - :param VersionControlRecursionType recursion_level: + :param str recursion_level: :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: @@ -940,7 +940,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -968,7 +968,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur :param str path: :param str project: Project ID or project name :param str scope_path: - :param VersionControlRecursionType recursion_level: + :param str recursion_level: :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: @@ -986,7 +986,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: diff --git a/vsts/vsts/git/v4_0/models/__init__.py b/vsts/vsts/git/v4_0/models/__init__.py index 1c26a7c2..e1173eb2 100644 --- a/vsts/vsts/git/v4_0/models/__init__.py +++ b/vsts/vsts/git/v4_0/models/__init__.py @@ -90,6 +90,7 @@ from .identity_ref import IdentityRef from .identity_ref_with_vote import IdentityRefWithVote from .import_repository_validation import ImportRepositoryValidation +from .item_content import ItemContent from .item_model import ItemModel from .reference_links import ReferenceLinks from .resource_ref import ResourceRef @@ -186,6 +187,7 @@ 'IdentityRef', 'IdentityRefWithVote', 'ImportRepositoryValidation', + 'ItemContent', 'ItemModel', 'ReferenceLinks', 'ResourceRef', diff --git a/vsts/vsts/git/v4_0/models/git_repository.py b/vsts/vsts/git/v4_0/models/git_repository.py index ba0da3b5..8c2ce70c 100644 --- a/vsts/vsts/git/v4_0/models/git_repository.py +++ b/vsts/vsts/git/v4_0/models/git_repository.py @@ -14,14 +14,8 @@ class GitRepository(Model): :param _links: :type _links: :class:`ReferenceLinks ` - :param created_by_forking: True if the repository was created as a fork - :type created_by_forking: bool :param default_branch: :type default_branch: str - :param fork_options: If set, options for creating this repo as a fork of another one. If unset, this repo is unrelated to any existing forks. - :type fork_options: :class:`GitForkSyncRequestParameters ` - :param fork_parent: Only set when querying repositories. If set, the "parent" fork of this repository. - :type fork_parent: :class:`GlobalGitRepositoryKey ` :param id: :type id: str :param is_fork: True if the repository was created as a fork @@ -42,10 +36,7 @@ class GitRepository(Model): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, - 'created_by_forking': {'key': 'createdByForking', 'type': 'bool'}, 'default_branch': {'key': 'defaultBranch', 'type': 'str'}, - 'fork_options': {'key': 'forkOptions', 'type': 'GitForkSyncRequestParameters'}, - 'fork_parent': {'key': 'forkParent', 'type': 'GlobalGitRepositoryKey'}, 'id': {'key': 'id', 'type': 'str'}, 'is_fork': {'key': 'isFork', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, @@ -56,13 +47,10 @@ class GitRepository(Model): 'valid_remote_urls': {'key': 'validRemoteUrls', 'type': '[str]'} } - def __init__(self, _links=None, created_by_forking=None, default_branch=None, fork_options=None, fork_parent=None, id=None, is_fork=None, name=None, parent_repository=None, project=None, remote_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, url=None, valid_remote_urls=None): super(GitRepository, self).__init__() self._links = _links - self.created_by_forking = created_by_forking self.default_branch = default_branch - self.fork_options = fork_options - self.fork_parent = fork_parent self.id = id self.is_fork = is_fork self.name = name diff --git a/vsts/vsts/git/v4_0/models/git_repository_create_options.py b/vsts/vsts/git/v4_0/models/git_repository_create_options.py index d27f3971..13db6bdf 100644 --- a/vsts/vsts/git/v4_0/models/git_repository_create_options.py +++ b/vsts/vsts/git/v4_0/models/git_repository_create_options.py @@ -12,8 +12,6 @@ class GitRepositoryCreateOptions(Model): """GitRepositoryCreateOptions. - :param fork_options: If set, options for creating this repo as a fork of another one. If unset, this repo is unrelated to any existing forks. - :type fork_options: :class:`GitForkSyncRequestParameters ` :param name: :type name: str :param parent_repository: @@ -23,15 +21,13 @@ class GitRepositoryCreateOptions(Model): """ _attribute_map = { - 'fork_options': {'key': 'forkOptions', 'type': 'GitForkSyncRequestParameters'}, 'name': {'key': 'name', 'type': 'str'}, 'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'}, 'project': {'key': 'project', 'type': 'TeamProjectReference'} } - def __init__(self, fork_options=None, name=None, parent_repository=None, project=None): + def __init__(self, name=None, parent_repository=None, project=None): super(GitRepositoryCreateOptions, self).__init__() - self.fork_options = fork_options self.name = name self.parent_repository = parent_repository self.project = project diff --git a/vsts/vsts/git/v4_0/models/item_content.py b/vsts/vsts/git/v4_0/models/item_content.py new file mode 100644 index 00000000..f5cfaef1 --- /dev/null +++ b/vsts/vsts/git/v4_0/models/item_content.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ItemContent(Model): + """ItemContent. + + :param content: + :type content: str + :param content_type: + :type content_type: object + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'object'} + } + + def __init__(self, content=None, content_type=None): + super(ItemContent, self).__init__() + self.content = content + self.content_type = content_type diff --git a/vsts/vsts/git/v4_1/git_client_base.py b/vsts/vsts/git/v4_1/git_client_base.py index bdec765b..ab401152 100644 --- a/vsts/vsts/git/v4_1/git_client_base.py +++ b/vsts/vsts/git/v4_1/git_client_base.py @@ -18,7 +18,7 @@ class GitClientBase(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(GitClientBase, 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) @@ -71,7 +71,7 @@ def get_blob(self, repository_id, sha1, project=None, download=None, file_name=N """GetBlob. [Preview API] Get a single blob. :param str repository_id: The name or ID of the repository. - :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the “Git/Items/Get Item” endpoint. + :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. :param str project: Project ID or project name :param bool download: If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip :param str file_name: Provide a fileName to use for a download. @@ -100,7 +100,7 @@ def get_blob_content(self, repository_id, sha1, project=None, download=None, fil """GetBlobContent. [Preview API] Get a single blob. :param str repository_id: The name or ID of the repository. - :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the “Git/Items/Get Item” endpoint. + :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. :param str project: Project ID or project name :param bool download: If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip :param str file_name: Provide a fileName to use for a download. @@ -155,7 +155,7 @@ def get_blob_zip(self, repository_id, sha1, project=None, download=None, file_na """GetBlobZip. [Preview API] Get a single blob. :param str repository_id: The name or ID of the repository. - :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the “Git/Items/Get Item” endpoint. + :param str sha1: SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. :param str project: Project ID or project name :param bool download: If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip :param str file_name: Provide a fileName to use for a download. @@ -754,18 +754,19 @@ def update_import_request(self, import_request_to_update, project, repository_id content=content) return self._deserialize('GitImportRequest', response) - def get_item(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): + def get_item(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None): """GetItem. [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name :param str scope_path: The path scope. The default is null. - :param VersionControlRecursionType recursion_level: The recursion level of this request. The default is 'none', no recursion. + :param str recursion_level: The recursion level of this request. The default is 'none', no recursion. :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. :rtype: :class:` ` """ route_values = {} @@ -779,7 +780,7 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -793,6 +794,8 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion query_parameters['versionDescriptor.Version'] = version_descriptor.version if version_descriptor.version_options is not None: query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', version='4.1-preview.1', @@ -800,18 +803,19 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion query_parameters=query_parameters) return self._deserialize('GitItem', response) - def get_item_content(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): + def get_item_content(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None): """GetItemContent. [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name :param str scope_path: The path scope. The default is null. - :param VersionControlRecursionType recursion_level: The recursion level of this request. The default is 'none', no recursion. + :param str recursion_level: The recursion level of this request. The default is 'none', no recursion. :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. :rtype: object """ route_values = {} @@ -825,7 +829,7 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -839,6 +843,8 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r query_parameters['versionDescriptor.Version'] = version_descriptor.version if version_descriptor.version_options is not None: query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', version='4.1-preview.1', @@ -852,7 +858,7 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve :param str repository_id: The Id of the repository. :param str project: Project ID or project name :param str scope_path: The path scope. The default is null. - :param VersionControlRecursionType recursion_level: The recursion level of this request. The default is 'none', no recursion. + :param str recursion_level: The recursion level of this request. The default is 'none', no recursion. :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. @@ -869,7 +875,7 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -893,18 +899,19 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve returns_collection=True) return self._deserialize('[GitItem]', response) - def get_item_text(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): + def get_item_text(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None): """GetItemText. [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name :param str scope_path: The path scope. The default is null. - :param VersionControlRecursionType recursion_level: The recursion level of this request. The default is 'none', no recursion. + :param str recursion_level: The recursion level of this request. The default is 'none', no recursion. :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. :rtype: object """ route_values = {} @@ -918,7 +925,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -932,6 +939,8 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu query_parameters['versionDescriptor.Version'] = version_descriptor.version if version_descriptor.version_options is not None: query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', version='4.1-preview.1', @@ -939,18 +948,19 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu query_parameters=query_parameters) return self._deserialize('object', response) - def get_item_zip(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): + def get_item_zip(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None, include_content=None): """GetItemZip. [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name :param str scope_path: The path scope. The default is null. - :param VersionControlRecursionType recursion_level: The recursion level of this request. The default is 'none', no recursion. + :param str recursion_level: The recursion level of this request. The default is 'none', no recursion. :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. :rtype: object """ route_values = {} @@ -964,7 +974,7 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') if recursion_level is not None: - query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'VersionControlRecursionType') + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') if include_content_metadata is not None: query_parameters['includeContentMetadata'] = self._serialize.query('include_content_metadata', include_content_metadata, 'bool') if latest_processed_change is not None: @@ -978,6 +988,8 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur query_parameters['versionDescriptor.Version'] = version_descriptor.version if version_descriptor.version_options is not None: query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') response = self._send(http_method='GET', location_id='fb93c0db-47ed-4a31-8c20-47552878fb44', version='4.1-preview.1', @@ -2402,13 +2414,13 @@ def update_thread(self, comment_thread, repository_id, pull_request_id, thread_i content=content) return self._deserialize('GitPullRequestCommentThread', response) - def get_pull_request_work_items(self, repository_id, pull_request_id, project=None): - """GetPullRequestWorkItems. + def get_pull_request_work_item_refs(self, repository_id, pull_request_id, project=None): + """GetPullRequestWorkItemRefs. [Preview API] Retrieve a list of work items associated with a pull request. :param str repository_id: ID or name of the repository. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: [AssociatedWorkItem] + :rtype: [ResourceRef] """ route_values = {} if project is not None: @@ -2422,7 +2434,7 @@ def get_pull_request_work_items(self, repository_id, pull_request_id, project=No version='4.1-preview.1', route_values=route_values, returns_collection=True) - return self._deserialize('[AssociatedWorkItem]', response) + return self._deserialize('[ResourceRef]', response) def create_push(self, push, repository_id, project=None): """CreatePush. @@ -2515,6 +2527,59 @@ def get_pushes(self, repository_id, project=None, skip=None, top=None, search_cr returns_collection=True) return self._deserialize('[GitPush]', response) + def delete_repository_from_recycle_bin(self, project, repository_id): + """DeleteRepositoryFromRecycleBin. + [Preview API] Destroy (hard delete) a soft-deleted Git repository. + :param str project: Project ID or project name + :param str repository_id: The ID of the repository. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + self._send(http_method='DELETE', + location_id='a663da97-81db-4eb3-8b83-287670f63073', + version='4.1-preview.1', + route_values=route_values) + + def get_recycle_bin_repositories(self, project): + """GetRecycleBinRepositories. + [Preview API] Retrieve soft-deleted git repositories from the recycle bin. + :param str project: Project ID or project name + :rtype: [GitDeletedRepository] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='a663da97-81db-4eb3-8b83-287670f63073', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[GitDeletedRepository]', response) + + def restore_repository_from_recycle_bin(self, repository_details, project, repository_id): + """RestoreRepositoryFromRecycleBin. + [Preview API] Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable. + :param :class:` ` repository_details: + :param str project: Project ID or project name + :param str repository_id: The ID of the repository. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + content = self._serialize.body(repository_details, 'GitRecycleBinRepositoryDetails') + response = self._send(http_method='PATCH', + location_id='a663da97-81db-4eb3-8b83-287670f63073', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('GitRepository', response) + def get_refs(self, repository_id, project=None, filter=None, include_links=None, latest_statuses_only=None): """GetRefs. [Preview API] Queries the provided repository for its refs and returns them. diff --git a/vsts/vsts/git/v4_1/models/__init__.py b/vsts/vsts/git/v4_1/models/__init__.py index 4ec1fdab..8bfc5b18 100644 --- a/vsts/vsts/git/v4_1/models/__init__.py +++ b/vsts/vsts/git/v4_1/models/__init__.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from .associated_work_item import AssociatedWorkItem from .attachment import Attachment from .change import Change from .change_count_dictionary import ChangeCountDictionary @@ -66,6 +65,7 @@ from .git_push_search_criteria import GitPushSearchCriteria from .git_query_branch_stats_criteria import GitQueryBranchStatsCriteria from .git_query_commits_criteria import GitQueryCommitsCriteria +from .git_recycle_bin_repository_details import GitRecycleBinRepositoryDetails from .git_ref import GitRef from .git_ref_favorite import GitRefFavorite from .git_ref_update import GitRefUpdate @@ -88,9 +88,11 @@ from .git_user_date import GitUserDate from .git_version_descriptor import GitVersionDescriptor from .global_git_repository_key import GlobalGitRepositoryKey +from .graph_subject_base import GraphSubjectBase from .identity_ref import IdentityRef from .identity_ref_with_vote import IdentityRefWithVote from .import_repository_validation import ImportRepositoryValidation +from .item_content import ItemContent from .item_model import ItemModel from .json_patch_operation import JsonPatchOperation from .reference_links import ReferenceLinks @@ -104,7 +106,6 @@ from .web_api_tag_definition import WebApiTagDefinition __all__ = [ - 'AssociatedWorkItem', 'Attachment', 'Change', 'ChangeCountDictionary', @@ -164,6 +165,7 @@ 'GitPushSearchCriteria', 'GitQueryBranchStatsCriteria', 'GitQueryCommitsCriteria', + 'GitRecycleBinRepositoryDetails', 'GitRef', 'GitRefFavorite', 'GitRefUpdate', @@ -186,9 +188,11 @@ 'GitUserDate', 'GitVersionDescriptor', 'GlobalGitRepositoryKey', + 'GraphSubjectBase', 'IdentityRef', 'IdentityRefWithVote', 'ImportRepositoryValidation', + 'ItemContent', 'ItemModel', 'JsonPatchOperation', 'ReferenceLinks', diff --git a/vsts/vsts/git/v4_1/models/git_fork_ref.py b/vsts/vsts/git/v4_1/models/git_fork_ref.py index 46f8ab5f..b5f8b9f0 100644 --- a/vsts/vsts/git/v4_1/models/git_fork_ref.py +++ b/vsts/vsts/git/v4_1/models/git_fork_ref.py @@ -14,6 +14,8 @@ class GitForkRef(GitRef): :param _links: :type _links: :class:`ReferenceLinks ` + :param creator: + :type creator: :class:`IdentityRef ` :param is_locked: :type is_locked: bool :param is_locked_by: @@ -34,6 +36,7 @@ class GitForkRef(GitRef): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'creator': {'key': 'creator', 'type': 'IdentityRef'}, 'is_locked': {'key': 'isLocked', 'type': 'bool'}, 'is_locked_by': {'key': 'isLockedBy', 'type': 'IdentityRef'}, 'name': {'key': 'name', 'type': 'str'}, @@ -44,6 +47,6 @@ class GitForkRef(GitRef): 'repository': {'key': 'repository', 'type': 'GitRepository'} } - def __init__(self, _links=None, is_locked=None, is_locked_by=None, name=None, object_id=None, peeled_object_id=None, statuses=None, url=None, repository=None): - super(GitForkRef, self).__init__(_links=_links, is_locked=is_locked, is_locked_by=is_locked_by, name=name, object_id=object_id, peeled_object_id=peeled_object_id, statuses=statuses, url=url) + def __init__(self, _links=None, creator=None, is_locked=None, is_locked_by=None, name=None, object_id=None, peeled_object_id=None, statuses=None, url=None, repository=None): + super(GitForkRef, self).__init__(_links=_links, creator=creator, is_locked=is_locked, is_locked_by=is_locked_by, name=name, object_id=object_id, peeled_object_id=peeled_object_id, statuses=statuses, url=url) self.repository = repository diff --git a/vsts/vsts/git/v4_1/models/git_item.py b/vsts/vsts/git/v4_1/models/git_item.py index 0980208b..8b5dd309 100644 --- a/vsts/vsts/git/v4_1/models/git_item.py +++ b/vsts/vsts/git/v4_1/models/git_item.py @@ -14,6 +14,8 @@ class GitItem(ItemModel): :param _links: :type _links: :class:`ReferenceLinks ` + :param content: + :type content: str :param content_metadata: :type content_metadata: :class:`FileContentMetadata ` :param is_folder: @@ -38,6 +40,7 @@ class GitItem(ItemModel): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'content': {'key': 'content', 'type': 'str'}, 'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'}, 'is_folder': {'key': 'isFolder', 'type': 'bool'}, 'is_sym_link': {'key': 'isSymLink', 'type': 'bool'}, @@ -50,8 +53,8 @@ class GitItem(ItemModel): 'original_object_id': {'key': 'originalObjectId', 'type': 'str'} } - def __init__(self, _links=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None, commit_id=None, git_object_type=None, latest_processed_change=None, object_id=None, original_object_id=None): - super(GitItem, self).__init__(_links=_links, content_metadata=content_metadata, is_folder=is_folder, is_sym_link=is_sym_link, path=path, url=url) + def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None, commit_id=None, git_object_type=None, latest_processed_change=None, object_id=None, original_object_id=None): + super(GitItem, self).__init__(_links=_links, content=content, content_metadata=content_metadata, is_folder=is_folder, is_sym_link=is_sym_link, path=path, url=url) self.commit_id = commit_id self.git_object_type = git_object_type self.latest_processed_change = latest_processed_change diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_completion_options.py b/vsts/vsts/git/v4_1/models/git_pull_request_completion_options.py index d0439970..6c16e9d4 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_completion_options.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_completion_options.py @@ -24,6 +24,8 @@ class GitPullRequestCompletionOptions(Model): :type squash_merge: bool :param transition_work_items: If true, we will attempt to transition any work items linked to the pull request into the next logical state (i.e. Active -> Resolved) :type transition_work_items: bool + :param triggered_by_auto_complete: If true, the current completion attempt was triggered via auto-complete. Used internally. + :type triggered_by_auto_complete: bool """ _attribute_map = { @@ -32,10 +34,11 @@ class GitPullRequestCompletionOptions(Model): 'delete_source_branch': {'key': 'deleteSourceBranch', 'type': 'bool'}, 'merge_commit_message': {'key': 'mergeCommitMessage', 'type': 'str'}, 'squash_merge': {'key': 'squashMerge', 'type': 'bool'}, - 'transition_work_items': {'key': 'transitionWorkItems', 'type': 'bool'} + 'transition_work_items': {'key': 'transitionWorkItems', 'type': 'bool'}, + 'triggered_by_auto_complete': {'key': 'triggeredByAutoComplete', 'type': 'bool'} } - def __init__(self, bypass_policy=None, bypass_reason=None, delete_source_branch=None, merge_commit_message=None, squash_merge=None, transition_work_items=None): + def __init__(self, bypass_policy=None, bypass_reason=None, delete_source_branch=None, merge_commit_message=None, squash_merge=None, transition_work_items=None, triggered_by_auto_complete=None): super(GitPullRequestCompletionOptions, self).__init__() self.bypass_policy = bypass_policy self.bypass_reason = bypass_reason @@ -43,3 +46,4 @@ def __init__(self, bypass_policy=None, bypass_reason=None, delete_source_branch= self.merge_commit_message = merge_commit_message self.squash_merge = squash_merge self.transition_work_items = transition_work_items + self.triggered_by_auto_complete = triggered_by_auto_complete diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_merge_options.py b/vsts/vsts/git/v4_1/models/git_pull_request_merge_options.py index 0dff7101..f2a86044 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_merge_options.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_merge_options.py @@ -12,14 +12,18 @@ class GitPullRequestMergeOptions(Model): """GitPullRequestMergeOptions. + :param detect_rename_false_positives: + :type detect_rename_false_positives: bool :param disable_renames: If true, rename detection will not be performed during the merge. :type disable_renames: bool """ _attribute_map = { + 'detect_rename_false_positives': {'key': 'detectRenameFalsePositives', 'type': 'bool'}, 'disable_renames': {'key': 'disableRenames', 'type': 'bool'} } - def __init__(self, disable_renames=None): + def __init__(self, detect_rename_false_positives=None, disable_renames=None): super(GitPullRequestMergeOptions, self).__init__() + self.detect_rename_false_positives = detect_rename_false_positives self.disable_renames = disable_renames diff --git a/vsts/vsts/git/v4_1/models/git_ref.py b/vsts/vsts/git/v4_1/models/git_ref.py index b549bebc..3da3c2ec 100644 --- a/vsts/vsts/git/v4_1/models/git_ref.py +++ b/vsts/vsts/git/v4_1/models/git_ref.py @@ -14,6 +14,8 @@ class GitRef(Model): :param _links: :type _links: :class:`ReferenceLinks ` + :param creator: + :type creator: :class:`IdentityRef ` :param is_locked: :type is_locked: bool :param is_locked_by: @@ -32,6 +34,7 @@ class GitRef(Model): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'creator': {'key': 'creator', 'type': 'IdentityRef'}, 'is_locked': {'key': 'isLocked', 'type': 'bool'}, 'is_locked_by': {'key': 'isLockedBy', 'type': 'IdentityRef'}, 'name': {'key': 'name', 'type': 'str'}, @@ -41,9 +44,10 @@ class GitRef(Model): 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, _links=None, is_locked=None, is_locked_by=None, name=None, object_id=None, peeled_object_id=None, statuses=None, url=None): + def __init__(self, _links=None, creator=None, is_locked=None, is_locked_by=None, name=None, object_id=None, peeled_object_id=None, statuses=None, url=None): super(GitRef, self).__init__() self._links = _links + self.creator = creator self.is_locked = is_locked self.is_locked_by = is_locked_by self.name = name diff --git a/vsts/vsts/git/v4_1/models/identity_ref.py b/vsts/vsts/git/v4_1/models/identity_ref.py index 40c776c5..c4c35ad5 100644 --- a/vsts/vsts/git/v4_1/models/identity_ref.py +++ b/vsts/vsts/git/v4_1/models/identity_ref.py @@ -6,16 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .graph_subject_base import GraphSubjectBase -class IdentityRef(Model): +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: :type directory_alias: str - :param display_name: - :type display_name: str :param id: :type id: str :param image_url: @@ -30,27 +36,26 @@ class IdentityRef(Model): :type profile_url: str :param unique_name: :type unique_name: str - :param url: - :type url: str """ _attribute_map = { - 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + '_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'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} + 'unique_name': {'key': 'uniqueName', 'type': 'str'} } - def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): - super(IdentityRef, self).__init__() + 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, 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.display_name = display_name self.id = id self.image_url = image_url self.inactive = inactive @@ -58,4 +63,3 @@ def __init__(self, directory_alias=None, display_name=None, id=None, image_url=N self.is_container = is_container self.profile_url = profile_url self.unique_name = unique_name - self.url = url diff --git a/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py b/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py index 2830b26b..30be999e 100644 --- a/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py +++ b/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py @@ -12,10 +12,16 @@ class IdentityRefWithVote(IdentityRef): """IdentityRefWithVote. + :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: :type directory_alias: str - :param display_name: - :type display_name: str :param id: :type id: str :param image_url: @@ -30,8 +36,6 @@ class IdentityRefWithVote(IdentityRef): :type profile_url: str :param unique_name: :type unique_name: str - :param url: - :type url: str :param is_required: Indicates if this is a required reviewer for this pull request.
Branches can have policies that require particular reviewers are required for pull requests. :type is_required: bool :param reviewer_url: URL to retrieve information about this identity @@ -43,8 +47,11 @@ class IdentityRefWithVote(IdentityRef): """ _attribute_map = { - 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + '_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'}, @@ -52,15 +59,14 @@ class IdentityRefWithVote(IdentityRef): 'is_container': {'key': 'isContainer', 'type': 'bool'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, 'is_required': {'key': 'isRequired', 'type': 'bool'}, 'reviewer_url': {'key': 'reviewerUrl', 'type': 'str'}, 'vote': {'key': 'vote', 'type': 'int'}, 'voted_for': {'key': 'votedFor', 'type': '[IdentityRefWithVote]'} } - def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None, is_required=None, reviewer_url=None, vote=None, voted_for=None): - super(IdentityRefWithVote, self).__init__(directory_alias=directory_alias, display_name=display_name, id=id, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, profile_url=profile_url, unique_name=unique_name, url=url) + 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, profile_url=None, unique_name=None, is_required=None, reviewer_url=None, vote=None, voted_for=None): + super(IdentityRefWithVote, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, directory_alias=directory_alias, id=id, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, profile_url=profile_url, unique_name=unique_name) self.is_required = is_required self.reviewer_url = reviewer_url self.vote = vote diff --git a/vsts/vsts/git/v4_1/models/item_content.py b/vsts/vsts/git/v4_1/models/item_content.py new file mode 100644 index 00000000..f5cfaef1 --- /dev/null +++ b/vsts/vsts/git/v4_1/models/item_content.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ItemContent(Model): + """ItemContent. + + :param content: + :type content: str + :param content_type: + :type content_type: object + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'object'} + } + + def __init__(self, content=None, content_type=None): + super(ItemContent, self).__init__() + self.content = content + self.content_type = content_type diff --git a/vsts/vsts/git/v4_1/models/item_model.py b/vsts/vsts/git/v4_1/models/item_model.py index 2bc23b37..f77a2638 100644 --- a/vsts/vsts/git/v4_1/models/item_model.py +++ b/vsts/vsts/git/v4_1/models/item_model.py @@ -14,6 +14,8 @@ class ItemModel(Model): :param _links: :type _links: :class:`ReferenceLinks ` + :param content: + :type content: str :param content_metadata: :type content_metadata: :class:`FileContentMetadata ` :param is_folder: @@ -28,6 +30,7 @@ class ItemModel(Model): _attribute_map = { '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'content': {'key': 'content', 'type': 'str'}, 'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'}, 'is_folder': {'key': 'isFolder', 'type': 'bool'}, 'is_sym_link': {'key': 'isSymLink', 'type': 'bool'}, @@ -35,9 +38,10 @@ class ItemModel(Model): 'url': {'key': 'url', 'type': 'str'} } - def __init__(self, _links=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None): + def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None): super(ItemModel, self).__init__() self._links = _links + self.content = content self.content_metadata = content_metadata self.is_folder = is_folder self.is_sym_link = is_sym_link diff --git a/vsts/vsts/identity/v4_0/identity_client.py b/vsts/vsts/identity/v4_0/identity_client.py index 4e365fdf..1a4ff65a 100644 --- a/vsts/vsts/identity/v4_0/identity_client.py +++ b/vsts/vsts/identity/v4_0/identity_client.py @@ -18,12 +18,12 @@ class IdentityClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(IdentityClient, 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 = '8A3D49B8-91F0-46EF-B33D-DDA338C25DB3' + resource_area_identifier = '8a3d49b8-91f0-46ef-b33d-dda338c25db3' def create_or_bind_with_claims(self, source_identity): """CreateOrBindWithClaims. @@ -148,10 +148,10 @@ def read_identities(self, descriptors=None, identity_ids=None, search_filter=Non :param str identity_ids: :param str search_filter: :param str filter_value: - :param QueryMembership query_membership: + :param str query_membership: :param str properties: :param bool include_restricted_visibility: - :param ReadIdentitiesOptions options: + :param str options: :rtype: [Identity] """ query_parameters = {} @@ -164,13 +164,13 @@ def read_identities(self, descriptors=None, identity_ids=None, search_filter=Non if filter_value is not None: query_parameters['filterValue'] = self._serialize.query('filter_value', filter_value, 'str') if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') if properties is not None: query_parameters['properties'] = self._serialize.query('properties', properties, 'str') if include_restricted_visibility is not None: query_parameters['includeRestrictedVisibility'] = self._serialize.query('include_restricted_visibility', include_restricted_visibility, 'bool') if options is not None: - query_parameters['options'] = self._serialize.query('options', options, 'ReadIdentitiesOptions') + query_parameters['options'] = self._serialize.query('options', options, 'str') response = self._send(http_method='GET', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', version='4.0', @@ -181,7 +181,7 @@ def read_identities(self, descriptors=None, identity_ids=None, search_filter=Non def read_identities_by_scope(self, scope_id, query_membership=None, properties=None): """ReadIdentitiesByScope. :param str scope_id: - :param QueryMembership query_membership: + :param str query_membership: :param str properties: :rtype: [Identity] """ @@ -189,7 +189,7 @@ def read_identities_by_scope(self, scope_id, query_membership=None, properties=N if scope_id is not None: query_parameters['scopeId'] = self._serialize.query('scope_id', scope_id, 'str') if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') if properties is not None: query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', @@ -202,7 +202,7 @@ def read_identities_by_scope(self, scope_id, query_membership=None, properties=N def read_identity(self, identity_id, query_membership=None, properties=None): """ReadIdentity. :param str identity_id: - :param QueryMembership query_membership: + :param str query_membership: :param str properties: :rtype: :class:` ` """ @@ -211,7 +211,7 @@ def read_identity(self, identity_id, query_membership=None, properties=None): route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') if properties is not None: query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', @@ -333,7 +333,7 @@ def read_member(self, container_id, member_id, query_membership=None): [Preview API] :param str container_id: :param str member_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: :class:` ` """ route_values = {} @@ -343,7 +343,7 @@ def read_member(self, container_id, member_id, query_membership=None): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.0-preview.1', @@ -355,7 +355,7 @@ def read_members(self, container_id, query_membership=None): """ReadMembers. [Preview API] :param str container_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: [str] """ route_values = {} @@ -363,7 +363,7 @@ def read_members(self, container_id, query_membership=None): route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.0-preview.1', @@ -395,7 +395,7 @@ def read_member_of(self, member_id, container_id, query_membership=None): [Preview API] :param str member_id: :param str container_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: :class:` ` """ route_values = {} @@ -405,7 +405,7 @@ def read_member_of(self, member_id, container_id, query_membership=None): route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0', version='4.0-preview.1', @@ -417,7 +417,7 @@ def read_members_of(self, member_id, query_membership=None): """ReadMembersOf. [Preview API] :param str member_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: [str] """ route_values = {} @@ -425,7 +425,7 @@ def read_members_of(self, member_id, query_membership=None): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0', version='4.0-preview.1', diff --git a/vsts/vsts/identity/v4_1/identity_client.py b/vsts/vsts/identity/v4_1/identity_client.py index 27513abb..95ae9f06 100644 --- a/vsts/vsts/identity/v4_1/identity_client.py +++ b/vsts/vsts/identity/v4_1/identity_client.py @@ -18,12 +18,12 @@ class IdentityClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(IdentityClient, 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 = '8A3D49B8-91F0-46EF-B33D-DDA338C25DB3' + resource_area_identifier = '8a3d49b8-91f0-46ef-b33d-dda338c25db3' def create_or_bind_with_claims(self, source_identity): """CreateOrBindWithClaims. @@ -154,10 +154,10 @@ def read_identities(self, descriptors=None, identity_ids=None, search_filter=Non :param str identity_ids: :param str search_filter: :param str filter_value: - :param QueryMembership query_membership: + :param str query_membership: :param str properties: :param bool include_restricted_visibility: - :param ReadIdentitiesOptions options: + :param str options: :rtype: [Identity] """ query_parameters = {} @@ -170,13 +170,13 @@ def read_identities(self, descriptors=None, identity_ids=None, search_filter=Non if filter_value is not None: query_parameters['filterValue'] = self._serialize.query('filter_value', filter_value, 'str') if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') if properties is not None: query_parameters['properties'] = self._serialize.query('properties', properties, 'str') if include_restricted_visibility is not None: query_parameters['includeRestrictedVisibility'] = self._serialize.query('include_restricted_visibility', include_restricted_visibility, 'bool') if options is not None: - query_parameters['options'] = self._serialize.query('options', options, 'ReadIdentitiesOptions') + query_parameters['options'] = self._serialize.query('options', options, 'str') response = self._send(http_method='GET', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', version='4.1-preview.1', @@ -188,7 +188,7 @@ def read_identities_by_scope(self, scope_id, query_membership=None, properties=N """ReadIdentitiesByScope. [Preview API] :param str scope_id: - :param QueryMembership query_membership: + :param str query_membership: :param str properties: :rtype: [Identity] """ @@ -196,7 +196,7 @@ def read_identities_by_scope(self, scope_id, query_membership=None, properties=N if scope_id is not None: query_parameters['scopeId'] = self._serialize.query('scope_id', scope_id, 'str') if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') if properties is not None: query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', @@ -210,7 +210,7 @@ def read_identity(self, identity_id, query_membership=None, properties=None): """ReadIdentity. [Preview API] :param str identity_id: - :param QueryMembership query_membership: + :param str query_membership: :param str properties: :rtype: :class:` ` """ @@ -219,7 +219,7 @@ def read_identity(self, identity_id, query_membership=None, properties=None): route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') if properties is not None: query_parameters['properties'] = self._serialize.query('properties', properties, 'str') response = self._send(http_method='GET', @@ -344,7 +344,7 @@ def read_member(self, container_id, member_id, query_membership=None): [Preview API] :param str container_id: :param str member_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: :class:` ` """ route_values = {} @@ -354,7 +354,7 @@ def read_member(self, container_id, member_id, query_membership=None): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.1-preview.1', @@ -366,7 +366,7 @@ def read_members(self, container_id, query_membership=None): """ReadMembers. [Preview API] :param str container_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: [str] """ route_values = {} @@ -374,7 +374,7 @@ def read_members(self, container_id, query_membership=None): route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.1-preview.1', @@ -406,7 +406,7 @@ def read_member_of(self, member_id, container_id, query_membership=None): [Preview API] :param str member_id: :param str container_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: :class:` ` """ route_values = {} @@ -416,7 +416,7 @@ def read_member_of(self, member_id, container_id, query_membership=None): route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0', version='4.1-preview.1', @@ -428,7 +428,7 @@ def read_members_of(self, member_id, query_membership=None): """ReadMembersOf. [Preview API] :param str member_id: - :param QueryMembership query_membership: + :param str query_membership: :rtype: [str] """ route_values = {} @@ -436,7 +436,7 @@ def read_members_of(self, member_id, query_membership=None): route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: - query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') + query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'str') response = self._send(http_method='GET', location_id='22865b02-9e4a-479e-9e18-e35b8803b8a0', version='4.1-preview.1', diff --git a/vsts/vsts/identity/v4_1/models/__init__.py b/vsts/vsts/identity/v4_1/models/__init__.py index 1580aa8a..08a68e1a 100644 --- a/vsts/vsts/identity/v4_1/models/__init__.py +++ b/vsts/vsts/identity/v4_1/models/__init__.py @@ -14,6 +14,7 @@ from .framework_identity_info import FrameworkIdentityInfo from .group_membership import GroupMembership from .identity import Identity +from .identity_base import IdentityBase from .identity_batch_info import IdentityBatchInfo from .identity_scope import IdentityScope from .identity_self import IdentitySelf @@ -32,6 +33,7 @@ 'FrameworkIdentityInfo', 'GroupMembership', 'Identity', + 'IdentityBase', 'IdentityBatchInfo', 'IdentityScope', 'IdentitySelf', diff --git a/vsts/vsts/identity/v4_1/models/identity.py b/vsts/vsts/identity/v4_1/models/identity.py index 2622bc22..018ffb12 100644 --- a/vsts/vsts/identity/v4_1/models/identity.py +++ b/vsts/vsts/identity/v4_1/models/identity.py @@ -6,10 +6,10 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .identity_base import IdentityBase -class Identity(Model): +class Identity(IdentityBase): """Identity. :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) @@ -59,23 +59,8 @@ class Identity(Model): 'provider_display_name': {'key': 'providerDisplayName', 'type': 'str'}, 'resource_version': {'key': 'resourceVersion', 'type': 'int'}, 'subject_descriptor': {'key': 'subjectDescriptor', 'type': 'str'}, - 'unique_user_id': {'key': 'uniqueUserId', 'type': 'int'} + '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__() - self.custom_display_name = custom_display_name - self.descriptor = descriptor - self.id = id - self.is_active = is_active - self.is_container = is_container - self.master_id = master_id - self.member_ids = member_ids - self.member_of = member_of - self.members = members - self.meta_type_id = meta_type_id - self.properties = properties - self.provider_display_name = provider_display_name - self.resource_version = resource_version - self.subject_descriptor = subject_descriptor - self.unique_user_id = unique_user_id + 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) diff --git a/vsts/vsts/licensing/__init__.py b/vsts/vsts/licensing/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/licensing/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/licensing/v4_0/__init__.py b/vsts/vsts/licensing/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/licensing/v4_0/licensing_client.py b/vsts/vsts/licensing/v4_0/licensing_client.py new file mode 100644 index 00000000..e35642b0 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/licensing_client.py @@ -0,0 +1,370 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class LicensingClient(VssClient): + """Licensing + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(LicensingClient, 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 = 'c73a23a1-59bb-458c-8ce3-02c83215e015' + + def get_extension_license_usage(self): + """GetExtensionLicenseUsage. + [Preview API] Returns Licensing info about paid extensions assigned to user passed into GetExtensionsAssignedToAccount + :rtype: [AccountLicenseExtensionUsage] + """ + response = self._send(http_method='GET', + location_id='01bce8d3-c130-480f-a332-474ae3f6662e', + version='4.0-preview.1', + returns_collection=True) + return self._deserialize('[AccountLicenseExtensionUsage]', response) + + def get_certificate(self): + """GetCertificate. + [Preview API] + :rtype: object + """ + response = self._send(http_method='GET', + location_id='2e0dbce7-a327-4bc0-a291-056139393f6d', + version='4.0-preview.1') + return self._deserialize('object', response) + + def get_client_rights(self, right_name=None, product_version=None, edition=None, rel_type=None, include_certificate=None, canary=None, machine_id=None): + """GetClientRights. + [Preview API] + :param str right_name: + :param str product_version: + :param str edition: + :param str rel_type: + :param bool include_certificate: + :param str canary: + :param str machine_id: + :rtype: :class:` ` + """ + route_values = {} + if right_name is not None: + route_values['rightName'] = self._serialize.url('right_name', right_name, 'str') + query_parameters = {} + if product_version is not None: + query_parameters['productVersion'] = self._serialize.query('product_version', product_version, 'str') + if edition is not None: + query_parameters['edition'] = self._serialize.query('edition', edition, 'str') + if rel_type is not None: + query_parameters['relType'] = self._serialize.query('rel_type', rel_type, 'str') + if include_certificate is not None: + query_parameters['includeCertificate'] = self._serialize.query('include_certificate', include_certificate, 'bool') + if canary is not None: + query_parameters['canary'] = self._serialize.query('canary', canary, 'str') + if machine_id is not None: + query_parameters['machineId'] = self._serialize.query('machine_id', machine_id, 'str') + response = self._send(http_method='GET', + location_id='643c72da-eaee-4163-9f07-d748ef5c2a0c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ClientRightsContainer', response) + + def assign_available_account_entitlement(self, user_id): + """AssignAvailableAccountEntitlement. + [Preview API] Assign an available entitilement to a user + :param str user_id: The user to which to assign the entitilement + :rtype: :class:` ` + """ + query_parameters = {} + if user_id is not None: + query_parameters['userId'] = self._serialize.query('user_id', user_id, 'str') + response = self._send(http_method='POST', + location_id='c01e9fd5-0d8c-4d5e-9a68-734bd8da6a38', + version='4.0-preview.1', + query_parameters=query_parameters) + return self._deserialize('AccountEntitlement', response) + + def get_account_entitlement(self): + """GetAccountEntitlement. + [Preview API] Gets the account entitlement of the current user it is mapped to _apis/licensing/entitlements/me so specifically is looking for the user of the request + :rtype: :class:` ` + """ + response = self._send(http_method='GET', + location_id='c01e9fd5-0d8c-4d5e-9a68-734bd8da6a38', + version='4.0-preview.1') + return self._deserialize('AccountEntitlement', response) + + def assign_account_entitlement_for_user(self, body, user_id): + """AssignAccountEntitlementForUser. + [Preview API] Assign an explicit account entitlement + :param :class:` ` body: The update model for the entitlement + :param str user_id: The id of the user + :rtype: :class:` ` + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + content = self._serialize.body(body, 'AccountEntitlementUpdateModel') + response = self._send(http_method='PUT', + location_id='6490e566-b299-49a7-a4e4-28749752581f', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('AccountEntitlement', response) + + def delete_user_entitlements(self, user_id): + """DeleteUserEntitlements. + [Preview API] + :param str user_id: + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + self._send(http_method='DELETE', + location_id='6490e566-b299-49a7-a4e4-28749752581f', + version='4.0-preview.1', + route_values=route_values) + + def get_account_entitlement_for_user(self, user_id, determine_rights=None): + """GetAccountEntitlementForUser. + [Preview API] Get the entitlements for a user + :param str user_id: The id of the user + :param bool determine_rights: + :rtype: :class:` ` + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + query_parameters = {} + if determine_rights is not None: + query_parameters['determineRights'] = self._serialize.query('determine_rights', determine_rights, 'bool') + response = self._send(http_method='GET', + location_id='6490e566-b299-49a7-a4e4-28749752581f', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AccountEntitlement', response) + + def obtain_available_account_entitlements(self, user_ids): + """ObtainAvailableAccountEntitlements. + [Preview API] Returns AccountEntitlements that are currently assigned to the given list of users in the account + :param [str] user_ids: List of user Ids. + :rtype: [AccountEntitlement] + """ + route_values = {} + content = self._serialize.body(user_ids, '[str]') + response = self._send(http_method='POST', + location_id='cc3a0130-78ad-4a00-b1ca-49bef42f4656', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AccountEntitlement]', response) + + def assign_extension_to_all_eligible_users(self, extension_id): + """AssignExtensionToAllEligibleUsers. + [Preview API] Assigns the access to the given extension for all eligible users in the account that do not already have access to the extension though bundle or account assignment + :param str extension_id: The extension id to assign the access to. + :rtype: [ExtensionOperationResult] + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='PUT', + location_id='5434f182-7f32-4135-8326-9340d887c08a', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ExtensionOperationResult]', response) + + def get_eligible_users_for_extension(self, extension_id, options): + """GetEligibleUsersForExtension. + [Preview API] Returns users that are currently eligible to assign the extension to. the list is filtered based on the value of ExtensionFilterOptions + :param str extension_id: The extension to check the eligibility of the users for. + :param str options: The options to filter the list. + :rtype: [str] + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + query_parameters = {} + if options is not None: + query_parameters['options'] = self._serialize.query('options', options, 'str') + response = self._send(http_method='GET', + location_id='5434f182-7f32-4135-8326-9340d887c08a', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_extension_status_for_users(self, extension_id): + """GetExtensionStatusForUsers. + [Preview API] Returns extension assignment status of all account users for the given extension + :param str extension_id: The extension to check the status of the users for. + :rtype: {ExtensionAssignmentDetails} + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='GET', + location_id='5434f182-7f32-4135-8326-9340d887c08a', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('{ExtensionAssignmentDetails}', response) + + def assign_extension_to_users(self, body): + """AssignExtensionToUsers. + [Preview API] Assigns the access to the given extension for a given list of users + :param :class:` ` body: The extension assignment details. + :rtype: [ExtensionOperationResult] + """ + content = self._serialize.body(body, 'ExtensionAssignment') + response = self._send(http_method='PUT', + location_id='8cec75ea-044f-4245-ab0d-a82dafcc85ea', + version='4.0-preview.1', + content=content, + returns_collection=True) + return self._deserialize('[ExtensionOperationResult]', response) + + def get_extensions_assigned_to_user(self, user_id): + """GetExtensionsAssignedToUser. + [Preview API] Returns extensions that are currently assigned to the user in the account + :param str user_id: The user's identity id. + :rtype: {LicensingSource} + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + response = self._send(http_method='GET', + location_id='8cec75ea-044f-4245-ab0d-a82dafcc85ea', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('{LicensingSource}', response) + + def bulk_get_extensions_assigned_to_users(self, user_ids): + """BulkGetExtensionsAssignedToUsers. + [Preview API] Returns extensions that are currrently assigned to the users that are in the account + :param [str] user_ids: + :rtype: {[ExtensionSource]} + """ + content = self._serialize.body(user_ids, '[str]') + response = self._send(http_method='PUT', + location_id='1d42ddc2-3e7d-4daa-a0eb-e12c1dbd7c72', + version='4.0-preview.2', + content=content, + returns_collection=True) + return self._deserialize('{[ExtensionSource]}', response) + + def get_extension_license_data(self, extension_id): + """GetExtensionLicenseData. + [Preview API] + :param str extension_id: + :rtype: :class:` ` + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='GET', + location_id='004a420a-7bef-4b7f-8a50-22975d2067cc', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ExtensionLicenseData', response) + + def register_extension_license(self, extension_license_data): + """RegisterExtensionLicense. + [Preview API] + :param :class:` ` extension_license_data: + :rtype: bool + """ + content = self._serialize.body(extension_license_data, 'ExtensionLicenseData') + response = self._send(http_method='POST', + location_id='004a420a-7bef-4b7f-8a50-22975d2067cc', + version='4.0-preview.1', + content=content) + return self._deserialize('bool', response) + + def compute_extension_rights(self, ids): + """ComputeExtensionRights. + [Preview API] + :param [str] ids: + :rtype: {bool} + """ + content = self._serialize.body(ids, '[str]') + response = self._send(http_method='POST', + location_id='5f1dbe21-f748-47c7-b5fd-3770c8bc2c08', + version='4.0-preview.1', + content=content, + returns_collection=True) + return self._deserialize('{bool}', response) + + def get_extension_rights(self): + """GetExtensionRights. + [Preview API] + :rtype: :class:` ` + """ + response = self._send(http_method='GET', + location_id='5f1dbe21-f748-47c7-b5fd-3770c8bc2c08', + version='4.0-preview.1') + return self._deserialize('ExtensionRightsResult', response) + + def get_msdn_presence(self): + """GetMsdnPresence. + [Preview API] + """ + self._send(http_method='GET', + location_id='69522c3f-eecc-48d0-b333-f69ffb8fa6cc', + version='4.0-preview.1') + + def get_entitlements(self): + """GetEntitlements. + [Preview API] + :rtype: [MsdnEntitlement] + """ + response = self._send(http_method='GET', + location_id='1cc6137e-12d5-4d44-a4f2-765006c9e85d', + version='4.0-preview.1', + returns_collection=True) + return self._deserialize('[MsdnEntitlement]', response) + + def get_account_licenses_usage(self): + """GetAccountLicensesUsage. + [Preview API] + :rtype: [AccountLicenseUsage] + """ + response = self._send(http_method='GET', + location_id='d3266b87-d395-4e91-97a5-0215b81a0b7d', + version='4.0-preview.1', + returns_collection=True) + return self._deserialize('[AccountLicenseUsage]', response) + + def get_usage_rights(self, right_name=None): + """GetUsageRights. + [Preview API] + :param str right_name: + :rtype: [IUsageRight] + """ + route_values = {} + if right_name is not None: + route_values['rightName'] = self._serialize.url('right_name', right_name, 'str') + response = self._send(http_method='GET', + location_id='d09ac573-58fe-4948-af97-793db40a7e16', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[IUsageRight]', response) + diff --git a/vsts/vsts/licensing/v4_0/models/__init__.py b/vsts/vsts/licensing/v4_0/models/__init__.py new file mode 100644 index 00000000..f915040d --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/__init__.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 .account_entitlement import AccountEntitlement +from .account_entitlement_update_model import AccountEntitlementUpdateModel +from .account_license_extension_usage import AccountLicenseExtensionUsage +from .account_license_usage import AccountLicenseUsage +from .account_rights import AccountRights +from .account_user_license import AccountUserLicense +from .client_rights_container import ClientRightsContainer +from .extension_assignment import ExtensionAssignment +from .extension_assignment_details import ExtensionAssignmentDetails +from .extension_license_data import ExtensionLicenseData +from .extension_operation_result import ExtensionOperationResult +from .extension_rights_result import ExtensionRightsResult +from .extension_source import ExtensionSource +from .identity_ref import IdentityRef +from .iUsage_right import IUsageRight +from .license import License +from .msdn_entitlement import MsdnEntitlement + +__all__ = [ + 'AccountEntitlement', + 'AccountEntitlementUpdateModel', + 'AccountLicenseExtensionUsage', + 'AccountLicenseUsage', + 'AccountRights', + 'AccountUserLicense', + 'ClientRightsContainer', + 'ExtensionAssignment', + 'ExtensionAssignmentDetails', + 'ExtensionLicenseData', + 'ExtensionOperationResult', + 'ExtensionRightsResult', + 'ExtensionSource', + 'IdentityRef', + 'IUsageRight', + 'License', + 'MsdnEntitlement', +] diff --git a/vsts/vsts/licensing/v4_0/models/account_entitlement.py b/vsts/vsts/licensing/v4_0/models/account_entitlement.py new file mode 100644 index 00000000..b79c1218 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/account_entitlement.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountEntitlement(Model): + """AccountEntitlement. + + :param account_id: Gets or sets the id of the account to which the license belongs + :type account_id: str + :param assignment_date: Gets or sets the date the license was assigned + :type assignment_date: datetime + :param assignment_source: Assignment Source + :type assignment_source: object + :param last_accessed_date: Gets or sets the date of the user last sign-in to this account + :type last_accessed_date: datetime + :param license: + :type license: :class:`License ` + :param rights: The computed rights of this user in the account. + :type rights: :class:`AccountRights ` + :param status: The status of the user in the account + :type status: object + :param user: Identity information of the user to which the license belongs + :type user: :class:`IdentityRef ` + :param user_id: Gets the id of the user to which the license belongs + :type user_id: str + """ + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'assignment_date': {'key': 'assignmentDate', 'type': 'iso-8601'}, + 'assignment_source': {'key': 'assignmentSource', 'type': 'object'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'license': {'key': 'license', 'type': 'License'}, + 'rights': {'key': 'rights', 'type': 'AccountRights'}, + 'status': {'key': 'status', 'type': 'object'}, + 'user': {'key': 'user', 'type': 'IdentityRef'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, account_id=None, assignment_date=None, assignment_source=None, last_accessed_date=None, license=None, rights=None, status=None, user=None, user_id=None): + super(AccountEntitlement, self).__init__() + self.account_id = account_id + self.assignment_date = assignment_date + self.assignment_source = assignment_source + self.last_accessed_date = last_accessed_date + self.license = license + self.rights = rights + self.status = status + self.user = user + self.user_id = user_id diff --git a/vsts/vsts/licensing/v4_0/models/account_entitlement_update_model.py b/vsts/vsts/licensing/v4_0/models/account_entitlement_update_model.py new file mode 100644 index 00000000..e2708836 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/account_entitlement_update_model.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountEntitlementUpdateModel(Model): + """AccountEntitlementUpdateModel. + + :param license: Gets or sets the license for the entitlement + :type license: :class:`License ` + """ + + _attribute_map = { + 'license': {'key': 'license', 'type': 'License'} + } + + def __init__(self, license=None): + super(AccountEntitlementUpdateModel, self).__init__() + self.license = license diff --git a/vsts/vsts/licensing/v4_0/models/account_license_extension_usage.py b/vsts/vsts/licensing/v4_0/models/account_license_extension_usage.py new file mode 100644 index 00000000..2f33edca --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/account_license_extension_usage.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountLicenseExtensionUsage(Model): + """AccountLicenseExtensionUsage. + + :param extension_id: + :type extension_id: str + :param extension_name: + :type extension_name: str + :param included_quantity: + :type included_quantity: int + :param is_trial: + :type is_trial: bool + :param minimum_license_required: + :type minimum_license_required: object + :param msdn_used_count: + :type msdn_used_count: int + :param provisioned_count: + :type provisioned_count: int + :param remaining_trial_days: + :type remaining_trial_days: int + :param trial_expiry_date: + :type trial_expiry_date: datetime + :param used_count: + :type used_count: int + """ + + _attribute_map = { + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'included_quantity': {'key': 'includedQuantity', 'type': 'int'}, + 'is_trial': {'key': 'isTrial', 'type': 'bool'}, + 'minimum_license_required': {'key': 'minimumLicenseRequired', 'type': 'object'}, + 'msdn_used_count': {'key': 'msdnUsedCount', 'type': 'int'}, + 'provisioned_count': {'key': 'provisionedCount', 'type': 'int'}, + 'remaining_trial_days': {'key': 'remainingTrialDays', 'type': 'int'}, + 'trial_expiry_date': {'key': 'trialExpiryDate', 'type': 'iso-8601'}, + 'used_count': {'key': 'usedCount', 'type': 'int'} + } + + def __init__(self, extension_id=None, extension_name=None, included_quantity=None, is_trial=None, minimum_license_required=None, msdn_used_count=None, provisioned_count=None, remaining_trial_days=None, trial_expiry_date=None, used_count=None): + super(AccountLicenseExtensionUsage, self).__init__() + self.extension_id = extension_id + self.extension_name = extension_name + self.included_quantity = included_quantity + self.is_trial = is_trial + self.minimum_license_required = minimum_license_required + self.msdn_used_count = msdn_used_count + self.provisioned_count = provisioned_count + self.remaining_trial_days = remaining_trial_days + self.trial_expiry_date = trial_expiry_date + self.used_count = used_count diff --git a/vsts/vsts/licensing/v4_0/models/account_license_usage.py b/vsts/vsts/licensing/v4_0/models/account_license_usage.py new file mode 100644 index 00000000..4fa792ae --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/account_license_usage.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountLicenseUsage(Model): + """AccountLicenseUsage. + + :param license: + :type license: :class:`AccountUserLicense ` + :param provisioned_count: + :type provisioned_count: int + :param used_count: + :type used_count: int + """ + + _attribute_map = { + 'license': {'key': 'license', 'type': 'AccountUserLicense'}, + 'provisioned_count': {'key': 'provisionedCount', 'type': 'int'}, + 'used_count': {'key': 'usedCount', 'type': 'int'} + } + + def __init__(self, license=None, provisioned_count=None, used_count=None): + super(AccountLicenseUsage, self).__init__() + self.license = license + self.provisioned_count = provisioned_count + self.used_count = used_count diff --git a/vsts/vsts/licensing/v4_0/models/account_rights.py b/vsts/vsts/licensing/v4_0/models/account_rights.py new file mode 100644 index 00000000..2906e32b --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/account_rights.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountRights(Model): + """AccountRights. + + :param level: + :type level: object + :param reason: + :type reason: str + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'str'} + } + + def __init__(self, level=None, reason=None): + super(AccountRights, self).__init__() + self.level = level + self.reason = reason diff --git a/vsts/vsts/licensing/v4_0/models/account_user_license.py b/vsts/vsts/licensing/v4_0/models/account_user_license.py new file mode 100644 index 00000000..d633f698 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/account_user_license.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountUserLicense(Model): + """AccountUserLicense. + + :param license: + :type license: int + :param source: + :type source: object + """ + + _attribute_map = { + 'license': {'key': 'license', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'object'} + } + + def __init__(self, license=None, source=None): + super(AccountUserLicense, self).__init__() + self.license = license + self.source = source diff --git a/vsts/vsts/licensing/v4_0/models/client_rights_container.py b/vsts/vsts/licensing/v4_0/models/client_rights_container.py new file mode 100644 index 00000000..299142d4 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/client_rights_container.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ClientRightsContainer(Model): + """ClientRightsContainer. + + :param certificate_bytes: + :type certificate_bytes: list of number + :param token: + :type token: str + """ + + _attribute_map = { + 'certificate_bytes': {'key': 'certificateBytes', 'type': '[number]'}, + 'token': {'key': 'token', 'type': 'str'} + } + + def __init__(self, certificate_bytes=None, token=None): + super(ClientRightsContainer, self).__init__() + self.certificate_bytes = certificate_bytes + self.token = token diff --git a/vsts/vsts/licensing/v4_0/models/extension_assignment.py b/vsts/vsts/licensing/v4_0/models/extension_assignment.py new file mode 100644 index 00000000..708b77bb --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/extension_assignment.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAssignment(Model): + """ExtensionAssignment. + + :param extension_gallery_id: Gets or sets the extension ID to assign. + :type extension_gallery_id: str + :param is_auto_assignment: Set to true if this a auto assignment scenario. + :type is_auto_assignment: bool + :param licensing_source: Gets or sets the licensing source. + :type licensing_source: object + :param user_ids: Gets or sets the user IDs to assign the extension to. + :type user_ids: list of str + """ + + _attribute_map = { + 'extension_gallery_id': {'key': 'extensionGalleryId', 'type': 'str'}, + 'is_auto_assignment': {'key': 'isAutoAssignment', 'type': 'bool'}, + 'licensing_source': {'key': 'licensingSource', 'type': 'object'}, + 'user_ids': {'key': 'userIds', 'type': '[str]'} + } + + def __init__(self, extension_gallery_id=None, is_auto_assignment=None, licensing_source=None, user_ids=None): + super(ExtensionAssignment, self).__init__() + self.extension_gallery_id = extension_gallery_id + self.is_auto_assignment = is_auto_assignment + self.licensing_source = licensing_source + self.user_ids = user_ids diff --git a/vsts/vsts/licensing/v4_0/models/extension_assignment_details.py b/vsts/vsts/licensing/v4_0/models/extension_assignment_details.py new file mode 100644 index 00000000..2ce0a970 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/extension_assignment_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAssignmentDetails(Model): + """ExtensionAssignmentDetails. + + :param assignment_status: + :type assignment_status: object + :param source_collection_name: + :type source_collection_name: str + """ + + _attribute_map = { + 'assignment_status': {'key': 'assignmentStatus', 'type': 'object'}, + 'source_collection_name': {'key': 'sourceCollectionName', 'type': 'str'} + } + + def __init__(self, assignment_status=None, source_collection_name=None): + super(ExtensionAssignmentDetails, self).__init__() + self.assignment_status = assignment_status + self.source_collection_name = source_collection_name diff --git a/vsts/vsts/licensing/v4_0/models/extension_license_data.py b/vsts/vsts/licensing/v4_0/models/extension_license_data.py new file mode 100644 index 00000000..0e088a4f --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/extension_license_data.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionLicenseData(Model): + """ExtensionLicenseData. + + :param created_date: + :type created_date: datetime + :param extension_id: + :type extension_id: str + :param is_free: + :type is_free: bool + :param minimum_required_access_level: + :type minimum_required_access_level: object + :param updated_date: + :type updated_date: datetime + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'is_free': {'key': 'isFree', 'type': 'bool'}, + 'minimum_required_access_level': {'key': 'minimumRequiredAccessLevel', 'type': 'object'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'} + } + + def __init__(self, created_date=None, extension_id=None, is_free=None, minimum_required_access_level=None, updated_date=None): + super(ExtensionLicenseData, self).__init__() + self.created_date = created_date + self.extension_id = extension_id + self.is_free = is_free + self.minimum_required_access_level = minimum_required_access_level + self.updated_date = updated_date diff --git a/vsts/vsts/licensing/v4_0/models/extension_operation_result.py b/vsts/vsts/licensing/v4_0/models/extension_operation_result.py new file mode 100644 index 00000000..e04aa817 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/extension_operation_result.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionOperationResult(Model): + """ExtensionOperationResult. + + :param account_id: + :type account_id: str + :param extension_id: + :type extension_id: str + :param message: + :type message: str + :param operation: + :type operation: object + :param result: + :type result: object + :param user_id: + :type user_id: str + """ + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'object'}, + 'result': {'key': 'result', 'type': 'object'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, account_id=None, extension_id=None, message=None, operation=None, result=None, user_id=None): + super(ExtensionOperationResult, self).__init__() + self.account_id = account_id + self.extension_id = extension_id + self.message = message + self.operation = operation + self.result = result + self.user_id = user_id diff --git a/vsts/vsts/licensing/v4_0/models/extension_rights_result.py b/vsts/vsts/licensing/v4_0/models/extension_rights_result.py new file mode 100644 index 00000000..185249fe --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/extension_rights_result.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionRightsResult(Model): + """ExtensionRightsResult. + + :param entitled_extensions: + :type entitled_extensions: list of str + :param host_id: + :type host_id: str + :param reason: + :type reason: str + :param reason_code: + :type reason_code: object + :param result_code: + :type result_code: object + """ + + _attribute_map = { + 'entitled_extensions': {'key': 'entitledExtensions', 'type': '[str]'}, + 'host_id': {'key': 'hostId', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'reason_code': {'key': 'reasonCode', 'type': 'object'}, + 'result_code': {'key': 'resultCode', 'type': 'object'} + } + + def __init__(self, entitled_extensions=None, host_id=None, reason=None, reason_code=None, result_code=None): + super(ExtensionRightsResult, self).__init__() + self.entitled_extensions = entitled_extensions + self.host_id = host_id + self.reason = reason + self.reason_code = reason_code + self.result_code = result_code diff --git a/vsts/vsts/licensing/v4_0/models/extension_source.py b/vsts/vsts/licensing/v4_0/models/extension_source.py new file mode 100644 index 00000000..6a1409e5 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/extension_source.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionSource(Model): + """ExtensionSource. + + :param assignment_source: Assignment Source + :type assignment_source: object + :param extension_gallery_id: extension Identifier + :type extension_gallery_id: str + :param licensing_source: The licensing source of the extension. Account, Msdn, ect. + :type licensing_source: object + """ + + _attribute_map = { + 'assignment_source': {'key': 'assignmentSource', 'type': 'object'}, + 'extension_gallery_id': {'key': 'extensionGalleryId', 'type': 'str'}, + 'licensing_source': {'key': 'licensingSource', 'type': 'object'} + } + + def __init__(self, assignment_source=None, extension_gallery_id=None, licensing_source=None): + super(ExtensionSource, self).__init__() + self.assignment_source = assignment_source + self.extension_gallery_id = extension_gallery_id + self.licensing_source = licensing_source diff --git a/vsts/vsts/licensing/v4_0/models/iUsage_right.py b/vsts/vsts/licensing/v4_0/models/iUsage_right.py new file mode 100644 index 00000000..d35c93c7 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/iUsage_right.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 IUsageRight(Model): + """IUsageRight. + + :param attributes: Rights data + :type attributes: dict + :param expiration_date: Rights expiration + :type expiration_date: datetime + :param name: Name, uniquely identifying a usage right + :type name: str + :param version: Version + :type version: str + """ + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': '{object}'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, attributes=None, expiration_date=None, name=None, version=None): + super(IUsageRight, self).__init__() + self.attributes = attributes + self.expiration_date = expiration_date + self.name = name + self.version = version diff --git a/vsts/vsts/licensing/v4_0/models/identity_ref.py b/vsts/vsts/licensing/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/licensing/v4_0/models/license.py b/vsts/vsts/licensing/v4_0/models/license.py new file mode 100644 index 00000000..6e381f36 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/license.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 License(Model): + """License. + + :param source: Gets the source of the license + :type source: object + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'object'} + } + + def __init__(self, source=None): + super(License, self).__init__() + self.source = source diff --git a/vsts/vsts/licensing/v4_0/models/msdn_entitlement.py b/vsts/vsts/licensing/v4_0/models/msdn_entitlement.py new file mode 100644 index 00000000..3fee52a8 --- /dev/null +++ b/vsts/vsts/licensing/v4_0/models/msdn_entitlement.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 MsdnEntitlement(Model): + """MsdnEntitlement. + + :param entitlement_code: Entilement id assigned to Entitlement in Benefits Database. + :type entitlement_code: str + :param entitlement_name: Entitlement Name e.g. Downloads, Chat. + :type entitlement_name: str + :param entitlement_type: Type of Entitlement e.g. Downloads, Chat. + :type entitlement_type: str + :param is_activated: Entitlement activation status + :type is_activated: bool + :param is_entitlement_available: Entitlement availability + :type is_entitlement_available: bool + :param subscription_channel: Write MSDN Channel into CRCT (Retail,MPN,VL,BizSpark,DreamSpark,MCT,FTE,Technet,WebsiteSpark,Other) + :type subscription_channel: str + :param subscription_expiration_date: Subscription Expiration Date. + :type subscription_expiration_date: datetime + :param subscription_id: Subscription id which identifies the subscription itself. This is the Benefit Detail Guid from BMS. + :type subscription_id: str + :param subscription_level_code: Identifier of the subscription or benefit level. + :type subscription_level_code: str + :param subscription_level_name: Name of subscription level. + :type subscription_level_name: str + :param subscription_status: Subscription Status Code (ACT, PND, INA ...). + :type subscription_status: str + """ + + _attribute_map = { + 'entitlement_code': {'key': 'entitlementCode', 'type': 'str'}, + 'entitlement_name': {'key': 'entitlementName', 'type': 'str'}, + 'entitlement_type': {'key': 'entitlementType', 'type': 'str'}, + 'is_activated': {'key': 'isActivated', 'type': 'bool'}, + 'is_entitlement_available': {'key': 'isEntitlementAvailable', 'type': 'bool'}, + 'subscription_channel': {'key': 'subscriptionChannel', 'type': 'str'}, + 'subscription_expiration_date': {'key': 'subscriptionExpirationDate', 'type': 'iso-8601'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'subscription_level_code': {'key': 'subscriptionLevelCode', 'type': 'str'}, + 'subscription_level_name': {'key': 'subscriptionLevelName', 'type': 'str'}, + 'subscription_status': {'key': 'subscriptionStatus', 'type': 'str'} + } + + def __init__(self, entitlement_code=None, entitlement_name=None, entitlement_type=None, is_activated=None, is_entitlement_available=None, subscription_channel=None, subscription_expiration_date=None, subscription_id=None, subscription_level_code=None, subscription_level_name=None, subscription_status=None): + super(MsdnEntitlement, self).__init__() + self.entitlement_code = entitlement_code + self.entitlement_name = entitlement_name + self.entitlement_type = entitlement_type + self.is_activated = is_activated + self.is_entitlement_available = is_entitlement_available + self.subscription_channel = subscription_channel + self.subscription_expiration_date = subscription_expiration_date + self.subscription_id = subscription_id + self.subscription_level_code = subscription_level_code + self.subscription_level_name = subscription_level_name + self.subscription_status = subscription_status diff --git a/vsts/vsts/licensing/v4_1/__init__.py b/vsts/vsts/licensing/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/licensing/v4_1/licensing_client.py b/vsts/vsts/licensing/v4_1/licensing_client.py new file mode 100644 index 00000000..82b513ad --- /dev/null +++ b/vsts/vsts/licensing/v4_1/licensing_client.py @@ -0,0 +1,403 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class LicensingClient(VssClient): + """Licensing + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(LicensingClient, 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 = 'c73a23a1-59bb-458c-8ce3-02c83215e015' + + def get_extension_license_usage(self): + """GetExtensionLicenseUsage. + [Preview API] Returns Licensing info about paid extensions assigned to user passed into GetExtensionsAssignedToAccount + :rtype: [AccountLicenseExtensionUsage] + """ + response = self._send(http_method='GET', + location_id='01bce8d3-c130-480f-a332-474ae3f6662e', + version='4.1-preview.1', + returns_collection=True) + return self._deserialize('[AccountLicenseExtensionUsage]', response) + + def get_certificate(self): + """GetCertificate. + [Preview API] + :rtype: object + """ + response = self._send(http_method='GET', + location_id='2e0dbce7-a327-4bc0-a291-056139393f6d', + version='4.1-preview.1') + return self._deserialize('object', response) + + def get_client_rights(self, right_name=None, product_version=None, edition=None, rel_type=None, include_certificate=None, canary=None, machine_id=None): + """GetClientRights. + [Preview API] + :param str right_name: + :param str product_version: + :param str edition: + :param str rel_type: + :param bool include_certificate: + :param str canary: + :param str machine_id: + :rtype: :class:` ` + """ + route_values = {} + if right_name is not None: + route_values['rightName'] = self._serialize.url('right_name', right_name, 'str') + query_parameters = {} + if product_version is not None: + query_parameters['productVersion'] = self._serialize.query('product_version', product_version, 'str') + if edition is not None: + query_parameters['edition'] = self._serialize.query('edition', edition, 'str') + if rel_type is not None: + query_parameters['relType'] = self._serialize.query('rel_type', rel_type, 'str') + if include_certificate is not None: + query_parameters['includeCertificate'] = self._serialize.query('include_certificate', include_certificate, 'bool') + if canary is not None: + query_parameters['canary'] = self._serialize.query('canary', canary, 'str') + if machine_id is not None: + query_parameters['machineId'] = self._serialize.query('machine_id', machine_id, 'str') + response = self._send(http_method='GET', + location_id='643c72da-eaee-4163-9f07-d748ef5c2a0c', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ClientRightsContainer', response) + + def assign_available_account_entitlement(self, user_id, dont_notify_user=None, origin=None): + """AssignAvailableAccountEntitlement. + [Preview API] Assign an available entitilement to a user + :param str user_id: The user to which to assign the entitilement + :param bool dont_notify_user: + :param str origin: + :rtype: :class:` ` + """ + query_parameters = {} + if user_id is not None: + query_parameters['userId'] = self._serialize.query('user_id', user_id, 'str') + if dont_notify_user is not None: + query_parameters['dontNotifyUser'] = self._serialize.query('dont_notify_user', dont_notify_user, 'bool') + if origin is not None: + query_parameters['origin'] = self._serialize.query('origin', origin, 'str') + response = self._send(http_method='POST', + location_id='c01e9fd5-0d8c-4d5e-9a68-734bd8da6a38', + version='4.1-preview.1', + query_parameters=query_parameters) + return self._deserialize('AccountEntitlement', response) + + def get_account_entitlement(self): + """GetAccountEntitlement. + [Preview API] Gets the account entitlement of the current user it is mapped to _apis/licensing/entitlements/me so specifically is looking for the user of the request + :rtype: :class:` ` + """ + response = self._send(http_method='GET', + location_id='c01e9fd5-0d8c-4d5e-9a68-734bd8da6a38', + version='4.1-preview.1') + return self._deserialize('AccountEntitlement', response) + + def get_account_entitlements(self, top=None, skip=None): + """GetAccountEntitlements. + [Preview API] Gets top (top) entitlements for users in the account from offset (skip) order by DateCreated ASC + :param int top: number of accounts to return + :param int skip: records to skip, null is interpreted as 0 + :rtype: [AccountEntitlement] + """ + query_parameters = {} + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='ea37be6f-8cd7-48dd-983d-2b72d6e3da0f', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[AccountEntitlement]', response) + + def assign_account_entitlement_for_user(self, body, user_id, dont_notify_user=None, origin=None): + """AssignAccountEntitlementForUser. + [Preview API] Assign an explicit account entitlement + :param :class:` ` body: The update model for the entitlement + :param str user_id: The id of the user + :param bool dont_notify_user: + :param str origin: + :rtype: :class:` ` + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + query_parameters = {} + if dont_notify_user is not None: + query_parameters['dontNotifyUser'] = self._serialize.query('dont_notify_user', dont_notify_user, 'bool') + if origin is not None: + query_parameters['origin'] = self._serialize.query('origin', origin, 'str') + content = self._serialize.body(body, 'AccountEntitlementUpdateModel') + response = self._send(http_method='PUT', + location_id='6490e566-b299-49a7-a4e4-28749752581f', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('AccountEntitlement', response) + + def delete_user_entitlements(self, user_id): + """DeleteUserEntitlements. + [Preview API] + :param str user_id: + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + self._send(http_method='DELETE', + location_id='6490e566-b299-49a7-a4e4-28749752581f', + version='4.1-preview.1', + route_values=route_values) + + def get_account_entitlement_for_user(self, user_id, determine_rights=None): + """GetAccountEntitlementForUser. + [Preview API] Get the entitlements for a user + :param str user_id: The id of the user + :param bool determine_rights: + :rtype: :class:` ` + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + query_parameters = {} + if determine_rights is not None: + query_parameters['determineRights'] = self._serialize.query('determine_rights', determine_rights, 'bool') + response = self._send(http_method='GET', + location_id='6490e566-b299-49a7-a4e4-28749752581f', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AccountEntitlement', response) + + def get_account_entitlements_batch(self, user_ids): + """GetAccountEntitlementsBatch. + [Preview API] Returns AccountEntitlements that are currently assigned to the given list of users in the account + :param [str] user_ids: List of user Ids. + :rtype: [AccountEntitlement] + """ + route_values = {} + content = self._serialize.body(user_ids, '[str]') + response = self._send(http_method='POST', + location_id='cc3a0130-78ad-4a00-b1ca-49bef42f4656', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AccountEntitlement]', response) + + def obtain_available_account_entitlements(self, user_ids): + """ObtainAvailableAccountEntitlements. + [Preview API] Returns AccountEntitlements that are currently assigned to the given list of users in the account + :param [str] user_ids: List of user Ids. + :rtype: [AccountEntitlement] + """ + route_values = {} + content = self._serialize.body(user_ids, '[str]') + response = self._send(http_method='POST', + location_id='cc3a0130-78ad-4a00-b1ca-49bef42f4656', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AccountEntitlement]', response) + + def assign_extension_to_all_eligible_users(self, extension_id): + """AssignExtensionToAllEligibleUsers. + [Preview API] Assigns the access to the given extension for all eligible users in the account that do not already have access to the extension though bundle or account assignment + :param str extension_id: The extension id to assign the access to. + :rtype: [ExtensionOperationResult] + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='PUT', + location_id='5434f182-7f32-4135-8326-9340d887c08a', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ExtensionOperationResult]', response) + + def get_eligible_users_for_extension(self, extension_id, options): + """GetEligibleUsersForExtension. + [Preview API] Returns users that are currently eligible to assign the extension to. the list is filtered based on the value of ExtensionFilterOptions + :param str extension_id: The extension to check the eligibility of the users for. + :param str options: The options to filter the list. + :rtype: [str] + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + query_parameters = {} + if options is not None: + query_parameters['options'] = self._serialize.query('options', options, 'str') + response = self._send(http_method='GET', + location_id='5434f182-7f32-4135-8326-9340d887c08a', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_extension_status_for_users(self, extension_id): + """GetExtensionStatusForUsers. + [Preview API] Returns extension assignment status of all account users for the given extension + :param str extension_id: The extension to check the status of the users for. + :rtype: {ExtensionAssignmentDetails} + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='GET', + location_id='5434f182-7f32-4135-8326-9340d887c08a', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('{ExtensionAssignmentDetails}', response) + + def assign_extension_to_users(self, body): + """AssignExtensionToUsers. + [Preview API] Assigns the access to the given extension for a given list of users + :param :class:` ` body: The extension assignment details. + :rtype: [ExtensionOperationResult] + """ + content = self._serialize.body(body, 'ExtensionAssignment') + response = self._send(http_method='PUT', + location_id='8cec75ea-044f-4245-ab0d-a82dafcc85ea', + version='4.1-preview.1', + content=content, + returns_collection=True) + return self._deserialize('[ExtensionOperationResult]', response) + + def get_extensions_assigned_to_user(self, user_id): + """GetExtensionsAssignedToUser. + [Preview API] Returns extensions that are currently assigned to the user in the account + :param str user_id: The user's identity id. + :rtype: {LicensingSource} + """ + route_values = {} + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + response = self._send(http_method='GET', + location_id='8cec75ea-044f-4245-ab0d-a82dafcc85ea', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('{LicensingSource}', response) + + def bulk_get_extensions_assigned_to_users(self, user_ids): + """BulkGetExtensionsAssignedToUsers. + [Preview API] Returns extensions that are currrently assigned to the users that are in the account + :param [str] user_ids: + :rtype: {[ExtensionSource]} + """ + content = self._serialize.body(user_ids, '[str]') + response = self._send(http_method='PUT', + location_id='1d42ddc2-3e7d-4daa-a0eb-e12c1dbd7c72', + version='4.1-preview.2', + content=content, + returns_collection=True) + return self._deserialize('{[ExtensionSource]}', response) + + def get_extension_license_data(self, extension_id): + """GetExtensionLicenseData. + [Preview API] + :param str extension_id: + :rtype: :class:` ` + """ + route_values = {} + if extension_id is not None: + route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str') + response = self._send(http_method='GET', + location_id='004a420a-7bef-4b7f-8a50-22975d2067cc', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ExtensionLicenseData', response) + + def register_extension_license(self, extension_license_data): + """RegisterExtensionLicense. + [Preview API] + :param :class:` ` extension_license_data: + :rtype: bool + """ + content = self._serialize.body(extension_license_data, 'ExtensionLicenseData') + response = self._send(http_method='POST', + location_id='004a420a-7bef-4b7f-8a50-22975d2067cc', + version='4.1-preview.1', + content=content) + return self._deserialize('bool', response) + + def compute_extension_rights(self, ids): + """ComputeExtensionRights. + [Preview API] + :param [str] ids: + :rtype: {bool} + """ + content = self._serialize.body(ids, '[str]') + response = self._send(http_method='POST', + location_id='5f1dbe21-f748-47c7-b5fd-3770c8bc2c08', + version='4.1-preview.1', + content=content, + returns_collection=True) + return self._deserialize('{bool}', response) + + def get_extension_rights(self): + """GetExtensionRights. + [Preview API] + :rtype: :class:` ` + """ + response = self._send(http_method='GET', + location_id='5f1dbe21-f748-47c7-b5fd-3770c8bc2c08', + version='4.1-preview.1') + return self._deserialize('ExtensionRightsResult', response) + + def get_msdn_presence(self): + """GetMsdnPresence. + [Preview API] + """ + self._send(http_method='GET', + location_id='69522c3f-eecc-48d0-b333-f69ffb8fa6cc', + version='4.1-preview.1') + + def get_entitlements(self): + """GetEntitlements. + [Preview API] + :rtype: [MsdnEntitlement] + """ + response = self._send(http_method='GET', + location_id='1cc6137e-12d5-4d44-a4f2-765006c9e85d', + version='4.1-preview.1', + returns_collection=True) + return self._deserialize('[MsdnEntitlement]', response) + + def get_account_licenses_usage(self): + """GetAccountLicensesUsage. + [Preview API] + :rtype: [AccountLicenseUsage] + """ + response = self._send(http_method='GET', + location_id='d3266b87-d395-4e91-97a5-0215b81a0b7d', + version='4.1-preview.1', + returns_collection=True) + return self._deserialize('[AccountLicenseUsage]', response) + diff --git a/vsts/vsts/licensing/v4_1/models/__init__.py b/vsts/vsts/licensing/v4_1/models/__init__.py new file mode 100644 index 00000000..fcbb5647 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/__init__.py @@ -0,0 +1,47 @@ +# -------------------------------------------------------------------------------------------- +# 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 .account_entitlement import AccountEntitlement +from .account_entitlement_update_model import AccountEntitlementUpdateModel +from .account_license_extension_usage import AccountLicenseExtensionUsage +from .account_license_usage import AccountLicenseUsage +from .account_rights import AccountRights +from .account_user_license import AccountUserLicense +from .client_rights_container import ClientRightsContainer +from .extension_assignment import ExtensionAssignment +from .extension_assignment_details import ExtensionAssignmentDetails +from .extension_license_data import ExtensionLicenseData +from .extension_operation_result import ExtensionOperationResult +from .extension_rights_result import ExtensionRightsResult +from .extension_source import ExtensionSource +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .license import License +from .msdn_entitlement import MsdnEntitlement +from .reference_links import ReferenceLinks + +__all__ = [ + 'AccountEntitlement', + 'AccountEntitlementUpdateModel', + 'AccountLicenseExtensionUsage', + 'AccountLicenseUsage', + 'AccountRights', + 'AccountUserLicense', + 'ClientRightsContainer', + 'ExtensionAssignment', + 'ExtensionAssignmentDetails', + 'ExtensionLicenseData', + 'ExtensionOperationResult', + 'ExtensionRightsResult', + 'ExtensionSource', + 'GraphSubjectBase', + 'IdentityRef', + 'License', + 'MsdnEntitlement', + 'ReferenceLinks', +] diff --git a/vsts/vsts/licensing/v4_1/models/account_entitlement.py b/vsts/vsts/licensing/v4_1/models/account_entitlement.py new file mode 100644 index 00000000..f66f89da --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/account_entitlement.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountEntitlement(Model): + """AccountEntitlement. + + :param account_id: Gets or sets the id of the account to which the license belongs + :type account_id: str + :param assignment_date: Gets or sets the date the license was assigned + :type assignment_date: datetime + :param assignment_source: Assignment Source + :type assignment_source: object + :param last_accessed_date: Gets or sets the date of the user last sign-in to this account + :type last_accessed_date: datetime + :param license: + :type license: :class:`License ` + :param origin: Licensing origin + :type origin: object + :param rights: The computed rights of this user in the account. + :type rights: :class:`AccountRights ` + :param status: The status of the user in the account + :type status: object + :param user: Identity information of the user to which the license belongs + :type user: :class:`IdentityRef ` + :param user_id: Gets the id of the user to which the license belongs + :type user_id: str + """ + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'assignment_date': {'key': 'assignmentDate', 'type': 'iso-8601'}, + 'assignment_source': {'key': 'assignmentSource', 'type': 'object'}, + 'last_accessed_date': {'key': 'lastAccessedDate', 'type': 'iso-8601'}, + 'license': {'key': 'license', 'type': 'License'}, + 'origin': {'key': 'origin', 'type': 'object'}, + 'rights': {'key': 'rights', 'type': 'AccountRights'}, + 'status': {'key': 'status', 'type': 'object'}, + 'user': {'key': 'user', 'type': 'IdentityRef'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, account_id=None, assignment_date=None, assignment_source=None, last_accessed_date=None, license=None, origin=None, rights=None, status=None, user=None, user_id=None): + super(AccountEntitlement, self).__init__() + self.account_id = account_id + self.assignment_date = assignment_date + self.assignment_source = assignment_source + self.last_accessed_date = last_accessed_date + self.license = license + self.origin = origin + self.rights = rights + self.status = status + self.user = user + self.user_id = user_id diff --git a/vsts/vsts/licensing/v4_1/models/account_entitlement_update_model.py b/vsts/vsts/licensing/v4_1/models/account_entitlement_update_model.py new file mode 100644 index 00000000..f3848f5a --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/account_entitlement_update_model.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountEntitlementUpdateModel(Model): + """AccountEntitlementUpdateModel. + + :param license: Gets or sets the license for the entitlement + :type license: :class:`License ` + """ + + _attribute_map = { + 'license': {'key': 'license', 'type': 'License'} + } + + def __init__(self, license=None): + super(AccountEntitlementUpdateModel, self).__init__() + self.license = license diff --git a/vsts/vsts/licensing/v4_1/models/account_license_extension_usage.py b/vsts/vsts/licensing/v4_1/models/account_license_extension_usage.py new file mode 100644 index 00000000..2f33edca --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/account_license_extension_usage.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountLicenseExtensionUsage(Model): + """AccountLicenseExtensionUsage. + + :param extension_id: + :type extension_id: str + :param extension_name: + :type extension_name: str + :param included_quantity: + :type included_quantity: int + :param is_trial: + :type is_trial: bool + :param minimum_license_required: + :type minimum_license_required: object + :param msdn_used_count: + :type msdn_used_count: int + :param provisioned_count: + :type provisioned_count: int + :param remaining_trial_days: + :type remaining_trial_days: int + :param trial_expiry_date: + :type trial_expiry_date: datetime + :param used_count: + :type used_count: int + """ + + _attribute_map = { + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'included_quantity': {'key': 'includedQuantity', 'type': 'int'}, + 'is_trial': {'key': 'isTrial', 'type': 'bool'}, + 'minimum_license_required': {'key': 'minimumLicenseRequired', 'type': 'object'}, + 'msdn_used_count': {'key': 'msdnUsedCount', 'type': 'int'}, + 'provisioned_count': {'key': 'provisionedCount', 'type': 'int'}, + 'remaining_trial_days': {'key': 'remainingTrialDays', 'type': 'int'}, + 'trial_expiry_date': {'key': 'trialExpiryDate', 'type': 'iso-8601'}, + 'used_count': {'key': 'usedCount', 'type': 'int'} + } + + def __init__(self, extension_id=None, extension_name=None, included_quantity=None, is_trial=None, minimum_license_required=None, msdn_used_count=None, provisioned_count=None, remaining_trial_days=None, trial_expiry_date=None, used_count=None): + super(AccountLicenseExtensionUsage, self).__init__() + self.extension_id = extension_id + self.extension_name = extension_name + self.included_quantity = included_quantity + self.is_trial = is_trial + self.minimum_license_required = minimum_license_required + self.msdn_used_count = msdn_used_count + self.provisioned_count = provisioned_count + self.remaining_trial_days = remaining_trial_days + self.trial_expiry_date = trial_expiry_date + self.used_count = used_count diff --git a/vsts/vsts/licensing/v4_1/models/account_license_usage.py b/vsts/vsts/licensing/v4_1/models/account_license_usage.py new file mode 100644 index 00000000..ec797e7e --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/account_license_usage.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountLicenseUsage(Model): + """AccountLicenseUsage. + + :param disabled_count: Amount that is disabled (Usually from licenses that were provisioned, but became invalid due to loss of subscription in a new billing cycle) + :type disabled_count: int + :param license: + :type license: :class:`AccountUserLicense ` + :param pending_provisioned_count: Amount that will be purchased in the next billing cycle + :type pending_provisioned_count: int + :param provisioned_count: Amount that has been purchased + :type provisioned_count: int + :param used_count: Amount currently being used. + :type used_count: int + """ + + _attribute_map = { + 'disabled_count': {'key': 'disabledCount', 'type': 'int'}, + 'license': {'key': 'license', 'type': 'AccountUserLicense'}, + 'pending_provisioned_count': {'key': 'pendingProvisionedCount', 'type': 'int'}, + 'provisioned_count': {'key': 'provisionedCount', 'type': 'int'}, + 'used_count': {'key': 'usedCount', 'type': 'int'} + } + + def __init__(self, disabled_count=None, license=None, pending_provisioned_count=None, provisioned_count=None, used_count=None): + super(AccountLicenseUsage, self).__init__() + self.disabled_count = disabled_count + self.license = license + self.pending_provisioned_count = pending_provisioned_count + self.provisioned_count = provisioned_count + self.used_count = used_count diff --git a/vsts/vsts/licensing/v4_1/models/account_rights.py b/vsts/vsts/licensing/v4_1/models/account_rights.py new file mode 100644 index 00000000..2906e32b --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/account_rights.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountRights(Model): + """AccountRights. + + :param level: + :type level: object + :param reason: + :type reason: str + """ + + _attribute_map = { + 'level': {'key': 'level', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'str'} + } + + def __init__(self, level=None, reason=None): + super(AccountRights, self).__init__() + self.level = level + self.reason = reason diff --git a/vsts/vsts/licensing/v4_1/models/account_user_license.py b/vsts/vsts/licensing/v4_1/models/account_user_license.py new file mode 100644 index 00000000..d633f698 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/account_user_license.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccountUserLicense(Model): + """AccountUserLicense. + + :param license: + :type license: int + :param source: + :type source: object + """ + + _attribute_map = { + 'license': {'key': 'license', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'object'} + } + + def __init__(self, license=None, source=None): + super(AccountUserLicense, self).__init__() + self.license = license + self.source = source diff --git a/vsts/vsts/licensing/v4_1/models/client_rights_container.py b/vsts/vsts/licensing/v4_1/models/client_rights_container.py new file mode 100644 index 00000000..299142d4 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/client_rights_container.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ClientRightsContainer(Model): + """ClientRightsContainer. + + :param certificate_bytes: + :type certificate_bytes: list of number + :param token: + :type token: str + """ + + _attribute_map = { + 'certificate_bytes': {'key': 'certificateBytes', 'type': '[number]'}, + 'token': {'key': 'token', 'type': 'str'} + } + + def __init__(self, certificate_bytes=None, token=None): + super(ClientRightsContainer, self).__init__() + self.certificate_bytes = certificate_bytes + self.token = token diff --git a/vsts/vsts/licensing/v4_1/models/extension_assignment.py b/vsts/vsts/licensing/v4_1/models/extension_assignment.py new file mode 100644 index 00000000..708b77bb --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/extension_assignment.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAssignment(Model): + """ExtensionAssignment. + + :param extension_gallery_id: Gets or sets the extension ID to assign. + :type extension_gallery_id: str + :param is_auto_assignment: Set to true if this a auto assignment scenario. + :type is_auto_assignment: bool + :param licensing_source: Gets or sets the licensing source. + :type licensing_source: object + :param user_ids: Gets or sets the user IDs to assign the extension to. + :type user_ids: list of str + """ + + _attribute_map = { + 'extension_gallery_id': {'key': 'extensionGalleryId', 'type': 'str'}, + 'is_auto_assignment': {'key': 'isAutoAssignment', 'type': 'bool'}, + 'licensing_source': {'key': 'licensingSource', 'type': 'object'}, + 'user_ids': {'key': 'userIds', 'type': '[str]'} + } + + def __init__(self, extension_gallery_id=None, is_auto_assignment=None, licensing_source=None, user_ids=None): + super(ExtensionAssignment, self).__init__() + self.extension_gallery_id = extension_gallery_id + self.is_auto_assignment = is_auto_assignment + self.licensing_source = licensing_source + self.user_ids = user_ids diff --git a/vsts/vsts/licensing/v4_1/models/extension_assignment_details.py b/vsts/vsts/licensing/v4_1/models/extension_assignment_details.py new file mode 100644 index 00000000..2ce0a970 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/extension_assignment_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionAssignmentDetails(Model): + """ExtensionAssignmentDetails. + + :param assignment_status: + :type assignment_status: object + :param source_collection_name: + :type source_collection_name: str + """ + + _attribute_map = { + 'assignment_status': {'key': 'assignmentStatus', 'type': 'object'}, + 'source_collection_name': {'key': 'sourceCollectionName', 'type': 'str'} + } + + def __init__(self, assignment_status=None, source_collection_name=None): + super(ExtensionAssignmentDetails, self).__init__() + self.assignment_status = assignment_status + self.source_collection_name = source_collection_name diff --git a/vsts/vsts/licensing/v4_1/models/extension_license_data.py b/vsts/vsts/licensing/v4_1/models/extension_license_data.py new file mode 100644 index 00000000..0e088a4f --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/extension_license_data.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionLicenseData(Model): + """ExtensionLicenseData. + + :param created_date: + :type created_date: datetime + :param extension_id: + :type extension_id: str + :param is_free: + :type is_free: bool + :param minimum_required_access_level: + :type minimum_required_access_level: object + :param updated_date: + :type updated_date: datetime + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'is_free': {'key': 'isFree', 'type': 'bool'}, + 'minimum_required_access_level': {'key': 'minimumRequiredAccessLevel', 'type': 'object'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'} + } + + def __init__(self, created_date=None, extension_id=None, is_free=None, minimum_required_access_level=None, updated_date=None): + super(ExtensionLicenseData, self).__init__() + self.created_date = created_date + self.extension_id = extension_id + self.is_free = is_free + self.minimum_required_access_level = minimum_required_access_level + self.updated_date = updated_date diff --git a/vsts/vsts/licensing/v4_1/models/extension_operation_result.py b/vsts/vsts/licensing/v4_1/models/extension_operation_result.py new file mode 100644 index 00000000..e04aa817 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/extension_operation_result.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionOperationResult(Model): + """ExtensionOperationResult. + + :param account_id: + :type account_id: str + :param extension_id: + :type extension_id: str + :param message: + :type message: str + :param operation: + :type operation: object + :param result: + :type result: object + :param user_id: + :type user_id: str + """ + + _attribute_map = { + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'extension_id': {'key': 'extensionId', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'object'}, + 'result': {'key': 'result', 'type': 'object'}, + 'user_id': {'key': 'userId', 'type': 'str'} + } + + def __init__(self, account_id=None, extension_id=None, message=None, operation=None, result=None, user_id=None): + super(ExtensionOperationResult, self).__init__() + self.account_id = account_id + self.extension_id = extension_id + self.message = message + self.operation = operation + self.result = result + self.user_id = user_id diff --git a/vsts/vsts/licensing/v4_1/models/extension_rights_result.py b/vsts/vsts/licensing/v4_1/models/extension_rights_result.py new file mode 100644 index 00000000..185249fe --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/extension_rights_result.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionRightsResult(Model): + """ExtensionRightsResult. + + :param entitled_extensions: + :type entitled_extensions: list of str + :param host_id: + :type host_id: str + :param reason: + :type reason: str + :param reason_code: + :type reason_code: object + :param result_code: + :type result_code: object + """ + + _attribute_map = { + 'entitled_extensions': {'key': 'entitledExtensions', 'type': '[str]'}, + 'host_id': {'key': 'hostId', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'reason_code': {'key': 'reasonCode', 'type': 'object'}, + 'result_code': {'key': 'resultCode', 'type': 'object'} + } + + def __init__(self, entitled_extensions=None, host_id=None, reason=None, reason_code=None, result_code=None): + super(ExtensionRightsResult, self).__init__() + self.entitled_extensions = entitled_extensions + self.host_id = host_id + self.reason = reason + self.reason_code = reason_code + self.result_code = result_code diff --git a/vsts/vsts/licensing/v4_1/models/extension_source.py b/vsts/vsts/licensing/v4_1/models/extension_source.py new file mode 100644 index 00000000..6a1409e5 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/extension_source.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExtensionSource(Model): + """ExtensionSource. + + :param assignment_source: Assignment Source + :type assignment_source: object + :param extension_gallery_id: extension Identifier + :type extension_gallery_id: str + :param licensing_source: The licensing source of the extension. Account, Msdn, ect. + :type licensing_source: object + """ + + _attribute_map = { + 'assignment_source': {'key': 'assignmentSource', 'type': 'object'}, + 'extension_gallery_id': {'key': 'extensionGalleryId', 'type': 'str'}, + 'licensing_source': {'key': 'licensingSource', 'type': 'object'} + } + + def __init__(self, assignment_source=None, extension_gallery_id=None, licensing_source=None): + super(ExtensionSource, self).__init__() + self.assignment_source = assignment_source + self.extension_gallery_id = extension_gallery_id + self.licensing_source = licensing_source diff --git a/vsts/vsts/licensing/v4_1/models/identity_ref.py b/vsts/vsts/licensing/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/licensing/v4_1/models/license.py b/vsts/vsts/licensing/v4_1/models/license.py new file mode 100644 index 00000000..6e381f36 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/license.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 License(Model): + """License. + + :param source: Gets the source of the license + :type source: object + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'object'} + } + + def __init__(self, source=None): + super(License, self).__init__() + self.source = source diff --git a/vsts/vsts/licensing/v4_1/models/msdn_entitlement.py b/vsts/vsts/licensing/v4_1/models/msdn_entitlement.py new file mode 100644 index 00000000..3fee52a8 --- /dev/null +++ b/vsts/vsts/licensing/v4_1/models/msdn_entitlement.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 MsdnEntitlement(Model): + """MsdnEntitlement. + + :param entitlement_code: Entilement id assigned to Entitlement in Benefits Database. + :type entitlement_code: str + :param entitlement_name: Entitlement Name e.g. Downloads, Chat. + :type entitlement_name: str + :param entitlement_type: Type of Entitlement e.g. Downloads, Chat. + :type entitlement_type: str + :param is_activated: Entitlement activation status + :type is_activated: bool + :param is_entitlement_available: Entitlement availability + :type is_entitlement_available: bool + :param subscription_channel: Write MSDN Channel into CRCT (Retail,MPN,VL,BizSpark,DreamSpark,MCT,FTE,Technet,WebsiteSpark,Other) + :type subscription_channel: str + :param subscription_expiration_date: Subscription Expiration Date. + :type subscription_expiration_date: datetime + :param subscription_id: Subscription id which identifies the subscription itself. This is the Benefit Detail Guid from BMS. + :type subscription_id: str + :param subscription_level_code: Identifier of the subscription or benefit level. + :type subscription_level_code: str + :param subscription_level_name: Name of subscription level. + :type subscription_level_name: str + :param subscription_status: Subscription Status Code (ACT, PND, INA ...). + :type subscription_status: str + """ + + _attribute_map = { + 'entitlement_code': {'key': 'entitlementCode', 'type': 'str'}, + 'entitlement_name': {'key': 'entitlementName', 'type': 'str'}, + 'entitlement_type': {'key': 'entitlementType', 'type': 'str'}, + 'is_activated': {'key': 'isActivated', 'type': 'bool'}, + 'is_entitlement_available': {'key': 'isEntitlementAvailable', 'type': 'bool'}, + 'subscription_channel': {'key': 'subscriptionChannel', 'type': 'str'}, + 'subscription_expiration_date': {'key': 'subscriptionExpirationDate', 'type': 'iso-8601'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'subscription_level_code': {'key': 'subscriptionLevelCode', 'type': 'str'}, + 'subscription_level_name': {'key': 'subscriptionLevelName', 'type': 'str'}, + 'subscription_status': {'key': 'subscriptionStatus', 'type': 'str'} + } + + def __init__(self, entitlement_code=None, entitlement_name=None, entitlement_type=None, is_activated=None, is_entitlement_available=None, subscription_channel=None, subscription_expiration_date=None, subscription_id=None, subscription_level_code=None, subscription_level_name=None, subscription_status=None): + super(MsdnEntitlement, self).__init__() + self.entitlement_code = entitlement_code + self.entitlement_name = entitlement_name + self.entitlement_type = entitlement_type + self.is_activated = is_activated + self.is_entitlement_available = is_entitlement_available + self.subscription_channel = subscription_channel + self.subscription_expiration_date = subscription_expiration_date + self.subscription_id = subscription_id + self.subscription_level_code = subscription_level_code + self.subscription_level_name = subscription_level_name + self.subscription_status = subscription_status diff --git a/vsts/vsts/location/v4_0/location_client.py b/vsts/vsts/location/v4_0/location_client.py index 97cb9f1f..f9ab6d62 100644 --- a/vsts/vsts/location/v4_0/location_client.py +++ b/vsts/vsts/location/v4_0/location_client.py @@ -18,7 +18,7 @@ class LocationClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(LocationClient, 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) @@ -28,14 +28,14 @@ def __init__(self, base_url=None, creds=None): def get_connection_data(self, connect_options=None, last_change_id=None, last_change_id64=None): """GetConnectionData. [Preview API] This was copied and adapted from TeamFoundationConnectionService.Connect() - :param ConnectOptions connect_options: + :param str connect_options: :param int last_change_id: Obsolete 32-bit LastChangeId :param long last_change_id64: Non-truncated 64-bit LastChangeId :rtype: :class:` ` """ query_parameters = {} if connect_options is not None: - query_parameters['connectOptions'] = self._serialize.query('connect_options', connect_options, 'ConnectOptions') + query_parameters['connectOptions'] = self._serialize.query('connect_options', connect_options, 'str') if last_change_id is not None: query_parameters['lastChangeId'] = self._serialize.query('last_change_id', last_change_id, 'int') if last_change_id64 is not None: diff --git a/vsts/vsts/location/v4_1/location_client.py b/vsts/vsts/location/v4_1/location_client.py index 99c429d7..bef06422 100644 --- a/vsts/vsts/location/v4_1/location_client.py +++ b/vsts/vsts/location/v4_1/location_client.py @@ -18,7 +18,7 @@ class LocationClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(LocationClient, 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) @@ -28,14 +28,14 @@ def __init__(self, base_url=None, creds=None): def get_connection_data(self, connect_options=None, last_change_id=None, last_change_id64=None): """GetConnectionData. [Preview API] This was copied and adapted from TeamFoundationConnectionService.Connect() - :param ConnectOptions connect_options: + :param str connect_options: :param int last_change_id: Obsolete 32-bit LastChangeId :param long last_change_id64: Non-truncated 64-bit LastChangeId :rtype: :class:` ` """ query_parameters = {} if connect_options is not None: - query_parameters['connectOptions'] = self._serialize.query('connect_options', connect_options, 'ConnectOptions') + query_parameters['connectOptions'] = self._serialize.query('connect_options', connect_options, 'str') if last_change_id is not None: query_parameters['lastChangeId'] = self._serialize.query('last_change_id', last_change_id, 'int') if last_change_id64 is not None: @@ -46,29 +46,81 @@ def get_connection_data(self, connect_options=None, last_change_id=None, last_ch query_parameters=query_parameters) return self._deserialize('ConnectionData', response) - def get_resource_area(self, area_id): + def get_resource_area(self, area_id, organization_name=None, account_name=None): """GetResourceArea. [Preview API] :param str area_id: + :param str organization_name: + :param str account_name: :rtype: :class:` ` """ route_values = {} if area_id is not None: route_values['areaId'] = self._serialize.url('area_id', area_id, 'str') + query_parameters = {} + if organization_name is not None: + query_parameters['organizationName'] = self._serialize.query('organization_name', organization_name, 'str') + if account_name is not None: + query_parameters['accountName'] = self._serialize.query('account_name', account_name, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', version='4.1-preview.1', - route_values=route_values) + route_values=route_values, + query_parameters=query_parameters) return self._deserialize('ResourceAreaInfo', response) - def get_resource_areas(self): + def get_resource_area_by_host(self, area_id, host_id): + """GetResourceAreaByHost. + [Preview API] + :param str area_id: + :param str host_id: + :rtype: :class:` ` + """ + route_values = {} + if area_id is not None: + route_values['areaId'] = self._serialize.url('area_id', area_id, 'str') + query_parameters = {} + if host_id is not None: + query_parameters['hostId'] = self._serialize.query('host_id', host_id, 'str') + response = self._send(http_method='GET', + location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ResourceAreaInfo', response) + + def get_resource_areas(self, organization_name=None, account_name=None): """GetResourceAreas. [Preview API] + :param str organization_name: + :param str account_name: + :rtype: [ResourceAreaInfo] + """ + query_parameters = {} + if organization_name is not None: + query_parameters['organizationName'] = self._serialize.query('organization_name', organization_name, 'str') + if account_name is not None: + query_parameters['accountName'] = self._serialize.query('account_name', account_name, 'str') + response = self._send(http_method='GET', + location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ResourceAreaInfo]', response) + + def get_resource_areas_by_host(self, host_id): + """GetResourceAreasByHost. + [Preview API] + :param str host_id: :rtype: [ResourceAreaInfo] """ + query_parameters = {} + if host_id is not None: + query_parameters['hostId'] = self._serialize.query('host_id', host_id, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', version='4.1-preview.1', + query_parameters=query_parameters, returns_collection=True) return self._deserialize('[ResourceAreaInfo]', response) diff --git a/vsts/vsts/location/v4_1/models/__init__.py b/vsts/vsts/location/v4_1/models/__init__.py index dbde91d7..61ed73d1 100644 --- a/vsts/vsts/location/v4_1/models/__init__.py +++ b/vsts/vsts/location/v4_1/models/__init__.py @@ -9,6 +9,7 @@ from .access_mapping import AccessMapping from .connection_data import ConnectionData from .identity import Identity +from .identity_base import IdentityBase from .location_mapping import LocationMapping from .location_service_data import LocationServiceData from .resource_area_info import ResourceAreaInfo @@ -18,6 +19,7 @@ 'AccessMapping', 'ConnectionData', 'Identity', + 'IdentityBase', 'LocationMapping', 'LocationServiceData', 'ResourceAreaInfo', diff --git a/vsts/vsts/location/v4_1/models/identity.py b/vsts/vsts/location/v4_1/models/identity.py index 65172c4a..96628e6c 100644 --- a/vsts/vsts/location/v4_1/models/identity.py +++ b/vsts/vsts/location/v4_1/models/identity.py @@ -6,10 +6,10 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .identity_base import IdentityBase -class Identity(Model): +class Identity(IdentityBase): """Identity. :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) @@ -59,23 +59,8 @@ class Identity(Model): 'provider_display_name': {'key': 'providerDisplayName', 'type': 'str'}, 'resource_version': {'key': 'resourceVersion', 'type': 'int'}, 'subject_descriptor': {'key': 'subjectDescriptor', 'type': 'str'}, - 'unique_user_id': {'key': 'uniqueUserId', 'type': 'int'} + '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__() - self.custom_display_name = custom_display_name - self.descriptor = descriptor - self.id = id - self.is_active = is_active - self.is_container = is_container - self.master_id = master_id - self.member_ids = member_ids - self.member_of = member_of - self.members = members - self.meta_type_id = meta_type_id - self.properties = properties - self.provider_display_name = provider_display_name - self.resource_version = resource_version - self.subject_descriptor = subject_descriptor - self.unique_user_id = unique_user_id + 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) diff --git a/vsts/vsts/models/__init__.py b/vsts/vsts/models/__init__.py index 6ddbb023..1ac30840 100644 --- a/vsts/vsts/models/__init__.py +++ b/vsts/vsts/models/__init__.py @@ -9,6 +9,7 @@ from ..customer_intelligence.v4_0.models.customer_intelligence_event import CustomerIntelligenceEvent from .improper_exception import ImproperException from ..location.v4_0.models.resource_area_info import ResourceAreaInfo +from .system_exception import SystemException from .vss_json_collection_wrapper_base import VssJsonCollectionWrapperBase from .vss_json_collection_wrapper import VssJsonCollectionWrapper from .wrapped_exception import WrappedException @@ -18,6 +19,7 @@ 'CustomerIntelligenceEvent', 'ImproperException', 'ResourceAreaInfo', + 'SystemException', 'VssJsonCollectionWrapperBase', 'VssJsonCollectionWrapper', 'WrappedException' diff --git a/vsts/vsts/models/system_exception.py b/vsts/vsts/models/system_exception.py new file mode 100644 index 00000000..7659b93b --- /dev/null +++ b/vsts/vsts/models/system_exception.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# 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 SystemException(Model): + """SystemException. + :param class_name: + :type class_name: str + :param inner_exception: + :type inner_exception: :class:`SystemException ` + :param message: + :type message: str + """ + + _attribute_map = { + 'class_name': {'key': 'ClassName', 'type': 'str'}, + 'message': {'key': 'Message', 'type': 'str'}, + 'inner_exception': {'key': 'InnerException', 'type': 'SystemException'} + } + + def __init__(self, class_name=None, message=None, inner_exception=None): + super(SystemException, self).__init__() + self.class_name = class_name + self.message = message + self.inner_exception = inner_exception diff --git a/vsts/vsts/models/wrapped_exception.py b/vsts/vsts/models/wrapped_exception.py index 8f274d63..537deb0c 100644 --- a/vsts/vsts/models/wrapped_exception.py +++ b/vsts/vsts/models/wrapped_exception.py @@ -13,7 +13,7 @@ class WrappedException(Model): :param exception_id: :type exception_id: str :param inner_exception: - :type inner_exception: :class:`WrappedException ` + :type inner_exception: :class:`WrappedException ` :param message: :type message: str :param type_name: diff --git a/vsts/vsts/notification/__init__.py b/vsts/vsts/notification/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/notification/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/notification/v4_0/__init__.py b/vsts/vsts/notification/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/notification/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/notification/v4_0/models/__init__.py b/vsts/vsts/notification/v4_0/models/__init__.py new file mode 100644 index 00000000..56c91337 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/__init__.py @@ -0,0 +1,113 @@ +# -------------------------------------------------------------------------------------------- +# 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 .artifact_filter import ArtifactFilter +from .base_subscription_filter import BaseSubscriptionFilter +from .batch_notification_operation import BatchNotificationOperation +from .event_actor import EventActor +from .event_scope import EventScope +from .events_evaluation_result import EventsEvaluationResult +from .expression_filter_clause import ExpressionFilterClause +from .expression_filter_group import ExpressionFilterGroup +from .expression_filter_model import ExpressionFilterModel +from .field_input_values import FieldInputValues +from .field_values_query import FieldValuesQuery +from .identity_ref import IdentityRef +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .input_values_query import InputValuesQuery +from .iSubscription_channel import ISubscriptionChannel +from .iSubscription_filter import ISubscriptionFilter +from .notification_event_field import NotificationEventField +from .notification_event_field_operator import NotificationEventFieldOperator +from .notification_event_field_type import NotificationEventFieldType +from .notification_event_publisher import NotificationEventPublisher +from .notification_event_role import NotificationEventRole +from .notification_event_type import NotificationEventType +from .notification_event_type_category import NotificationEventTypeCategory +from .notification_query_condition import NotificationQueryCondition +from .notification_reason import NotificationReason +from .notifications_evaluation_result import NotificationsEvaluationResult +from .notification_statistic import NotificationStatistic +from .notification_statistics_query import NotificationStatisticsQuery +from .notification_statistics_query_conditions import NotificationStatisticsQueryConditions +from .notification_subscriber import NotificationSubscriber +from .notification_subscriber_update_parameters import NotificationSubscriberUpdateParameters +from .notification_subscription import NotificationSubscription +from .notification_subscription_create_parameters import NotificationSubscriptionCreateParameters +from .notification_subscription_template import NotificationSubscriptionTemplate +from .notification_subscription_update_parameters import NotificationSubscriptionUpdateParameters +from .operator_constraint import OperatorConstraint +from .reference_links import ReferenceLinks +from .subscription_admin_settings import SubscriptionAdminSettings +from .subscription_channel_with_address import SubscriptionChannelWithAddress +from .subscription_evaluation_request import SubscriptionEvaluationRequest +from .subscription_evaluation_result import SubscriptionEvaluationResult +from .subscription_evaluation_settings import SubscriptionEvaluationSettings +from .subscription_management import SubscriptionManagement +from .subscription_query import SubscriptionQuery +from .subscription_query_condition import SubscriptionQueryCondition +from .subscription_scope import SubscriptionScope +from .subscription_user_settings import SubscriptionUserSettings +from .value_definition import ValueDefinition +from .vss_notification_event import VssNotificationEvent + +__all__ = [ + 'ArtifactFilter', + 'BaseSubscriptionFilter', + 'BatchNotificationOperation', + 'EventActor', + 'EventScope', + 'EventsEvaluationResult', + 'ExpressionFilterClause', + 'ExpressionFilterGroup', + 'ExpressionFilterModel', + 'FieldInputValues', + 'FieldValuesQuery', + 'IdentityRef', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'InputValuesQuery', + 'ISubscriptionChannel', + 'ISubscriptionFilter', + 'NotificationEventField', + 'NotificationEventFieldOperator', + 'NotificationEventFieldType', + 'NotificationEventPublisher', + 'NotificationEventRole', + 'NotificationEventType', + 'NotificationEventTypeCategory', + 'NotificationQueryCondition', + 'NotificationReason', + 'NotificationsEvaluationResult', + 'NotificationStatistic', + 'NotificationStatisticsQuery', + 'NotificationStatisticsQueryConditions', + 'NotificationSubscriber', + 'NotificationSubscriberUpdateParameters', + 'NotificationSubscription', + 'NotificationSubscriptionCreateParameters', + 'NotificationSubscriptionTemplate', + 'NotificationSubscriptionUpdateParameters', + 'OperatorConstraint', + 'ReferenceLinks', + 'SubscriptionAdminSettings', + 'SubscriptionChannelWithAddress', + 'SubscriptionEvaluationRequest', + 'SubscriptionEvaluationResult', + 'SubscriptionEvaluationSettings', + 'SubscriptionManagement', + 'SubscriptionQuery', + 'SubscriptionQueryCondition', + 'SubscriptionScope', + 'SubscriptionUserSettings', + 'ValueDefinition', + 'VssNotificationEvent', +] diff --git a/vsts/vsts/notification/v4_0/models/artifact_filter.py b/vsts/vsts/notification/v4_0/models/artifact_filter.py new file mode 100644 index 00000000..633c1aff --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/artifact_filter.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------------------------- +# 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 .base_subscription_filter import BaseSubscriptionFilter + + +class ArtifactFilter(BaseSubscriptionFilter): + """ArtifactFilter. + + :param event_type: + :type event_type: str + :param artifact_id: + :type artifact_id: str + :param artifact_type: + :type artifact_type: str + :param artifact_uri: + :type artifact_uri: str + :param type: + :type type: str + """ + + _attribute_map = { + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_type': {'key': 'artifactType', 'type': 'str'}, + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, event_type=None, artifact_id=None, artifact_type=None, artifact_uri=None, type=None): + super(ArtifactFilter, self).__init__(event_type=event_type) + self.artifact_id = artifact_id + self.artifact_type = artifact_type + self.artifact_uri = artifact_uri + self.type = type diff --git a/vsts/vsts/notification/v4_0/models/base_subscription_filter.py b/vsts/vsts/notification/v4_0/models/base_subscription_filter.py new file mode 100644 index 00000000..64cfbeca --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/base_subscription_filter.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BaseSubscriptionFilter(Model): + """BaseSubscriptionFilter. + + :param event_type: + :type event_type: str + :param type: + :type type: str + """ + + _attribute_map = { + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, event_type=None, type=None): + super(BaseSubscriptionFilter, self).__init__() + self.event_type = event_type + self.type = type diff --git a/vsts/vsts/notification/v4_0/models/batch_notification_operation.py b/vsts/vsts/notification/v4_0/models/batch_notification_operation.py new file mode 100644 index 00000000..e8040157 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/batch_notification_operation.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BatchNotificationOperation(Model): + """BatchNotificationOperation. + + :param notification_operation: + :type notification_operation: object + :param notification_query_conditions: + :type notification_query_conditions: list of :class:`NotificationQueryCondition ` + """ + + _attribute_map = { + 'notification_operation': {'key': 'notificationOperation', 'type': 'object'}, + 'notification_query_conditions': {'key': 'notificationQueryConditions', 'type': '[NotificationQueryCondition]'} + } + + def __init__(self, notification_operation=None, notification_query_conditions=None): + super(BatchNotificationOperation, self).__init__() + self.notification_operation = notification_operation + self.notification_query_conditions = notification_query_conditions diff --git a/vsts/vsts/notification/v4_0/models/event_actor.py b/vsts/vsts/notification/v4_0/models/event_actor.py new file mode 100644 index 00000000..00258294 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/event_actor.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventActor(Model): + """EventActor. + + :param id: Required: This is the identity of the user for the specified role. + :type id: str + :param role: Required: The event specific name of a role. + :type role: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'} + } + + def __init__(self, id=None, role=None): + super(EventActor, self).__init__() + self.id = id + self.role = role diff --git a/vsts/vsts/notification/v4_0/models/event_scope.py b/vsts/vsts/notification/v4_0/models/event_scope.py new file mode 100644 index 00000000..e15c58fd --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/event_scope.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventScope(Model): + """EventScope. + + :param id: Required: This is the identity of the scope for the type. + :type id: str + :param type: Required: The event specific type of a scope. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, type=None): + super(EventScope, self).__init__() + self.id = id + self.type = type diff --git a/vsts/vsts/notification/v4_0/models/events_evaluation_result.py b/vsts/vsts/notification/v4_0/models/events_evaluation_result.py new file mode 100644 index 00000000..cf73a07d --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/events_evaluation_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventsEvaluationResult(Model): + """EventsEvaluationResult. + + :param count: Count of events evaluated. + :type count: int + :param matched_count: Count of matched events. + :type matched_count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'matched_count': {'key': 'matchedCount', 'type': 'int'} + } + + def __init__(self, count=None, matched_count=None): + super(EventsEvaluationResult, self).__init__() + self.count = count + self.matched_count = matched_count diff --git a/vsts/vsts/notification/v4_0/models/expression_filter_clause.py b/vsts/vsts/notification/v4_0/models/expression_filter_clause.py new file mode 100644 index 00000000..908ba993 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/expression_filter_clause.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExpressionFilterClause(Model): + """ExpressionFilterClause. + + :param field_name: + :type field_name: str + :param index: The order in which this clause appeared in the filter query + :type index: int + :param logical_operator: Logical Operator 'AND', 'OR' or NULL (only for the first clause in the filter) + :type logical_operator: str + :param operator: + :type operator: str + :param value: + :type value: str + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'index': {'key': 'index', 'type': 'int'}, + 'logical_operator': {'key': 'logicalOperator', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, field_name=None, index=None, logical_operator=None, operator=None, value=None): + super(ExpressionFilterClause, self).__init__() + self.field_name = field_name + self.index = index + self.logical_operator = logical_operator + self.operator = operator + self.value = value diff --git a/vsts/vsts/notification/v4_0/models/expression_filter_group.py b/vsts/vsts/notification/v4_0/models/expression_filter_group.py new file mode 100644 index 00000000..d7c493bf --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/expression_filter_group.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExpressionFilterGroup(Model): + """ExpressionFilterGroup. + + :param end: The index of the last FilterClause in this group + :type end: int + :param level: Level of the group, since groups can be nested for each nested group the level will increase by 1 + :type level: int + :param start: The index of the first FilterClause in this group + :type start: int + """ + + _attribute_map = { + 'end': {'key': 'end', 'type': 'int'}, + 'level': {'key': 'level', 'type': 'int'}, + 'start': {'key': 'start', 'type': 'int'} + } + + def __init__(self, end=None, level=None, start=None): + super(ExpressionFilterGroup, self).__init__() + self.end = end + self.level = level + self.start = start diff --git a/vsts/vsts/notification/v4_0/models/expression_filter_model.py b/vsts/vsts/notification/v4_0/models/expression_filter_model.py new file mode 100644 index 00000000..9e483cb0 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/expression_filter_model.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExpressionFilterModel(Model): + """ExpressionFilterModel. + + :param clauses: Flat list of clauses in this subscription + :type clauses: list of :class:`ExpressionFilterClause ` + :param groups: Grouping of clauses in the subscription + :type groups: list of :class:`ExpressionFilterGroup ` + :param max_group_level: Max depth of the Subscription tree + :type max_group_level: int + """ + + _attribute_map = { + 'clauses': {'key': 'clauses', 'type': '[ExpressionFilterClause]'}, + 'groups': {'key': 'groups', 'type': '[ExpressionFilterGroup]'}, + 'max_group_level': {'key': 'maxGroupLevel', 'type': 'int'} + } + + def __init__(self, clauses=None, groups=None, max_group_level=None): + super(ExpressionFilterModel, self).__init__() + self.clauses = clauses + self.groups = groups + self.max_group_level = max_group_level diff --git a/vsts/vsts/notification/v4_0/models/field_input_values.py b/vsts/vsts/notification/v4_0/models/field_input_values.py new file mode 100644 index 00000000..4024af7e --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/field_input_values.py @@ -0,0 +1,46 @@ +# -------------------------------------------------------------------------------------------- +# 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 .input_values import InputValues + + +class FieldInputValues(InputValues): + """FieldInputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + :param operators: + :type operators: list of number + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'}, + 'operators': {'key': 'operators', 'type': '[number]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None, operators=None): + super(FieldInputValues, self).__init__(default_value=default_value, error=error, input_id=input_id, is_disabled=is_disabled, is_limited_to_possible_values=is_limited_to_possible_values, is_read_only=is_read_only, possible_values=possible_values) + self.operators = operators diff --git a/vsts/vsts/notification/v4_0/models/field_values_query.py b/vsts/vsts/notification/v4_0/models/field_values_query.py new file mode 100644 index 00000000..f878970a --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/field_values_query.py @@ -0,0 +1,35 @@ +# -------------------------------------------------------------------------------------------- +# 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 .input_values_query import InputValuesQuery + + +class FieldValuesQuery(InputValuesQuery): + """FieldValuesQuery. + + :param current_values: + :type current_values: dict + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + :param input_values: + :type input_values: list of :class:`FieldInputValues ` + :param scope: + :type scope: str + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'resource': {'key': 'resource', 'type': 'object'}, + 'input_values': {'key': 'inputValues', 'type': '[FieldInputValues]'}, + 'scope': {'key': 'scope', 'type': 'str'} + } + + def __init__(self, current_values=None, resource=None, input_values=None, scope=None): + super(FieldValuesQuery, self).__init__(current_values=current_values, resource=resource) + self.input_values = input_values + self.scope = scope diff --git a/vsts/vsts/notification/v4_0/models/iSubscription_channel.py b/vsts/vsts/notification/v4_0/models/iSubscription_channel.py new file mode 100644 index 00000000..9f8ed3c5 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/iSubscription_channel.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ISubscriptionChannel(Model): + """ISubscriptionChannel. + + :param type: + :type type: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, type=None): + super(ISubscriptionChannel, self).__init__() + self.type = type diff --git a/vsts/vsts/notification/v4_0/models/iSubscription_filter.py b/vsts/vsts/notification/v4_0/models/iSubscription_filter.py new file mode 100644 index 00000000..c90034ca --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/iSubscription_filter.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ISubscriptionFilter(Model): + """ISubscriptionFilter. + + :param event_type: + :type event_type: str + :param type: + :type type: str + """ + + _attribute_map = { + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, event_type=None, type=None): + super(ISubscriptionFilter, self).__init__() + self.event_type = event_type + self.type = type diff --git a/vsts/vsts/notification/v4_0/models/identity_ref.py b/vsts/vsts/notification/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/notification/v4_0/models/input_value.py b/vsts/vsts/notification/v4_0/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/notification/v4_0/models/input_values.py b/vsts/vsts/notification/v4_0/models/input_values.py new file mode 100644 index 00000000..15d047fe --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/notification/v4_0/models/input_values_error.py b/vsts/vsts/notification/v4_0/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/notification/v4_0/models/input_values_query.py b/vsts/vsts/notification/v4_0/models/input_values_query.py new file mode 100644 index 00000000..26e4c954 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/input_values_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesQuery(Model): + """InputValuesQuery. + + :param current_values: + :type current_values: dict + :param input_values: The input values to return on input, and the result from the consumer on output. + :type input_values: list of :class:`InputValues ` + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, + 'resource': {'key': 'resource', 'type': 'object'} + } + + def __init__(self, current_values=None, input_values=None, resource=None): + super(InputValuesQuery, self).__init__() + self.current_values = current_values + self.input_values = input_values + self.resource = resource diff --git a/vsts/vsts/notification/v4_0/models/notification_event_field.py b/vsts/vsts/notification/v4_0/models/notification_event_field.py new file mode 100644 index 00000000..f0154e29 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_event_field.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventField(Model): + """NotificationEventField. + + :param field_type: Gets or sets the type of this field. + :type field_type: :class:`NotificationEventFieldType ` + :param id: Gets or sets the unique identifier of this field. + :type id: str + :param name: Gets or sets the name of this field. + :type name: str + :param path: Gets or sets the path to the field in the event object. This path can be either Json Path or XPath, depending on if the event will be serialized into Json or XML + :type path: str + :param supported_scopes: Gets or sets the scopes that this field supports. If not specified then the event type scopes apply. + :type supported_scopes: list of str + """ + + _attribute_map = { + 'field_type': {'key': 'fieldType', 'type': 'NotificationEventFieldType'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[str]'} + } + + def __init__(self, field_type=None, id=None, name=None, path=None, supported_scopes=None): + super(NotificationEventField, self).__init__() + self.field_type = field_type + self.id = id + self.name = name + self.path = path + self.supported_scopes = supported_scopes diff --git a/vsts/vsts/notification/v4_0/models/notification_event_field_operator.py b/vsts/vsts/notification/v4_0/models/notification_event_field_operator.py new file mode 100644 index 00000000..20593c7d --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_event_field_operator.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventFieldOperator(Model): + """NotificationEventFieldOperator. + + :param display_name: Gets or sets the display name of an operator + :type display_name: str + :param id: Gets or sets the id of an operator + :type id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, display_name=None, id=None): + super(NotificationEventFieldOperator, self).__init__() + self.display_name = display_name + self.id = id diff --git a/vsts/vsts/notification/v4_0/models/notification_event_field_type.py b/vsts/vsts/notification/v4_0/models/notification_event_field_type.py new file mode 100644 index 00000000..d92b825d --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_event_field_type.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventFieldType(Model): + """NotificationEventFieldType. + + :param id: Gets or sets the unique identifier of this field type. + :type id: str + :param operator_constraints: + :type operator_constraints: list of :class:`OperatorConstraint ` + :param operators: Gets or sets the list of operators that this type supports. + :type operators: list of :class:`NotificationEventFieldOperator ` + :param subscription_field_type: + :type subscription_field_type: object + :param value: Gets or sets the value definition of this field like the getValuesMethod and template to display in the UI + :type value: :class:`ValueDefinition ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'operator_constraints': {'key': 'operatorConstraints', 'type': '[OperatorConstraint]'}, + 'operators': {'key': 'operators', 'type': '[NotificationEventFieldOperator]'}, + 'subscription_field_type': {'key': 'subscriptionFieldType', 'type': 'object'}, + 'value': {'key': 'value', 'type': 'ValueDefinition'} + } + + def __init__(self, id=None, operator_constraints=None, operators=None, subscription_field_type=None, value=None): + super(NotificationEventFieldType, self).__init__() + self.id = id + self.operator_constraints = operator_constraints + self.operators = operators + self.subscription_field_type = subscription_field_type + self.value = value diff --git a/vsts/vsts/notification/v4_0/models/notification_event_publisher.py b/vsts/vsts/notification/v4_0/models/notification_event_publisher.py new file mode 100644 index 00000000..1d9da751 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_event_publisher.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventPublisher(Model): + """NotificationEventPublisher. + + :param id: + :type id: str + :param subscription_management_info: + :type subscription_management_info: :class:`SubscriptionManagement ` + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_management_info': {'key': 'subscriptionManagementInfo', 'type': 'SubscriptionManagement'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, subscription_management_info=None, url=None): + super(NotificationEventPublisher, self).__init__() + self.id = id + self.subscription_management_info = subscription_management_info + self.url = url diff --git a/vsts/vsts/notification/v4_0/models/notification_event_role.py b/vsts/vsts/notification/v4_0/models/notification_event_role.py new file mode 100644 index 00000000..51f4c866 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_event_role.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventRole(Model): + """NotificationEventRole. + + :param id: Gets or sets an Id for that role, this id is used by the event. + :type id: str + :param name: Gets or sets the Name for that role, this name is used for UI display. + :type name: str + :param supports_groups: Gets or sets whether this role can be a group or just an individual user + :type supports_groups: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supports_groups': {'key': 'supportsGroups', 'type': 'bool'} + } + + def __init__(self, id=None, name=None, supports_groups=None): + super(NotificationEventRole, self).__init__() + self.id = id + self.name = name + self.supports_groups = supports_groups diff --git a/vsts/vsts/notification/v4_0/models/notification_event_type.py b/vsts/vsts/notification/v4_0/models/notification_event_type.py new file mode 100644 index 00000000..17edad39 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_event_type.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventType(Model): + """NotificationEventType. + + :param category: + :type category: :class:`NotificationEventTypeCategory ` + :param color: Gets or sets the color representing this event type. Example: rgb(128,245,211) or #fafafa + :type color: str + :param custom_subscriptions_allowed: + :type custom_subscriptions_allowed: bool + :param event_publisher: + :type event_publisher: :class:`NotificationEventPublisher ` + :param fields: + :type fields: dict + :param has_initiator: + :type has_initiator: bool + :param icon: Gets or sets the icon representing this event type. Can be a URL or a CSS class. Example: css://some-css-class + :type icon: str + :param id: Gets or sets the unique identifier of this event definition. + :type id: str + :param name: Gets or sets the name of this event definition. + :type name: str + :param roles: + :type roles: list of :class:`NotificationEventRole ` + :param supported_scopes: Gets or sets the scopes that this event type supports + :type supported_scopes: list of str + :param url: Gets or sets the rest end point to get this event type details (fields, fields types) + :type url: str + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'NotificationEventTypeCategory'}, + 'color': {'key': 'color', 'type': 'str'}, + 'custom_subscriptions_allowed': {'key': 'customSubscriptionsAllowed', 'type': 'bool'}, + 'event_publisher': {'key': 'eventPublisher', 'type': 'NotificationEventPublisher'}, + 'fields': {'key': 'fields', 'type': '{NotificationEventField}'}, + 'has_initiator': {'key': 'hasInitiator', 'type': 'bool'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[NotificationEventRole]'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[str]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, category=None, color=None, custom_subscriptions_allowed=None, event_publisher=None, fields=None, has_initiator=None, icon=None, id=None, name=None, roles=None, supported_scopes=None, url=None): + super(NotificationEventType, self).__init__() + self.category = category + self.color = color + self.custom_subscriptions_allowed = custom_subscriptions_allowed + self.event_publisher = event_publisher + self.fields = fields + self.has_initiator = has_initiator + self.icon = icon + self.id = id + self.name = name + self.roles = roles + self.supported_scopes = supported_scopes + self.url = url diff --git a/vsts/vsts/notification/v4_0/models/notification_event_type_category.py b/vsts/vsts/notification/v4_0/models/notification_event_type_category.py new file mode 100644 index 00000000..0d3040b6 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_event_type_category.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventTypeCategory(Model): + """NotificationEventTypeCategory. + + :param id: Gets or sets the unique identifier of this category. + :type id: str + :param name: Gets or sets the friendly name of this category. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(NotificationEventTypeCategory, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/notification/v4_0/models/notification_query_condition.py b/vsts/vsts/notification/v4_0/models/notification_query_condition.py new file mode 100644 index 00000000..1c1b3aaf --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_query_condition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationQueryCondition(Model): + """NotificationQueryCondition. + + :param event_initiator: + :type event_initiator: str + :param event_type: + :type event_type: str + :param subscriber: + :type subscriber: str + :param subscription_id: + :type subscription_id: str + """ + + _attribute_map = { + 'event_initiator': {'key': 'eventInitiator', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'subscriber': {'key': 'subscriber', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, event_initiator=None, event_type=None, subscriber=None, subscription_id=None): + super(NotificationQueryCondition, self).__init__() + self.event_initiator = event_initiator + self.event_type = event_type + self.subscriber = subscriber + self.subscription_id = subscription_id diff --git a/vsts/vsts/notification/v4_0/models/notification_reason.py b/vsts/vsts/notification/v4_0/models/notification_reason.py new file mode 100644 index 00000000..17bc7357 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_reason.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationReason(Model): + """NotificationReason. + + :param notification_reason_type: + :type notification_reason_type: object + :param target_identities: + :type target_identities: list of :class:`IdentityRef ` + """ + + _attribute_map = { + 'notification_reason_type': {'key': 'notificationReasonType', 'type': 'object'}, + 'target_identities': {'key': 'targetIdentities', 'type': '[IdentityRef]'} + } + + def __init__(self, notification_reason_type=None, target_identities=None): + super(NotificationReason, self).__init__() + self.notification_reason_type = notification_reason_type + self.target_identities = target_identities diff --git a/vsts/vsts/notification/v4_0/models/notification_statistic.py b/vsts/vsts/notification/v4_0/models/notification_statistic.py new file mode 100644 index 00000000..b045ca40 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_statistic.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationStatistic(Model): + """NotificationStatistic. + + :param date: + :type date: datetime + :param hit_count: + :type hit_count: int + :param path: + :type path: str + :param type: + :type type: object + :param user: + :type user: :class:`IdentityRef ` + """ + + _attribute_map = { + 'date': {'key': 'date', 'type': 'iso-8601'}, + 'hit_count': {'key': 'hitCount', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'}, + 'user': {'key': 'user', 'type': 'IdentityRef'} + } + + def __init__(self, date=None, hit_count=None, path=None, type=None, user=None): + super(NotificationStatistic, self).__init__() + self.date = date + self.hit_count = hit_count + self.path = path + self.type = type + self.user = user diff --git a/vsts/vsts/notification/v4_0/models/notification_statistics_query.py b/vsts/vsts/notification/v4_0/models/notification_statistics_query.py new file mode 100644 index 00000000..1b81a70d --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_statistics_query.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationStatisticsQuery(Model): + """NotificationStatisticsQuery. + + :param conditions: + :type conditions: list of :class:`NotificationStatisticsQueryConditions ` + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[NotificationStatisticsQueryConditions]'} + } + + def __init__(self, conditions=None): + super(NotificationStatisticsQuery, self).__init__() + self.conditions = conditions diff --git a/vsts/vsts/notification/v4_0/models/notification_statistics_query_conditions.py b/vsts/vsts/notification/v4_0/models/notification_statistics_query_conditions.py new file mode 100644 index 00000000..075c4233 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_statistics_query_conditions.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationStatisticsQueryConditions(Model): + """NotificationStatisticsQueryConditions. + + :param end_date: + :type end_date: datetime + :param hit_count_minimum: + :type hit_count_minimum: int + :param path: + :type path: str + :param start_date: + :type start_date: datetime + :param type: + :type type: object + :param user: + :type user: :class:`IdentityRef ` + """ + + _attribute_map = { + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'hit_count_minimum': {'key': 'hitCountMinimum', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'object'}, + 'user': {'key': 'user', 'type': 'IdentityRef'} + } + + def __init__(self, end_date=None, hit_count_minimum=None, path=None, start_date=None, type=None, user=None): + super(NotificationStatisticsQueryConditions, self).__init__() + self.end_date = end_date + self.hit_count_minimum = hit_count_minimum + self.path = path + self.start_date = start_date + self.type = type + self.user = user diff --git a/vsts/vsts/notification/v4_0/models/notification_subscriber.py b/vsts/vsts/notification/v4_0/models/notification_subscriber.py new file mode 100644 index 00000000..fa488c80 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_subscriber.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriber(Model): + """NotificationSubscriber. + + :param delivery_preference: Indicates how the subscriber should be notified by default. + :type delivery_preference: object + :param flags: + :type flags: object + :param id: Identifier of the subscriber. + :type id: str + :param preferred_email_address: Preferred email address of the subscriber. A null or empty value indicates no preferred email address has been set. + :type preferred_email_address: str + """ + + _attribute_map = { + 'delivery_preference': {'key': 'deliveryPreference', 'type': 'object'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + 'preferred_email_address': {'key': 'preferredEmailAddress', 'type': 'str'} + } + + def __init__(self, delivery_preference=None, flags=None, id=None, preferred_email_address=None): + super(NotificationSubscriber, self).__init__() + self.delivery_preference = delivery_preference + self.flags = flags + self.id = id + self.preferred_email_address = preferred_email_address diff --git a/vsts/vsts/notification/v4_0/models/notification_subscriber_update_parameters.py b/vsts/vsts/notification/v4_0/models/notification_subscriber_update_parameters.py new file mode 100644 index 00000000..68ca80ff --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_subscriber_update_parameters.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriberUpdateParameters(Model): + """NotificationSubscriberUpdateParameters. + + :param delivery_preference: New delivery preference for the subscriber (indicates how the subscriber should be notified). + :type delivery_preference: object + :param preferred_email_address: New preferred email address for the subscriber. Specify an empty string to clear the current address. + :type preferred_email_address: str + """ + + _attribute_map = { + 'delivery_preference': {'key': 'deliveryPreference', 'type': 'object'}, + 'preferred_email_address': {'key': 'preferredEmailAddress', 'type': 'str'} + } + + def __init__(self, delivery_preference=None, preferred_email_address=None): + super(NotificationSubscriberUpdateParameters, self).__init__() + self.delivery_preference = delivery_preference + self.preferred_email_address = preferred_email_address diff --git a/vsts/vsts/notification/v4_0/models/notification_subscription.py b/vsts/vsts/notification/v4_0/models/notification_subscription.py new file mode 100644 index 00000000..818f7dd9 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_subscription.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscription(Model): + """NotificationSubscription. + + :param _links: Links to related resources, APIs, and views for the subscription. + :type _links: :class:`ReferenceLinks ` + :param admin_settings: Admin-managed settings for the subscription. Only applies when the subscriber is a group. + :type admin_settings: :class:`SubscriptionAdminSettings ` + :param channel: Channel for delivering notifications triggered by the subscription. + :type channel: :class:`ISubscriptionChannel ` + :param description: Description of the subscription. Typically describes filter criteria which helps identity the subscription. + :type description: str + :param extended_properties: Any extra properties like detailed description for different contexts, user/group contexts + :type extended_properties: dict + :param filter: Matching criteria for the subscription. ExpressionFilter + :type filter: :class:`ISubscriptionFilter ` + :param flags: Read-only indicators that further describe the subscription. + :type flags: object + :param id: Subscription identifier. + :type id: str + :param last_modified_by: User that last modified (or created) the subscription. + :type last_modified_by: :class:`IdentityRef ` + :param modified_date: Date when the subscription was last modified. If the subscription has not been updated since it was created, this value will indicate when the subscription was created. + :type modified_date: datetime + :param permissions: The permissions the user have for this subscriptions. + :type permissions: object + :param scope: The container in which events must be published from in order to be matched by the subscription. If empty, the scope is the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + :type scope: :class:`SubscriptionScope ` + :param status: Status of the subscription. Typically indicates whether the subscription is enabled or not. + :type status: object + :param status_message: Message that provides more details about the status of the subscription. + :type status_message: str + :param subscriber: User or group that will receive notifications for events matching the subscription's filter criteria. + :type subscriber: :class:`IdentityRef ` + :param url: REST API URL of the subscriotion. + :type url: str + :param user_settings: User-managed settings for the subscription. Only applies when the subscriber is a group. Typically used to indicate whether the calling user is opted in or out of a group subscription. + :type user_settings: :class:`SubscriptionUserSettings ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'admin_settings': {'key': 'adminSettings', 'type': 'SubscriptionAdminSettings'}, + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, + 'description': {'key': 'description', 'type': 'str'}, + 'extended_properties': {'key': 'extendedProperties', 'type': '{str}'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'permissions': {'key': 'permissions', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, + 'status': {'key': 'status', 'type': 'object'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'user_settings': {'key': 'userSettings', 'type': 'SubscriptionUserSettings'} + } + + def __init__(self, _links=None, admin_settings=None, channel=None, description=None, extended_properties=None, filter=None, flags=None, id=None, last_modified_by=None, modified_date=None, permissions=None, scope=None, status=None, status_message=None, subscriber=None, url=None, user_settings=None): + super(NotificationSubscription, self).__init__() + self._links = _links + self.admin_settings = admin_settings + self.channel = channel + self.description = description + self.extended_properties = extended_properties + self.filter = filter + self.flags = flags + self.id = id + self.last_modified_by = last_modified_by + self.modified_date = modified_date + self.permissions = permissions + self.scope = scope + self.status = status + self.status_message = status_message + self.subscriber = subscriber + self.url = url + self.user_settings = user_settings diff --git a/vsts/vsts/notification/v4_0/models/notification_subscription_create_parameters.py b/vsts/vsts/notification/v4_0/models/notification_subscription_create_parameters.py new file mode 100644 index 00000000..1d8f01d7 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_subscription_create_parameters.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriptionCreateParameters(Model): + """NotificationSubscriptionCreateParameters. + + :param channel: Channel for delivering notifications triggered by the new subscription. + :type channel: :class:`ISubscriptionChannel ` + :param description: Brief description for the new subscription. Typically describes filter criteria which helps identity the subscription. + :type description: str + :param filter: Matching criteria for the new subscription. ExpressionFilter + :type filter: :class:`ISubscriptionFilter ` + :param scope: The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + :type scope: :class:`SubscriptionScope ` + :param subscriber: User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. + :type subscriber: :class:`IdentityRef ` + """ + + _attribute_map = { + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, + 'description': {'key': 'description', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, + 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'} + } + + def __init__(self, channel=None, description=None, filter=None, scope=None, subscriber=None): + super(NotificationSubscriptionCreateParameters, self).__init__() + self.channel = channel + self.description = description + self.filter = filter + self.scope = scope + self.subscriber = subscriber diff --git a/vsts/vsts/notification/v4_0/models/notification_subscription_template.py b/vsts/vsts/notification/v4_0/models/notification_subscription_template.py new file mode 100644 index 00000000..a7db31fd --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_subscription_template.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriptionTemplate(Model): + """NotificationSubscriptionTemplate. + + :param description: + :type description: str + :param filter: + :type filter: :class:`ISubscriptionFilter ` + :param id: + :type id: str + :param notification_event_information: + :type notification_event_information: :class:`NotificationEventType ` + :param type: + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'id': {'key': 'id', 'type': 'str'}, + 'notification_event_information': {'key': 'notificationEventInformation', 'type': 'NotificationEventType'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, filter=None, id=None, notification_event_information=None, type=None): + super(NotificationSubscriptionTemplate, self).__init__() + self.description = description + self.filter = filter + self.id = id + self.notification_event_information = notification_event_information + self.type = type diff --git a/vsts/vsts/notification/v4_0/models/notification_subscription_update_parameters.py b/vsts/vsts/notification/v4_0/models/notification_subscription_update_parameters.py new file mode 100644 index 00000000..d2ecee78 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notification_subscription_update_parameters.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriptionUpdateParameters(Model): + """NotificationSubscriptionUpdateParameters. + + :param admin_settings: Admin-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. + :type admin_settings: :class:`SubscriptionAdminSettings ` + :param channel: Channel for delivering notifications triggered by the subscription. + :type channel: :class:`ISubscriptionChannel ` + :param description: Updated description for the subscription. Typically describes filter criteria which helps identity the subscription. + :type description: str + :param filter: Matching criteria for the subscription. ExpressionFilter + :type filter: :class:`ISubscriptionFilter ` + :param scope: The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically the current account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + :type scope: :class:`SubscriptionScope ` + :param status: Updated status for the subscription. Typically used to enable or disable a subscription. + :type status: object + :param status_message: Optional message that provides more details about the updated status. + :type status_message: str + :param user_settings: User-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. Typically used to opt-in or opt-out a user from a group subscription. + :type user_settings: :class:`SubscriptionUserSettings ` + """ + + _attribute_map = { + 'admin_settings': {'key': 'adminSettings', 'type': 'SubscriptionAdminSettings'}, + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, + 'description': {'key': 'description', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, + 'status': {'key': 'status', 'type': 'object'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'user_settings': {'key': 'userSettings', 'type': 'SubscriptionUserSettings'} + } + + def __init__(self, admin_settings=None, channel=None, description=None, filter=None, scope=None, status=None, status_message=None, user_settings=None): + super(NotificationSubscriptionUpdateParameters, self).__init__() + self.admin_settings = admin_settings + self.channel = channel + self.description = description + self.filter = filter + self.scope = scope + self.status = status + self.status_message = status_message + self.user_settings = user_settings diff --git a/vsts/vsts/notification/v4_0/models/notifications_evaluation_result.py b/vsts/vsts/notification/v4_0/models/notifications_evaluation_result.py new file mode 100644 index 00000000..3fe8febc --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/notifications_evaluation_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationsEvaluationResult(Model): + """NotificationsEvaluationResult. + + :param count: Count of generated notifications + :type count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'} + } + + def __init__(self, count=None): + super(NotificationsEvaluationResult, self).__init__() + self.count = count diff --git a/vsts/vsts/notification/v4_0/models/operator_constraint.py b/vsts/vsts/notification/v4_0/models/operator_constraint.py new file mode 100644 index 00000000..f5041e41 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/operator_constraint.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 OperatorConstraint(Model): + """OperatorConstraint. + + :param operator: + :type operator: str + :param supported_scopes: Gets or sets the list of scopes that this type supports. + :type supported_scopes: list of str + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[str]'} + } + + def __init__(self, operator=None, supported_scopes=None): + super(OperatorConstraint, self).__init__() + self.operator = operator + self.supported_scopes = supported_scopes diff --git a/vsts/vsts/notification/v4_0/models/reference_links.py b/vsts/vsts/notification/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/notification/v4_0/models/subscription_admin_settings.py b/vsts/vsts/notification/v4_0/models/subscription_admin_settings.py new file mode 100644 index 00000000..bb257d6a --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_admin_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionAdminSettings(Model): + """SubscriptionAdminSettings. + + :param block_user_opt_out: If true, members of the group subscribed to the associated subscription cannot opt (choose not to get notified) + :type block_user_opt_out: bool + """ + + _attribute_map = { + 'block_user_opt_out': {'key': 'blockUserOptOut', 'type': 'bool'} + } + + def __init__(self, block_user_opt_out=None): + super(SubscriptionAdminSettings, self).__init__() + self.block_user_opt_out = block_user_opt_out diff --git a/vsts/vsts/notification/v4_0/models/subscription_channel_with_address.py b/vsts/vsts/notification/v4_0/models/subscription_channel_with_address.py new file mode 100644 index 00000000..c5d7f620 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_channel_with_address.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionChannelWithAddress(Model): + """SubscriptionChannelWithAddress. + + :param address: + :type address: str + :param type: + :type type: str + :param use_custom_address: + :type use_custom_address: bool + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_custom_address': {'key': 'useCustomAddress', 'type': 'bool'} + } + + def __init__(self, address=None, type=None, use_custom_address=None): + super(SubscriptionChannelWithAddress, self).__init__() + self.address = address + self.type = type + self.use_custom_address = use_custom_address diff --git a/vsts/vsts/notification/v4_0/models/subscription_evaluation_request.py b/vsts/vsts/notification/v4_0/models/subscription_evaluation_request.py new file mode 100644 index 00000000..1de14b6f --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_evaluation_request.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionEvaluationRequest(Model): + """SubscriptionEvaluationRequest. + + :param min_events_created_date: The min created date for the events used for matching in UTC. Use all events created since this date + :type min_events_created_date: datetime + :param subscription_create_parameters: User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. + :type subscription_create_parameters: :class:`NotificationSubscriptionCreateParameters ` + """ + + _attribute_map = { + 'min_events_created_date': {'key': 'minEventsCreatedDate', 'type': 'iso-8601'}, + 'subscription_create_parameters': {'key': 'subscriptionCreateParameters', 'type': 'NotificationSubscriptionCreateParameters'} + } + + def __init__(self, min_events_created_date=None, subscription_create_parameters=None): + super(SubscriptionEvaluationRequest, self).__init__() + self.min_events_created_date = min_events_created_date + self.subscription_create_parameters = subscription_create_parameters diff --git a/vsts/vsts/notification/v4_0/models/subscription_evaluation_result.py b/vsts/vsts/notification/v4_0/models/subscription_evaluation_result.py new file mode 100644 index 00000000..4a278a9c --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_evaluation_result.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionEvaluationResult(Model): + """SubscriptionEvaluationResult. + + :param evaluation_job_status: Subscription evaluation job status + :type evaluation_job_status: object + :param events: Subscription evaluation events results. + :type events: :class:`EventsEvaluationResult ` + :param id: The requestId which is the subscription evaluation jobId + :type id: str + :param notifications: Subscription evaluation notification results. + :type notifications: :class:`NotificationsEvaluationResult ` + """ + + _attribute_map = { + 'evaluation_job_status': {'key': 'evaluationJobStatus', 'type': 'object'}, + 'events': {'key': 'events', 'type': 'EventsEvaluationResult'}, + 'id': {'key': 'id', 'type': 'str'}, + 'notifications': {'key': 'notifications', 'type': 'NotificationsEvaluationResult'} + } + + def __init__(self, evaluation_job_status=None, events=None, id=None, notifications=None): + super(SubscriptionEvaluationResult, self).__init__() + self.evaluation_job_status = evaluation_job_status + self.events = events + self.id = id + self.notifications = notifications diff --git a/vsts/vsts/notification/v4_0/models/subscription_evaluation_settings.py b/vsts/vsts/notification/v4_0/models/subscription_evaluation_settings.py new file mode 100644 index 00000000..2afc0946 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_evaluation_settings.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionEvaluationSettings(Model): + """SubscriptionEvaluationSettings. + + :param enabled: Indicates whether subscription evaluation before saving is enabled or not + :type enabled: bool + :param interval: Time interval to check on subscription evaluation job in seconds + :type interval: int + :param threshold: Threshold on the number of notifications for considering a subscription too noisy + :type threshold: int + :param time_out: Time out for the subscription evaluation check in seconds + :type time_out: int + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'threshold': {'key': 'threshold', 'type': 'int'}, + 'time_out': {'key': 'timeOut', 'type': 'int'} + } + + def __init__(self, enabled=None, interval=None, threshold=None, time_out=None): + super(SubscriptionEvaluationSettings, self).__init__() + self.enabled = enabled + self.interval = interval + self.threshold = threshold + self.time_out = time_out diff --git a/vsts/vsts/notification/v4_0/models/subscription_management.py b/vsts/vsts/notification/v4_0/models/subscription_management.py new file mode 100644 index 00000000..92f047de --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_management.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionManagement(Model): + """SubscriptionManagement. + + :param service_instance_type: + :type service_instance_type: str + :param url: + :type url: str + """ + + _attribute_map = { + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, service_instance_type=None, url=None): + super(SubscriptionManagement, self).__init__() + self.service_instance_type = service_instance_type + self.url = url diff --git a/vsts/vsts/notification/v4_0/models/subscription_query.py b/vsts/vsts/notification/v4_0/models/subscription_query.py new file mode 100644 index 00000000..898b8ae3 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionQuery(Model): + """SubscriptionQuery. + + :param conditions: One or more conditions to query on. If more than 2 conditions are specified, the combined results of each condition is returned (i.e. conditions are logically OR'ed). + :type conditions: list of :class:`SubscriptionQueryCondition ` + :param query_flags: Flags the refine the types of subscriptions that will be returned from the query. + :type query_flags: object + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[SubscriptionQueryCondition]'}, + 'query_flags': {'key': 'queryFlags', 'type': 'object'} + } + + def __init__(self, conditions=None, query_flags=None): + super(SubscriptionQuery, self).__init__() + self.conditions = conditions + self.query_flags = query_flags diff --git a/vsts/vsts/notification/v4_0/models/subscription_query_condition.py b/vsts/vsts/notification/v4_0/models/subscription_query_condition.py new file mode 100644 index 00000000..29679811 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_query_condition.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionQueryCondition(Model): + """SubscriptionQueryCondition. + + :param filter: Filter conditions that matching subscriptions must have. Typically only the filter's type and event type are used for matching. + :type filter: :class:`ISubscriptionFilter ` + :param flags: Flags to specify the the type subscriptions to query for. + :type flags: object + :param scope: Scope that matching subscriptions must have. + :type scope: str + :param subscriber_id: ID of the subscriber (user or group) that matching subscriptions must be subscribed to. + :type subscriber_id: str + :param subscription_id: ID of the subscription to query for. + :type subscription_id: str + """ + + _attribute_map = { + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'subscriber_id': {'key': 'subscriberId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, filter=None, flags=None, scope=None, subscriber_id=None, subscription_id=None): + super(SubscriptionQueryCondition, self).__init__() + self.filter = filter + self.flags = flags + self.scope = scope + self.subscriber_id = subscriber_id + self.subscription_id = subscription_id diff --git a/vsts/vsts/notification/v4_0/models/subscription_scope.py b/vsts/vsts/notification/v4_0/models/subscription_scope.py new file mode 100644 index 00000000..50575042 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_scope.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# 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 .event_scope import EventScope + + +class SubscriptionScope(EventScope): + """SubscriptionScope. + + :param id: Required: This is the identity of the scope for the type. + :type id: str + :param type: Required: The event specific type of a scope. + :type type: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, type=None, name=None): + super(SubscriptionScope, self).__init__(id=id, type=type) + self.name = name diff --git a/vsts/vsts/notification/v4_0/models/subscription_user_settings.py b/vsts/vsts/notification/v4_0/models/subscription_user_settings.py new file mode 100644 index 00000000..ae1d2e4b --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/subscription_user_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionUserSettings(Model): + """SubscriptionUserSettings. + + :param opted_out: Indicates whether the user will receive notifications for the associated group subscription. + :type opted_out: bool + """ + + _attribute_map = { + 'opted_out': {'key': 'optedOut', 'type': 'bool'} + } + + def __init__(self, opted_out=None): + super(SubscriptionUserSettings, self).__init__() + self.opted_out = opted_out diff --git a/vsts/vsts/notification/v4_0/models/value_definition.py b/vsts/vsts/notification/v4_0/models/value_definition.py new file mode 100644 index 00000000..0a03fdf0 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/value_definition.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ValueDefinition(Model): + """ValueDefinition. + + :param data_source: Gets or sets the data source. + :type data_source: list of :class:`InputValue ` + :param end_point: Gets or sets the rest end point. + :type end_point: str + :param result_template: Gets or sets the result template. + :type result_template: str + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': '[InputValue]'}, + 'end_point': {'key': 'endPoint', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'} + } + + def __init__(self, data_source=None, end_point=None, result_template=None): + super(ValueDefinition, self).__init__() + self.data_source = data_source + self.end_point = end_point + self.result_template = result_template diff --git a/vsts/vsts/notification/v4_0/models/vss_notification_event.py b/vsts/vsts/notification/v4_0/models/vss_notification_event.py new file mode 100644 index 00000000..3c71d927 --- /dev/null +++ b/vsts/vsts/notification/v4_0/models/vss_notification_event.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 VssNotificationEvent(Model): + """VssNotificationEvent. + + :param actors: Optional: A list of actors which are additional identities with corresponding roles that are relevant to the event. + :type actors: list of :class:`EventActor ` + :param artifact_uris: Optional: A list of artifacts referenced or impacted by this event. + :type artifact_uris: list of str + :param data: Required: The event payload. If Data is a string, it must be in Json or XML format. Otherwise it must have a serialization format attribute. + :type data: object + :param event_type: Required: The name of the event. This event must be registered in the context it is being fired. + :type event_type: str + :param scopes: Optional: A list of scopes which are are relevant to the event. + :type scopes: list of :class:`EventScope ` + """ + + _attribute_map = { + 'actors': {'key': 'actors', 'type': '[EventActor]'}, + 'artifact_uris': {'key': 'artifactUris', 'type': '[str]'}, + 'data': {'key': 'data', 'type': 'object'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': '[EventScope]'} + } + + def __init__(self, actors=None, artifact_uris=None, data=None, event_type=None, scopes=None): + super(VssNotificationEvent, self).__init__() + self.actors = actors + self.artifact_uris = artifact_uris + self.data = data + self.event_type = event_type + self.scopes = scopes diff --git a/vsts/vsts/notification/v4_0/notification_client.py b/vsts/vsts/notification/v4_0/notification_client.py new file mode 100644 index 00000000..b77e4c4a --- /dev/null +++ b/vsts/vsts/notification/v4_0/notification_client.py @@ -0,0 +1,244 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class NotificationClient(VssClient): + """Notification + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(NotificationClient, 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 get_event_type(self, event_type): + """GetEventType. + [Preview API] Get a specific event type. + :param str event_type: + :rtype: :class:` ` + """ + route_values = {} + if event_type is not None: + route_values['eventType'] = self._serialize.url('event_type', event_type, 'str') + response = self._send(http_method='GET', + location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('NotificationEventType', response) + + def list_event_types(self, publisher_id=None): + """ListEventTypes. + [Preview API] List available event types for this service. Optionally filter by only event types for the specified publisher. + :param str publisher_id: Limit to event types for this publisher + :rtype: [NotificationEventType] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[NotificationEventType]', response) + + def get_notification_reasons(self, notification_id): + """GetNotificationReasons. + [Preview API] + :param int notification_id: + :rtype: :class:` ` + """ + route_values = {} + if notification_id is not None: + route_values['notificationId'] = self._serialize.url('notification_id', notification_id, 'int') + response = self._send(http_method='GET', + location_id='19824fa9-1c76-40e6-9cce-cf0b9ca1cb60', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('NotificationReason', response) + + def list_notification_reasons(self, notification_ids=None): + """ListNotificationReasons. + [Preview API] + :param int notification_ids: + :rtype: [NotificationReason] + """ + query_parameters = {} + if notification_ids is not None: + query_parameters['notificationIds'] = self._serialize.query('notification_ids', notification_ids, 'int') + response = self._send(http_method='GET', + location_id='19824fa9-1c76-40e6-9cce-cf0b9ca1cb60', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[NotificationReason]', response) + + def get_subscriber(self, subscriber_id): + """GetSubscriber. + [Preview API] + :param str subscriber_id: + :rtype: :class:` ` + """ + route_values = {} + if subscriber_id is not None: + route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') + response = self._send(http_method='GET', + location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('NotificationSubscriber', response) + + def update_subscriber(self, update_parameters, subscriber_id): + """UpdateSubscriber. + [Preview API] + :param :class:` ` update_parameters: + :param str subscriber_id: + :rtype: :class:` ` + """ + route_values = {} + if subscriber_id is not None: + route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') + content = self._serialize.body(update_parameters, 'NotificationSubscriberUpdateParameters') + response = self._send(http_method='PATCH', + location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('NotificationSubscriber', response) + + def query_subscriptions(self, subscription_query): + """QuerySubscriptions. + [Preview API] Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + :param :class:` ` subscription_query: + :rtype: [NotificationSubscription] + """ + content = self._serialize.body(subscription_query, 'SubscriptionQuery') + response = self._send(http_method='POST', + location_id='6864db85-08c0-4006-8e8e-cc1bebe31675', + version='4.0-preview.1', + content=content, + returns_collection=True) + return self._deserialize('[NotificationSubscription]', response) + + def create_subscription(self, create_parameters): + """CreateSubscription. + [Preview API] Create a new subscription. + :param :class:` ` create_parameters: + :rtype: :class:` ` + """ + content = self._serialize.body(create_parameters, 'NotificationSubscriptionCreateParameters') + response = self._send(http_method='POST', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.0-preview.1', + content=content) + return self._deserialize('NotificationSubscription', response) + + def delete_subscription(self, subscription_id): + """DeleteSubscription. + [Preview API] Delete a subscription. + :param str subscription_id: + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + self._send(http_method='DELETE', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.0-preview.1', + route_values=route_values) + + def get_subscription(self, subscription_id, query_flags=None): + """GetSubscription. + [Preview API] Get a notification subscription by its ID. + :param str subscription_id: + :param str query_flags: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + query_parameters = {} + if query_flags is not None: + query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') + response = self._send(http_method='GET', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('NotificationSubscription', response) + + def list_subscriptions(self, target_id=None, ids=None, query_flags=None): + """ListSubscriptions. + [Preview API] + :param str target_id: + :param [str] ids: + :param str query_flags: + :rtype: [NotificationSubscription] + """ + query_parameters = {} + if target_id is not None: + query_parameters['targetId'] = self._serialize.query('target_id', target_id, 'str') + if ids is not None: + ids = ",".join(ids) + query_parameters['ids'] = self._serialize.query('ids', ids, 'str') + if query_flags is not None: + query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') + response = self._send(http_method='GET', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[NotificationSubscription]', response) + + def update_subscription(self, update_parameters, subscription_id): + """UpdateSubscription. + [Preview API] Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. + :param :class:` ` update_parameters: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(update_parameters, 'NotificationSubscriptionUpdateParameters') + response = self._send(http_method='PATCH', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('NotificationSubscription', response) + + def update_subscription_user_settings(self, user_settings, subscription_id, user_id=None): + """UpdateSubscriptionUserSettings. + [Preview API] Update the specified users' settings for the specified subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. This API is typically used to opt in or out of a shared subscription. + :param :class:` ` user_settings: + :param str subscription_id: + :param str user_id: ID of the user or "me" to indicate the calling user + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + content = self._serialize.body(user_settings, 'SubscriptionUserSettings') + response = self._send(http_method='PUT', + location_id='ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('SubscriptionUserSettings', response) + diff --git a/vsts/vsts/notification/v4_1/__init__.py b/vsts/vsts/notification/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/notification/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/notification/v4_1/models/__init__.py b/vsts/vsts/notification/v4_1/models/__init__.py new file mode 100644 index 00000000..f51b3477 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/__init__.py @@ -0,0 +1,127 @@ +# -------------------------------------------------------------------------------------------- +# 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 .artifact_filter import ArtifactFilter +from .base_subscription_filter import BaseSubscriptionFilter +from .batch_notification_operation import BatchNotificationOperation +from .event_actor import EventActor +from .event_scope import EventScope +from .events_evaluation_result import EventsEvaluationResult +from .expression_filter_clause import ExpressionFilterClause +from .expression_filter_group import ExpressionFilterGroup +from .expression_filter_model import ExpressionFilterModel +from .field_input_values import FieldInputValues +from .field_values_query import FieldValuesQuery +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .iNotification_diagnostic_log import INotificationDiagnosticLog +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .input_values_query import InputValuesQuery +from .iSubscription_channel import ISubscriptionChannel +from .iSubscription_filter import ISubscriptionFilter +from .notification_diagnostic_log_message import NotificationDiagnosticLogMessage +from .notification_event_field import NotificationEventField +from .notification_event_field_operator import NotificationEventFieldOperator +from .notification_event_field_type import NotificationEventFieldType +from .notification_event_publisher import NotificationEventPublisher +from .notification_event_role import NotificationEventRole +from .notification_event_type import NotificationEventType +from .notification_event_type_category import NotificationEventTypeCategory +from .notification_query_condition import NotificationQueryCondition +from .notification_reason import NotificationReason +from .notifications_evaluation_result import NotificationsEvaluationResult +from .notification_statistic import NotificationStatistic +from .notification_statistics_query import NotificationStatisticsQuery +from .notification_statistics_query_conditions import NotificationStatisticsQueryConditions +from .notification_subscriber import NotificationSubscriber +from .notification_subscriber_update_parameters import NotificationSubscriberUpdateParameters +from .notification_subscription import NotificationSubscription +from .notification_subscription_create_parameters import NotificationSubscriptionCreateParameters +from .notification_subscription_template import NotificationSubscriptionTemplate +from .notification_subscription_update_parameters import NotificationSubscriptionUpdateParameters +from .operator_constraint import OperatorConstraint +from .reference_links import ReferenceLinks +from .subscription_admin_settings import SubscriptionAdminSettings +from .subscription_channel_with_address import SubscriptionChannelWithAddress +from .subscription_diagnostics import SubscriptionDiagnostics +from .subscription_evaluation_request import SubscriptionEvaluationRequest +from .subscription_evaluation_result import SubscriptionEvaluationResult +from .subscription_evaluation_settings import SubscriptionEvaluationSettings +from .subscription_management import SubscriptionManagement +from .subscription_query import SubscriptionQuery +from .subscription_query_condition import SubscriptionQueryCondition +from .subscription_scope import SubscriptionScope +from .subscription_tracing import SubscriptionTracing +from .subscription_user_settings import SubscriptionUserSettings +from .update_subscripiton_diagnostics_parameters import UpdateSubscripitonDiagnosticsParameters +from .update_subscripiton_tracing_parameters import UpdateSubscripitonTracingParameters +from .value_definition import ValueDefinition +from .vss_notification_event import VssNotificationEvent + +__all__ = [ + 'ArtifactFilter', + 'BaseSubscriptionFilter', + 'BatchNotificationOperation', + 'EventActor', + 'EventScope', + 'EventsEvaluationResult', + 'ExpressionFilterClause', + 'ExpressionFilterGroup', + 'ExpressionFilterModel', + 'FieldInputValues', + 'FieldValuesQuery', + 'GraphSubjectBase', + 'IdentityRef', + 'INotificationDiagnosticLog', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'InputValuesQuery', + 'ISubscriptionChannel', + 'ISubscriptionFilter', + 'NotificationDiagnosticLogMessage', + 'NotificationEventField', + 'NotificationEventFieldOperator', + 'NotificationEventFieldType', + 'NotificationEventPublisher', + 'NotificationEventRole', + 'NotificationEventType', + 'NotificationEventTypeCategory', + 'NotificationQueryCondition', + 'NotificationReason', + 'NotificationsEvaluationResult', + 'NotificationStatistic', + 'NotificationStatisticsQuery', + 'NotificationStatisticsQueryConditions', + 'NotificationSubscriber', + 'NotificationSubscriberUpdateParameters', + 'NotificationSubscription', + 'NotificationSubscriptionCreateParameters', + 'NotificationSubscriptionTemplate', + 'NotificationSubscriptionUpdateParameters', + 'OperatorConstraint', + 'ReferenceLinks', + 'SubscriptionAdminSettings', + 'SubscriptionChannelWithAddress', + 'SubscriptionDiagnostics', + 'SubscriptionEvaluationRequest', + 'SubscriptionEvaluationResult', + 'SubscriptionEvaluationSettings', + 'SubscriptionManagement', + 'SubscriptionQuery', + 'SubscriptionQueryCondition', + 'SubscriptionScope', + 'SubscriptionTracing', + 'SubscriptionUserSettings', + 'UpdateSubscripitonDiagnosticsParameters', + 'UpdateSubscripitonTracingParameters', + 'ValueDefinition', + 'VssNotificationEvent', +] diff --git a/vsts/vsts/notification/v4_1/models/artifact_filter.py b/vsts/vsts/notification/v4_1/models/artifact_filter.py new file mode 100644 index 00000000..633c1aff --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/artifact_filter.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------------------------- +# 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 .base_subscription_filter import BaseSubscriptionFilter + + +class ArtifactFilter(BaseSubscriptionFilter): + """ArtifactFilter. + + :param event_type: + :type event_type: str + :param artifact_id: + :type artifact_id: str + :param artifact_type: + :type artifact_type: str + :param artifact_uri: + :type artifact_uri: str + :param type: + :type type: str + """ + + _attribute_map = { + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'artifact_id': {'key': 'artifactId', 'type': 'str'}, + 'artifact_type': {'key': 'artifactType', 'type': 'str'}, + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, event_type=None, artifact_id=None, artifact_type=None, artifact_uri=None, type=None): + super(ArtifactFilter, self).__init__(event_type=event_type) + self.artifact_id = artifact_id + self.artifact_type = artifact_type + self.artifact_uri = artifact_uri + self.type = type diff --git a/vsts/vsts/notification/v4_1/models/base_subscription_filter.py b/vsts/vsts/notification/v4_1/models/base_subscription_filter.py new file mode 100644 index 00000000..64cfbeca --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/base_subscription_filter.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BaseSubscriptionFilter(Model): + """BaseSubscriptionFilter. + + :param event_type: + :type event_type: str + :param type: + :type type: str + """ + + _attribute_map = { + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, event_type=None, type=None): + super(BaseSubscriptionFilter, self).__init__() + self.event_type = event_type + self.type = type diff --git a/vsts/vsts/notification/v4_1/models/batch_notification_operation.py b/vsts/vsts/notification/v4_1/models/batch_notification_operation.py new file mode 100644 index 00000000..70185702 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/batch_notification_operation.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BatchNotificationOperation(Model): + """BatchNotificationOperation. + + :param notification_operation: + :type notification_operation: object + :param notification_query_conditions: + :type notification_query_conditions: list of :class:`NotificationQueryCondition ` + """ + + _attribute_map = { + 'notification_operation': {'key': 'notificationOperation', 'type': 'object'}, + 'notification_query_conditions': {'key': 'notificationQueryConditions', 'type': '[NotificationQueryCondition]'} + } + + def __init__(self, notification_operation=None, notification_query_conditions=None): + super(BatchNotificationOperation, self).__init__() + self.notification_operation = notification_operation + self.notification_query_conditions = notification_query_conditions diff --git a/vsts/vsts/notification/v4_1/models/event_actor.py b/vsts/vsts/notification/v4_1/models/event_actor.py new file mode 100644 index 00000000..00258294 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/event_actor.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventActor(Model): + """EventActor. + + :param id: Required: This is the identity of the user for the specified role. + :type id: str + :param role: Required: The event specific name of a role. + :type role: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'} + } + + def __init__(self, id=None, role=None): + super(EventActor, self).__init__() + self.id = id + self.role = role diff --git a/vsts/vsts/notification/v4_1/models/event_scope.py b/vsts/vsts/notification/v4_1/models/event_scope.py new file mode 100644 index 00000000..9a5d7bc4 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/event_scope.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventScope(Model): + """EventScope. + + :param id: Required: This is the identity of the scope for the type. + :type id: str + :param name: Optional: The display name of the scope + :type name: str + :param type: Required: The event specific type of a scope. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None): + super(EventScope, self).__init__() + self.id = id + self.name = name + self.type = type diff --git a/vsts/vsts/notification/v4_1/models/events_evaluation_result.py b/vsts/vsts/notification/v4_1/models/events_evaluation_result.py new file mode 100644 index 00000000..cf73a07d --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/events_evaluation_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventsEvaluationResult(Model): + """EventsEvaluationResult. + + :param count: Count of events evaluated. + :type count: int + :param matched_count: Count of matched events. + :type matched_count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'matched_count': {'key': 'matchedCount', 'type': 'int'} + } + + def __init__(self, count=None, matched_count=None): + super(EventsEvaluationResult, self).__init__() + self.count = count + self.matched_count = matched_count diff --git a/vsts/vsts/notification/v4_1/models/expression_filter_clause.py b/vsts/vsts/notification/v4_1/models/expression_filter_clause.py new file mode 100644 index 00000000..908ba993 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/expression_filter_clause.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExpressionFilterClause(Model): + """ExpressionFilterClause. + + :param field_name: + :type field_name: str + :param index: The order in which this clause appeared in the filter query + :type index: int + :param logical_operator: Logical Operator 'AND', 'OR' or NULL (only for the first clause in the filter) + :type logical_operator: str + :param operator: + :type operator: str + :param value: + :type value: str + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'index': {'key': 'index', 'type': 'int'}, + 'logical_operator': {'key': 'logicalOperator', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, field_name=None, index=None, logical_operator=None, operator=None, value=None): + super(ExpressionFilterClause, self).__init__() + self.field_name = field_name + self.index = index + self.logical_operator = logical_operator + self.operator = operator + self.value = value diff --git a/vsts/vsts/notification/v4_1/models/expression_filter_group.py b/vsts/vsts/notification/v4_1/models/expression_filter_group.py new file mode 100644 index 00000000..d7c493bf --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/expression_filter_group.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExpressionFilterGroup(Model): + """ExpressionFilterGroup. + + :param end: The index of the last FilterClause in this group + :type end: int + :param level: Level of the group, since groups can be nested for each nested group the level will increase by 1 + :type level: int + :param start: The index of the first FilterClause in this group + :type start: int + """ + + _attribute_map = { + 'end': {'key': 'end', 'type': 'int'}, + 'level': {'key': 'level', 'type': 'int'}, + 'start': {'key': 'start', 'type': 'int'} + } + + def __init__(self, end=None, level=None, start=None): + super(ExpressionFilterGroup, self).__init__() + self.end = end + self.level = level + self.start = start diff --git a/vsts/vsts/notification/v4_1/models/expression_filter_model.py b/vsts/vsts/notification/v4_1/models/expression_filter_model.py new file mode 100644 index 00000000..00302d55 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/expression_filter_model.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExpressionFilterModel(Model): + """ExpressionFilterModel. + + :param clauses: Flat list of clauses in this subscription + :type clauses: list of :class:`ExpressionFilterClause ` + :param groups: Grouping of clauses in the subscription + :type groups: list of :class:`ExpressionFilterGroup ` + :param max_group_level: Max depth of the Subscription tree + :type max_group_level: int + """ + + _attribute_map = { + 'clauses': {'key': 'clauses', 'type': '[ExpressionFilterClause]'}, + 'groups': {'key': 'groups', 'type': '[ExpressionFilterGroup]'}, + 'max_group_level': {'key': 'maxGroupLevel', 'type': 'int'} + } + + def __init__(self, clauses=None, groups=None, max_group_level=None): + super(ExpressionFilterModel, self).__init__() + self.clauses = clauses + self.groups = groups + self.max_group_level = max_group_level diff --git a/vsts/vsts/notification/v4_1/models/field_input_values.py b/vsts/vsts/notification/v4_1/models/field_input_values.py new file mode 100644 index 00000000..d8bfe127 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/field_input_values.py @@ -0,0 +1,46 @@ +# -------------------------------------------------------------------------------------------- +# 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 .input_values import InputValues + + +class FieldInputValues(InputValues): + """FieldInputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + :param operators: + :type operators: list of number + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'}, + 'operators': {'key': 'operators', 'type': '[number]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None, operators=None): + super(FieldInputValues, self).__init__(default_value=default_value, error=error, input_id=input_id, is_disabled=is_disabled, is_limited_to_possible_values=is_limited_to_possible_values, is_read_only=is_read_only, possible_values=possible_values) + self.operators = operators diff --git a/vsts/vsts/notification/v4_1/models/field_values_query.py b/vsts/vsts/notification/v4_1/models/field_values_query.py new file mode 100644 index 00000000..0c09e828 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/field_values_query.py @@ -0,0 +1,35 @@ +# -------------------------------------------------------------------------------------------- +# 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 .input_values_query import InputValuesQuery + + +class FieldValuesQuery(InputValuesQuery): + """FieldValuesQuery. + + :param current_values: + :type current_values: dict + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + :param input_values: + :type input_values: list of :class:`FieldInputValues ` + :param scope: + :type scope: str + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'resource': {'key': 'resource', 'type': 'object'}, + 'input_values': {'key': 'inputValues', 'type': '[FieldInputValues]'}, + 'scope': {'key': 'scope', 'type': 'str'} + } + + def __init__(self, current_values=None, resource=None, input_values=None, scope=None): + super(FieldValuesQuery, self).__init__(current_values=current_values, resource=resource) + self.input_values = input_values + self.scope = scope diff --git a/vsts/vsts/notification/v4_1/models/iSubscription_channel.py b/vsts/vsts/notification/v4_1/models/iSubscription_channel.py new file mode 100644 index 00000000..9f8ed3c5 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/iSubscription_channel.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ISubscriptionChannel(Model): + """ISubscriptionChannel. + + :param type: + :type type: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, type=None): + super(ISubscriptionChannel, self).__init__() + self.type = type diff --git a/vsts/vsts/notification/v4_1/models/iSubscription_filter.py b/vsts/vsts/notification/v4_1/models/iSubscription_filter.py new file mode 100644 index 00000000..c90034ca --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/iSubscription_filter.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ISubscriptionFilter(Model): + """ISubscriptionFilter. + + :param event_type: + :type event_type: str + :param type: + :type type: str + """ + + _attribute_map = { + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, event_type=None, type=None): + super(ISubscriptionFilter, self).__init__() + self.event_type = event_type + self.type = type diff --git a/vsts/vsts/notification/v4_1/models/identity_ref.py b/vsts/vsts/notification/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/notification/v4_1/models/input_value.py b/vsts/vsts/notification/v4_1/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/notification/v4_1/models/input_values.py b/vsts/vsts/notification/v4_1/models/input_values.py new file mode 100644 index 00000000..69472f8d --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/notification/v4_1/models/input_values_error.py b/vsts/vsts/notification/v4_1/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/notification/v4_1/models/input_values_query.py b/vsts/vsts/notification/v4_1/models/input_values_query.py new file mode 100644 index 00000000..97687a61 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/input_values_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesQuery(Model): + """InputValuesQuery. + + :param current_values: + :type current_values: dict + :param input_values: The input values to return on input, and the result from the consumer on output. + :type input_values: list of :class:`InputValues ` + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, + 'resource': {'key': 'resource', 'type': 'object'} + } + + def __init__(self, current_values=None, input_values=None, resource=None): + super(InputValuesQuery, self).__init__() + self.current_values = current_values + self.input_values = input_values + self.resource = resource diff --git a/vsts/vsts/notification/v4_1/models/notification_event_field.py b/vsts/vsts/notification/v4_1/models/notification_event_field.py new file mode 100644 index 00000000..84ef1e97 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_event_field.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventField(Model): + """NotificationEventField. + + :param field_type: Gets or sets the type of this field. + :type field_type: :class:`NotificationEventFieldType ` + :param id: Gets or sets the unique identifier of this field. + :type id: str + :param name: Gets or sets the name of this field. + :type name: str + :param path: Gets or sets the path to the field in the event object. This path can be either Json Path or XPath, depending on if the event will be serialized into Json or XML + :type path: str + :param supported_scopes: Gets or sets the scopes that this field supports. If not specified then the event type scopes apply. + :type supported_scopes: list of str + """ + + _attribute_map = { + 'field_type': {'key': 'fieldType', 'type': 'NotificationEventFieldType'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[str]'} + } + + def __init__(self, field_type=None, id=None, name=None, path=None, supported_scopes=None): + super(NotificationEventField, self).__init__() + self.field_type = field_type + self.id = id + self.name = name + self.path = path + self.supported_scopes = supported_scopes diff --git a/vsts/vsts/notification/v4_1/models/notification_event_field_operator.py b/vsts/vsts/notification/v4_1/models/notification_event_field_operator.py new file mode 100644 index 00000000..20593c7d --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_event_field_operator.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventFieldOperator(Model): + """NotificationEventFieldOperator. + + :param display_name: Gets or sets the display name of an operator + :type display_name: str + :param id: Gets or sets the id of an operator + :type id: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, display_name=None, id=None): + super(NotificationEventFieldOperator, self).__init__() + self.display_name = display_name + self.id = id diff --git a/vsts/vsts/notification/v4_1/models/notification_event_field_type.py b/vsts/vsts/notification/v4_1/models/notification_event_field_type.py new file mode 100644 index 00000000..e0877416 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_event_field_type.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventFieldType(Model): + """NotificationEventFieldType. + + :param id: Gets or sets the unique identifier of this field type. + :type id: str + :param operator_constraints: + :type operator_constraints: list of :class:`OperatorConstraint ` + :param operators: Gets or sets the list of operators that this type supports. + :type operators: list of :class:`NotificationEventFieldOperator ` + :param subscription_field_type: + :type subscription_field_type: object + :param value: Gets or sets the value definition of this field like the getValuesMethod and template to display in the UI + :type value: :class:`ValueDefinition ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'operator_constraints': {'key': 'operatorConstraints', 'type': '[OperatorConstraint]'}, + 'operators': {'key': 'operators', 'type': '[NotificationEventFieldOperator]'}, + 'subscription_field_type': {'key': 'subscriptionFieldType', 'type': 'object'}, + 'value': {'key': 'value', 'type': 'ValueDefinition'} + } + + def __init__(self, id=None, operator_constraints=None, operators=None, subscription_field_type=None, value=None): + super(NotificationEventFieldType, self).__init__() + self.id = id + self.operator_constraints = operator_constraints + self.operators = operators + self.subscription_field_type = subscription_field_type + self.value = value diff --git a/vsts/vsts/notification/v4_1/models/notification_event_publisher.py b/vsts/vsts/notification/v4_1/models/notification_event_publisher.py new file mode 100644 index 00000000..de394a80 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_event_publisher.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventPublisher(Model): + """NotificationEventPublisher. + + :param id: + :type id: str + :param subscription_management_info: + :type subscription_management_info: :class:`SubscriptionManagement ` + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_management_info': {'key': 'subscriptionManagementInfo', 'type': 'SubscriptionManagement'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, subscription_management_info=None, url=None): + super(NotificationEventPublisher, self).__init__() + self.id = id + self.subscription_management_info = subscription_management_info + self.url = url diff --git a/vsts/vsts/notification/v4_1/models/notification_event_role.py b/vsts/vsts/notification/v4_1/models/notification_event_role.py new file mode 100644 index 00000000..51f4c866 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_event_role.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventRole(Model): + """NotificationEventRole. + + :param id: Gets or sets an Id for that role, this id is used by the event. + :type id: str + :param name: Gets or sets the Name for that role, this name is used for UI display. + :type name: str + :param supports_groups: Gets or sets whether this role can be a group or just an individual user + :type supports_groups: bool + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supports_groups': {'key': 'supportsGroups', 'type': 'bool'} + } + + def __init__(self, id=None, name=None, supports_groups=None): + super(NotificationEventRole, self).__init__() + self.id = id + self.name = name + self.supports_groups = supports_groups diff --git a/vsts/vsts/notification/v4_1/models/notification_event_type.py b/vsts/vsts/notification/v4_1/models/notification_event_type.py new file mode 100644 index 00000000..339375f2 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_event_type.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventType(Model): + """NotificationEventType. + + :param category: + :type category: :class:`NotificationEventTypeCategory ` + :param color: Gets or sets the color representing this event type. Example: rgb(128,245,211) or #fafafa + :type color: str + :param custom_subscriptions_allowed: + :type custom_subscriptions_allowed: bool + :param event_publisher: + :type event_publisher: :class:`NotificationEventPublisher ` + :param fields: + :type fields: dict + :param has_initiator: + :type has_initiator: bool + :param icon: Gets or sets the icon representing this event type. Can be a URL or a CSS class. Example: css://some-css-class + :type icon: str + :param id: Gets or sets the unique identifier of this event definition. + :type id: str + :param name: Gets or sets the name of this event definition. + :type name: str + :param roles: + :type roles: list of :class:`NotificationEventRole ` + :param supported_scopes: Gets or sets the scopes that this event type supports + :type supported_scopes: list of str + :param url: Gets or sets the rest end point to get this event type details (fields, fields types) + :type url: str + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'NotificationEventTypeCategory'}, + 'color': {'key': 'color', 'type': 'str'}, + 'custom_subscriptions_allowed': {'key': 'customSubscriptionsAllowed', 'type': 'bool'}, + 'event_publisher': {'key': 'eventPublisher', 'type': 'NotificationEventPublisher'}, + 'fields': {'key': 'fields', 'type': '{NotificationEventField}'}, + 'has_initiator': {'key': 'hasInitiator', 'type': 'bool'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[NotificationEventRole]'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[str]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, category=None, color=None, custom_subscriptions_allowed=None, event_publisher=None, fields=None, has_initiator=None, icon=None, id=None, name=None, roles=None, supported_scopes=None, url=None): + super(NotificationEventType, self).__init__() + self.category = category + self.color = color + self.custom_subscriptions_allowed = custom_subscriptions_allowed + self.event_publisher = event_publisher + self.fields = fields + self.has_initiator = has_initiator + self.icon = icon + self.id = id + self.name = name + self.roles = roles + self.supported_scopes = supported_scopes + self.url = url diff --git a/vsts/vsts/notification/v4_1/models/notification_event_type_category.py b/vsts/vsts/notification/v4_1/models/notification_event_type_category.py new file mode 100644 index 00000000..0d3040b6 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_event_type_category.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationEventTypeCategory(Model): + """NotificationEventTypeCategory. + + :param id: Gets or sets the unique identifier of this category. + :type id: str + :param name: Gets or sets the friendly name of this category. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(NotificationEventTypeCategory, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/notification/v4_1/models/notification_query_condition.py b/vsts/vsts/notification/v4_1/models/notification_query_condition.py new file mode 100644 index 00000000..1c1b3aaf --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_query_condition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationQueryCondition(Model): + """NotificationQueryCondition. + + :param event_initiator: + :type event_initiator: str + :param event_type: + :type event_type: str + :param subscriber: + :type subscriber: str + :param subscription_id: + :type subscription_id: str + """ + + _attribute_map = { + 'event_initiator': {'key': 'eventInitiator', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'subscriber': {'key': 'subscriber', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, event_initiator=None, event_type=None, subscriber=None, subscription_id=None): + super(NotificationQueryCondition, self).__init__() + self.event_initiator = event_initiator + self.event_type = event_type + self.subscriber = subscriber + self.subscription_id = subscription_id diff --git a/vsts/vsts/notification/v4_1/models/notification_reason.py b/vsts/vsts/notification/v4_1/models/notification_reason.py new file mode 100644 index 00000000..5769f688 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_reason.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationReason(Model): + """NotificationReason. + + :param notification_reason_type: + :type notification_reason_type: object + :param target_identities: + :type target_identities: list of :class:`IdentityRef ` + """ + + _attribute_map = { + 'notification_reason_type': {'key': 'notificationReasonType', 'type': 'object'}, + 'target_identities': {'key': 'targetIdentities', 'type': '[IdentityRef]'} + } + + def __init__(self, notification_reason_type=None, target_identities=None): + super(NotificationReason, self).__init__() + self.notification_reason_type = notification_reason_type + self.target_identities = target_identities diff --git a/vsts/vsts/notification/v4_1/models/notification_statistic.py b/vsts/vsts/notification/v4_1/models/notification_statistic.py new file mode 100644 index 00000000..17e6ba89 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_statistic.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationStatistic(Model): + """NotificationStatistic. + + :param date: + :type date: datetime + :param hit_count: + :type hit_count: int + :param path: + :type path: str + :param type: + :type type: object + :param user: + :type user: :class:`IdentityRef ` + """ + + _attribute_map = { + 'date': {'key': 'date', 'type': 'iso-8601'}, + 'hit_count': {'key': 'hitCount', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'}, + 'user': {'key': 'user', 'type': 'IdentityRef'} + } + + def __init__(self, date=None, hit_count=None, path=None, type=None, user=None): + super(NotificationStatistic, self).__init__() + self.date = date + self.hit_count = hit_count + self.path = path + self.type = type + self.user = user diff --git a/vsts/vsts/notification/v4_1/models/notification_statistics_query.py b/vsts/vsts/notification/v4_1/models/notification_statistics_query.py new file mode 100644 index 00000000..9a7b9310 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_statistics_query.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationStatisticsQuery(Model): + """NotificationStatisticsQuery. + + :param conditions: + :type conditions: list of :class:`NotificationStatisticsQueryConditions ` + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[NotificationStatisticsQueryConditions]'} + } + + def __init__(self, conditions=None): + super(NotificationStatisticsQuery, self).__init__() + self.conditions = conditions diff --git a/vsts/vsts/notification/v4_1/models/notification_statistics_query_conditions.py b/vsts/vsts/notification/v4_1/models/notification_statistics_query_conditions.py new file mode 100644 index 00000000..663c00e8 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_statistics_query_conditions.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationStatisticsQueryConditions(Model): + """NotificationStatisticsQueryConditions. + + :param end_date: + :type end_date: datetime + :param hit_count_minimum: + :type hit_count_minimum: int + :param path: + :type path: str + :param start_date: + :type start_date: datetime + :param type: + :type type: object + :param user: + :type user: :class:`IdentityRef ` + """ + + _attribute_map = { + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'hit_count_minimum': {'key': 'hitCountMinimum', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'object'}, + 'user': {'key': 'user', 'type': 'IdentityRef'} + } + + def __init__(self, end_date=None, hit_count_minimum=None, path=None, start_date=None, type=None, user=None): + super(NotificationStatisticsQueryConditions, self).__init__() + self.end_date = end_date + self.hit_count_minimum = hit_count_minimum + self.path = path + self.start_date = start_date + self.type = type + self.user = user diff --git a/vsts/vsts/notification/v4_1/models/notification_subscriber.py b/vsts/vsts/notification/v4_1/models/notification_subscriber.py new file mode 100644 index 00000000..fa488c80 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_subscriber.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriber(Model): + """NotificationSubscriber. + + :param delivery_preference: Indicates how the subscriber should be notified by default. + :type delivery_preference: object + :param flags: + :type flags: object + :param id: Identifier of the subscriber. + :type id: str + :param preferred_email_address: Preferred email address of the subscriber. A null or empty value indicates no preferred email address has been set. + :type preferred_email_address: str + """ + + _attribute_map = { + 'delivery_preference': {'key': 'deliveryPreference', 'type': 'object'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + 'preferred_email_address': {'key': 'preferredEmailAddress', 'type': 'str'} + } + + def __init__(self, delivery_preference=None, flags=None, id=None, preferred_email_address=None): + super(NotificationSubscriber, self).__init__() + self.delivery_preference = delivery_preference + self.flags = flags + self.id = id + self.preferred_email_address = preferred_email_address diff --git a/vsts/vsts/notification/v4_1/models/notification_subscriber_update_parameters.py b/vsts/vsts/notification/v4_1/models/notification_subscriber_update_parameters.py new file mode 100644 index 00000000..68ca80ff --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_subscriber_update_parameters.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriberUpdateParameters(Model): + """NotificationSubscriberUpdateParameters. + + :param delivery_preference: New delivery preference for the subscriber (indicates how the subscriber should be notified). + :type delivery_preference: object + :param preferred_email_address: New preferred email address for the subscriber. Specify an empty string to clear the current address. + :type preferred_email_address: str + """ + + _attribute_map = { + 'delivery_preference': {'key': 'deliveryPreference', 'type': 'object'}, + 'preferred_email_address': {'key': 'preferredEmailAddress', 'type': 'str'} + } + + def __init__(self, delivery_preference=None, preferred_email_address=None): + super(NotificationSubscriberUpdateParameters, self).__init__() + self.delivery_preference = delivery_preference + self.preferred_email_address = preferred_email_address diff --git a/vsts/vsts/notification/v4_1/models/notification_subscription.py b/vsts/vsts/notification/v4_1/models/notification_subscription.py new file mode 100644 index 00000000..46030af2 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_subscription.py @@ -0,0 +1,93 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscription(Model): + """NotificationSubscription. + + :param _links: Links to related resources, APIs, and views for the subscription. + :type _links: :class:`ReferenceLinks ` + :param admin_settings: Admin-managed settings for the subscription. Only applies when the subscriber is a group. + :type admin_settings: :class:`SubscriptionAdminSettings ` + :param channel: Channel for delivering notifications triggered by the subscription. + :type channel: :class:`ISubscriptionChannel ` + :param description: Description of the subscription. Typically describes filter criteria which helps identity the subscription. + :type description: str + :param diagnostics: Diagnostics for this subscription. + :type diagnostics: :class:`SubscriptionDiagnostics ` + :param extended_properties: Any extra properties like detailed description for different contexts, user/group contexts + :type extended_properties: dict + :param filter: Matching criteria for the subscription. ExpressionFilter + :type filter: :class:`ISubscriptionFilter ` + :param flags: Read-only indicators that further describe the subscription. + :type flags: object + :param id: Subscription identifier. + :type id: str + :param last_modified_by: User that last modified (or created) the subscription. + :type last_modified_by: :class:`IdentityRef ` + :param modified_date: Date when the subscription was last modified. If the subscription has not been updated since it was created, this value will indicate when the subscription was created. + :type modified_date: datetime + :param permissions: The permissions the user have for this subscriptions. + :type permissions: object + :param scope: The container in which events must be published from in order to be matched by the subscription. If empty, the scope is the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + :type scope: :class:`SubscriptionScope ` + :param status: Status of the subscription. Typically indicates whether the subscription is enabled or not. + :type status: object + :param status_message: Message that provides more details about the status of the subscription. + :type status_message: str + :param subscriber: User or group that will receive notifications for events matching the subscription's filter criteria. + :type subscriber: :class:`IdentityRef ` + :param url: REST API URL of the subscriotion. + :type url: str + :param user_settings: User-managed settings for the subscription. Only applies when the subscriber is a group. Typically used to indicate whether the calling user is opted in or out of a group subscription. + :type user_settings: :class:`SubscriptionUserSettings ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'admin_settings': {'key': 'adminSettings', 'type': 'SubscriptionAdminSettings'}, + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, + 'description': {'key': 'description', 'type': 'str'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'SubscriptionDiagnostics'}, + 'extended_properties': {'key': 'extendedProperties', 'type': '{str}'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'permissions': {'key': 'permissions', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, + 'status': {'key': 'status', 'type': 'object'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'user_settings': {'key': 'userSettings', 'type': 'SubscriptionUserSettings'} + } + + def __init__(self, _links=None, admin_settings=None, channel=None, description=None, diagnostics=None, extended_properties=None, filter=None, flags=None, id=None, last_modified_by=None, modified_date=None, permissions=None, scope=None, status=None, status_message=None, subscriber=None, url=None, user_settings=None): + super(NotificationSubscription, self).__init__() + self._links = _links + self.admin_settings = admin_settings + self.channel = channel + self.description = description + self.diagnostics = diagnostics + self.extended_properties = extended_properties + self.filter = filter + self.flags = flags + self.id = id + self.last_modified_by = last_modified_by + self.modified_date = modified_date + self.permissions = permissions + self.scope = scope + self.status = status + self.status_message = status_message + self.subscriber = subscriber + self.url = url + self.user_settings = user_settings diff --git a/vsts/vsts/notification/v4_1/models/notification_subscription_create_parameters.py b/vsts/vsts/notification/v4_1/models/notification_subscription_create_parameters.py new file mode 100644 index 00000000..4b894a18 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_subscription_create_parameters.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriptionCreateParameters(Model): + """NotificationSubscriptionCreateParameters. + + :param channel: Channel for delivering notifications triggered by the new subscription. + :type channel: :class:`ISubscriptionChannel ` + :param description: Brief description for the new subscription. Typically describes filter criteria which helps identity the subscription. + :type description: str + :param filter: Matching criteria for the new subscription. ExpressionFilter + :type filter: :class:`ISubscriptionFilter ` + :param scope: The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + :type scope: :class:`SubscriptionScope ` + :param subscriber: User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. + :type subscriber: :class:`IdentityRef ` + """ + + _attribute_map = { + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, + 'description': {'key': 'description', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, + 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'} + } + + def __init__(self, channel=None, description=None, filter=None, scope=None, subscriber=None): + super(NotificationSubscriptionCreateParameters, self).__init__() + self.channel = channel + self.description = description + self.filter = filter + self.scope = scope + self.subscriber = subscriber diff --git a/vsts/vsts/notification/v4_1/models/notification_subscription_template.py b/vsts/vsts/notification/v4_1/models/notification_subscription_template.py new file mode 100644 index 00000000..d6cc39e5 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_subscription_template.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriptionTemplate(Model): + """NotificationSubscriptionTemplate. + + :param description: + :type description: str + :param filter: + :type filter: :class:`ISubscriptionFilter ` + :param id: + :type id: str + :param notification_event_information: + :type notification_event_information: :class:`NotificationEventType ` + :param type: + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'id': {'key': 'id', 'type': 'str'}, + 'notification_event_information': {'key': 'notificationEventInformation', 'type': 'NotificationEventType'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, filter=None, id=None, notification_event_information=None, type=None): + super(NotificationSubscriptionTemplate, self).__init__() + self.description = description + self.filter = filter + self.id = id + self.notification_event_information = notification_event_information + self.type = type diff --git a/vsts/vsts/notification/v4_1/models/notification_subscription_update_parameters.py b/vsts/vsts/notification/v4_1/models/notification_subscription_update_parameters.py new file mode 100644 index 00000000..7d9a60aa --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notification_subscription_update_parameters.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSubscriptionUpdateParameters(Model): + """NotificationSubscriptionUpdateParameters. + + :param admin_settings: Admin-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. + :type admin_settings: :class:`SubscriptionAdminSettings ` + :param channel: Channel for delivering notifications triggered by the subscription. + :type channel: :class:`ISubscriptionChannel ` + :param description: Updated description for the subscription. Typically describes filter criteria which helps identity the subscription. + :type description: str + :param filter: Matching criteria for the subscription. ExpressionFilter + :type filter: :class:`ISubscriptionFilter ` + :param scope: The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically the current account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + :type scope: :class:`SubscriptionScope ` + :param status: Updated status for the subscription. Typically used to enable or disable a subscription. + :type status: object + :param status_message: Optional message that provides more details about the updated status. + :type status_message: str + :param user_settings: User-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. Typically used to opt-in or opt-out a user from a group subscription. + :type user_settings: :class:`SubscriptionUserSettings ` + """ + + _attribute_map = { + 'admin_settings': {'key': 'adminSettings', 'type': 'SubscriptionAdminSettings'}, + 'channel': {'key': 'channel', 'type': 'ISubscriptionChannel'}, + 'description': {'key': 'description', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'scope': {'key': 'scope', 'type': 'SubscriptionScope'}, + 'status': {'key': 'status', 'type': 'object'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'user_settings': {'key': 'userSettings', 'type': 'SubscriptionUserSettings'} + } + + def __init__(self, admin_settings=None, channel=None, description=None, filter=None, scope=None, status=None, status_message=None, user_settings=None): + super(NotificationSubscriptionUpdateParameters, self).__init__() + self.admin_settings = admin_settings + self.channel = channel + self.description = description + self.filter = filter + self.scope = scope + self.status = status + self.status_message = status_message + self.user_settings = user_settings diff --git a/vsts/vsts/notification/v4_1/models/notifications_evaluation_result.py b/vsts/vsts/notification/v4_1/models/notifications_evaluation_result.py new file mode 100644 index 00000000..3fe8febc --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/notifications_evaluation_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationsEvaluationResult(Model): + """NotificationsEvaluationResult. + + :param count: Count of generated notifications + :type count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'} + } + + def __init__(self, count=None): + super(NotificationsEvaluationResult, self).__init__() + self.count = count diff --git a/vsts/vsts/notification/v4_1/models/operator_constraint.py b/vsts/vsts/notification/v4_1/models/operator_constraint.py new file mode 100644 index 00000000..f5041e41 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/operator_constraint.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 OperatorConstraint(Model): + """OperatorConstraint. + + :param operator: + :type operator: str + :param supported_scopes: Gets or sets the list of scopes that this type supports. + :type supported_scopes: list of str + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'supported_scopes': {'key': 'supportedScopes', 'type': '[str]'} + } + + def __init__(self, operator=None, supported_scopes=None): + super(OperatorConstraint, self).__init__() + self.operator = operator + self.supported_scopes = supported_scopes diff --git a/vsts/vsts/notification/v4_1/models/reference_links.py b/vsts/vsts/notification/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/notification/v4_1/models/subscription_admin_settings.py b/vsts/vsts/notification/v4_1/models/subscription_admin_settings.py new file mode 100644 index 00000000..bb257d6a --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_admin_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionAdminSettings(Model): + """SubscriptionAdminSettings. + + :param block_user_opt_out: If true, members of the group subscribed to the associated subscription cannot opt (choose not to get notified) + :type block_user_opt_out: bool + """ + + _attribute_map = { + 'block_user_opt_out': {'key': 'blockUserOptOut', 'type': 'bool'} + } + + def __init__(self, block_user_opt_out=None): + super(SubscriptionAdminSettings, self).__init__() + self.block_user_opt_out = block_user_opt_out diff --git a/vsts/vsts/notification/v4_1/models/subscription_channel_with_address.py b/vsts/vsts/notification/v4_1/models/subscription_channel_with_address.py new file mode 100644 index 00000000..c5d7f620 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_channel_with_address.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionChannelWithAddress(Model): + """SubscriptionChannelWithAddress. + + :param address: + :type address: str + :param type: + :type type: str + :param use_custom_address: + :type use_custom_address: bool + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_custom_address': {'key': 'useCustomAddress', 'type': 'bool'} + } + + def __init__(self, address=None, type=None, use_custom_address=None): + super(SubscriptionChannelWithAddress, self).__init__() + self.address = address + self.type = type + self.use_custom_address = use_custom_address diff --git a/vsts/vsts/notification/v4_1/models/subscription_evaluation_request.py b/vsts/vsts/notification/v4_1/models/subscription_evaluation_request.py new file mode 100644 index 00000000..7735679c --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_evaluation_request.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionEvaluationRequest(Model): + """SubscriptionEvaluationRequest. + + :param min_events_created_date: The min created date for the events used for matching in UTC. Use all events created since this date + :type min_events_created_date: datetime + :param subscription_create_parameters: User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. + :type subscription_create_parameters: :class:`NotificationSubscriptionCreateParameters ` + """ + + _attribute_map = { + 'min_events_created_date': {'key': 'minEventsCreatedDate', 'type': 'iso-8601'}, + 'subscription_create_parameters': {'key': 'subscriptionCreateParameters', 'type': 'NotificationSubscriptionCreateParameters'} + } + + def __init__(self, min_events_created_date=None, subscription_create_parameters=None): + super(SubscriptionEvaluationRequest, self).__init__() + self.min_events_created_date = min_events_created_date + self.subscription_create_parameters = subscription_create_parameters diff --git a/vsts/vsts/notification/v4_1/models/subscription_evaluation_result.py b/vsts/vsts/notification/v4_1/models/subscription_evaluation_result.py new file mode 100644 index 00000000..0896d2c3 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_evaluation_result.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionEvaluationResult(Model): + """SubscriptionEvaluationResult. + + :param evaluation_job_status: Subscription evaluation job status + :type evaluation_job_status: object + :param events: Subscription evaluation events results. + :type events: :class:`EventsEvaluationResult ` + :param id: The requestId which is the subscription evaluation jobId + :type id: str + :param notifications: Subscription evaluation notification results. + :type notifications: :class:`NotificationsEvaluationResult ` + """ + + _attribute_map = { + 'evaluation_job_status': {'key': 'evaluationJobStatus', 'type': 'object'}, + 'events': {'key': 'events', 'type': 'EventsEvaluationResult'}, + 'id': {'key': 'id', 'type': 'str'}, + 'notifications': {'key': 'notifications', 'type': 'NotificationsEvaluationResult'} + } + + def __init__(self, evaluation_job_status=None, events=None, id=None, notifications=None): + super(SubscriptionEvaluationResult, self).__init__() + self.evaluation_job_status = evaluation_job_status + self.events = events + self.id = id + self.notifications = notifications diff --git a/vsts/vsts/notification/v4_1/models/subscription_evaluation_settings.py b/vsts/vsts/notification/v4_1/models/subscription_evaluation_settings.py new file mode 100644 index 00000000..2afc0946 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_evaluation_settings.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionEvaluationSettings(Model): + """SubscriptionEvaluationSettings. + + :param enabled: Indicates whether subscription evaluation before saving is enabled or not + :type enabled: bool + :param interval: Time interval to check on subscription evaluation job in seconds + :type interval: int + :param threshold: Threshold on the number of notifications for considering a subscription too noisy + :type threshold: int + :param time_out: Time out for the subscription evaluation check in seconds + :type time_out: int + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'interval': {'key': 'interval', 'type': 'int'}, + 'threshold': {'key': 'threshold', 'type': 'int'}, + 'time_out': {'key': 'timeOut', 'type': 'int'} + } + + def __init__(self, enabled=None, interval=None, threshold=None, time_out=None): + super(SubscriptionEvaluationSettings, self).__init__() + self.enabled = enabled + self.interval = interval + self.threshold = threshold + self.time_out = time_out diff --git a/vsts/vsts/notification/v4_1/models/subscription_management.py b/vsts/vsts/notification/v4_1/models/subscription_management.py new file mode 100644 index 00000000..92f047de --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_management.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionManagement(Model): + """SubscriptionManagement. + + :param service_instance_type: + :type service_instance_type: str + :param url: + :type url: str + """ + + _attribute_map = { + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, service_instance_type=None, url=None): + super(SubscriptionManagement, self).__init__() + self.service_instance_type = service_instance_type + self.url = url diff --git a/vsts/vsts/notification/v4_1/models/subscription_query.py b/vsts/vsts/notification/v4_1/models/subscription_query.py new file mode 100644 index 00000000..10ee7b00 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_query.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionQuery(Model): + """SubscriptionQuery. + + :param conditions: One or more conditions to query on. If more than 2 conditions are specified, the combined results of each condition is returned (i.e. conditions are logically OR'ed). + :type conditions: list of :class:`SubscriptionQueryCondition ` + :param query_flags: Flags the refine the types of subscriptions that will be returned from the query. + :type query_flags: object + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[SubscriptionQueryCondition]'}, + 'query_flags': {'key': 'queryFlags', 'type': 'object'} + } + + def __init__(self, conditions=None, query_flags=None): + super(SubscriptionQuery, self).__init__() + self.conditions = conditions + self.query_flags = query_flags diff --git a/vsts/vsts/notification/v4_1/models/subscription_query_condition.py b/vsts/vsts/notification/v4_1/models/subscription_query_condition.py new file mode 100644 index 00000000..90080ee2 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_query_condition.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionQueryCondition(Model): + """SubscriptionQueryCondition. + + :param filter: Filter conditions that matching subscriptions must have. Typically only the filter's type and event type are used for matching. + :type filter: :class:`ISubscriptionFilter ` + :param flags: Flags to specify the the type subscriptions to query for. + :type flags: object + :param scope: Scope that matching subscriptions must have. + :type scope: str + :param subscriber_id: ID of the subscriber (user or group) that matching subscriptions must be subscribed to. + :type subscriber_id: str + :param subscription_id: ID of the subscription to query for. + :type subscription_id: str + """ + + _attribute_map = { + 'filter': {'key': 'filter', 'type': 'ISubscriptionFilter'}, + 'flags': {'key': 'flags', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'subscriber_id': {'key': 'subscriberId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, filter=None, flags=None, scope=None, subscriber_id=None, subscription_id=None): + super(SubscriptionQueryCondition, self).__init__() + self.filter = filter + self.flags = flags + self.scope = scope + self.subscriber_id = subscriber_id + self.subscription_id = subscription_id diff --git a/vsts/vsts/notification/v4_1/models/subscription_scope.py b/vsts/vsts/notification/v4_1/models/subscription_scope.py new file mode 100644 index 00000000..63d16770 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_scope.py @@ -0,0 +1,30 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from .event_scope import EventScope + + +class SubscriptionScope(EventScope): + """SubscriptionScope. + + :param id: Required: This is the identity of the scope for the type. + :type id: str + :param name: Optional: The display name of the scope + :type name: str + :param type: Required: The event specific type of a scope. + :type type: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, id=None, name=None, type=None): + super(SubscriptionScope, self).__init__(id=id, name=name, type=type) diff --git a/vsts/vsts/notification/v4_1/models/subscription_user_settings.py b/vsts/vsts/notification/v4_1/models/subscription_user_settings.py new file mode 100644 index 00000000..ae1d2e4b --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/subscription_user_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionUserSettings(Model): + """SubscriptionUserSettings. + + :param opted_out: Indicates whether the user will receive notifications for the associated group subscription. + :type opted_out: bool + """ + + _attribute_map = { + 'opted_out': {'key': 'optedOut', 'type': 'bool'} + } + + def __init__(self, opted_out=None): + super(SubscriptionUserSettings, self).__init__() + self.opted_out = opted_out diff --git a/vsts/vsts/notification/v4_1/models/value_definition.py b/vsts/vsts/notification/v4_1/models/value_definition.py new file mode 100644 index 00000000..5ea1d0f0 --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/value_definition.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ValueDefinition(Model): + """ValueDefinition. + + :param data_source: Gets or sets the data source. + :type data_source: list of :class:`InputValue ` + :param end_point: Gets or sets the rest end point. + :type end_point: str + :param result_template: Gets or sets the result template. + :type result_template: str + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': '[InputValue]'}, + 'end_point': {'key': 'endPoint', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'} + } + + def __init__(self, data_source=None, end_point=None, result_template=None): + super(ValueDefinition, self).__init__() + self.data_source = data_source + self.end_point = end_point + self.result_template = result_template diff --git a/vsts/vsts/notification/v4_1/models/vss_notification_event.py b/vsts/vsts/notification/v4_1/models/vss_notification_event.py new file mode 100644 index 00000000..fcc6ea1b --- /dev/null +++ b/vsts/vsts/notification/v4_1/models/vss_notification_event.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 VssNotificationEvent(Model): + """VssNotificationEvent. + + :param actors: Optional: A list of actors which are additional identities with corresponding roles that are relevant to the event. + :type actors: list of :class:`EventActor ` + :param artifact_uris: Optional: A list of artifacts referenced or impacted by this event. + :type artifact_uris: list of str + :param data: Required: The event payload. If Data is a string, it must be in Json or XML format. Otherwise it must have a serialization format attribute. + :type data: object + :param event_type: Required: The name of the event. This event must be registered in the context it is being fired. + :type event_type: str + :param scopes: Optional: A list of scopes which are are relevant to the event. + :type scopes: list of :class:`EventScope ` + """ + + _attribute_map = { + 'actors': {'key': 'actors', 'type': '[EventActor]'}, + 'artifact_uris': {'key': 'artifactUris', 'type': '[str]'}, + 'data': {'key': 'data', 'type': 'object'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': '[EventScope]'} + } + + def __init__(self, actors=None, artifact_uris=None, data=None, event_type=None, scopes=None): + super(VssNotificationEvent, self).__init__() + self.actors = actors + self.artifact_uris = artifact_uris + self.data = data + self.event_type = event_type + self.scopes = scopes diff --git a/vsts/vsts/notification/v4_1/notification_client.py b/vsts/vsts/notification/v4_1/notification_client.py new file mode 100644 index 00000000..64f104c0 --- /dev/null +++ b/vsts/vsts/notification/v4_1/notification_client.py @@ -0,0 +1,297 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class NotificationClient(VssClient): + """Notification + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(NotificationClient, 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 list_logs(self, source, entry_id=None, start_time=None, end_time=None): + """ListLogs. + [Preview API] List diagnostic logs this service. + :param str source: + :param str entry_id: + :param datetime start_time: + :param datetime end_time: + :rtype: [INotificationDiagnosticLog] + """ + route_values = {} + if source is not None: + route_values['source'] = self._serialize.url('source', source, 'str') + if entry_id is not None: + route_values['entryId'] = self._serialize.url('entry_id', entry_id, 'str') + query_parameters = {} + if start_time is not None: + query_parameters['startTime'] = self._serialize.query('start_time', start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query('end_time', end_time, 'iso-8601') + response = self._send(http_method='GET', + location_id='991842f3-eb16-4aea-ac81-81353ef2b75c', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[INotificationDiagnosticLog]', response) + + def get_subscription_diagnostics(self, subscription_id): + """GetSubscriptionDiagnostics. + [Preview API] + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + response = self._send(http_method='GET', + location_id='20f1929d-4be7-4c2e-a74e-d47640ff3418', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('SubscriptionDiagnostics', response) + + def update_subscription_diagnostics(self, update_parameters, subscription_id): + """UpdateSubscriptionDiagnostics. + [Preview API] + :param :class:` ` update_parameters: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(update_parameters, 'UpdateSubscripitonDiagnosticsParameters') + response = self._send(http_method='PUT', + location_id='20f1929d-4be7-4c2e-a74e-d47640ff3418', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('SubscriptionDiagnostics', response) + + def publish_event(self, notification_event): + """PublishEvent. + [Preview API] Publish an event. + :param :class:` ` notification_event: + :rtype: :class:` ` + """ + content = self._serialize.body(notification_event, 'VssNotificationEvent') + response = self._send(http_method='POST', + location_id='14c57b7a-c0e6-4555-9f51-e067188fdd8e', + version='4.1-preview.1', + content=content) + return self._deserialize('VssNotificationEvent', response) + + def get_event_type(self, event_type): + """GetEventType. + [Preview API] Get a specific event type. + :param str event_type: + :rtype: :class:` ` + """ + route_values = {} + if event_type is not None: + route_values['eventType'] = self._serialize.url('event_type', event_type, 'str') + response = self._send(http_method='GET', + location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('NotificationEventType', response) + + def list_event_types(self, publisher_id=None): + """ListEventTypes. + [Preview API] List available event types for this service. Optionally filter by only event types for the specified publisher. + :param str publisher_id: Limit to event types for this publisher + :rtype: [NotificationEventType] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[NotificationEventType]', response) + + def get_subscriber(self, subscriber_id): + """GetSubscriber. + [Preview API] + :param str subscriber_id: + :rtype: :class:` ` + """ + route_values = {} + if subscriber_id is not None: + route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') + response = self._send(http_method='GET', + location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('NotificationSubscriber', response) + + def update_subscriber(self, update_parameters, subscriber_id): + """UpdateSubscriber. + [Preview API] + :param :class:` ` update_parameters: + :param str subscriber_id: + :rtype: :class:` ` + """ + route_values = {} + if subscriber_id is not None: + route_values['subscriberId'] = self._serialize.url('subscriber_id', subscriber_id, 'str') + content = self._serialize.body(update_parameters, 'NotificationSubscriberUpdateParameters') + response = self._send(http_method='PATCH', + location_id='4d5caff1-25ba-430b-b808-7a1f352cc197', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('NotificationSubscriber', response) + + def query_subscriptions(self, subscription_query): + """QuerySubscriptions. + [Preview API] Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + :param :class:` ` subscription_query: + :rtype: [NotificationSubscription] + """ + content = self._serialize.body(subscription_query, 'SubscriptionQuery') + response = self._send(http_method='POST', + location_id='6864db85-08c0-4006-8e8e-cc1bebe31675', + version='4.1-preview.1', + content=content, + returns_collection=True) + return self._deserialize('[NotificationSubscription]', response) + + def create_subscription(self, create_parameters): + """CreateSubscription. + [Preview API] Create a new subscription. + :param :class:` ` create_parameters: + :rtype: :class:` ` + """ + content = self._serialize.body(create_parameters, 'NotificationSubscriptionCreateParameters') + response = self._send(http_method='POST', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.1-preview.1', + content=content) + return self._deserialize('NotificationSubscription', response) + + def delete_subscription(self, subscription_id): + """DeleteSubscription. + [Preview API] Delete a subscription. + :param str subscription_id: + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + self._send(http_method='DELETE', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.1-preview.1', + route_values=route_values) + + def get_subscription(self, subscription_id, query_flags=None): + """GetSubscription. + [Preview API] Get a notification subscription by its ID. + :param str subscription_id: + :param str query_flags: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + query_parameters = {} + if query_flags is not None: + query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') + response = self._send(http_method='GET', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('NotificationSubscription', response) + + def list_subscriptions(self, target_id=None, ids=None, query_flags=None): + """ListSubscriptions. + [Preview API] + :param str target_id: + :param [str] ids: + :param str query_flags: + :rtype: [NotificationSubscription] + """ + query_parameters = {} + if target_id is not None: + query_parameters['targetId'] = self._serialize.query('target_id', target_id, 'str') + if ids is not None: + ids = ",".join(ids) + query_parameters['ids'] = self._serialize.query('ids', ids, 'str') + if query_flags is not None: + query_parameters['queryFlags'] = self._serialize.query('query_flags', query_flags, 'str') + response = self._send(http_method='GET', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[NotificationSubscription]', response) + + def update_subscription(self, update_parameters, subscription_id): + """UpdateSubscription. + [Preview API] Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. + :param :class:` ` update_parameters: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(update_parameters, 'NotificationSubscriptionUpdateParameters') + response = self._send(http_method='PATCH', + location_id='70f911d6-abac-488c-85b3-a206bf57e165', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('NotificationSubscription', response) + + def get_subscription_templates(self): + """GetSubscriptionTemplates. + [Preview API] Get available subscription templates. + :rtype: [NotificationSubscriptionTemplate] + """ + response = self._send(http_method='GET', + location_id='fa5d24ba-7484-4f3d-888d-4ec6b1974082', + version='4.1-preview.1', + returns_collection=True) + return self._deserialize('[NotificationSubscriptionTemplate]', response) + + def update_subscription_user_settings(self, user_settings, subscription_id, user_id): + """UpdateSubscriptionUserSettings. + [Preview API] Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. + :param :class:` ` user_settings: + :param str subscription_id: + :param str user_id: ID of the user + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + if user_id is not None: + route_values['userId'] = self._serialize.url('user_id', user_id, 'str') + content = self._serialize.body(user_settings, 'SubscriptionUserSettings') + response = self._send(http_method='PUT', + location_id='ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('SubscriptionUserSettings', response) + diff --git a/vsts/vsts/operations/v4_0/operations_client.py b/vsts/vsts/operations/v4_0/operations_client.py index 70ba8f89..282a4cd9 100644 --- a/vsts/vsts/operations/v4_0/operations_client.py +++ b/vsts/vsts/operations/v4_0/operations_client.py @@ -18,7 +18,7 @@ class OperationsClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(OperationsClient, 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) diff --git a/vsts/vsts/operations/v4_1/operations_client.py b/vsts/vsts/operations/v4_1/operations_client.py index 181c1a81..5bedf682 100644 --- a/vsts/vsts/operations/v4_1/operations_client.py +++ b/vsts/vsts/operations/v4_1/operations_client.py @@ -18,7 +18,7 @@ class OperationsClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(OperationsClient, 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) diff --git a/vsts/vsts/policy/v4_0/policy_client.py b/vsts/vsts/policy/v4_0/policy_client.py index a0a1fc99..a18a7f24 100644 --- a/vsts/vsts/policy/v4_0/policy_client.py +++ b/vsts/vsts/policy/v4_0/policy_client.py @@ -18,7 +18,7 @@ class PolicyClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(PolicyClient, 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) diff --git a/vsts/vsts/policy/v4_1/models/__init__.py b/vsts/vsts/policy/v4_1/models/__init__.py index 15df3183..a1e4a4bc 100644 --- a/vsts/vsts/policy/v4_1/models/__init__.py +++ b/vsts/vsts/policy/v4_1/models/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- +from .graph_subject_base import GraphSubjectBase from .identity_ref import IdentityRef from .policy_configuration import PolicyConfiguration from .policy_configuration_ref import PolicyConfigurationRef @@ -16,6 +17,7 @@ from .versioned_policy_configuration_ref import VersionedPolicyConfigurationRef __all__ = [ + 'GraphSubjectBase', 'IdentityRef', 'PolicyConfiguration', 'PolicyConfigurationRef', diff --git a/vsts/vsts/policy/v4_1/models/identity_ref.py b/vsts/vsts/policy/v4_1/models/identity_ref.py index 40c776c5..c4c35ad5 100644 --- a/vsts/vsts/policy/v4_1/models/identity_ref.py +++ b/vsts/vsts/policy/v4_1/models/identity_ref.py @@ -6,16 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .graph_subject_base import GraphSubjectBase -class IdentityRef(Model): +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: :type directory_alias: str - :param display_name: - :type display_name: str :param id: :type id: str :param image_url: @@ -30,27 +36,26 @@ class IdentityRef(Model): :type profile_url: str :param unique_name: :type unique_name: str - :param url: - :type url: str """ _attribute_map = { - 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + '_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'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} + 'unique_name': {'key': 'uniqueName', 'type': 'str'} } - def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): - super(IdentityRef, self).__init__() + 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, 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.display_name = display_name self.id = id self.image_url = image_url self.inactive = inactive @@ -58,4 +63,3 @@ def __init__(self, directory_alias=None, display_name=None, id=None, image_url=N self.is_container = is_container self.profile_url = profile_url self.unique_name = unique_name - self.url = url diff --git a/vsts/vsts/policy/v4_1/policy_client.py b/vsts/vsts/policy/v4_1/policy_client.py index bdca231c..ad21d1b6 100644 --- a/vsts/vsts/policy/v4_1/policy_client.py +++ b/vsts/vsts/policy/v4_1/policy_client.py @@ -18,7 +18,7 @@ class PolicyClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(PolicyClient, 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) @@ -80,11 +80,12 @@ def get_policy_configuration(self, project, configuration_id): route_values=route_values) return self._deserialize('PolicyConfiguration', response) - def get_policy_configurations(self, project, scope=None): + def get_policy_configurations(self, project, scope=None, policy_type=None): """GetPolicyConfigurations. [Preview API] Get a list of policy configurations in a project. :param str project: Project ID or project name :param str scope: The scope on which a subset of policies is applied. + :param str policy_type: Filter returned policies to only this type :rtype: [PolicyConfiguration] """ route_values = {} @@ -93,6 +94,8 @@ def get_policy_configurations(self, project, scope=None): query_parameters = {} if scope is not None: query_parameters['scope'] = self._serialize.query('scope', scope, 'str') + if policy_type is not None: + query_parameters['policyType'] = self._serialize.query('policy_type', policy_type, 'str') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='4.1-preview.1', diff --git a/vsts/vsts/project_analysis/__init__.py b/vsts/vsts/project_analysis/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/project_analysis/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/project_analysis/v4_0/__init__.py b/vsts/vsts/project_analysis/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/project_analysis/v4_0/models/__init__.py b/vsts/vsts/project_analysis/v4_0/models/__init__.py new file mode 100644 index 00000000..dc7da909 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/models/__init__.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from .code_change_trend_item import CodeChangeTrendItem +from .language_statistics import LanguageStatistics +from .project_activity_metrics import ProjectActivityMetrics +from .project_language_analytics import ProjectLanguageAnalytics +from .repository_language_analytics import RepositoryLanguageAnalytics + +__all__ = [ + 'CodeChangeTrendItem', + 'LanguageStatistics', + 'ProjectActivityMetrics', + 'ProjectLanguageAnalytics', + 'RepositoryLanguageAnalytics', +] diff --git a/vsts/vsts/project_analysis/v4_0/models/code_change_trend_item.py b/vsts/vsts/project_analysis/v4_0/models/code_change_trend_item.py new file mode 100644 index 00000000..805629d0 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/models/code_change_trend_item.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeChangeTrendItem(Model): + """CodeChangeTrendItem. + + :param time: + :type time: datetime + :param value: + :type value: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'int'} + } + + def __init__(self, time=None, value=None): + super(CodeChangeTrendItem, self).__init__() + self.time = time + self.value = value diff --git a/vsts/vsts/project_analysis/v4_0/models/language_statistics.py b/vsts/vsts/project_analysis/v4_0/models/language_statistics.py new file mode 100644 index 00000000..998b34e1 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/models/language_statistics.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 LanguageStatistics(Model): + """LanguageStatistics. + + :param bytes: + :type bytes: long + :param bytes_percentage: + :type bytes_percentage: number + :param files: + :type files: int + :param files_percentage: + :type files_percentage: number + :param name: + :type name: str + :param weighted_bytes_percentage: + :type weighted_bytes_percentage: number + """ + + _attribute_map = { + 'bytes': {'key': 'bytes', 'type': 'long'}, + 'bytes_percentage': {'key': 'bytesPercentage', 'type': 'number'}, + 'files': {'key': 'files', 'type': 'int'}, + 'files_percentage': {'key': 'filesPercentage', 'type': 'number'}, + 'name': {'key': 'name', 'type': 'str'}, + 'weighted_bytes_percentage': {'key': 'weightedBytesPercentage', 'type': 'number'} + } + + def __init__(self, bytes=None, bytes_percentage=None, files=None, files_percentage=None, name=None, weighted_bytes_percentage=None): + super(LanguageStatistics, self).__init__() + self.bytes = bytes + self.bytes_percentage = bytes_percentage + self.files = files + self.files_percentage = files_percentage + self.name = name + self.weighted_bytes_percentage = weighted_bytes_percentage diff --git a/vsts/vsts/project_analysis/v4_0/models/project_activity_metrics.py b/vsts/vsts/project_analysis/v4_0/models/project_activity_metrics.py new file mode 100644 index 00000000..c0aeb27b --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/models/project_activity_metrics.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectActivityMetrics(Model): + """ProjectActivityMetrics. + + :param authors_count: + :type authors_count: int + :param code_changes_count: + :type code_changes_count: int + :param code_changes_trend: + :type code_changes_trend: list of :class:`CodeChangeTrendItem ` + :param project_id: + :type project_id: str + :param pull_requests_completed_count: + :type pull_requests_completed_count: int + :param pull_requests_created_count: + :type pull_requests_created_count: int + """ + + _attribute_map = { + 'authors_count': {'key': 'authorsCount', 'type': 'int'}, + 'code_changes_count': {'key': 'codeChangesCount', 'type': 'int'}, + 'code_changes_trend': {'key': 'codeChangesTrend', 'type': '[CodeChangeTrendItem]'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'pull_requests_completed_count': {'key': 'pullRequestsCompletedCount', 'type': 'int'}, + 'pull_requests_created_count': {'key': 'pullRequestsCreatedCount', 'type': 'int'} + } + + def __init__(self, authors_count=None, code_changes_count=None, code_changes_trend=None, project_id=None, pull_requests_completed_count=None, pull_requests_created_count=None): + super(ProjectActivityMetrics, self).__init__() + self.authors_count = authors_count + self.code_changes_count = code_changes_count + self.code_changes_trend = code_changes_trend + self.project_id = project_id + self.pull_requests_completed_count = pull_requests_completed_count + self.pull_requests_created_count = pull_requests_created_count diff --git a/vsts/vsts/project_analysis/v4_0/models/project_language_analytics.py b/vsts/vsts/project_analysis/v4_0/models/project_language_analytics.py new file mode 100644 index 00000000..b1870566 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/models/project_language_analytics.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectLanguageAnalytics(Model): + """ProjectLanguageAnalytics. + + :param id: + :type id: str + :param language_breakdown: + :type language_breakdown: list of :class:`LanguageStatistics ` + :param repository_language_analytics: + :type repository_language_analytics: list of :class:`RepositoryLanguageAnalytics ` + :param result_phase: + :type result_phase: object + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'language_breakdown': {'key': 'languageBreakdown', 'type': '[LanguageStatistics]'}, + 'repository_language_analytics': {'key': 'repositoryLanguageAnalytics', 'type': '[RepositoryLanguageAnalytics]'}, + 'result_phase': {'key': 'resultPhase', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, language_breakdown=None, repository_language_analytics=None, result_phase=None, url=None): + super(ProjectLanguageAnalytics, self).__init__() + self.id = id + self.language_breakdown = language_breakdown + self.repository_language_analytics = repository_language_analytics + self.result_phase = result_phase + self.url = url diff --git a/vsts/vsts/project_analysis/v4_0/models/repository_language_analytics.py b/vsts/vsts/project_analysis/v4_0/models/repository_language_analytics.py new file mode 100644 index 00000000..dd797c46 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/models/repository_language_analytics.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 RepositoryLanguageAnalytics(Model): + """RepositoryLanguageAnalytics. + + :param id: + :type id: str + :param language_breakdown: + :type language_breakdown: list of :class:`LanguageStatistics ` + :param name: + :type name: str + :param result_phase: + :type result_phase: object + :param updated_time: + :type updated_time: datetime + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'language_breakdown': {'key': 'languageBreakdown', 'type': '[LanguageStatistics]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'result_phase': {'key': 'resultPhase', 'type': 'object'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'} + } + + def __init__(self, id=None, language_breakdown=None, name=None, result_phase=None, updated_time=None): + super(RepositoryLanguageAnalytics, self).__init__() + self.id = id + self.language_breakdown = language_breakdown + self.name = name + self.result_phase = result_phase + self.updated_time = updated_time diff --git a/vsts/vsts/project_analysis/v4_0/project_analysis_client.py b/vsts/vsts/project_analysis/v4_0/project_analysis_client.py new file mode 100644 index 00000000..2de2e041 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_0/project_analysis_client.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ProjectAnalysisClient(VssClient): + """ProjectAnalysis + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ProjectAnalysisClient, 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 = '7658fa33-b1bf-4580-990f-fac5896773d3' + + def get_project_language_analytics(self, project): + """GetProjectLanguageAnalytics. + [Preview API] + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='5b02a779-1867-433f-90b7-d23ed5e33e57', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ProjectLanguageAnalytics', response) + + def get_project_activity_metrics(self, project, from_date, aggregation_type): + """GetProjectActivityMetrics. + [Preview API] + :param str project: Project ID or project name + :param datetime from_date: + :param str aggregation_type: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'iso-8601') + if aggregation_type is not None: + query_parameters['aggregationType'] = self._serialize.query('aggregation_type', aggregation_type, 'str') + response = self._send(http_method='GET', + location_id='e40ae584-9ea6-4f06-a7c7-6284651b466b', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProjectActivityMetrics', response) + diff --git a/vsts/vsts/project_analysis/v4_1/__init__.py b/vsts/vsts/project_analysis/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/project_analysis/v4_1/models/__init__.py b/vsts/vsts/project_analysis/v4_1/models/__init__.py new file mode 100644 index 00000000..34df4d66 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/models/__init__.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 .code_change_trend_item import CodeChangeTrendItem +from .language_metrics_secured_object import LanguageMetricsSecuredObject +from .language_statistics import LanguageStatistics +from .project_activity_metrics import ProjectActivityMetrics +from .project_language_analytics import ProjectLanguageAnalytics +from .repository_activity_metrics import RepositoryActivityMetrics +from .repository_language_analytics import RepositoryLanguageAnalytics + +__all__ = [ + 'CodeChangeTrendItem', + 'LanguageMetricsSecuredObject', + 'LanguageStatistics', + 'ProjectActivityMetrics', + 'ProjectLanguageAnalytics', + 'RepositoryActivityMetrics', + 'RepositoryLanguageAnalytics', +] diff --git a/vsts/vsts/project_analysis/v4_1/models/code_change_trend_item.py b/vsts/vsts/project_analysis/v4_1/models/code_change_trend_item.py new file mode 100644 index 00000000..805629d0 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/models/code_change_trend_item.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeChangeTrendItem(Model): + """CodeChangeTrendItem. + + :param time: + :type time: datetime + :param value: + :type value: int + """ + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'int'} + } + + def __init__(self, time=None, value=None): + super(CodeChangeTrendItem, self).__init__() + self.time = time + self.value = value diff --git a/vsts/vsts/project_analysis/v4_1/models/language_statistics.py b/vsts/vsts/project_analysis/v4_1/models/language_statistics.py new file mode 100644 index 00000000..2f777576 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/models/language_statistics.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------------------------- +# 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 .language_metrics_secured_object import LanguageMetricsSecuredObject + + +class LanguageStatistics(LanguageMetricsSecuredObject): + """LanguageStatistics. + + :param namespace_id: + :type namespace_id: str + :param project_id: + :type project_id: str + :param required_permissions: + :type required_permissions: int + :param bytes: + :type bytes: long + :param files: + :type files: int + :param files_percentage: + :type files_percentage: number + :param language_percentage: + :type language_percentage: number + :param name: + :type name: str + """ + + _attribute_map = { + 'namespace_id': {'key': 'namespaceId', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'required_permissions': {'key': 'requiredPermissions', 'type': 'int'}, + 'bytes': {'key': 'bytes', 'type': 'long'}, + 'files': {'key': 'files', 'type': 'int'}, + 'files_percentage': {'key': 'filesPercentage', 'type': 'number'}, + 'language_percentage': {'key': 'languagePercentage', 'type': 'number'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, namespace_id=None, project_id=None, required_permissions=None, bytes=None, files=None, files_percentage=None, language_percentage=None, name=None): + super(LanguageStatistics, self).__init__(namespace_id=namespace_id, project_id=project_id, required_permissions=required_permissions) + self.bytes = bytes + self.files = files + self.files_percentage = files_percentage + self.language_percentage = language_percentage + self.name = name diff --git a/vsts/vsts/project_analysis/v4_1/models/project_activity_metrics.py b/vsts/vsts/project_analysis/v4_1/models/project_activity_metrics.py new file mode 100644 index 00000000..2b0ce812 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/models/project_activity_metrics.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectActivityMetrics(Model): + """ProjectActivityMetrics. + + :param authors_count: + :type authors_count: int + :param code_changes_count: + :type code_changes_count: int + :param code_changes_trend: + :type code_changes_trend: list of :class:`CodeChangeTrendItem ` + :param project_id: + :type project_id: str + :param pull_requests_completed_count: + :type pull_requests_completed_count: int + :param pull_requests_created_count: + :type pull_requests_created_count: int + """ + + _attribute_map = { + 'authors_count': {'key': 'authorsCount', 'type': 'int'}, + 'code_changes_count': {'key': 'codeChangesCount', 'type': 'int'}, + 'code_changes_trend': {'key': 'codeChangesTrend', 'type': '[CodeChangeTrendItem]'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'pull_requests_completed_count': {'key': 'pullRequestsCompletedCount', 'type': 'int'}, + 'pull_requests_created_count': {'key': 'pullRequestsCreatedCount', 'type': 'int'} + } + + def __init__(self, authors_count=None, code_changes_count=None, code_changes_trend=None, project_id=None, pull_requests_completed_count=None, pull_requests_created_count=None): + super(ProjectActivityMetrics, self).__init__() + self.authors_count = authors_count + self.code_changes_count = code_changes_count + self.code_changes_trend = code_changes_trend + self.project_id = project_id + self.pull_requests_completed_count = pull_requests_completed_count + self.pull_requests_created_count = pull_requests_created_count diff --git a/vsts/vsts/project_analysis/v4_1/models/project_language_analytics.py b/vsts/vsts/project_analysis/v4_1/models/project_language_analytics.py new file mode 100644 index 00000000..284e8f99 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/models/project_language_analytics.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------------------------- +# 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 .language_metrics_secured_object import LanguageMetricsSecuredObject + + +class ProjectLanguageAnalytics(LanguageMetricsSecuredObject): + """ProjectLanguageAnalytics. + + :param namespace_id: + :type namespace_id: str + :param project_id: + :type project_id: str + :param required_permissions: + :type required_permissions: int + :param id: + :type id: str + :param language_breakdown: + :type language_breakdown: list of :class:`LanguageStatistics ` + :param repository_language_analytics: + :type repository_language_analytics: list of :class:`RepositoryLanguageAnalytics ` + :param result_phase: + :type result_phase: object + :param url: + :type url: str + """ + + _attribute_map = { + 'namespace_id': {'key': 'namespaceId', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'required_permissions': {'key': 'requiredPermissions', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'language_breakdown': {'key': 'languageBreakdown', 'type': '[LanguageStatistics]'}, + 'repository_language_analytics': {'key': 'repositoryLanguageAnalytics', 'type': '[RepositoryLanguageAnalytics]'}, + 'result_phase': {'key': 'resultPhase', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, namespace_id=None, project_id=None, required_permissions=None, id=None, language_breakdown=None, repository_language_analytics=None, result_phase=None, url=None): + super(ProjectLanguageAnalytics, self).__init__(namespace_id=namespace_id, project_id=project_id, required_permissions=required_permissions) + self.id = id + self.language_breakdown = language_breakdown + self.repository_language_analytics = repository_language_analytics + self.result_phase = result_phase + self.url = url diff --git a/vsts/vsts/project_analysis/v4_1/models/repository_activity_metrics.py b/vsts/vsts/project_analysis/v4_1/models/repository_activity_metrics.py new file mode 100644 index 00000000..0d3d9381 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/models/repository_activity_metrics.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 RepositoryActivityMetrics(Model): + """RepositoryActivityMetrics. + + :param code_changes_count: + :type code_changes_count: int + :param code_changes_trend: + :type code_changes_trend: list of :class:`CodeChangeTrendItem ` + :param repository_id: + :type repository_id: str + """ + + _attribute_map = { + 'code_changes_count': {'key': 'codeChangesCount', 'type': 'int'}, + 'code_changes_trend': {'key': 'codeChangesTrend', 'type': '[CodeChangeTrendItem]'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'} + } + + def __init__(self, code_changes_count=None, code_changes_trend=None, repository_id=None): + super(RepositoryActivityMetrics, self).__init__() + self.code_changes_count = code_changes_count + self.code_changes_trend = code_changes_trend + self.repository_id = repository_id diff --git a/vsts/vsts/project_analysis/v4_1/models/repository_language_analytics.py b/vsts/vsts/project_analysis/v4_1/models/repository_language_analytics.py new file mode 100644 index 00000000..52799cc6 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/models/repository_language_analytics.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------------------------- +# 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 .language_metrics_secured_object import LanguageMetricsSecuredObject + + +class RepositoryLanguageAnalytics(LanguageMetricsSecuredObject): + """RepositoryLanguageAnalytics. + + :param namespace_id: + :type namespace_id: str + :param project_id: + :type project_id: str + :param required_permissions: + :type required_permissions: int + :param id: + :type id: str + :param language_breakdown: + :type language_breakdown: list of :class:`LanguageStatistics ` + :param name: + :type name: str + :param result_phase: + :type result_phase: object + :param updated_time: + :type updated_time: datetime + """ + + _attribute_map = { + 'namespace_id': {'key': 'namespaceId', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'required_permissions': {'key': 'requiredPermissions', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'language_breakdown': {'key': 'languageBreakdown', 'type': '[LanguageStatistics]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'result_phase': {'key': 'resultPhase', 'type': 'object'}, + 'updated_time': {'key': 'updatedTime', 'type': 'iso-8601'} + } + + def __init__(self, namespace_id=None, project_id=None, required_permissions=None, id=None, language_breakdown=None, name=None, result_phase=None, updated_time=None): + super(RepositoryLanguageAnalytics, self).__init__(namespace_id=namespace_id, project_id=project_id, required_permissions=required_permissions) + self.id = id + self.language_breakdown = language_breakdown + self.name = name + self.result_phase = result_phase + self.updated_time = updated_time diff --git a/vsts/vsts/project_analysis/v4_1/project_analysis_client.py b/vsts/vsts/project_analysis/v4_1/project_analysis_client.py new file mode 100644 index 00000000..e2ba8e83 --- /dev/null +++ b/vsts/vsts/project_analysis/v4_1/project_analysis_client.py @@ -0,0 +1,121 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ProjectAnalysisClient(VssClient): + """ProjectAnalysis + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ProjectAnalysisClient, 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 = '7658fa33-b1bf-4580-990f-fac5896773d3' + + def get_project_language_analytics(self, project): + """GetProjectLanguageAnalytics. + [Preview API] + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='5b02a779-1867-433f-90b7-d23ed5e33e57', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ProjectLanguageAnalytics', response) + + def get_project_activity_metrics(self, project, from_date, aggregation_type): + """GetProjectActivityMetrics. + [Preview API] + :param str project: Project ID or project name + :param datetime from_date: + :param str aggregation_type: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'iso-8601') + if aggregation_type is not None: + query_parameters['aggregationType'] = self._serialize.query('aggregation_type', aggregation_type, 'str') + response = self._send(http_method='GET', + location_id='e40ae584-9ea6-4f06-a7c7-6284651b466b', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProjectActivityMetrics', response) + + def get_git_repositories_activity_metrics(self, project, from_date, aggregation_type, skip, top): + """GetGitRepositoriesActivityMetrics. + [Preview API] Retrieves git activity metrics for repositories matching a specified criteria. + :param str project: Project ID or project name + :param datetime from_date: Date from which, the trends are to be fetched. + :param str aggregation_type: Bucket size on which, trends are to be aggregated. + :param int skip: The number of repositories to ignore. + :param int top: The number of repositories for which activity metrics are to be retrieved. + :rtype: [RepositoryActivityMetrics] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'iso-8601') + if aggregation_type is not None: + query_parameters['aggregationType'] = self._serialize.query('aggregation_type', aggregation_type, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='df7fbbca-630a-40e3-8aa3-7a3faf66947e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[RepositoryActivityMetrics]', response) + + def get_repository_activity_metrics(self, project, repository_id, from_date, aggregation_type): + """GetRepositoryActivityMetrics. + [Preview API] + :param str project: Project ID or project name + :param str repository_id: + :param datetime from_date: + :param str aggregation_type: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + query_parameters = {} + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'iso-8601') + if aggregation_type is not None: + query_parameters['aggregationType'] = self._serialize.query('aggregation_type', aggregation_type, 'str') + response = self._send(http_method='GET', + location_id='df7fbbca-630a-40e3-8aa3-7a3faf66947e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('RepositoryActivityMetrics', response) + diff --git a/vsts/vsts/release/__init__.py b/vsts/vsts/release/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/release/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/release/v4_0/__init__.py b/vsts/vsts/release/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/release/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/release/v4_0/models/__init__.py b/vsts/vsts/release/v4_0/models/__init__.py new file mode 100644 index 00000000..03b6a70c --- /dev/null +++ b/vsts/vsts/release/v4_0/models/__init__.py @@ -0,0 +1,175 @@ +# -------------------------------------------------------------------------------------------- +# 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 .agent_artifact_definition import AgentArtifactDefinition +from .approval_options import ApprovalOptions +from .artifact import Artifact +from .artifact_metadata import ArtifactMetadata +from .artifact_source_reference import ArtifactSourceReference +from .artifact_type_definition import ArtifactTypeDefinition +from .artifact_version import ArtifactVersion +from .artifact_version_query_result import ArtifactVersionQueryResult +from .auto_trigger_issue import AutoTriggerIssue +from .build_version import BuildVersion +from .change import Change +from .condition import Condition +from .configuration_variable_value import ConfigurationVariableValue +from .data_source_binding_base import DataSourceBindingBase +from .definition_environment_reference import DefinitionEnvironmentReference +from .deployment import Deployment +from .deployment_attempt import DeploymentAttempt +from .deployment_job import DeploymentJob +from .deployment_query_parameters import DeploymentQueryParameters +from .deploy_phase import DeployPhase +from .email_recipients import EmailRecipients +from .environment_execution_policy import EnvironmentExecutionPolicy +from .environment_options import EnvironmentOptions +from .environment_retention_policy import EnvironmentRetentionPolicy +from .favorite_item import FavoriteItem +from .folder import Folder +from .identity_ref import IdentityRef +from .input_descriptor import InputDescriptor +from .input_validation import InputValidation +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .input_values_query import InputValuesQuery +from .issue import Issue +from .mail_message import MailMessage +from .manual_intervention import ManualIntervention +from .manual_intervention_update_metadata import ManualInterventionUpdateMetadata +from .metric import Metric +from .process_parameters import ProcessParameters +from .project_reference import ProjectReference +from .queued_release_data import QueuedReleaseData +from .reference_links import ReferenceLinks +from .release import Release +from .release_approval import ReleaseApproval +from .release_approval_history import ReleaseApprovalHistory +from .release_condition import ReleaseCondition +from .release_definition import ReleaseDefinition +from .release_definition_approvals import ReleaseDefinitionApprovals +from .release_definition_approval_step import ReleaseDefinitionApprovalStep +from .release_definition_deploy_step import ReleaseDefinitionDeployStep +from .release_definition_environment import ReleaseDefinitionEnvironment +from .release_definition_environment_step import ReleaseDefinitionEnvironmentStep +from .release_definition_environment_summary import ReleaseDefinitionEnvironmentSummary +from .release_definition_environment_template import ReleaseDefinitionEnvironmentTemplate +from .release_definition_revision import ReleaseDefinitionRevision +from .release_definition_shallow_reference import ReleaseDefinitionShallowReference +from .release_definition_summary import ReleaseDefinitionSummary +from .release_deploy_phase import ReleaseDeployPhase +from .release_environment import ReleaseEnvironment +from .release_environment_shallow_reference import ReleaseEnvironmentShallowReference +from .release_environment_update_metadata import ReleaseEnvironmentUpdateMetadata +from .release_reference import ReleaseReference +from .release_revision import ReleaseRevision +from .release_schedule import ReleaseSchedule +from .release_settings import ReleaseSettings +from .release_shallow_reference import ReleaseShallowReference +from .release_start_metadata import ReleaseStartMetadata +from .release_task import ReleaseTask +from .release_trigger_base import ReleaseTriggerBase +from .release_update_metadata import ReleaseUpdateMetadata +from .release_work_item_ref import ReleaseWorkItemRef +from .retention_policy import RetentionPolicy +from .retention_settings import RetentionSettings +from .summary_mail_section import SummaryMailSection +from .task_input_definition_base import TaskInputDefinitionBase +from .task_input_validation import TaskInputValidation +from .task_source_definition_base import TaskSourceDefinitionBase +from .variable_group import VariableGroup +from .variable_group_provider_data import VariableGroupProviderData +from .variable_value import VariableValue +from .workflow_task import WorkflowTask +from .workflow_task_reference import WorkflowTaskReference + +__all__ = [ + 'AgentArtifactDefinition', + 'ApprovalOptions', + 'Artifact', + 'ArtifactMetadata', + 'ArtifactSourceReference', + 'ArtifactTypeDefinition', + 'ArtifactVersion', + 'ArtifactVersionQueryResult', + 'AutoTriggerIssue', + 'BuildVersion', + 'Change', + 'Condition', + 'ConfigurationVariableValue', + 'DataSourceBindingBase', + 'DefinitionEnvironmentReference', + 'Deployment', + 'DeploymentAttempt', + 'DeploymentJob', + 'DeploymentQueryParameters', + 'DeployPhase', + 'EmailRecipients', + 'EnvironmentExecutionPolicy', + 'EnvironmentOptions', + 'EnvironmentRetentionPolicy', + 'FavoriteItem', + 'Folder', + 'IdentityRef', + 'InputDescriptor', + 'InputValidation', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'InputValuesQuery', + 'Issue', + 'MailMessage', + 'ManualIntervention', + 'ManualInterventionUpdateMetadata', + 'Metric', + 'ProcessParameters', + 'ProjectReference', + 'QueuedReleaseData', + 'ReferenceLinks', + 'Release', + 'ReleaseApproval', + 'ReleaseApprovalHistory', + 'ReleaseCondition', + 'ReleaseDefinition', + 'ReleaseDefinitionApprovals', + 'ReleaseDefinitionApprovalStep', + 'ReleaseDefinitionDeployStep', + 'ReleaseDefinitionEnvironment', + 'ReleaseDefinitionEnvironmentStep', + 'ReleaseDefinitionEnvironmentSummary', + 'ReleaseDefinitionEnvironmentTemplate', + 'ReleaseDefinitionRevision', + 'ReleaseDefinitionShallowReference', + 'ReleaseDefinitionSummary', + 'ReleaseDeployPhase', + 'ReleaseEnvironment', + 'ReleaseEnvironmentShallowReference', + 'ReleaseEnvironmentUpdateMetadata', + 'ReleaseReference', + 'ReleaseRevision', + 'ReleaseSchedule', + 'ReleaseSettings', + 'ReleaseShallowReference', + 'ReleaseStartMetadata', + 'ReleaseTask', + 'ReleaseTriggerBase', + 'ReleaseUpdateMetadata', + 'ReleaseWorkItemRef', + 'RetentionPolicy', + 'RetentionSettings', + 'SummaryMailSection', + 'TaskInputDefinitionBase', + 'TaskInputValidation', + 'TaskSourceDefinitionBase', + 'VariableGroup', + 'VariableGroupProviderData', + 'VariableValue', + 'WorkflowTask', + 'WorkflowTaskReference', +] diff --git a/vsts/vsts/release/v4_0/models/agent_artifact_definition.py b/vsts/vsts/release/v4_0/models/agent_artifact_definition.py new file mode 100644 index 00000000..8e2ec362 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/agent_artifact_definition.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AgentArtifactDefinition(Model): + """AgentArtifactDefinition. + + :param alias: + :type alias: str + :param artifact_type: + :type artifact_type: object + :param details: + :type details: str + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'artifact_type': {'key': 'artifactType', 'type': 'object'}, + 'details': {'key': 'details', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, alias=None, artifact_type=None, details=None, name=None, version=None): + super(AgentArtifactDefinition, self).__init__() + self.alias = alias + self.artifact_type = artifact_type + self.details = details + self.name = name + self.version = version diff --git a/vsts/vsts/release/v4_0/models/approval_options.py b/vsts/vsts/release/v4_0/models/approval_options.py new file mode 100644 index 00000000..088817f9 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/approval_options.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ApprovalOptions(Model): + """ApprovalOptions. + + :param auto_triggered_and_previous_environment_approved_can_be_skipped: + :type auto_triggered_and_previous_environment_approved_can_be_skipped: bool + :param enforce_identity_revalidation: + :type enforce_identity_revalidation: bool + :param release_creator_can_be_approver: + :type release_creator_can_be_approver: bool + :param required_approver_count: + :type required_approver_count: int + :param timeout_in_minutes: + :type timeout_in_minutes: int + """ + + _attribute_map = { + 'auto_triggered_and_previous_environment_approved_can_be_skipped': {'key': 'autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped', 'type': 'bool'}, + 'enforce_identity_revalidation': {'key': 'enforceIdentityRevalidation', 'type': 'bool'}, + 'release_creator_can_be_approver': {'key': 'releaseCreatorCanBeApprover', 'type': 'bool'}, + 'required_approver_count': {'key': 'requiredApproverCount', 'type': 'int'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'} + } + + def __init__(self, auto_triggered_and_previous_environment_approved_can_be_skipped=None, enforce_identity_revalidation=None, release_creator_can_be_approver=None, required_approver_count=None, timeout_in_minutes=None): + super(ApprovalOptions, self).__init__() + self.auto_triggered_and_previous_environment_approved_can_be_skipped = auto_triggered_and_previous_environment_approved_can_be_skipped + self.enforce_identity_revalidation = enforce_identity_revalidation + self.release_creator_can_be_approver = release_creator_can_be_approver + self.required_approver_count = required_approver_count + self.timeout_in_minutes = timeout_in_minutes diff --git a/vsts/vsts/release/v4_0/models/artifact.py b/vsts/vsts/release/v4_0/models/artifact.py new file mode 100644 index 00000000..4bdf46a5 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/artifact.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Artifact(Model): + """Artifact. + + :param alias: Gets or sets alias. + :type alias: str + :param definition_reference: Gets or sets definition reference. e.g. {"project":{"id":"fed755ea-49c5-4399-acea-fd5b5aa90a6c","name":"myProject"},"definition":{"id":"1","name":"mybuildDefinition"},"connection":{"id":"1","name":"myConnection"}} + :type definition_reference: dict + :param is_primary: Gets or sets as artifact is primary or not. + :type is_primary: bool + :param source_id: + :type source_id: str + :param type: Gets or sets type. It can have value as 'Build', 'Jenkins', 'GitHub', 'Nuget', 'Team Build (external)', 'ExternalTFSBuild', 'Git', 'TFVC', 'ExternalTfsXamlBuild'. + :type type: str + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'definition_reference': {'key': 'definitionReference', 'type': '{ArtifactSourceReference}'}, + 'is_primary': {'key': 'isPrimary', 'type': 'bool'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, alias=None, definition_reference=None, is_primary=None, source_id=None, type=None): + super(Artifact, self).__init__() + self.alias = alias + self.definition_reference = definition_reference + self.is_primary = is_primary + self.source_id = source_id + self.type = type diff --git a/vsts/vsts/release/v4_0/models/artifact_metadata.py b/vsts/vsts/release/v4_0/models/artifact_metadata.py new file mode 100644 index 00000000..0e27dc22 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/artifact_metadata.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactMetadata(Model): + """ArtifactMetadata. + + :param alias: Sets alias of artifact. + :type alias: str + :param instance_reference: Sets instance reference of artifact. e.g. for build artifact it is build number. + :type instance_reference: :class:`BuildVersion ` + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'instance_reference': {'key': 'instanceReference', 'type': 'BuildVersion'} + } + + def __init__(self, alias=None, instance_reference=None): + super(ArtifactMetadata, self).__init__() + self.alias = alias + self.instance_reference = instance_reference diff --git a/vsts/vsts/release/v4_0/models/artifact_source_reference.py b/vsts/vsts/release/v4_0/models/artifact_source_reference.py new file mode 100644 index 00000000..7f1fefd8 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/artifact_source_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactSourceReference(Model): + """ArtifactSourceReference. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ArtifactSourceReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/release/v4_0/models/artifact_type_definition.py b/vsts/vsts/release/v4_0/models/artifact_type_definition.py new file mode 100644 index 00000000..9abc5029 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/artifact_type_definition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactTypeDefinition(Model): + """ArtifactTypeDefinition. + + :param display_name: + :type display_name: str + :param input_descriptors: + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: + :type name: str + :param unique_source_identifier: + :type unique_source_identifier: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'unique_source_identifier': {'key': 'uniqueSourceIdentifier', 'type': 'str'} + } + + def __init__(self, display_name=None, input_descriptors=None, name=None, unique_source_identifier=None): + super(ArtifactTypeDefinition, self).__init__() + self.display_name = display_name + self.input_descriptors = input_descriptors + self.name = name + self.unique_source_identifier = unique_source_identifier diff --git a/vsts/vsts/release/v4_0/models/artifact_version.py b/vsts/vsts/release/v4_0/models/artifact_version.py new file mode 100644 index 00000000..4ed1d574 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/artifact_version.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactVersion(Model): + """ArtifactVersion. + + :param alias: + :type alias: str + :param default_version: + :type default_version: :class:`BuildVersion ` + :param error_message: + :type error_message: str + :param source_id: + :type source_id: str + :param versions: + :type versions: list of :class:`BuildVersion ` + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'default_version': {'key': 'defaultVersion', 'type': 'BuildVersion'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'versions': {'key': 'versions', 'type': '[BuildVersion]'} + } + + def __init__(self, alias=None, default_version=None, error_message=None, source_id=None, versions=None): + super(ArtifactVersion, self).__init__() + self.alias = alias + self.default_version = default_version + self.error_message = error_message + self.source_id = source_id + self.versions = versions diff --git a/vsts/vsts/release/v4_0/models/artifact_version_query_result.py b/vsts/vsts/release/v4_0/models/artifact_version_query_result.py new file mode 100644 index 00000000..4201e360 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/artifact_version_query_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactVersionQueryResult(Model): + """ArtifactVersionQueryResult. + + :param artifact_versions: + :type artifact_versions: list of :class:`ArtifactVersion ` + """ + + _attribute_map = { + 'artifact_versions': {'key': 'artifactVersions', 'type': '[ArtifactVersion]'} + } + + def __init__(self, artifact_versions=None): + super(ArtifactVersionQueryResult, self).__init__() + self.artifact_versions = artifact_versions diff --git a/vsts/vsts/release/v4_0/models/auto_trigger_issue.py b/vsts/vsts/release/v4_0/models/auto_trigger_issue.py new file mode 100644 index 00000000..bd1c7f65 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/auto_trigger_issue.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AutoTriggerIssue(Model): + """AutoTriggerIssue. + + :param issue: + :type issue: :class:`Issue ` + :param issue_source: + :type issue_source: object + :param project: + :type project: :class:`ProjectReference ` + :param release_definition_reference: + :type release_definition_reference: :class:`ReleaseDefinitionShallowReference ` + :param release_trigger_type: + :type release_trigger_type: object + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'Issue'}, + 'issue_source': {'key': 'issueSource', 'type': 'object'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'release_definition_reference': {'key': 'releaseDefinitionReference', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_trigger_type': {'key': 'releaseTriggerType', 'type': 'object'} + } + + def __init__(self, issue=None, issue_source=None, project=None, release_definition_reference=None, release_trigger_type=None): + super(AutoTriggerIssue, self).__init__() + self.issue = issue + self.issue_source = issue_source + self.project = project + self.release_definition_reference = release_definition_reference + self.release_trigger_type = release_trigger_type diff --git a/vsts/vsts/release/v4_0/models/build_version.py b/vsts/vsts/release/v4_0/models/build_version.py new file mode 100644 index 00000000..519cef9b --- /dev/null +++ b/vsts/vsts/release/v4_0/models/build_version.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildVersion(Model): + """BuildVersion. + + :param id: + :type id: str + :param name: + :type name: str + :param source_branch: + :type source_branch: str + :param source_repository_id: + :type source_repository_id: str + :param source_repository_type: + :type source_repository_type: str + :param source_version: + :type source_version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'source_branch': {'key': 'sourceBranch', 'type': 'str'}, + 'source_repository_id': {'key': 'sourceRepositoryId', 'type': 'str'}, + 'source_repository_type': {'key': 'sourceRepositoryType', 'type': 'str'}, + 'source_version': {'key': 'sourceVersion', 'type': 'str'} + } + + def __init__(self, id=None, name=None, source_branch=None, source_repository_id=None, source_repository_type=None, source_version=None): + super(BuildVersion, self).__init__() + self.id = id + self.name = name + self.source_branch = source_branch + self.source_repository_id = source_repository_id + self.source_repository_type = source_repository_type + self.source_version = source_version diff --git a/vsts/vsts/release/v4_0/models/change.py b/vsts/vsts/release/v4_0/models/change.py new file mode 100644 index 00000000..0e46a7ee --- /dev/null +++ b/vsts/vsts/release/v4_0/models/change.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 Change(Model): + """Change. + + :param author: The author of the change. + :type author: :class:`IdentityRef ` + :param change_type: The type of change. "commit", "changeset", etc. + :type change_type: str + :param display_uri: The location of a user-friendly representation of the resource. + :type display_uri: str + :param id: Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. + :type id: str + :param location: The location of the full representation of the resource. + :type location: str + :param message: A description of the change. This might be a commit message or changeset description. + :type message: str + :param timestamp: A timestamp for the change. + :type timestamp: datetime + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'change_type': {'key': 'changeType', 'type': 'str'}, + 'display_uri': {'key': 'displayUri', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'} + } + + def __init__(self, author=None, change_type=None, display_uri=None, id=None, location=None, message=None, timestamp=None): + super(Change, self).__init__() + self.author = author + self.change_type = change_type + self.display_uri = display_uri + self.id = id + self.location = location + self.message = message + self.timestamp = timestamp diff --git a/vsts/vsts/release/v4_0/models/condition.py b/vsts/vsts/release/v4_0/models/condition.py new file mode 100644 index 00000000..6cbd8186 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/condition.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 Condition(Model): + """Condition. + + :param condition_type: + :type condition_type: object + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'condition_type': {'key': 'conditionType', 'type': 'object'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, condition_type=None, name=None, value=None): + super(Condition, self).__init__() + self.condition_type = condition_type + self.name = name + self.value = value diff --git a/vsts/vsts/release/v4_0/models/configuration_variable_value.py b/vsts/vsts/release/v4_0/models/configuration_variable_value.py new file mode 100644 index 00000000..4db7217a --- /dev/null +++ b/vsts/vsts/release/v4_0/models/configuration_variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ConfigurationVariableValue(Model): + """ConfigurationVariableValue. + + :param is_secret: Gets or sets as variable is secret or not. + :type is_secret: bool + :param value: Gets or sets value of the configuration variable. + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(ConfigurationVariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/release/v4_0/models/data_source_binding_base.py b/vsts/vsts/release/v4_0/models/data_source_binding_base.py new file mode 100644 index 00000000..e2c6e8d5 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/data_source_binding_base.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataSourceBindingBase(Model): + """DataSourceBindingBase. + + :param data_source_name: + :type data_source_name: str + :param endpoint_id: + :type endpoint_id: str + :param endpoint_url: + :type endpoint_url: str + :param parameters: + :type parameters: dict + :param result_selector: + :type result_selector: str + :param result_template: + :type result_template: str + :param target: + :type target: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, data_source_name=None, endpoint_id=None, endpoint_url=None, parameters=None, result_selector=None, result_template=None, target=None): + super(DataSourceBindingBase, self).__init__() + self.data_source_name = data_source_name + self.endpoint_id = endpoint_id + self.endpoint_url = endpoint_url + self.parameters = parameters + self.result_selector = result_selector + self.result_template = result_template + self.target = target diff --git a/vsts/vsts/release/v4_0/models/definition_environment_reference.py b/vsts/vsts/release/v4_0/models/definition_environment_reference.py new file mode 100644 index 00000000..06c56140 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/definition_environment_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DefinitionEnvironmentReference(Model): + """DefinitionEnvironmentReference. + + :param definition_environment_id: + :type definition_environment_id: int + :param definition_environment_name: + :type definition_environment_name: str + :param release_definition_id: + :type release_definition_id: int + :param release_definition_name: + :type release_definition_name: str + """ + + _attribute_map = { + 'definition_environment_id': {'key': 'definitionEnvironmentId', 'type': 'int'}, + 'definition_environment_name': {'key': 'definitionEnvironmentName', 'type': 'str'}, + 'release_definition_id': {'key': 'releaseDefinitionId', 'type': 'int'}, + 'release_definition_name': {'key': 'releaseDefinitionName', 'type': 'str'} + } + + def __init__(self, definition_environment_id=None, definition_environment_name=None, release_definition_id=None, release_definition_name=None): + super(DefinitionEnvironmentReference, self).__init__() + self.definition_environment_id = definition_environment_id + self.definition_environment_name = definition_environment_name + self.release_definition_id = release_definition_id + self.release_definition_name = release_definition_name diff --git a/vsts/vsts/release/v4_0/models/deploy_phase.py b/vsts/vsts/release/v4_0/models/deploy_phase.py new file mode 100644 index 00000000..3aad99e6 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/deploy_phase.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeployPhase(Model): + """DeployPhase. + + :param name: + :type name: str + :param phase_type: + :type phase_type: object + :param rank: + :type rank: int + :param workflow_tasks: + :type workflow_tasks: list of :class:`WorkflowTask ` + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'phase_type': {'key': 'phaseType', 'type': 'object'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'workflow_tasks': {'key': 'workflowTasks', 'type': '[WorkflowTask]'} + } + + def __init__(self, name=None, phase_type=None, rank=None, workflow_tasks=None): + super(DeployPhase, self).__init__() + self.name = name + self.phase_type = phase_type + self.rank = rank + self.workflow_tasks = workflow_tasks diff --git a/vsts/vsts/release/v4_0/models/deployment.py b/vsts/vsts/release/v4_0/models/deployment.py new file mode 100644 index 00000000..71018e34 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/deployment.py @@ -0,0 +1,101 @@ +# -------------------------------------------------------------------------------------------- +# 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 Deployment(Model): + """Deployment. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param attempt: + :type attempt: int + :param conditions: + :type conditions: list of :class:`Condition ` + :param definition_environment_id: + :type definition_environment_id: int + :param deployment_status: + :type deployment_status: object + :param id: + :type id: int + :param last_modified_by: + :type last_modified_by: :class:`IdentityRef ` + :param last_modified_on: + :type last_modified_on: datetime + :param operation_status: + :type operation_status: object + :param post_deploy_approvals: + :type post_deploy_approvals: list of :class:`ReleaseApproval ` + :param pre_deploy_approvals: + :type pre_deploy_approvals: list of :class:`ReleaseApproval ` + :param queued_on: + :type queued_on: datetime + :param reason: + :type reason: object + :param release: + :type release: :class:`ReleaseReference ` + :param release_definition: + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_environment: + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :param requested_by: + :type requested_by: :class:`IdentityRef ` + :param requested_for: + :type requested_for: :class:`IdentityRef ` + :param scheduled_deployment_time: + :type scheduled_deployment_time: datetime + :param started_on: + :type started_on: datetime + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'conditions': {'key': 'conditions', 'type': '[Condition]'}, + 'definition_environment_id': {'key': 'definitionEnvironmentId', 'type': 'int'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'last_modified_on': {'key': 'lastModifiedOn', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'post_deploy_approvals': {'key': 'postDeployApprovals', 'type': '[ReleaseApproval]'}, + 'pre_deploy_approvals': {'key': 'preDeployApprovals', 'type': '[ReleaseApproval]'}, + 'queued_on': {'key': 'queuedOn', 'type': 'iso-8601'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_environment': {'key': 'releaseEnvironment', 'type': 'ReleaseEnvironmentShallowReference'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'requested_for': {'key': 'requestedFor', 'type': 'IdentityRef'}, + 'scheduled_deployment_time': {'key': 'scheduledDeploymentTime', 'type': 'iso-8601'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'} + } + + def __init__(self, _links=None, attempt=None, conditions=None, definition_environment_id=None, deployment_status=None, id=None, last_modified_by=None, last_modified_on=None, operation_status=None, post_deploy_approvals=None, pre_deploy_approvals=None, queued_on=None, reason=None, release=None, release_definition=None, release_environment=None, requested_by=None, requested_for=None, scheduled_deployment_time=None, started_on=None): + super(Deployment, self).__init__() + self._links = _links + self.attempt = attempt + self.conditions = conditions + self.definition_environment_id = definition_environment_id + self.deployment_status = deployment_status + self.id = id + self.last_modified_by = last_modified_by + self.last_modified_on = last_modified_on + self.operation_status = operation_status + self.post_deploy_approvals = post_deploy_approvals + self.pre_deploy_approvals = pre_deploy_approvals + self.queued_on = queued_on + self.reason = reason + self.release = release + self.release_definition = release_definition + self.release_environment = release_environment + self.requested_by = requested_by + self.requested_for = requested_for + self.scheduled_deployment_time = scheduled_deployment_time + self.started_on = started_on diff --git a/vsts/vsts/release/v4_0/models/deployment_attempt.py b/vsts/vsts/release/v4_0/models/deployment_attempt.py new file mode 100644 index 00000000..106b3e43 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/deployment_attempt.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentAttempt(Model): + """DeploymentAttempt. + + :param attempt: + :type attempt: int + :param deployment_id: + :type deployment_id: int + :param error_log: Error log to show any unexpected error that occurred during executing deploy step + :type error_log: str + :param has_started: Specifies whether deployment has started or not + :type has_started: bool + :param id: + :type id: int + :param job: + :type job: :class:`ReleaseTask ` + :param last_modified_by: + :type last_modified_by: :class:`IdentityRef ` + :param last_modified_on: + :type last_modified_on: datetime + :param operation_status: + :type operation_status: object + :param queued_on: + :type queued_on: datetime + :param reason: + :type reason: object + :param release_deploy_phases: + :type release_deploy_phases: list of :class:`ReleaseDeployPhase ` + :param requested_by: + :type requested_by: :class:`IdentityRef ` + :param requested_for: + :type requested_for: :class:`IdentityRef ` + :param run_plan_id: + :type run_plan_id: str + :param status: + :type status: object + :param tasks: + :type tasks: list of :class:`ReleaseTask ` + """ + + _attribute_map = { + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'deployment_id': {'key': 'deploymentId', 'type': 'int'}, + 'error_log': {'key': 'errorLog', 'type': 'str'}, + 'has_started': {'key': 'hasStarted', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'job': {'key': 'job', 'type': 'ReleaseTask'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'last_modified_on': {'key': 'lastModifiedOn', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'queued_on': {'key': 'queuedOn', 'type': 'iso-8601'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release_deploy_phases': {'key': 'releaseDeployPhases', 'type': '[ReleaseDeployPhase]'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'requested_for': {'key': 'requestedFor', 'type': 'IdentityRef'}, + 'run_plan_id': {'key': 'runPlanId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'tasks': {'key': 'tasks', 'type': '[ReleaseTask]'} + } + + def __init__(self, attempt=None, deployment_id=None, error_log=None, has_started=None, id=None, job=None, last_modified_by=None, last_modified_on=None, operation_status=None, queued_on=None, reason=None, release_deploy_phases=None, requested_by=None, requested_for=None, run_plan_id=None, status=None, tasks=None): + super(DeploymentAttempt, self).__init__() + self.attempt = attempt + self.deployment_id = deployment_id + self.error_log = error_log + self.has_started = has_started + self.id = id + self.job = job + self.last_modified_by = last_modified_by + self.last_modified_on = last_modified_on + self.operation_status = operation_status + self.queued_on = queued_on + self.reason = reason + self.release_deploy_phases = release_deploy_phases + self.requested_by = requested_by + self.requested_for = requested_for + self.run_plan_id = run_plan_id + self.status = status + self.tasks = tasks diff --git a/vsts/vsts/release/v4_0/models/deployment_job.py b/vsts/vsts/release/v4_0/models/deployment_job.py new file mode 100644 index 00000000..562ebaba --- /dev/null +++ b/vsts/vsts/release/v4_0/models/deployment_job.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentJob(Model): + """DeploymentJob. + + :param job: + :type job: :class:`ReleaseTask ` + :param tasks: + :type tasks: list of :class:`ReleaseTask ` + """ + + _attribute_map = { + 'job': {'key': 'job', 'type': 'ReleaseTask'}, + 'tasks': {'key': 'tasks', 'type': '[ReleaseTask]'} + } + + def __init__(self, job=None, tasks=None): + super(DeploymentJob, self).__init__() + self.job = job + self.tasks = tasks diff --git a/vsts/vsts/release/v4_0/models/deployment_query_parameters.py b/vsts/vsts/release/v4_0/models/deployment_query_parameters.py new file mode 100644 index 00000000..b257efe0 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/deployment_query_parameters.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentQueryParameters(Model): + """DeploymentQueryParameters. + + :param artifact_source_id: + :type artifact_source_id: str + :param artifact_type_id: + :type artifact_type_id: str + :param artifact_versions: + :type artifact_versions: list of str + :param deployment_status: + :type deployment_status: object + :param environments: + :type environments: list of :class:`DefinitionEnvironmentReference ` + :param expands: + :type expands: object + :param is_deleted: + :type is_deleted: bool + :param latest_deployments_only: + :type latest_deployments_only: bool + :param max_deployments_per_environment: + :type max_deployments_per_environment: int + :param max_modified_time: + :type max_modified_time: datetime + :param min_modified_time: + :type min_modified_time: datetime + :param operation_status: + :type operation_status: object + :param query_order: + :type query_order: object + """ + + _attribute_map = { + 'artifact_source_id': {'key': 'artifactSourceId', 'type': 'str'}, + 'artifact_type_id': {'key': 'artifactTypeId', 'type': 'str'}, + 'artifact_versions': {'key': 'artifactVersions', 'type': '[str]'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'object'}, + 'environments': {'key': 'environments', 'type': '[DefinitionEnvironmentReference]'}, + 'expands': {'key': 'expands', 'type': 'object'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'latest_deployments_only': {'key': 'latestDeploymentsOnly', 'type': 'bool'}, + 'max_deployments_per_environment': {'key': 'maxDeploymentsPerEnvironment', 'type': 'int'}, + 'max_modified_time': {'key': 'maxModifiedTime', 'type': 'iso-8601'}, + 'min_modified_time': {'key': 'minModifiedTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'query_order': {'key': 'queryOrder', 'type': 'object'} + } + + def __init__(self, artifact_source_id=None, artifact_type_id=None, artifact_versions=None, deployment_status=None, environments=None, expands=None, is_deleted=None, latest_deployments_only=None, max_deployments_per_environment=None, max_modified_time=None, min_modified_time=None, operation_status=None, query_order=None): + super(DeploymentQueryParameters, self).__init__() + self.artifact_source_id = artifact_source_id + self.artifact_type_id = artifact_type_id + self.artifact_versions = artifact_versions + self.deployment_status = deployment_status + self.environments = environments + self.expands = expands + self.is_deleted = is_deleted + self.latest_deployments_only = latest_deployments_only + self.max_deployments_per_environment = max_deployments_per_environment + self.max_modified_time = max_modified_time + self.min_modified_time = min_modified_time + self.operation_status = operation_status + self.query_order = query_order diff --git a/vsts/vsts/release/v4_0/models/email_recipients.py b/vsts/vsts/release/v4_0/models/email_recipients.py new file mode 100644 index 00000000..349b8915 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/email_recipients.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EmailRecipients(Model): + """EmailRecipients. + + :param email_addresses: + :type email_addresses: list of str + :param tfs_ids: + :type tfs_ids: list of str + """ + + _attribute_map = { + 'email_addresses': {'key': 'emailAddresses', 'type': '[str]'}, + 'tfs_ids': {'key': 'tfsIds', 'type': '[str]'} + } + + def __init__(self, email_addresses=None, tfs_ids=None): + super(EmailRecipients, self).__init__() + self.email_addresses = email_addresses + self.tfs_ids = tfs_ids diff --git a/vsts/vsts/release/v4_0/models/environment_execution_policy.py b/vsts/vsts/release/v4_0/models/environment_execution_policy.py new file mode 100644 index 00000000..5085c836 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/environment_execution_policy.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EnvironmentExecutionPolicy(Model): + """EnvironmentExecutionPolicy. + + :param concurrency_count: This policy decides, how many environments would be with Environment Runner. + :type concurrency_count: int + :param queue_depth_count: Queue depth in the EnvironmentQueue table, this table keeps the environment entries till Environment Runner is free [as per it's policy] to take another environment for running. + :type queue_depth_count: int + """ + + _attribute_map = { + 'concurrency_count': {'key': 'concurrencyCount', 'type': 'int'}, + 'queue_depth_count': {'key': 'queueDepthCount', 'type': 'int'} + } + + def __init__(self, concurrency_count=None, queue_depth_count=None): + super(EnvironmentExecutionPolicy, self).__init__() + self.concurrency_count = concurrency_count + self.queue_depth_count = queue_depth_count diff --git a/vsts/vsts/release/v4_0/models/environment_options.py b/vsts/vsts/release/v4_0/models/environment_options.py new file mode 100644 index 00000000..e4afe484 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/environment_options.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 EnvironmentOptions(Model): + """EnvironmentOptions. + + :param email_notification_type: + :type email_notification_type: str + :param email_recipients: + :type email_recipients: str + :param enable_access_token: + :type enable_access_token: bool + :param publish_deployment_status: + :type publish_deployment_status: bool + :param skip_artifacts_download: + :type skip_artifacts_download: bool + :param timeout_in_minutes: + :type timeout_in_minutes: int + """ + + _attribute_map = { + 'email_notification_type': {'key': 'emailNotificationType', 'type': 'str'}, + 'email_recipients': {'key': 'emailRecipients', 'type': 'str'}, + 'enable_access_token': {'key': 'enableAccessToken', 'type': 'bool'}, + 'publish_deployment_status': {'key': 'publishDeploymentStatus', 'type': 'bool'}, + 'skip_artifacts_download': {'key': 'skipArtifactsDownload', 'type': 'bool'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'} + } + + def __init__(self, email_notification_type=None, email_recipients=None, enable_access_token=None, publish_deployment_status=None, skip_artifacts_download=None, timeout_in_minutes=None): + super(EnvironmentOptions, self).__init__() + self.email_notification_type = email_notification_type + self.email_recipients = email_recipients + self.enable_access_token = enable_access_token + self.publish_deployment_status = publish_deployment_status + self.skip_artifacts_download = skip_artifacts_download + self.timeout_in_minutes = timeout_in_minutes diff --git a/vsts/vsts/release/v4_0/models/environment_retention_policy.py b/vsts/vsts/release/v4_0/models/environment_retention_policy.py new file mode 100644 index 00000000..a391f806 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/environment_retention_policy.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 EnvironmentRetentionPolicy(Model): + """EnvironmentRetentionPolicy. + + :param days_to_keep: + :type days_to_keep: int + :param releases_to_keep: + :type releases_to_keep: int + :param retain_build: + :type retain_build: bool + """ + + _attribute_map = { + 'days_to_keep': {'key': 'daysToKeep', 'type': 'int'}, + 'releases_to_keep': {'key': 'releasesToKeep', 'type': 'int'}, + 'retain_build': {'key': 'retainBuild', 'type': 'bool'} + } + + def __init__(self, days_to_keep=None, releases_to_keep=None, retain_build=None): + super(EnvironmentRetentionPolicy, self).__init__() + self.days_to_keep = days_to_keep + self.releases_to_keep = releases_to_keep + self.retain_build = retain_build diff --git a/vsts/vsts/release/v4_0/models/favorite_item.py b/vsts/vsts/release/v4_0/models/favorite_item.py new file mode 100644 index 00000000..94bdd0be --- /dev/null +++ b/vsts/vsts/release/v4_0/models/favorite_item.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 FavoriteItem(Model): + """FavoriteItem. + + :param data: Application specific data for the entry + :type data: str + :param id: Unique Id of the the entry + :type id: str + :param name: Display text for favorite entry + :type name: str + :param type: Application specific favorite entry type. Empty or Null represents that Favorite item is a Folder + :type type: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, data=None, id=None, name=None, type=None): + super(FavoriteItem, self).__init__() + self.data = data + self.id = id + self.name = name + self.type = type diff --git a/vsts/vsts/release/v4_0/models/folder.py b/vsts/vsts/release/v4_0/models/folder.py new file mode 100644 index 00000000..5d60e06d --- /dev/null +++ b/vsts/vsts/release/v4_0/models/folder.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 Folder(Model): + """Folder. + + :param created_by: + :type created_by: :class:`IdentityRef ` + :param created_on: + :type created_on: datetime + :param description: + :type description: str + :param last_changed_by: + :type last_changed_by: :class:`IdentityRef ` + :param last_changed_date: + :type last_changed_date: datetime + :param path: + :type path: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'last_changed_by': {'key': 'lastChangedBy', 'type': 'IdentityRef'}, + 'last_changed_date': {'key': 'lastChangedDate', 'type': 'iso-8601'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, created_by=None, created_on=None, description=None, last_changed_by=None, last_changed_date=None, path=None): + super(Folder, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.description = description + self.last_changed_by = last_changed_by + self.last_changed_date = last_changed_date + self.path = path diff --git a/vsts/vsts/release/v4_0/models/identity_ref.py b/vsts/vsts/release/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/release/v4_0/models/input_descriptor.py b/vsts/vsts/release/v4_0/models/input_descriptor.py new file mode 100644 index 00000000..860efdcc --- /dev/null +++ b/vsts/vsts/release/v4_0/models/input_descriptor.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputDescriptor(Model): + """InputDescriptor. + + :param dependency_input_ids: The ids of all inputs that the value of this input is dependent on. + :type dependency_input_ids: list of str + :param description: Description of what this input is used for + :type description: str + :param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + :type group_name: str + :param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + :type has_dynamic_value_information: bool + :param id: Identifier for the subscription input + :type id: str + :param input_mode: Mode in which the value of this input should be entered + :type input_mode: object + :param is_confidential: Gets whether this input is confidential, such as for a password or application key + :type is_confidential: bool + :param name: Localized name which can be shown as a label for the subscription input + :type name: str + :param properties: Custom properties for the input which can be used by the service provider + :type properties: dict + :param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. + :type type: str + :param use_in_default_description: Gets whether this input is included in the default generated action description. + :type use_in_default_description: bool + :param validation: Information to use to validate this input's value + :type validation: :class:`InputValidation ` + :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. + :type value_hint: str + :param values: Information about possible values for this input + :type values: :class:`InputValues ` + """ + + _attribute_map = { + 'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_mode': {'key': 'inputMode', 'type': 'object'}, + 'is_confidential': {'key': 'isConfidential', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'}, + 'validation': {'key': 'validation', 'type': 'InputValidation'}, + 'value_hint': {'key': 'valueHint', 'type': 'str'}, + 'values': {'key': 'values', 'type': 'InputValues'} + } + + def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None): + super(InputDescriptor, self).__init__() + self.dependency_input_ids = dependency_input_ids + self.description = description + self.group_name = group_name + self.has_dynamic_value_information = has_dynamic_value_information + self.id = id + self.input_mode = input_mode + self.is_confidential = is_confidential + self.name = name + self.properties = properties + self.type = type + self.use_in_default_description = use_in_default_description + self.validation = validation + self.value_hint = value_hint + self.values = values diff --git a/vsts/vsts/release/v4_0/models/input_validation.py b/vsts/vsts/release/v4_0/models/input_validation.py new file mode 100644 index 00000000..f2f1a434 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/input_validation.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidation(Model): + """InputValidation. + + :param data_type: + :type data_type: object + :param is_required: + :type is_required: bool + :param max_length: + :type max_length: int + :param max_value: + :type max_value: decimal + :param min_length: + :type min_length: int + :param min_value: + :type min_value: decimal + :param pattern: + :type pattern: str + :param pattern_mismatch_error_message: + :type pattern_mismatch_error_message: str + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'object'}, + 'is_required': {'key': 'isRequired', 'type': 'bool'}, + 'max_length': {'key': 'maxLength', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'decimal'}, + 'min_length': {'key': 'minLength', 'type': 'int'}, + 'min_value': {'key': 'minValue', 'type': 'decimal'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'} + } + + def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None): + super(InputValidation, self).__init__() + self.data_type = data_type + self.is_required = is_required + self.max_length = max_length + self.max_value = max_value + self.min_length = min_length + self.min_value = min_value + self.pattern = pattern + self.pattern_mismatch_error_message = pattern_mismatch_error_message diff --git a/vsts/vsts/release/v4_0/models/input_value.py b/vsts/vsts/release/v4_0/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/release/v4_0/models/input_values.py b/vsts/vsts/release/v4_0/models/input_values.py new file mode 100644 index 00000000..15d047fe --- /dev/null +++ b/vsts/vsts/release/v4_0/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/release/v4_0/models/input_values_error.py b/vsts/vsts/release/v4_0/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/release/v4_0/models/input_values_query.py b/vsts/vsts/release/v4_0/models/input_values_query.py new file mode 100644 index 00000000..26e4c954 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/input_values_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesQuery(Model): + """InputValuesQuery. + + :param current_values: + :type current_values: dict + :param input_values: The input values to return on input, and the result from the consumer on output. + :type input_values: list of :class:`InputValues ` + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, + 'resource': {'key': 'resource', 'type': 'object'} + } + + def __init__(self, current_values=None, input_values=None, resource=None): + super(InputValuesQuery, self).__init__() + self.current_values = current_values + self.input_values = input_values + self.resource = resource diff --git a/vsts/vsts/release/v4_0/models/issue.py b/vsts/vsts/release/v4_0/models/issue.py new file mode 100644 index 00000000..0e31522e --- /dev/null +++ b/vsts/vsts/release/v4_0/models/issue.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Issue(Model): + """Issue. + + :param issue_type: + :type issue_type: str + :param message: + :type message: str + """ + + _attribute_map = { + 'issue_type': {'key': 'issueType', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, issue_type=None, message=None): + super(Issue, self).__init__() + self.issue_type = issue_type + self.message = message diff --git a/vsts/vsts/release/v4_0/models/mail_message.py b/vsts/vsts/release/v4_0/models/mail_message.py new file mode 100644 index 00000000..abaaf812 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/mail_message.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 MailMessage(Model): + """MailMessage. + + :param body: + :type body: str + :param cC: + :type cC: :class:`EmailRecipients ` + :param in_reply_to: + :type in_reply_to: str + :param message_id: + :type message_id: str + :param reply_by: + :type reply_by: datetime + :param reply_to: + :type reply_to: :class:`EmailRecipients ` + :param sections: + :type sections: list of MailSectionType + :param sender_type: + :type sender_type: object + :param subject: + :type subject: str + :param to: + :type to: :class:`EmailRecipients ` + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'cC': {'key': 'cC', 'type': 'EmailRecipients'}, + 'in_reply_to': {'key': 'inReplyTo', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'reply_by': {'key': 'replyBy', 'type': 'iso-8601'}, + 'reply_to': {'key': 'replyTo', 'type': 'EmailRecipients'}, + 'sections': {'key': 'sections', 'type': '[MailSectionType]'}, + 'sender_type': {'key': 'senderType', 'type': 'object'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'EmailRecipients'} + } + + def __init__(self, body=None, cC=None, in_reply_to=None, message_id=None, reply_by=None, reply_to=None, sections=None, sender_type=None, subject=None, to=None): + super(MailMessage, self).__init__() + self.body = body + self.cC = cC + self.in_reply_to = in_reply_to + self.message_id = message_id + self.reply_by = reply_by + self.reply_to = reply_to + self.sections = sections + self.sender_type = sender_type + self.subject = subject + self.to = to diff --git a/vsts/vsts/release/v4_0/models/manual_intervention.py b/vsts/vsts/release/v4_0/models/manual_intervention.py new file mode 100644 index 00000000..86d5efb2 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/manual_intervention.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 ManualIntervention(Model): + """ManualIntervention. + + :param approver: + :type approver: :class:`IdentityRef ` + :param comments: + :type comments: str + :param created_on: + :type created_on: datetime + :param id: + :type id: int + :param instructions: + :type instructions: str + :param modified_on: + :type modified_on: datetime + :param name: + :type name: str + :param release: + :type release: :class:`ReleaseShallowReference ` + :param release_definition: + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_environment: + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :param status: + :type status: object + :param task_instance_id: + :type task_instance_id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + 'instructions': {'key': 'instructions', 'type': 'str'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'release': {'key': 'release', 'type': 'ReleaseShallowReference'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_environment': {'key': 'releaseEnvironment', 'type': 'ReleaseEnvironmentShallowReference'}, + 'status': {'key': 'status', 'type': 'object'}, + 'task_instance_id': {'key': 'taskInstanceId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, approver=None, comments=None, created_on=None, id=None, instructions=None, modified_on=None, name=None, release=None, release_definition=None, release_environment=None, status=None, task_instance_id=None, url=None): + super(ManualIntervention, self).__init__() + self.approver = approver + self.comments = comments + self.created_on = created_on + self.id = id + self.instructions = instructions + self.modified_on = modified_on + self.name = name + self.release = release + self.release_definition = release_definition + self.release_environment = release_environment + self.status = status + self.task_instance_id = task_instance_id + self.url = url diff --git a/vsts/vsts/release/v4_0/models/manual_intervention_update_metadata.py b/vsts/vsts/release/v4_0/models/manual_intervention_update_metadata.py new file mode 100644 index 00000000..1358617e --- /dev/null +++ b/vsts/vsts/release/v4_0/models/manual_intervention_update_metadata.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ManualInterventionUpdateMetadata(Model): + """ManualInterventionUpdateMetadata. + + :param comment: + :type comment: str + :param status: + :type status: object + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, comment=None, status=None): + super(ManualInterventionUpdateMetadata, self).__init__() + self.comment = comment + self.status = status diff --git a/vsts/vsts/release/v4_0/models/metric.py b/vsts/vsts/release/v4_0/models/metric.py new file mode 100644 index 00000000..bb95c93e --- /dev/null +++ b/vsts/vsts/release/v4_0/models/metric.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Metric(Model): + """Metric. + + :param name: + :type name: str + :param value: + :type value: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'} + } + + def __init__(self, name=None, value=None): + super(Metric, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/release/v4_0/models/process_parameters.py b/vsts/vsts/release/v4_0/models/process_parameters.py new file mode 100644 index 00000000..f6903143 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/process_parameters.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProcessParameters(Model): + """ProcessParameters. + + :param data_source_bindings: + :type data_source_bindings: list of :class:`DataSourceBindingBase ` + :param inputs: + :type inputs: list of :class:`TaskInputDefinitionBase ` + :param source_definitions: + :type source_definitions: list of :class:`TaskSourceDefinitionBase ` + """ + + _attribute_map = { + 'data_source_bindings': {'key': 'dataSourceBindings', 'type': '[DataSourceBindingBase]'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinitionBase]'}, + 'source_definitions': {'key': 'sourceDefinitions', 'type': '[TaskSourceDefinitionBase]'} + } + + def __init__(self, data_source_bindings=None, inputs=None, source_definitions=None): + super(ProcessParameters, self).__init__() + self.data_source_bindings = data_source_bindings + self.inputs = inputs + self.source_definitions = source_definitions diff --git a/vsts/vsts/release/v4_0/models/project_reference.py b/vsts/vsts/release/v4_0/models/project_reference.py new file mode 100644 index 00000000..fee185de --- /dev/null +++ b/vsts/vsts/release/v4_0/models/project_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectReference(Model): + """ProjectReference. + + :param id: Gets the unique identifier of this field. + :type id: str + :param name: Gets name of project. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ProjectReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/release/v4_0/models/queued_release_data.py b/vsts/vsts/release/v4_0/models/queued_release_data.py new file mode 100644 index 00000000..892670ff --- /dev/null +++ b/vsts/vsts/release/v4_0/models/queued_release_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 QueuedReleaseData(Model): + """QueuedReleaseData. + + :param project_id: + :type project_id: str + :param queue_position: + :type queue_position: int + :param release_id: + :type release_id: int + """ + + _attribute_map = { + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'queue_position': {'key': 'queuePosition', 'type': 'int'}, + 'release_id': {'key': 'releaseId', 'type': 'int'} + } + + def __init__(self, project_id=None, queue_position=None, release_id=None): + super(QueuedReleaseData, self).__init__() + self.project_id = project_id + self.queue_position = queue_position + self.release_id = release_id diff --git a/vsts/vsts/release/v4_0/models/reference_links.py b/vsts/vsts/release/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/release/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/release/v4_0/models/release.py b/vsts/vsts/release/v4_0/models/release.py new file mode 100644 index 00000000..e5741a08 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release.py @@ -0,0 +1,121 @@ +# -------------------------------------------------------------------------------------------- +# 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 Release(Model): + """Release. + + :param _links: Gets links to access the release. + :type _links: :class:`ReferenceLinks ` + :param artifacts: Gets or sets the list of artifacts. + :type artifacts: list of :class:`Artifact ` + :param comment: Gets or sets comment. + :type comment: str + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param definition_snapshot_revision: Gets revision number of definition snapshot. + :type definition_snapshot_revision: int + :param description: Gets or sets description of release. + :type description: str + :param environments: Gets list of environments. + :type environments: list of :class:`ReleaseEnvironment ` + :param id: Gets the unique identifier of this field. + :type id: int + :param keep_forever: Whether to exclude the release from retention policies. + :type keep_forever: bool + :param logs_container_url: Gets logs container url. + :type logs_container_url: str + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets name. + :type name: str + :param pool_name: Gets pool name. + :type pool_name: str + :param project_reference: Gets or sets project reference. + :type project_reference: :class:`ProjectReference ` + :param properties: + :type properties: :class:`object ` + :param reason: Gets reason of release. + :type reason: object + :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this release is associated. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_name_format: Gets release name format. + :type release_name_format: str + :param status: Gets status. + :type status: object + :param tags: Gets or sets list of tags. + :type tags: list of str + :param url: + :type url: str + :param variable_groups: Gets the list of variable groups. + :type variable_groups: list of :class:`VariableGroup ` + :param variables: Gets or sets the dictionary of variables. + :type variables: dict + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'definition_snapshot_revision': {'key': 'definitionSnapshotRevision', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environments': {'key': 'environments', 'type': '[ReleaseEnvironment]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'keep_forever': {'key': 'keepForever', 'type': 'bool'}, + 'logs_container_url': {'key': 'logsContainerUrl', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, + 'project_reference': {'key': 'projectReference', 'type': 'ProjectReference'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_name_format': {'key': 'releaseNameFormat', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'variable_groups': {'key': 'variableGroups', 'type': '[VariableGroup]'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'} + } + + def __init__(self, _links=None, artifacts=None, comment=None, created_by=None, created_on=None, definition_snapshot_revision=None, description=None, environments=None, id=None, keep_forever=None, logs_container_url=None, modified_by=None, modified_on=None, name=None, pool_name=None, project_reference=None, properties=None, reason=None, release_definition=None, release_name_format=None, status=None, tags=None, url=None, variable_groups=None, variables=None): + super(Release, self).__init__() + self._links = _links + self.artifacts = artifacts + self.comment = comment + self.created_by = created_by + self.created_on = created_on + self.definition_snapshot_revision = definition_snapshot_revision + self.description = description + self.environments = environments + self.id = id + self.keep_forever = keep_forever + self.logs_container_url = logs_container_url + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.pool_name = pool_name + self.project_reference = project_reference + self.properties = properties + self.reason = reason + self.release_definition = release_definition + self.release_name_format = release_name_format + self.status = status + self.tags = tags + self.url = url + self.variable_groups = variable_groups + self.variables = variables diff --git a/vsts/vsts/release/v4_0/models/release_approval.py b/vsts/vsts/release/v4_0/models/release_approval.py new file mode 100644 index 00000000..f08fdff8 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_approval.py @@ -0,0 +1,97 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseApproval(Model): + """ReleaseApproval. + + :param approval_type: Gets or sets the type of approval. + :type approval_type: object + :param approved_by: Gets the identity who approved. + :type approved_by: :class:`IdentityRef ` + :param approver: Gets or sets the identity who should approve. + :type approver: :class:`IdentityRef ` + :param attempt: Gets or sets attempt which specifies as which deployment attempt it belongs. + :type attempt: int + :param comments: Gets or sets comments for approval. + :type comments: str + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param history: Gets history which specifies all approvals associated with this approval. + :type history: list of :class:`ReleaseApprovalHistory ` + :param id: Gets the unique identifier of this field. + :type id: int + :param is_automated: Gets or sets as approval is automated or not. + :type is_automated: bool + :param is_notification_on: + :type is_notification_on: bool + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param rank: Gets or sets rank which specifies the order of the approval. e.g. Same rank denotes parallel approval. + :type rank: int + :param release: Gets releaseReference which specifies the reference of the release to which this approval is associated. + :type release: :class:`ReleaseShallowReference ` + :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this approval is associated. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_environment: Gets releaseEnvironmentReference which specifies the reference of the release environment to which this approval is associated. + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :param revision: Gets the revision number. + :type revision: int + :param status: Gets or sets the status of the approval. + :type status: object + :param trial_number: + :type trial_number: int + :param url: Gets url to access the approval. + :type url: str + """ + + _attribute_map = { + 'approval_type': {'key': 'approvalType', 'type': 'object'}, + 'approved_by': {'key': 'approvedBy', 'type': 'IdentityRef'}, + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'history': {'key': 'history', 'type': '[ReleaseApprovalHistory]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'is_automated': {'key': 'isAutomated', 'type': 'bool'}, + 'is_notification_on': {'key': 'isNotificationOn', 'type': 'bool'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'release': {'key': 'release', 'type': 'ReleaseShallowReference'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_environment': {'key': 'releaseEnvironment', 'type': 'ReleaseEnvironmentShallowReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'object'}, + 'trial_number': {'key': 'trialNumber', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, approval_type=None, approved_by=None, approver=None, attempt=None, comments=None, created_on=None, history=None, id=None, is_automated=None, is_notification_on=None, modified_on=None, rank=None, release=None, release_definition=None, release_environment=None, revision=None, status=None, trial_number=None, url=None): + super(ReleaseApproval, self).__init__() + self.approval_type = approval_type + self.approved_by = approved_by + self.approver = approver + self.attempt = attempt + self.comments = comments + self.created_on = created_on + self.history = history + self.id = id + self.is_automated = is_automated + self.is_notification_on = is_notification_on + self.modified_on = modified_on + self.rank = rank + self.release = release + self.release_definition = release_definition + self.release_environment = release_environment + self.revision = revision + self.status = status + self.trial_number = trial_number + self.url = url diff --git a/vsts/vsts/release/v4_0/models/release_approval_history.py b/vsts/vsts/release/v4_0/models/release_approval_history.py new file mode 100644 index 00000000..d0af43e9 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_approval_history.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseApprovalHistory(Model): + """ReleaseApprovalHistory. + + :param approver: + :type approver: :class:`IdentityRef ` + :param changed_by: + :type changed_by: :class:`IdentityRef ` + :param comments: + :type comments: str + :param created_on: + :type created_on: datetime + :param modified_on: + :type modified_on: datetime + :param revision: + :type revision: int + """ + + _attribute_map = { + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, approver=None, changed_by=None, comments=None, created_on=None, modified_on=None, revision=None): + super(ReleaseApprovalHistory, self).__init__() + self.approver = approver + self.changed_by = changed_by + self.comments = comments + self.created_on = created_on + self.modified_on = modified_on + self.revision = revision diff --git a/vsts/vsts/release/v4_0/models/release_condition.py b/vsts/vsts/release/v4_0/models/release_condition.py new file mode 100644 index 00000000..b5bd67cd --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_condition.py @@ -0,0 +1,34 @@ +# -------------------------------------------------------------------------------------------- +# 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 .condition import Condition + + +class ReleaseCondition(Condition): + """ReleaseCondition. + + :param condition_type: + :type condition_type: object + :param name: + :type name: str + :param value: + :type value: str + :param result: + :type result: bool + """ + + _attribute_map = { + 'condition_type': {'key': 'conditionType', 'type': 'object'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'bool'} + } + + def __init__(self, condition_type=None, name=None, value=None, result=None): + super(ReleaseCondition, self).__init__(condition_type=condition_type, name=name, value=value) + self.result = result diff --git a/vsts/vsts/release/v4_0/models/release_definition.py b/vsts/vsts/release/v4_0/models/release_definition.py new file mode 100644 index 00000000..7b0d4930 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition.py @@ -0,0 +1,113 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinition(Model): + """ReleaseDefinition. + + :param _links: Gets links to access the release definition. + :type _links: :class:`ReferenceLinks ` + :param artifacts: Gets or sets the list of artifacts. + :type artifacts: list of :class:`Artifact ` + :param comment: Gets or sets comment. + :type comment: str + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param description: Gets or sets the description. + :type description: str + :param environments: Gets or sets the list of environments. + :type environments: list of :class:`ReleaseDefinitionEnvironment ` + :param id: Gets the unique identifier of this field. + :type id: int + :param last_release: Gets the reference of last release. + :type last_release: :class:`ReleaseReference ` + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets or sets the name. + :type name: str + :param path: Gets or sets the path. + :type path: str + :param properties: Gets or sets properties. + :type properties: :class:`object ` + :param release_name_format: Gets or sets the release name format. + :type release_name_format: str + :param retention_policy: + :type retention_policy: :class:`RetentionPolicy ` + :param revision: Gets the revision number. + :type revision: int + :param source: Gets or sets source of release definition. + :type source: object + :param tags: Gets or sets list of tags. + :type tags: list of str + :param triggers: Gets or sets the list of triggers. + :type triggers: list of :class:`ReleaseTriggerBase ` + :param url: Gets url to access the release definition. + :type url: str + :param variable_groups: Gets or sets the list of variable groups. + :type variable_groups: list of int + :param variables: Gets or sets the dictionary of variables. + :type variables: dict + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environments': {'key': 'environments', 'type': '[ReleaseDefinitionEnvironment]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_release': {'key': 'lastRelease', 'type': 'ReleaseReference'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'release_name_format': {'key': 'releaseNameFormat', 'type': 'str'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'triggers': {'key': 'triggers', 'type': '[ReleaseTriggerBase]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'variable_groups': {'key': 'variableGroups', 'type': '[int]'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'} + } + + def __init__(self, _links=None, artifacts=None, comment=None, created_by=None, created_on=None, description=None, environments=None, id=None, last_release=None, modified_by=None, modified_on=None, name=None, path=None, properties=None, release_name_format=None, retention_policy=None, revision=None, source=None, tags=None, triggers=None, url=None, variable_groups=None, variables=None): + super(ReleaseDefinition, self).__init__() + self._links = _links + self.artifacts = artifacts + self.comment = comment + self.created_by = created_by + self.created_on = created_on + self.description = description + self.environments = environments + self.id = id + self.last_release = last_release + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.path = path + self.properties = properties + self.release_name_format = release_name_format + self.retention_policy = retention_policy + self.revision = revision + self.source = source + self.tags = tags + self.triggers = triggers + self.url = url + self.variable_groups = variable_groups + self.variables = variables diff --git a/vsts/vsts/release/v4_0/models/release_definition_approval_step.py b/vsts/vsts/release/v4_0/models/release_definition_approval_step.py new file mode 100644 index 00000000..bd56c822 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_approval_step.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------------------------- +# 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 .release_definition_environment_step import ReleaseDefinitionEnvironmentStep + + +class ReleaseDefinitionApprovalStep(ReleaseDefinitionEnvironmentStep): + """ReleaseDefinitionApprovalStep. + + :param id: + :type id: int + :param approver: + :type approver: :class:`IdentityRef ` + :param is_automated: + :type is_automated: bool + :param is_notification_on: + :type is_notification_on: bool + :param rank: + :type rank: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'is_automated': {'key': 'isAutomated', 'type': 'bool'}, + 'is_notification_on': {'key': 'isNotificationOn', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'} + } + + def __init__(self, id=None, approver=None, is_automated=None, is_notification_on=None, rank=None): + super(ReleaseDefinitionApprovalStep, self).__init__(id=id) + self.approver = approver + self.is_automated = is_automated + self.is_notification_on = is_notification_on + self.rank = rank diff --git a/vsts/vsts/release/v4_0/models/release_definition_approvals.py b/vsts/vsts/release/v4_0/models/release_definition_approvals.py new file mode 100644 index 00000000..765f7708 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_approvals.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionApprovals(Model): + """ReleaseDefinitionApprovals. + + :param approval_options: + :type approval_options: :class:`ApprovalOptions ` + :param approvals: + :type approvals: list of :class:`ReleaseDefinitionApprovalStep ` + """ + + _attribute_map = { + 'approval_options': {'key': 'approvalOptions', 'type': 'ApprovalOptions'}, + 'approvals': {'key': 'approvals', 'type': '[ReleaseDefinitionApprovalStep]'} + } + + def __init__(self, approval_options=None, approvals=None): + super(ReleaseDefinitionApprovals, self).__init__() + self.approval_options = approval_options + self.approvals = approvals diff --git a/vsts/vsts/release/v4_0/models/release_definition_deploy_step.py b/vsts/vsts/release/v4_0/models/release_definition_deploy_step.py new file mode 100644 index 00000000..ecad0f43 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_deploy_step.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# 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 .release_definition_environment_step import ReleaseDefinitionEnvironmentStep + + +class ReleaseDefinitionDeployStep(ReleaseDefinitionEnvironmentStep): + """ReleaseDefinitionDeployStep. + + :param id: + :type id: int + :param tasks: The list of steps for this definition. + :type tasks: list of :class:`WorkflowTask ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'tasks': {'key': 'tasks', 'type': '[WorkflowTask]'} + } + + def __init__(self, id=None, tasks=None): + super(ReleaseDefinitionDeployStep, self).__init__(id=id) + self.tasks = tasks diff --git a/vsts/vsts/release/v4_0/models/release_definition_environment.py b/vsts/vsts/release/v4_0/models/release_definition_environment.py new file mode 100644 index 00000000..6238a3e7 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_environment.py @@ -0,0 +1,97 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironment(Model): + """ReleaseDefinitionEnvironment. + + :param conditions: + :type conditions: list of :class:`Condition ` + :param demands: + :type demands: list of :class:`object ` + :param deploy_phases: + :type deploy_phases: list of :class:`DeployPhase ` + :param deploy_step: + :type deploy_step: :class:`ReleaseDefinitionDeployStep ` + :param environment_options: + :type environment_options: :class:`EnvironmentOptions ` + :param execution_policy: + :type execution_policy: :class:`EnvironmentExecutionPolicy ` + :param id: + :type id: int + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param post_deploy_approvals: + :type post_deploy_approvals: :class:`ReleaseDefinitionApprovals ` + :param pre_deploy_approvals: + :type pre_deploy_approvals: :class:`ReleaseDefinitionApprovals ` + :param process_parameters: + :type process_parameters: :class:`ProcessParameters ` + :param properties: + :type properties: :class:`object ` + :param queue_id: + :type queue_id: int + :param rank: + :type rank: int + :param retention_policy: + :type retention_policy: :class:`EnvironmentRetentionPolicy ` + :param run_options: + :type run_options: dict + :param schedules: + :type schedules: list of :class:`ReleaseSchedule ` + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[Condition]'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deploy_phases': {'key': 'deployPhases', 'type': '[DeployPhase]'}, + 'deploy_step': {'key': 'deployStep', 'type': 'ReleaseDefinitionDeployStep'}, + 'environment_options': {'key': 'environmentOptions', 'type': 'EnvironmentOptions'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'EnvironmentExecutionPolicy'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'post_deploy_approvals': {'key': 'postDeployApprovals', 'type': 'ReleaseDefinitionApprovals'}, + 'pre_deploy_approvals': {'key': 'preDeployApprovals', 'type': 'ReleaseDefinitionApprovals'}, + 'process_parameters': {'key': 'processParameters', 'type': 'ProcessParameters'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'queue_id': {'key': 'queueId', 'type': 'int'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'EnvironmentRetentionPolicy'}, + 'run_options': {'key': 'runOptions', 'type': '{str}'}, + 'schedules': {'key': 'schedules', 'type': '[ReleaseSchedule]'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'} + } + + def __init__(self, conditions=None, demands=None, deploy_phases=None, deploy_step=None, environment_options=None, execution_policy=None, id=None, name=None, owner=None, post_deploy_approvals=None, pre_deploy_approvals=None, process_parameters=None, properties=None, queue_id=None, rank=None, retention_policy=None, run_options=None, schedules=None, variables=None): + super(ReleaseDefinitionEnvironment, self).__init__() + self.conditions = conditions + self.demands = demands + self.deploy_phases = deploy_phases + self.deploy_step = deploy_step + self.environment_options = environment_options + self.execution_policy = execution_policy + self.id = id + self.name = name + self.owner = owner + self.post_deploy_approvals = post_deploy_approvals + self.pre_deploy_approvals = pre_deploy_approvals + self.process_parameters = process_parameters + self.properties = properties + self.queue_id = queue_id + self.rank = rank + self.retention_policy = retention_policy + self.run_options = run_options + self.schedules = schedules + self.variables = variables diff --git a/vsts/vsts/release/v4_0/models/release_definition_environment_step.py b/vsts/vsts/release/v4_0/models/release_definition_environment_step.py new file mode 100644 index 00000000..f013f154 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_environment_step.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironmentStep(Model): + """ReleaseDefinitionEnvironmentStep. + + :param id: + :type id: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'} + } + + def __init__(self, id=None): + super(ReleaseDefinitionEnvironmentStep, self).__init__() + self.id = id diff --git a/vsts/vsts/release/v4_0/models/release_definition_environment_summary.py b/vsts/vsts/release/v4_0/models/release_definition_environment_summary.py new file mode 100644 index 00000000..337ca819 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_environment_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironmentSummary(Model): + """ReleaseDefinitionEnvironmentSummary. + + :param id: + :type id: int + :param last_releases: + :type last_releases: list of :class:`ReleaseShallowReference ` + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'last_releases': {'key': 'lastReleases', 'type': '[ReleaseShallowReference]'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, last_releases=None, name=None): + super(ReleaseDefinitionEnvironmentSummary, self).__init__() + self.id = id + self.last_releases = last_releases + self.name = name diff --git a/vsts/vsts/release/v4_0/models/release_definition_environment_template.py b/vsts/vsts/release/v4_0/models/release_definition_environment_template.py new file mode 100644 index 00000000..203f2634 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_environment_template.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironmentTemplate(Model): + """ReleaseDefinitionEnvironmentTemplate. + + :param can_delete: + :type can_delete: bool + :param category: + :type category: str + :param description: + :type description: str + :param environment: + :type environment: :class:`ReleaseDefinitionEnvironment ` + :param icon_task_id: + :type icon_task_id: str + :param icon_uri: + :type icon_uri: str + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'can_delete': {'key': 'canDelete', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment': {'key': 'environment', 'type': 'ReleaseDefinitionEnvironment'}, + 'icon_task_id': {'key': 'iconTaskId', 'type': 'str'}, + 'icon_uri': {'key': 'iconUri', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, can_delete=None, category=None, description=None, environment=None, icon_task_id=None, icon_uri=None, id=None, name=None): + super(ReleaseDefinitionEnvironmentTemplate, self).__init__() + self.can_delete = can_delete + self.category = category + self.description = description + self.environment = environment + self.icon_task_id = icon_task_id + self.icon_uri = icon_uri + self.id = id + self.name = name diff --git a/vsts/vsts/release/v4_0/models/release_definition_revision.py b/vsts/vsts/release/v4_0/models/release_definition_revision.py new file mode 100644 index 00000000..1235a505 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_revision.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionRevision(Model): + """ReleaseDefinitionRevision. + + :param api_version: Gets api-version for revision object. + :type api_version: str + :param changed_by: Gets the identity who did change. + :type changed_by: :class:`IdentityRef ` + :param changed_date: Gets date on which it got changed. + :type changed_date: datetime + :param change_type: Gets type of change. + :type change_type: object + :param comment: Gets comments for revision. + :type comment: str + :param definition_id: Get id of the definition. + :type definition_id: int + :param definition_url: Gets definition url. + :type definition_url: str + :param revision: Get revision number of the definition. + :type revision: int + """ + + _attribute_map = { + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'definition_url': {'key': 'definitionUrl', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, api_version=None, changed_by=None, changed_date=None, change_type=None, comment=None, definition_id=None, definition_url=None, revision=None): + super(ReleaseDefinitionRevision, self).__init__() + self.api_version = api_version + self.changed_by = changed_by + self.changed_date = changed_date + self.change_type = change_type + self.comment = comment + self.definition_id = definition_id + self.definition_url = definition_url + self.revision = revision diff --git a/vsts/vsts/release/v4_0/models/release_definition_shallow_reference.py b/vsts/vsts/release/v4_0/models/release_definition_shallow_reference.py new file mode 100644 index 00000000..cab430f1 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_shallow_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionShallowReference(Model): + """ReleaseDefinitionShallowReference. + + :param _links: Gets the links to related resources, APIs, and views for the release definition. + :type _links: :class:`ReferenceLinks ` + :param id: Gets the unique identifier of release definition. + :type id: int + :param name: Gets or sets the name of the release definition. + :type name: str + :param url: Gets the REST API url to access the release definition. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None, url=None): + super(ReleaseDefinitionShallowReference, self).__init__() + self._links = _links + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/release/v4_0/models/release_definition_summary.py b/vsts/vsts/release/v4_0/models/release_definition_summary.py new file mode 100644 index 00000000..49c53def --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_definition_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionSummary(Model): + """ReleaseDefinitionSummary. + + :param environments: + :type environments: list of :class:`ReleaseDefinitionEnvironmentSummary ` + :param release_definition: + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param releases: + :type releases: list of :class:`Release ` + """ + + _attribute_map = { + 'environments': {'key': 'environments', 'type': '[ReleaseDefinitionEnvironmentSummary]'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'releases': {'key': 'releases', 'type': '[Release]'} + } + + def __init__(self, environments=None, release_definition=None, releases=None): + super(ReleaseDefinitionSummary, self).__init__() + self.environments = environments + self.release_definition = release_definition + self.releases = releases diff --git a/vsts/vsts/release/v4_0/models/release_deploy_phase.py b/vsts/vsts/release/v4_0/models/release_deploy_phase.py new file mode 100644 index 00000000..cda1082e --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_deploy_phase.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDeployPhase(Model): + """ReleaseDeployPhase. + + :param deployment_jobs: + :type deployment_jobs: list of :class:`DeploymentJob ` + :param error_log: + :type error_log: str + :param id: + :type id: int + :param manual_interventions: + :type manual_interventions: list of :class:`ManualIntervention ` + :param phase_type: + :type phase_type: object + :param rank: + :type rank: int + :param run_plan_id: + :type run_plan_id: str + :param status: + :type status: object + """ + + _attribute_map = { + 'deployment_jobs': {'key': 'deploymentJobs', 'type': '[DeploymentJob]'}, + 'error_log': {'key': 'errorLog', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'manual_interventions': {'key': 'manualInterventions', 'type': '[ManualIntervention]'}, + 'phase_type': {'key': 'phaseType', 'type': 'object'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'run_plan_id': {'key': 'runPlanId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, deployment_jobs=None, error_log=None, id=None, manual_interventions=None, phase_type=None, rank=None, run_plan_id=None, status=None): + super(ReleaseDeployPhase, self).__init__() + self.deployment_jobs = deployment_jobs + self.error_log = error_log + self.id = id + self.manual_interventions = manual_interventions + self.phase_type = phase_type + self.rank = rank + self.run_plan_id = run_plan_id + self.status = status diff --git a/vsts/vsts/release/v4_0/models/release_environment.py b/vsts/vsts/release/v4_0/models/release_environment.py new file mode 100644 index 00000000..252252e5 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_environment.py @@ -0,0 +1,145 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironment(Model): + """ReleaseEnvironment. + + :param conditions: Gets list of conditions. + :type conditions: list of :class:`ReleaseCondition ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param definition_environment_id: Gets definition environment id. + :type definition_environment_id: int + :param demands: Gets demands. + :type demands: list of :class:`object ` + :param deploy_phases_snapshot: Gets list of deploy phases snapshot. + :type deploy_phases_snapshot: list of :class:`DeployPhase ` + :param deploy_steps: Gets deploy steps. + :type deploy_steps: list of :class:`DeploymentAttempt ` + :param environment_options: Gets environment options. + :type environment_options: :class:`EnvironmentOptions ` + :param id: Gets the unique identifier of this field. + :type id: int + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets name. + :type name: str + :param next_scheduled_utc_time: Gets next scheduled UTC time. + :type next_scheduled_utc_time: datetime + :param owner: Gets the identity who is owner for release environment. + :type owner: :class:`IdentityRef ` + :param post_approvals_snapshot: Gets list of post deploy approvals snapshot. + :type post_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` + :param post_deploy_approvals: Gets list of post deploy approvals. + :type post_deploy_approvals: list of :class:`ReleaseApproval ` + :param pre_approvals_snapshot: Gets list of pre deploy approvals snapshot. + :type pre_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` + :param pre_deploy_approvals: Gets list of pre deploy approvals. + :type pre_deploy_approvals: list of :class:`ReleaseApproval ` + :param process_parameters: Gets process parameters. + :type process_parameters: :class:`ProcessParameters ` + :param queue_id: Gets queue id. + :type queue_id: int + :param rank: Gets rank. + :type rank: int + :param release: Gets release reference which specifies the reference of the release to which this release environment is associated. + :type release: :class:`ReleaseShallowReference ` + :param release_created_by: Gets the identity who created release. + :type release_created_by: :class:`IdentityRef ` + :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this release environment is associated. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_description: Gets release description. + :type release_description: str + :param release_id: Gets release id. + :type release_id: int + :param scheduled_deployment_time: Gets schedule deployment time of release environment. + :type scheduled_deployment_time: datetime + :param schedules: Gets list of schedules. + :type schedules: list of :class:`ReleaseSchedule ` + :param status: Gets environment status. + :type status: object + :param time_to_deploy: Gets time to deploy. + :type time_to_deploy: number + :param trigger_reason: Gets trigger reason. + :type trigger_reason: str + :param variables: Gets the dictionary of variables. + :type variables: dict + :param workflow_tasks: Gets list of workflow tasks. + :type workflow_tasks: list of :class:`WorkflowTask ` + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[ReleaseCondition]'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'definition_environment_id': {'key': 'definitionEnvironmentId', 'type': 'int'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deploy_phases_snapshot': {'key': 'deployPhasesSnapshot', 'type': '[DeployPhase]'}, + 'deploy_steps': {'key': 'deploySteps', 'type': '[DeploymentAttempt]'}, + 'environment_options': {'key': 'environmentOptions', 'type': 'EnvironmentOptions'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'next_scheduled_utc_time': {'key': 'nextScheduledUtcTime', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'post_approvals_snapshot': {'key': 'postApprovalsSnapshot', 'type': 'ReleaseDefinitionApprovals'}, + 'post_deploy_approvals': {'key': 'postDeployApprovals', 'type': '[ReleaseApproval]'}, + 'pre_approvals_snapshot': {'key': 'preApprovalsSnapshot', 'type': 'ReleaseDefinitionApprovals'}, + 'pre_deploy_approvals': {'key': 'preDeployApprovals', 'type': '[ReleaseApproval]'}, + 'process_parameters': {'key': 'processParameters', 'type': 'ProcessParameters'}, + 'queue_id': {'key': 'queueId', 'type': 'int'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'release': {'key': 'release', 'type': 'ReleaseShallowReference'}, + 'release_created_by': {'key': 'releaseCreatedBy', 'type': 'IdentityRef'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_description': {'key': 'releaseDescription', 'type': 'str'}, + 'release_id': {'key': 'releaseId', 'type': 'int'}, + 'scheduled_deployment_time': {'key': 'scheduledDeploymentTime', 'type': 'iso-8601'}, + 'schedules': {'key': 'schedules', 'type': '[ReleaseSchedule]'}, + 'status': {'key': 'status', 'type': 'object'}, + 'time_to_deploy': {'key': 'timeToDeploy', 'type': 'number'}, + 'trigger_reason': {'key': 'triggerReason', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'}, + 'workflow_tasks': {'key': 'workflowTasks', 'type': '[WorkflowTask]'} + } + + def __init__(self, conditions=None, created_on=None, definition_environment_id=None, demands=None, deploy_phases_snapshot=None, deploy_steps=None, environment_options=None, id=None, modified_on=None, name=None, next_scheduled_utc_time=None, owner=None, post_approvals_snapshot=None, post_deploy_approvals=None, pre_approvals_snapshot=None, pre_deploy_approvals=None, process_parameters=None, queue_id=None, rank=None, release=None, release_created_by=None, release_definition=None, release_description=None, release_id=None, scheduled_deployment_time=None, schedules=None, status=None, time_to_deploy=None, trigger_reason=None, variables=None, workflow_tasks=None): + super(ReleaseEnvironment, self).__init__() + self.conditions = conditions + self.created_on = created_on + self.definition_environment_id = definition_environment_id + self.demands = demands + self.deploy_phases_snapshot = deploy_phases_snapshot + self.deploy_steps = deploy_steps + self.environment_options = environment_options + self.id = id + self.modified_on = modified_on + self.name = name + self.next_scheduled_utc_time = next_scheduled_utc_time + self.owner = owner + self.post_approvals_snapshot = post_approvals_snapshot + self.post_deploy_approvals = post_deploy_approvals + self.pre_approvals_snapshot = pre_approvals_snapshot + self.pre_deploy_approvals = pre_deploy_approvals + self.process_parameters = process_parameters + self.queue_id = queue_id + self.rank = rank + self.release = release + self.release_created_by = release_created_by + self.release_definition = release_definition + self.release_description = release_description + self.release_id = release_id + self.scheduled_deployment_time = scheduled_deployment_time + self.schedules = schedules + self.status = status + self.time_to_deploy = time_to_deploy + self.trigger_reason = trigger_reason + self.variables = variables + self.workflow_tasks = workflow_tasks diff --git a/vsts/vsts/release/v4_0/models/release_environment_shallow_reference.py b/vsts/vsts/release/v4_0/models/release_environment_shallow_reference.py new file mode 100644 index 00000000..e1f0ca55 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_environment_shallow_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironmentShallowReference(Model): + """ReleaseEnvironmentShallowReference. + + :param _links: Gets the links to related resources, APIs, and views for the release environment. + :type _links: :class:`ReferenceLinks ` + :param id: Gets the unique identifier of release environment. + :type id: int + :param name: Gets or sets the name of the release environment. + :type name: str + :param url: Gets the REST API url to access the release environment. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None, url=None): + super(ReleaseEnvironmentShallowReference, self).__init__() + self._links = _links + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/release/v4_0/models/release_environment_update_metadata.py b/vsts/vsts/release/v4_0/models/release_environment_update_metadata.py new file mode 100644 index 00000000..df5c0fed --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_environment_update_metadata.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironmentUpdateMetadata(Model): + """ReleaseEnvironmentUpdateMetadata. + + :param comment: Gets or sets comment. + :type comment: str + :param scheduled_deployment_time: Gets or sets scheduled deployment time. + :type scheduled_deployment_time: datetime + :param status: Gets or sets status of environment. + :type status: object + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'scheduled_deployment_time': {'key': 'scheduledDeploymentTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, comment=None, scheduled_deployment_time=None, status=None): + super(ReleaseEnvironmentUpdateMetadata, self).__init__() + self.comment = comment + self.scheduled_deployment_time = scheduled_deployment_time + self.status = status diff --git a/vsts/vsts/release/v4_0/models/release_reference.py b/vsts/vsts/release/v4_0/models/release_reference.py new file mode 100644 index 00000000..7dc00b17 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_reference.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseReference(Model): + """ReleaseReference. + + :param _links: Gets links to access the release. + :type _links: :class:`ReferenceLinks ` + :param artifacts: Gets list of artifacts. + :type artifacts: list of :class:`Artifact ` + :param created_by: Gets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param description: Gets description. + :type description: str + :param id: Gets the unique identifier of this field. + :type id: int + :param modified_by: Gets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param name: Gets name of release. + :type name: str + :param reason: Gets reason for release. + :type reason: object + :param release_definition: Gets release definition shallow reference. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param url: + :type url: str + :param web_access_uri: + :type web_access_uri: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'url': {'key': 'url', 'type': 'str'}, + 'web_access_uri': {'key': 'webAccessUri', 'type': 'str'} + } + + def __init__(self, _links=None, artifacts=None, created_by=None, created_on=None, description=None, id=None, modified_by=None, name=None, reason=None, release_definition=None, url=None, web_access_uri=None): + super(ReleaseReference, self).__init__() + self._links = _links + self.artifacts = artifacts + self.created_by = created_by + self.created_on = created_on + self.description = description + self.id = id + self.modified_by = modified_by + self.name = name + self.reason = reason + self.release_definition = release_definition + self.url = url + self.web_access_uri = web_access_uri diff --git a/vsts/vsts/release/v4_0/models/release_revision.py b/vsts/vsts/release/v4_0/models/release_revision.py new file mode 100644 index 00000000..437dc373 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_revision.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseRevision(Model): + """ReleaseRevision. + + :param changed_by: + :type changed_by: :class:`IdentityRef ` + :param changed_date: + :type changed_date: datetime + :param change_details: + :type change_details: str + :param change_type: + :type change_type: str + :param comment: + :type comment: str + :param definition_snapshot_revision: + :type definition_snapshot_revision: int + :param release_id: + :type release_id: int + """ + + _attribute_map = { + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, + 'change_details': {'key': 'changeDetails', 'type': 'str'}, + 'change_type': {'key': 'changeType', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'definition_snapshot_revision': {'key': 'definitionSnapshotRevision', 'type': 'int'}, + 'release_id': {'key': 'releaseId', 'type': 'int'} + } + + def __init__(self, changed_by=None, changed_date=None, change_details=None, change_type=None, comment=None, definition_snapshot_revision=None, release_id=None): + super(ReleaseRevision, self).__init__() + self.changed_by = changed_by + self.changed_date = changed_date + self.change_details = change_details + self.change_type = change_type + self.comment = comment + self.definition_snapshot_revision = definition_snapshot_revision + self.release_id = release_id diff --git a/vsts/vsts/release/v4_0/models/release_schedule.py b/vsts/vsts/release/v4_0/models/release_schedule.py new file mode 100644 index 00000000..ac0b3f86 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_schedule.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseSchedule(Model): + """ReleaseSchedule. + + :param days_to_release: Days of the week to release + :type days_to_release: object + :param job_id: Team Foundation Job Definition Job Id + :type job_id: str + :param start_hours: Local time zone hour to start + :type start_hours: int + :param start_minutes: Local time zone minute to start + :type start_minutes: int + :param time_zone_id: Time zone Id of release schedule, such as 'UTC' + :type time_zone_id: str + """ + + _attribute_map = { + 'days_to_release': {'key': 'daysToRelease', 'type': 'object'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_hours': {'key': 'startHours', 'type': 'int'}, + 'start_minutes': {'key': 'startMinutes', 'type': 'int'}, + 'time_zone_id': {'key': 'timeZoneId', 'type': 'str'} + } + + def __init__(self, days_to_release=None, job_id=None, start_hours=None, start_minutes=None, time_zone_id=None): + super(ReleaseSchedule, self).__init__() + self.days_to_release = days_to_release + self.job_id = job_id + self.start_hours = start_hours + self.start_minutes = start_minutes + self.time_zone_id = time_zone_id diff --git a/vsts/vsts/release/v4_0/models/release_settings.py b/vsts/vsts/release/v4_0/models/release_settings.py new file mode 100644 index 00000000..b139d649 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseSettings(Model): + """ReleaseSettings. + + :param retention_settings: + :type retention_settings: :class:`RetentionSettings ` + """ + + _attribute_map = { + 'retention_settings': {'key': 'retentionSettings', 'type': 'RetentionSettings'} + } + + def __init__(self, retention_settings=None): + super(ReleaseSettings, self).__init__() + self.retention_settings = retention_settings diff --git a/vsts/vsts/release/v4_0/models/release_shallow_reference.py b/vsts/vsts/release/v4_0/models/release_shallow_reference.py new file mode 100644 index 00000000..172de396 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_shallow_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseShallowReference(Model): + """ReleaseShallowReference. + + :param _links: Gets the links to related resources, APIs, and views for the release. + :type _links: :class:`ReferenceLinks ` + :param id: Gets the unique identifier of release. + :type id: int + :param name: Gets or sets the name of the release. + :type name: str + :param url: Gets the REST API url to access the release. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None, url=None): + super(ReleaseShallowReference, self).__init__() + self._links = _links + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/release/v4_0/models/release_start_metadata.py b/vsts/vsts/release/v4_0/models/release_start_metadata.py new file mode 100644 index 00000000..626534c8 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_start_metadata.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseStartMetadata(Model): + """ReleaseStartMetadata. + + :param artifacts: Sets list of artifact to create a release. + :type artifacts: list of :class:`ArtifactMetadata ` + :param definition_id: Sets definition Id to create a release. + :type definition_id: int + :param description: Sets description to create a release. + :type description: str + :param is_draft: Sets 'true' to create release in draft mode, 'false' otherwise. + :type is_draft: bool + :param manual_environments: Sets list of environments to manual as condition. + :type manual_environments: list of str + :param properties: + :type properties: :class:`object ` + :param reason: Sets reason to create a release. + :type reason: object + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactMetadata]'}, + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_draft': {'key': 'isDraft', 'type': 'bool'}, + 'manual_environments': {'key': 'manualEnvironments', 'type': '[str]'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'object'} + } + + def __init__(self, artifacts=None, definition_id=None, description=None, is_draft=None, manual_environments=None, properties=None, reason=None): + super(ReleaseStartMetadata, self).__init__() + self.artifacts = artifacts + self.definition_id = definition_id + self.description = description + self.is_draft = is_draft + self.manual_environments = manual_environments + self.properties = properties + self.reason = reason diff --git a/vsts/vsts/release/v4_0/models/release_task.py b/vsts/vsts/release/v4_0/models/release_task.py new file mode 100644 index 00000000..153b051a --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_task.py @@ -0,0 +1,81 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseTask(Model): + """ReleaseTask. + + :param agent_name: + :type agent_name: str + :param date_ended: + :type date_ended: datetime + :param date_started: + :type date_started: datetime + :param finish_time: + :type finish_time: datetime + :param id: + :type id: int + :param issues: + :type issues: list of :class:`Issue ` + :param line_count: + :type line_count: long + :param log_url: + :type log_url: str + :param name: + :type name: str + :param percent_complete: + :type percent_complete: int + :param rank: + :type rank: int + :param start_time: + :type start_time: datetime + :param status: + :type status: object + :param task: + :type task: :class:`WorkflowTaskReference ` + :param timeline_record_id: + :type timeline_record_id: str + """ + + _attribute_map = { + 'agent_name': {'key': 'agentName', 'type': 'str'}, + 'date_ended': {'key': 'dateEnded', 'type': 'iso-8601'}, + 'date_started': {'key': 'dateStarted', 'type': 'iso-8601'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + 'issues': {'key': 'issues', 'type': '[Issue]'}, + 'line_count': {'key': 'lineCount', 'type': 'long'}, + 'log_url': {'key': 'logUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'}, + 'task': {'key': 'task', 'type': 'WorkflowTaskReference'}, + 'timeline_record_id': {'key': 'timelineRecordId', 'type': 'str'} + } + + def __init__(self, agent_name=None, date_ended=None, date_started=None, finish_time=None, id=None, issues=None, line_count=None, log_url=None, name=None, percent_complete=None, rank=None, start_time=None, status=None, task=None, timeline_record_id=None): + super(ReleaseTask, self).__init__() + self.agent_name = agent_name + self.date_ended = date_ended + self.date_started = date_started + self.finish_time = finish_time + self.id = id + self.issues = issues + self.line_count = line_count + self.log_url = log_url + self.name = name + self.percent_complete = percent_complete + self.rank = rank + self.start_time = start_time + self.status = status + self.task = task + self.timeline_record_id = timeline_record_id diff --git a/vsts/vsts/release/v4_0/models/release_trigger_base.py b/vsts/vsts/release/v4_0/models/release_trigger_base.py new file mode 100644 index 00000000..30c36fb3 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_trigger_base.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseTriggerBase(Model): + """ReleaseTriggerBase. + + :param trigger_type: + :type trigger_type: object + """ + + _attribute_map = { + 'trigger_type': {'key': 'triggerType', 'type': 'object'} + } + + def __init__(self, trigger_type=None): + super(ReleaseTriggerBase, self).__init__() + self.trigger_type = trigger_type diff --git a/vsts/vsts/release/v4_0/models/release_update_metadata.py b/vsts/vsts/release/v4_0/models/release_update_metadata.py new file mode 100644 index 00000000..24cad449 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_update_metadata.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseUpdateMetadata(Model): + """ReleaseUpdateMetadata. + + :param comment: Sets comment for release. + :type comment: str + :param keep_forever: Set 'true' to exclude the release from retention policies. + :type keep_forever: bool + :param manual_environments: Sets list of manual environments. + :type manual_environments: list of str + :param status: Sets status of the release. + :type status: object + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'keep_forever': {'key': 'keepForever', 'type': 'bool'}, + 'manual_environments': {'key': 'manualEnvironments', 'type': '[str]'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, comment=None, keep_forever=None, manual_environments=None, status=None): + super(ReleaseUpdateMetadata, self).__init__() + self.comment = comment + self.keep_forever = keep_forever + self.manual_environments = manual_environments + self.status = status diff --git a/vsts/vsts/release/v4_0/models/release_work_item_ref.py b/vsts/vsts/release/v4_0/models/release_work_item_ref.py new file mode 100644 index 00000000..9891d5a0 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/release_work_item_ref.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseWorkItemRef(Model): + """ReleaseWorkItemRef. + + :param assignee: + :type assignee: str + :param id: + :type id: str + :param state: + :type state: str + :param title: + :type title: str + :param type: + :type type: str + :param url: + :type url: str + """ + + _attribute_map = { + 'assignee': {'key': 'assignee', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, assignee=None, id=None, state=None, title=None, type=None, url=None): + super(ReleaseWorkItemRef, self).__init__() + self.assignee = assignee + self.id = id + self.state = state + self.title = title + self.type = type + self.url = url diff --git a/vsts/vsts/release/v4_0/models/retention_policy.py b/vsts/vsts/release/v4_0/models/retention_policy.py new file mode 100644 index 00000000..e070b170 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/retention_policy.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 RetentionPolicy(Model): + """RetentionPolicy. + + :param days_to_keep: + :type days_to_keep: int + """ + + _attribute_map = { + 'days_to_keep': {'key': 'daysToKeep', 'type': 'int'} + } + + def __init__(self, days_to_keep=None): + super(RetentionPolicy, self).__init__() + self.days_to_keep = days_to_keep diff --git a/vsts/vsts/release/v4_0/models/retention_settings.py b/vsts/vsts/release/v4_0/models/retention_settings.py new file mode 100644 index 00000000..a2a23aa1 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/retention_settings.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 RetentionSettings(Model): + """RetentionSettings. + + :param days_to_keep_deleted_releases: + :type days_to_keep_deleted_releases: int + :param default_environment_retention_policy: + :type default_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` + :param maximum_environment_retention_policy: + :type maximum_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` + """ + + _attribute_map = { + 'days_to_keep_deleted_releases': {'key': 'daysToKeepDeletedReleases', 'type': 'int'}, + 'default_environment_retention_policy': {'key': 'defaultEnvironmentRetentionPolicy', 'type': 'EnvironmentRetentionPolicy'}, + 'maximum_environment_retention_policy': {'key': 'maximumEnvironmentRetentionPolicy', 'type': 'EnvironmentRetentionPolicy'} + } + + def __init__(self, days_to_keep_deleted_releases=None, default_environment_retention_policy=None, maximum_environment_retention_policy=None): + super(RetentionSettings, self).__init__() + self.days_to_keep_deleted_releases = days_to_keep_deleted_releases + self.default_environment_retention_policy = default_environment_retention_policy + self.maximum_environment_retention_policy = maximum_environment_retention_policy diff --git a/vsts/vsts/release/v4_0/models/summary_mail_section.py b/vsts/vsts/release/v4_0/models/summary_mail_section.py new file mode 100644 index 00000000..b8f6a8ea --- /dev/null +++ b/vsts/vsts/release/v4_0/models/summary_mail_section.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SummaryMailSection(Model): + """SummaryMailSection. + + :param html_content: + :type html_content: str + :param rank: + :type rank: int + :param section_type: + :type section_type: object + :param title: + :type title: str + """ + + _attribute_map = { + 'html_content': {'key': 'htmlContent', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'section_type': {'key': 'sectionType', 'type': 'object'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, html_content=None, rank=None, section_type=None, title=None): + super(SummaryMailSection, self).__init__() + self.html_content = html_content + self.rank = rank + self.section_type = section_type + self.title = title diff --git a/vsts/vsts/release/v4_0/models/task_input_definition_base.py b/vsts/vsts/release/v4_0/models/task_input_definition_base.py new file mode 100644 index 00000000..1f33183e --- /dev/null +++ b/vsts/vsts/release/v4_0/models/task_input_definition_base.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskInputDefinitionBase(Model): + """TaskInputDefinitionBase. + + :param default_value: + :type default_value: str + :param group_name: + :type group_name: str + :param help_mark_down: + :type help_mark_down: str + :param label: + :type label: str + :param name: + :type name: str + :param options: + :type options: dict + :param properties: + :type properties: dict + :param required: + :type required: bool + :param type: + :type type: str + :param validation: + :type validation: :class:`TaskInputValidation ` + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation': {'key': 'validation', 'type': 'TaskInputValidation'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'} + } + + def __init__(self, default_value=None, group_name=None, help_mark_down=None, label=None, name=None, options=None, properties=None, required=None, type=None, validation=None, visible_rule=None): + super(TaskInputDefinitionBase, self).__init__() + self.default_value = default_value + self.group_name = group_name + self.help_mark_down = help_mark_down + self.label = label + self.name = name + self.options = options + self.properties = properties + self.required = required + self.type = type + self.validation = validation + self.visible_rule = visible_rule diff --git a/vsts/vsts/release/v4_0/models/task_input_validation.py b/vsts/vsts/release/v4_0/models/task_input_validation.py new file mode 100644 index 00000000..42524013 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/task_input_validation.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskInputValidation(Model): + """TaskInputValidation. + + :param expression: Conditional expression + :type expression: str + :param message: Message explaining how user can correct if validation fails + :type message: str + """ + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, expression=None, message=None): + super(TaskInputValidation, self).__init__() + self.expression = expression + self.message = message diff --git a/vsts/vsts/release/v4_0/models/task_source_definition_base.py b/vsts/vsts/release/v4_0/models/task_source_definition_base.py new file mode 100644 index 00000000..c8a6b6d6 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/task_source_definition_base.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskSourceDefinitionBase(Model): + """TaskSourceDefinitionBase. + + :param auth_key: + :type auth_key: str + :param endpoint: + :type endpoint: str + :param key_selector: + :type key_selector: str + :param selector: + :type selector: str + :param target: + :type target: str + """ + + _attribute_map = { + 'auth_key': {'key': 'authKey', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=None, target=None): + super(TaskSourceDefinitionBase, self).__init__() + self.auth_key = auth_key + self.endpoint = endpoint + self.key_selector = key_selector + self.selector = selector + self.target = target diff --git a/vsts/vsts/release/v4_0/models/variable_group.py b/vsts/vsts/release/v4_0/models/variable_group.py new file mode 100644 index 00000000..827408a1 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/variable_group.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableGroup(Model): + """VariableGroup. + + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param description: Gets or sets description. + :type description: str + :param id: Gets the unique identifier of this field. + :type id: int + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets or sets name. + :type name: str + :param provider_data: Gets or sets provider data. + :type provider_data: :class:`VariableGroupProviderData ` + :param type: Gets or sets type. + :type type: str + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provider_data': {'key': 'providerData', 'type': 'VariableGroupProviderData'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{VariableValue}'} + } + + def __init__(self, created_by=None, created_on=None, description=None, id=None, modified_by=None, modified_on=None, name=None, provider_data=None, type=None, variables=None): + super(VariableGroup, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.description = description + self.id = id + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.provider_data = provider_data + self.type = type + self.variables = variables diff --git a/vsts/vsts/release/v4_0/models/variable_group_provider_data.py b/vsts/vsts/release/v4_0/models/variable_group_provider_data.py new file mode 100644 index 00000000..b86942f1 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/variable_group_provider_data.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VariableGroupProviderData(Model): + """VariableGroupProviderData. + + """ + + _attribute_map = { + } + + def __init__(self): + super(VariableGroupProviderData, self).__init__() diff --git a/vsts/vsts/release/v4_0/models/variable_value.py b/vsts/vsts/release/v4_0/models/variable_value.py new file mode 100644 index 00000000..035049c0 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableValue(Model): + """VariableValue. + + :param is_secret: + :type is_secret: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(VariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/release/v4_0/models/workflow_task.py b/vsts/vsts/release/v4_0/models/workflow_task.py new file mode 100644 index 00000000..14ef134c --- /dev/null +++ b/vsts/vsts/release/v4_0/models/workflow_task.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkflowTask(Model): + """WorkflowTask. + + :param always_run: + :type always_run: bool + :param condition: + :type condition: str + :param continue_on_error: + :type continue_on_error: bool + :param definition_type: + :type definition_type: str + :param enabled: + :type enabled: bool + :param inputs: + :type inputs: dict + :param name: + :type name: str + :param override_inputs: + :type override_inputs: dict + :param ref_name: + :type ref_name: str + :param task_id: + :type task_id: str + :param timeout_in_minutes: + :type timeout_in_minutes: int + :param version: + :type version: str + """ + + _attribute_map = { + 'always_run': {'key': 'alwaysRun', 'type': 'bool'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'continue_on_error': {'key': 'continueOnError', 'type': 'bool'}, + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'override_inputs': {'key': 'overrideInputs', 'type': '{str}'}, + 'ref_name': {'key': 'refName', 'type': 'str'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, always_run=None, condition=None, continue_on_error=None, definition_type=None, enabled=None, inputs=None, name=None, override_inputs=None, ref_name=None, task_id=None, timeout_in_minutes=None, version=None): + super(WorkflowTask, self).__init__() + self.always_run = always_run + self.condition = condition + self.continue_on_error = continue_on_error + self.definition_type = definition_type + self.enabled = enabled + self.inputs = inputs + self.name = name + self.override_inputs = override_inputs + self.ref_name = ref_name + self.task_id = task_id + self.timeout_in_minutes = timeout_in_minutes + self.version = version diff --git a/vsts/vsts/release/v4_0/models/workflow_task_reference.py b/vsts/vsts/release/v4_0/models/workflow_task_reference.py new file mode 100644 index 00000000..0a99eab3 --- /dev/null +++ b/vsts/vsts/release/v4_0/models/workflow_task_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkflowTaskReference(Model): + """WorkflowTaskReference. + + :param id: + :type id: str + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, name=None, version=None): + super(WorkflowTaskReference, self).__init__() + self.id = id + self.name = name + self.version = version diff --git a/vsts/vsts/release/v4_0/release_client.py b/vsts/vsts/release/v4_0/release_client.py new file mode 100644 index 00000000..bd6b4825 --- /dev/null +++ b/vsts/vsts/release/v4_0/release_client.py @@ -0,0 +1,1694 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ReleaseClient(VssClient): + """Release + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ReleaseClient, 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 = 'efc2f575-36ef-48e9-b672-0c6fb4a48ac5' + + def get_agent_artifact_definitions(self, project, release_id): + """GetAgentArtifactDefinitions. + [Preview API] Returns the artifact details that automation agent requires + :param str project: Project ID or project name + :param int release_id: + :rtype: [AgentArtifactDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='f2571c27-bf50-4938-b396-32d109ddef26', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[AgentArtifactDefinition]', response) + + def get_approvals(self, project, assigned_to_filter=None, status_filter=None, release_ids_filter=None, type_filter=None, top=None, continuation_token=None, query_order=None, include_my_group_approvals=None): + """GetApprovals. + [Preview API] Get a list of approvals + :param str project: Project ID or project name + :param str assigned_to_filter: Approvals assigned to this user. + :param str status_filter: Approvals with this status. Default is 'pending'. + :param [int] release_ids_filter: Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4. + :param str type_filter: Approval with this type. + :param int top: Number of approvals to get. Default is 50. + :param int continuation_token: Gets the approvals after the continuation token provided. + :param str query_order: Gets the results in the defined order of created approvals. Default is 'descending'. + :param bool include_my_group_approvals: 'true' to include my group approvals. Default is 'false'. + :rtype: [ReleaseApproval] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if assigned_to_filter is not None: + query_parameters['assignedToFilter'] = self._serialize.query('assigned_to_filter', assigned_to_filter, 'str') + if status_filter is not None: + query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') + if release_ids_filter is not None: + release_ids_filter = ",".join(map(str, release_ids_filter)) + query_parameters['releaseIdsFilter'] = self._serialize.query('release_ids_filter', release_ids_filter, 'str') + if type_filter is not None: + query_parameters['typeFilter'] = self._serialize.query('type_filter', type_filter, 'str') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if include_my_group_approvals is not None: + query_parameters['includeMyGroupApprovals'] = self._serialize.query('include_my_group_approvals', include_my_group_approvals, 'bool') + response = self._send(http_method='GET', + location_id='b47c6458-e73b-47cb-a770-4df1e8813a91', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ReleaseApproval]', response) + + def get_approval_history(self, project, approval_step_id): + """GetApprovalHistory. + [Preview API] Get approval history. + :param str project: Project ID or project name + :param int approval_step_id: Id of the approval. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if approval_step_id is not None: + route_values['approvalStepId'] = self._serialize.url('approval_step_id', approval_step_id, 'int') + response = self._send(http_method='GET', + location_id='250c7158-852e-4130-a00f-a0cce9b72d05', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ReleaseApproval', response) + + def get_approval(self, project, approval_id, include_history=None): + """GetApproval. + [Preview API] Get an approval. + :param str project: Project ID or project name + :param int approval_id: Id of the approval. + :param bool include_history: 'true' to include history of the approval. Default is 'false'. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if approval_id is not None: + route_values['approvalId'] = self._serialize.url('approval_id', approval_id, 'int') + query_parameters = {} + if include_history is not None: + query_parameters['includeHistory'] = self._serialize.query('include_history', include_history, 'bool') + response = self._send(http_method='GET', + location_id='9328e074-59fb-465a-89d9-b09c82ee5109', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReleaseApproval', response) + + def update_release_approval(self, approval, project, approval_id): + """UpdateReleaseApproval. + [Preview API] Update status of an approval + :param :class:` ` approval: ReleaseApproval object having status, approver and comments. + :param str project: Project ID or project name + :param int approval_id: Id of the approval. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if approval_id is not None: + route_values['approvalId'] = self._serialize.url('approval_id', approval_id, 'int') + content = self._serialize.body(approval, 'ReleaseApproval') + response = self._send(http_method='PATCH', + location_id='9328e074-59fb-465a-89d9-b09c82ee5109', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ReleaseApproval', response) + + def update_release_approvals(self, approvals, project): + """UpdateReleaseApprovals. + [Preview API] + :param [ReleaseApproval] approvals: + :param str project: Project ID or project name + :rtype: [ReleaseApproval] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(approvals, '[ReleaseApproval]') + response = self._send(http_method='PATCH', + location_id='c957584a-82aa-4131-8222-6d47f78bfa7a', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[ReleaseApproval]', response) + + def get_auto_trigger_issues(self, artifact_type, source_id, artifact_version_id): + """GetAutoTriggerIssues. + [Preview API] + :param str artifact_type: + :param str source_id: + :param str artifact_version_id: + :rtype: [AutoTriggerIssue] + """ + query_parameters = {} + if artifact_type is not None: + query_parameters['artifactType'] = self._serialize.query('artifact_type', artifact_type, 'str') + if source_id is not None: + query_parameters['sourceId'] = self._serialize.query('source_id', source_id, 'str') + if artifact_version_id is not None: + query_parameters['artifactVersionId'] = self._serialize.query('artifact_version_id', artifact_version_id, 'str') + response = self._send(http_method='GET', + location_id='c1a68497-69da-40fb-9423-cab19cfeeca9', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[AutoTriggerIssue]', response) + + def get_release_changes(self, project, release_id, base_release_id=None, top=None): + """GetReleaseChanges. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int base_release_id: + :param int top: + :rtype: [Change] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if base_release_id is not None: + query_parameters['baseReleaseId'] = self._serialize.query('base_release_id', base_release_id, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='8dcf9fe9-ca37-4113-8ee1-37928e98407c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Change]', response) + + def get_definition_environments(self, project, task_group_id=None, property_filters=None): + """GetDefinitionEnvironments. + [Preview API] + :param str project: Project ID or project name + :param str task_group_id: + :param [str] property_filters: + :rtype: [DefinitionEnvironmentReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if task_group_id is not None: + query_parameters['taskGroupId'] = self._serialize.query('task_group_id', task_group_id, 'str') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + response = self._send(http_method='GET', + location_id='12b5d21a-f54c-430e-a8c1-7515d196890e', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DefinitionEnvironmentReference]', response) + + def create_release_definition(self, release_definition, project): + """CreateReleaseDefinition. + [Preview API] Create a release definition + :param :class:` ` release_definition: release definition object to create. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(release_definition, 'ReleaseDefinition') + response = self._send(http_method='POST', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.0-preview.3', + route_values=route_values, + content=content) + return self._deserialize('ReleaseDefinition', response) + + def delete_release_definition(self, project, definition_id): + """DeleteReleaseDefinition. + [Preview API] Delete a release definition. + :param str project: Project ID or project name + :param int definition_id: Id of the release definition. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + self._send(http_method='DELETE', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.0-preview.3', + route_values=route_values) + + def get_release_definition(self, project, definition_id, property_filters=None): + """GetReleaseDefinition. + [Preview API] Get a release definition. + :param str project: Project ID or project name + :param int definition_id: Id of the release definition. + :param [str] property_filters: A comma-delimited list of extended properties to retrieve. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + query_parameters = {} + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + response = self._send(http_method='GET', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.0-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReleaseDefinition', response) + + def get_release_definition_revision(self, project, definition_id, revision): + """GetReleaseDefinitionRevision. + [Preview API] Get release definition of a given revision. + :param str project: Project ID or project name + :param int definition_id: Id of the release definition. + :param int revision: Revision number of the release definition. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + query_parameters = {} + if revision is not None: + query_parameters['revision'] = self._serialize.query('revision', revision, 'int') + response = self._send(http_method='GET', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.0-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_release_definitions(self, project, search_text=None, expand=None, artifact_type=None, artifact_source_id=None, top=None, continuation_token=None, query_order=None, path=None, is_exact_name_match=None, tag_filter=None, property_filters=None, definition_id_filter=None): + """GetReleaseDefinitions. + [Preview API] Get a list of release definitions. + :param str project: Project ID or project name + :param str search_text: Get release definitions with names starting with searchText. + :param str expand: The properties that should be expanded in the list of Release definitions. + :param str artifact_type: Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + :param str artifact_source_id: Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + :param int top: Number of release definitions to get. + :param str continuation_token: Gets the release definitions after the continuation token provided. + :param str query_order: Gets the results in the defined order. Default is 'IdAscending'. + :param str path: Gets the release definitions under the specified path. + :param bool is_exact_name_match: 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'. + :param [str] tag_filter: A comma-delimited list of tags. Only release definitions with these tags will be returned. + :param [str] property_filters: A comma-delimited list of extended properties to retrieve. + :param [str] definition_id_filter: A comma-delimited list of release definitions to retrieve. + :rtype: [ReleaseDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if search_text is not None: + query_parameters['searchText'] = self._serialize.query('search_text', search_text, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + if artifact_type is not None: + query_parameters['artifactType'] = self._serialize.query('artifact_type', artifact_type, 'str') + if artifact_source_id is not None: + query_parameters['artifactSourceId'] = self._serialize.query('artifact_source_id', artifact_source_id, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if is_exact_name_match is not None: + query_parameters['isExactNameMatch'] = self._serialize.query('is_exact_name_match', is_exact_name_match, 'bool') + if tag_filter is not None: + tag_filter = ",".join(tag_filter) + query_parameters['tagFilter'] = self._serialize.query('tag_filter', tag_filter, 'str') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + if definition_id_filter is not None: + definition_id_filter = ",".join(definition_id_filter) + query_parameters['definitionIdFilter'] = self._serialize.query('definition_id_filter', definition_id_filter, 'str') + response = self._send(http_method='GET', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.0-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ReleaseDefinition]', response) + + def update_release_definition(self, release_definition, project): + """UpdateReleaseDefinition. + [Preview API] Update a release definition. + :param :class:` ` release_definition: Release definition object to update. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(release_definition, 'ReleaseDefinition') + response = self._send(http_method='PUT', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.0-preview.3', + route_values=route_values, + content=content) + return self._deserialize('ReleaseDefinition', response) + + def get_deployments(self, project, definition_id=None, definition_environment_id=None, created_by=None, min_modified_time=None, max_modified_time=None, deployment_status=None, operation_status=None, latest_attempts_only=None, query_order=None, top=None, continuation_token=None, created_for=None): + """GetDeployments. + [Preview API] + :param str project: Project ID or project name + :param int definition_id: + :param int definition_environment_id: + :param str created_by: + :param datetime min_modified_time: + :param datetime max_modified_time: + :param str deployment_status: + :param str operation_status: + :param bool latest_attempts_only: + :param str query_order: + :param int top: + :param int continuation_token: + :param str created_for: + :rtype: [Deployment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') + if definition_environment_id is not None: + query_parameters['definitionEnvironmentId'] = self._serialize.query('definition_environment_id', definition_environment_id, 'int') + if created_by is not None: + query_parameters['createdBy'] = self._serialize.query('created_by', created_by, 'str') + if min_modified_time is not None: + query_parameters['minModifiedTime'] = self._serialize.query('min_modified_time', min_modified_time, 'iso-8601') + if max_modified_time is not None: + query_parameters['maxModifiedTime'] = self._serialize.query('max_modified_time', max_modified_time, 'iso-8601') + if deployment_status is not None: + query_parameters['deploymentStatus'] = self._serialize.query('deployment_status', deployment_status, 'str') + if operation_status is not None: + query_parameters['operationStatus'] = self._serialize.query('operation_status', operation_status, 'str') + if latest_attempts_only is not None: + query_parameters['latestAttemptsOnly'] = self._serialize.query('latest_attempts_only', latest_attempts_only, 'bool') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') + if created_for is not None: + query_parameters['createdFor'] = self._serialize.query('created_for', created_for, 'str') + response = self._send(http_method='GET', + location_id='b005ef73-cddc-448e-9ba2-5193bf36b19f', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Deployment]', response) + + def get_deployments_for_multiple_environments(self, query_parameters, project): + """GetDeploymentsForMultipleEnvironments. + [Preview API] + :param :class:` ` query_parameters: + :param str project: Project ID or project name + :rtype: [Deployment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(query_parameters, 'DeploymentQueryParameters') + response = self._send(http_method='POST', + location_id='b005ef73-cddc-448e-9ba2-5193bf36b19f', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[Deployment]', response) + + def get_release_environment(self, project, release_id, environment_id): + """GetReleaseEnvironment. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int environment_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + response = self._send(http_method='GET', + location_id='a7e426b1-03dc-48af-9dfe-c98bac612dcb', + version='4.0-preview.4', + route_values=route_values) + return self._deserialize('ReleaseEnvironment', response) + + def update_release_environment(self, environment_update_data, project, release_id, environment_id): + """UpdateReleaseEnvironment. + [Preview API] Update the status of a release environment + :param :class:` ` environment_update_data: Environment update meta data. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int environment_id: Id of release environment. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + content = self._serialize.body(environment_update_data, 'ReleaseEnvironmentUpdateMetadata') + response = self._send(http_method='PATCH', + location_id='a7e426b1-03dc-48af-9dfe-c98bac612dcb', + version='4.0-preview.4', + route_values=route_values, + content=content) + return self._deserialize('ReleaseEnvironment', response) + + def create_definition_environment_template(self, template, project): + """CreateDefinitionEnvironmentTemplate. + [Preview API] + :param :class:` ` template: + :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(template, 'ReleaseDefinitionEnvironmentTemplate') + response = self._send(http_method='POST', + location_id='6b03b696-824e-4479-8eb2-6644a51aba89', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('ReleaseDefinitionEnvironmentTemplate', response) + + def delete_definition_environment_template(self, project, template_id): + """DeleteDefinitionEnvironmentTemplate. + [Preview API] + :param str project: Project ID or project name + :param str template_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if template_id is not None: + query_parameters['templateId'] = self._serialize.query('template_id', template_id, 'str') + self._send(http_method='DELETE', + location_id='6b03b696-824e-4479-8eb2-6644a51aba89', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + + def get_definition_environment_template(self, project, template_id): + """GetDefinitionEnvironmentTemplate. + [Preview API] + :param str project: Project ID or project name + :param str template_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if template_id is not None: + query_parameters['templateId'] = self._serialize.query('template_id', template_id, 'str') + response = self._send(http_method='GET', + location_id='6b03b696-824e-4479-8eb2-6644a51aba89', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReleaseDefinitionEnvironmentTemplate', response) + + def list_definition_environment_templates(self, project): + """ListDefinitionEnvironmentTemplates. + [Preview API] + :param str project: Project ID or project name + :rtype: [ReleaseDefinitionEnvironmentTemplate] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='6b03b696-824e-4479-8eb2-6644a51aba89', + version='4.0-preview.2', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ReleaseDefinitionEnvironmentTemplate]', response) + + def create_favorites(self, favorite_items, project, scope, identity_id=None): + """CreateFavorites. + [Preview API] + :param [FavoriteItem] favorite_items: + :param str project: Project ID or project name + :param str scope: + :param str identity_id: + :rtype: [FavoriteItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if scope is not None: + route_values['scope'] = self._serialize.url('scope', scope, 'str') + query_parameters = {} + if identity_id is not None: + query_parameters['identityId'] = self._serialize.query('identity_id', identity_id, 'str') + content = self._serialize.body(favorite_items, '[FavoriteItem]') + response = self._send(http_method='POST', + location_id='938f7222-9acb-48fe-b8a3-4eda04597171', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[FavoriteItem]', response) + + def delete_favorites(self, project, scope, identity_id=None, favorite_item_ids=None): + """DeleteFavorites. + [Preview API] + :param str project: Project ID or project name + :param str scope: + :param str identity_id: + :param str favorite_item_ids: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if scope is not None: + route_values['scope'] = self._serialize.url('scope', scope, 'str') + query_parameters = {} + if identity_id is not None: + query_parameters['identityId'] = self._serialize.query('identity_id', identity_id, 'str') + if favorite_item_ids is not None: + query_parameters['favoriteItemIds'] = self._serialize.query('favorite_item_ids', favorite_item_ids, 'str') + self._send(http_method='DELETE', + location_id='938f7222-9acb-48fe-b8a3-4eda04597171', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_favorites(self, project, scope, identity_id=None): + """GetFavorites. + [Preview API] + :param str project: Project ID or project name + :param str scope: + :param str identity_id: + :rtype: [FavoriteItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if scope is not None: + route_values['scope'] = self._serialize.url('scope', scope, 'str') + query_parameters = {} + if identity_id is not None: + query_parameters['identityId'] = self._serialize.query('identity_id', identity_id, 'str') + response = self._send(http_method='GET', + location_id='938f7222-9acb-48fe-b8a3-4eda04597171', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[FavoriteItem]', response) + + def create_folder(self, folder, project, path): + """CreateFolder. + [Preview API] Creates a new folder + :param :class:` ` folder: + :param str project: Project ID or project name + :param str path: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') + content = self._serialize.body(folder, 'Folder') + response = self._send(http_method='POST', + location_id='f7ddf76d-ce0c-4d68-94ff-becaec5d9dea', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Folder', response) + + def delete_folder(self, project, path): + """DeleteFolder. + [Preview API] Deletes a definition folder for given folder name and path and all it's existing definitions + :param str project: Project ID or project name + :param str path: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') + self._send(http_method='DELETE', + location_id='f7ddf76d-ce0c-4d68-94ff-becaec5d9dea', + version='4.0-preview.1', + route_values=route_values) + + def get_folders(self, project, path=None, query_order=None): + """GetFolders. + [Preview API] Gets folders + :param str project: Project ID or project name + :param str path: + :param str query_order: + :rtype: [Folder] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') + query_parameters = {} + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + response = self._send(http_method='GET', + location_id='f7ddf76d-ce0c-4d68-94ff-becaec5d9dea', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Folder]', response) + + def update_folder(self, folder, project, path): + """UpdateFolder. + [Preview API] Updates an existing folder at given existing path + :param :class:` ` folder: + :param str project: Project ID or project name + :param str path: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') + content = self._serialize.body(folder, 'Folder') + response = self._send(http_method='PATCH', + location_id='f7ddf76d-ce0c-4d68-94ff-becaec5d9dea', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Folder', response) + + def get_release_history(self, project, release_id): + """GetReleaseHistory. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :rtype: [ReleaseRevision] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='23f461c8-629a-4144-a076-3054fa5f268a', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ReleaseRevision]', response) + + def get_input_values(self, query, project): + """GetInputValues. + [Preview API] + :param :class:` ` query: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(query, 'InputValuesQuery') + response = self._send(http_method='POST', + location_id='71dd499b-317d-45ea-9134-140ea1932b5e', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('InputValuesQuery', response) + + def get_issues(self, project, build_id, source_id=None): + """GetIssues. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str source_id: + :rtype: [AutoTriggerIssue] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + query_parameters = {} + if source_id is not None: + query_parameters['sourceId'] = self._serialize.query('source_id', source_id, 'str') + response = self._send(http_method='GET', + location_id='cd42261a-f5c6-41c8-9259-f078989b9f25', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[AutoTriggerIssue]', response) + + def get_log(self, project, release_id, environment_id, task_id, attempt_id=None): + """GetLog. + [Preview API] Gets logs + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int environment_id: Id of release environment. + :param int task_id: ReleaseTask Id for the log. + :param int attempt_id: Id of the attempt. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if task_id is not None: + route_values['taskId'] = self._serialize.url('task_id', task_id, 'int') + query_parameters = {} + if attempt_id is not None: + query_parameters['attemptId'] = self._serialize.query('attempt_id', attempt_id, 'int') + response = self._send(http_method='GET', + location_id='e71ba1ed-c0a4-4a28-a61f-2dd5f68cf3fd', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_logs(self, project, release_id): + """GetLogs. + [Preview API] Get logs for a release Id. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='c37fbab5-214b-48e4-a55b-cb6b4f6e4038', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('object', response) + + def get_task_log(self, project, release_id, environment_id, release_deploy_phase_id, task_id): + """GetTaskLog. + [Preview API] Gets the task log of a release as a plain text file. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int environment_id: Id of release environment. + :param int release_deploy_phase_id: Release deploy phase Id. + :param int task_id: ReleaseTask Id for the log. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if release_deploy_phase_id is not None: + route_values['releaseDeployPhaseId'] = self._serialize.url('release_deploy_phase_id', release_deploy_phase_id, 'int') + if task_id is not None: + route_values['taskId'] = self._serialize.url('task_id', task_id, 'int') + response = self._send(http_method='GET', + location_id='17c91af7-09fd-4256-bff1-c24ee4f73bc0', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('object', response) + + def get_manual_intervention(self, project, release_id, manual_intervention_id): + """GetManualIntervention. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int manual_intervention_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if manual_intervention_id is not None: + route_values['manualInterventionId'] = self._serialize.url('manual_intervention_id', manual_intervention_id, 'int') + response = self._send(http_method='GET', + location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ManualIntervention', response) + + def get_manual_interventions(self, project, release_id): + """GetManualInterventions. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :rtype: [ManualIntervention] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ManualIntervention]', response) + + def update_manual_intervention(self, manual_intervention_update_metadata, project, release_id, manual_intervention_id): + """UpdateManualIntervention. + [Preview API] + :param :class:` ` manual_intervention_update_metadata: + :param str project: Project ID or project name + :param int release_id: + :param int manual_intervention_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if manual_intervention_id is not None: + route_values['manualInterventionId'] = self._serialize.url('manual_intervention_id', manual_intervention_id, 'int') + content = self._serialize.body(manual_intervention_update_metadata, 'ManualInterventionUpdateMetadata') + response = self._send(http_method='PATCH', + location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ManualIntervention', response) + + def get_metrics(self, project, min_metrics_time=None): + """GetMetrics. + [Preview API] + :param str project: Project ID or project name + :param datetime min_metrics_time: + :rtype: [Metric] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if min_metrics_time is not None: + query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'iso-8601') + response = self._send(http_method='GET', + location_id='cd1502bb-3c73-4e11-80a6-d11308dceae5', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Metric]', response) + + def get_release_projects(self, artifact_type, artifact_source_id): + """GetReleaseProjects. + [Preview API] + :param str artifact_type: + :param str artifact_source_id: + :rtype: [ProjectReference] + """ + query_parameters = {} + if artifact_type is not None: + query_parameters['artifactType'] = self._serialize.query('artifact_type', artifact_type, 'str') + if artifact_source_id is not None: + query_parameters['artifactSourceId'] = self._serialize.query('artifact_source_id', artifact_source_id, 'str') + response = self._send(http_method='GET', + location_id='917ace4a-79d1-45a7-987c-7be4db4268fa', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ProjectReference]', response) + + def get_releases(self, project=None, definition_id=None, definition_environment_id=None, search_text=None, created_by=None, status_filter=None, environment_status_filter=None, min_created_time=None, max_created_time=None, query_order=None, top=None, continuation_token=None, expand=None, artifact_type_id=None, source_id=None, artifact_version_id=None, source_branch_filter=None, is_deleted=None, tag_filter=None, property_filters=None): + """GetReleases. + [Preview API] Get a list of releases + :param str project: Project ID or project name + :param int definition_id: Releases from this release definition Id. + :param int definition_environment_id: + :param str search_text: Releases with names starting with searchText. + :param str created_by: Releases created by this user. + :param str status_filter: Releases that have this status. + :param int environment_status_filter: + :param datetime min_created_time: Releases that were created after this time. + :param datetime max_created_time: Releases that were created before this time. + :param str query_order: Gets the results in the defined order of created date for releases. Default is descending. + :param int top: Number of releases to get. Default is 50. + :param int continuation_token: Gets the releases after the continuation token provided. + :param str expand: The property that should be expanded in the list of releases. + :param str artifact_type_id: Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + :param str source_id: Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + :param str artifact_version_id: Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId. + :param str source_branch_filter: Releases with given sourceBranchFilter will be returned. + :param bool is_deleted: Gets the soft deleted releases, if true. + :param [str] tag_filter: A comma-delimited list of tags. Only releases with these tags will be returned. + :param [str] property_filters: A comma-delimited list of extended properties to retrieve. + :rtype: [Release] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') + if definition_environment_id is not None: + query_parameters['definitionEnvironmentId'] = self._serialize.query('definition_environment_id', definition_environment_id, 'int') + if search_text is not None: + query_parameters['searchText'] = self._serialize.query('search_text', search_text, 'str') + if created_by is not None: + query_parameters['createdBy'] = self._serialize.query('created_by', created_by, 'str') + if status_filter is not None: + query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') + if environment_status_filter is not None: + query_parameters['environmentStatusFilter'] = self._serialize.query('environment_status_filter', environment_status_filter, 'int') + if min_created_time is not None: + query_parameters['minCreatedTime'] = self._serialize.query('min_created_time', min_created_time, 'iso-8601') + if max_created_time is not None: + query_parameters['maxCreatedTime'] = self._serialize.query('max_created_time', max_created_time, 'iso-8601') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + if artifact_type_id is not None: + query_parameters['artifactTypeId'] = self._serialize.query('artifact_type_id', artifact_type_id, 'str') + if source_id is not None: + query_parameters['sourceId'] = self._serialize.query('source_id', source_id, 'str') + if artifact_version_id is not None: + query_parameters['artifactVersionId'] = self._serialize.query('artifact_version_id', artifact_version_id, 'str') + if source_branch_filter is not None: + query_parameters['sourceBranchFilter'] = self._serialize.query('source_branch_filter', source_branch_filter, 'str') + if is_deleted is not None: + query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool') + if tag_filter is not None: + tag_filter = ",".join(tag_filter) + query_parameters['tagFilter'] = self._serialize.query('tag_filter', tag_filter, 'str') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Release]', response) + + def create_release(self, release_start_metadata, project): + """CreateRelease. + [Preview API] Create a release. + :param :class:` ` release_start_metadata: Metadata to create a release. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(release_start_metadata, 'ReleaseStartMetadata') + response = self._send(http_method='POST', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + content=content) + return self._deserialize('Release', response) + + def delete_release(self, project, release_id, comment=None): + """DeleteRelease. + [Preview API] Soft delete a release + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param str comment: Comment for deleting a release. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if comment is not None: + query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + self._send(http_method='DELETE', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters) + + def get_release(self, project, release_id, include_all_approvals=None, property_filters=None): + """GetRelease. + [Preview API] Get a Release + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param bool include_all_approvals: Include all approvals in the result. Default is 'true'. + :param [str] property_filters: A comma-delimited list of properties to include in the results. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if include_all_approvals is not None: + query_parameters['includeAllApprovals'] = self._serialize.query('include_all_approvals', include_all_approvals, 'bool') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Release', response) + + def get_release_definition_summary(self, project, definition_id, release_count, include_artifact=None, definition_environment_ids_filter=None): + """GetReleaseDefinitionSummary. + [Preview API] Get release summary of a given definition Id. + :param str project: Project ID or project name + :param int definition_id: Id of the definition to get release summary. + :param int release_count: Count of releases to be included in summary. + :param bool include_artifact: Include artifact details.Default is 'false'. + :param [int] definition_environment_ids_filter: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') + if release_count is not None: + query_parameters['releaseCount'] = self._serialize.query('release_count', release_count, 'int') + if include_artifact is not None: + query_parameters['includeArtifact'] = self._serialize.query('include_artifact', include_artifact, 'bool') + if definition_environment_ids_filter is not None: + definition_environment_ids_filter = ",".join(map(str, definition_environment_ids_filter)) + query_parameters['definitionEnvironmentIdsFilter'] = self._serialize.query('definition_environment_ids_filter', definition_environment_ids_filter, 'str') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReleaseDefinitionSummary', response) + + def get_release_revision(self, project, release_id, definition_snapshot_revision): + """GetReleaseRevision. + [Preview API] Get release for a given revision number. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int definition_snapshot_revision: Definition snapshot revision number. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if definition_snapshot_revision is not None: + query_parameters['definitionSnapshotRevision'] = self._serialize.query('definition_snapshot_revision', definition_snapshot_revision, 'int') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def undelete_release(self, project, release_id, comment): + """UndeleteRelease. + [Preview API] Undelete a soft deleted release. + :param str project: Project ID or project name + :param int release_id: Id of release to be undeleted. + :param str comment: Any comment for undeleting. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if comment is not None: + query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + self._send(http_method='PUT', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + query_parameters=query_parameters) + + def update_release(self, release, project, release_id): + """UpdateRelease. + [Preview API] Update a complete release object. + :param :class:` ` release: Release object for update. + :param str project: Project ID or project name + :param int release_id: Id of the release to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + content = self._serialize.body(release, 'Release') + response = self._send(http_method='PUT', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + content=content) + return self._deserialize('Release', response) + + def update_release_resource(self, release_update_metadata, project, release_id): + """UpdateReleaseResource. + [Preview API] Update few properties of a release. + :param :class:` ` release_update_metadata: Properties of release to update. + :param str project: Project ID or project name + :param int release_id: Id of the release to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + content = self._serialize.body(release_update_metadata, 'ReleaseUpdateMetadata') + response = self._send(http_method='PATCH', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.0-preview.4', + route_values=route_values, + content=content) + return self._deserialize('Release', response) + + def get_release_settings(self, project): + """GetReleaseSettings. + [Preview API] Gets the release settings + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='c63c3718-7cfd-41e0-b89b-81c1ca143437', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ReleaseSettings', response) + + def update_release_settings(self, release_settings, project): + """UpdateReleaseSettings. + [Preview API] Updates the release settings + :param :class:` ` release_settings: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(release_settings, 'ReleaseSettings') + response = self._send(http_method='PUT', + location_id='c63c3718-7cfd-41e0-b89b-81c1ca143437', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ReleaseSettings', response) + + def get_definition_revision(self, project, definition_id, revision): + """GetDefinitionRevision. + [Preview API] + :param str project: Project ID or project name + :param int definition_id: + :param int revision: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + if revision is not None: + route_values['revision'] = self._serialize.url('revision', revision, 'int') + response = self._send(http_method='GET', + location_id='258b82e0-9d41-43f3-86d6-fef14ddd44bc', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_release_definition_history(self, project, definition_id): + """GetReleaseDefinitionHistory. + [Preview API] Get revision history for a release definition + :param str project: Project ID or project name + :param int definition_id: Id of the definition. + :rtype: [ReleaseDefinitionRevision] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + response = self._send(http_method='GET', + location_id='258b82e0-9d41-43f3-86d6-fef14ddd44bc', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ReleaseDefinitionRevision]', response) + + def get_summary_mail_sections(self, project, release_id): + """GetSummaryMailSections. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :rtype: [SummaryMailSection] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='224e92b2-8d13-4c14-b120-13d877c516f8', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SummaryMailSection]', response) + + def send_summary_mail(self, mail_message, project, release_id): + """SendSummaryMail. + [Preview API] + :param :class:` ` mail_message: + :param str project: Project ID or project name + :param int release_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + content = self._serialize.body(mail_message, 'MailMessage') + self._send(http_method='POST', + location_id='224e92b2-8d13-4c14-b120-13d877c516f8', + version='4.0-preview.1', + route_values=route_values, + content=content) + + def get_source_branches(self, project, definition_id): + """GetSourceBranches. + [Preview API] + :param str project: Project ID or project name + :param int definition_id: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + response = self._send(http_method='GET', + location_id='0e5def23-78b3-461f-8198-1558f25041c8', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def add_definition_tag(self, project, release_definition_id, tag): + """AddDefinitionTag. + [Preview API] Adds a tag to a definition + :param str project: Project ID or project name + :param int release_definition_id: + :param str tag: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_definition_id is not None: + route_values['releaseDefinitionId'] = self._serialize.url('release_definition_id', release_definition_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') + response = self._send(http_method='PATCH', + location_id='3d21b4c8-c32e-45b2-a7cb-770a369012f4', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def add_definition_tags(self, tags, project, release_definition_id): + """AddDefinitionTags. + [Preview API] Adds multiple tags to a definition + :param [str] tags: + :param str project: Project ID or project name + :param int release_definition_id: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_definition_id is not None: + route_values['releaseDefinitionId'] = self._serialize.url('release_definition_id', release_definition_id, 'int') + content = self._serialize.body(tags, '[str]') + response = self._send(http_method='POST', + location_id='3d21b4c8-c32e-45b2-a7cb-770a369012f4', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[str]', response) + + def delete_definition_tag(self, project, release_definition_id, tag): + """DeleteDefinitionTag. + [Preview API] Deletes a tag from a definition + :param str project: Project ID or project name + :param int release_definition_id: + :param str tag: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_definition_id is not None: + route_values['releaseDefinitionId'] = self._serialize.url('release_definition_id', release_definition_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') + response = self._send(http_method='DELETE', + location_id='3d21b4c8-c32e-45b2-a7cb-770a369012f4', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_definition_tags(self, project, release_definition_id): + """GetDefinitionTags. + [Preview API] Gets the tags for a definition + :param str project: Project ID or project name + :param int release_definition_id: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_definition_id is not None: + route_values['releaseDefinitionId'] = self._serialize.url('release_definition_id', release_definition_id, 'int') + response = self._send(http_method='GET', + location_id='3d21b4c8-c32e-45b2-a7cb-770a369012f4', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def add_release_tag(self, project, release_id, tag): + """AddReleaseTag. + [Preview API] Adds a tag to a releaseId + :param str project: Project ID or project name + :param int release_id: + :param str tag: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') + response = self._send(http_method='PATCH', + location_id='c5b602b6-d1b3-4363-8a51-94384f78068f', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def add_release_tags(self, tags, project, release_id): + """AddReleaseTags. + [Preview API] Adds tag to a release + :param [str] tags: + :param str project: Project ID or project name + :param int release_id: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + content = self._serialize.body(tags, '[str]') + response = self._send(http_method='POST', + location_id='c5b602b6-d1b3-4363-8a51-94384f78068f', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[str]', response) + + def delete_release_tag(self, project, release_id, tag): + """DeleteReleaseTag. + [Preview API] Deletes a tag from a release + :param str project: Project ID or project name + :param int release_id: + :param str tag: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') + response = self._send(http_method='DELETE', + location_id='c5b602b6-d1b3-4363-8a51-94384f78068f', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_release_tags(self, project, release_id): + """GetReleaseTags. + [Preview API] Gets the tags for a release + :param str project: Project ID or project name + :param int release_id: + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='c5b602b6-d1b3-4363-8a51-94384f78068f', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_tags(self, project): + """GetTags. + [Preview API] + :param str project: Project ID or project name + :rtype: [str] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='86cee25a-68ba-4ba3-9171-8ad6ffc6df93', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_tasks(self, project, release_id, environment_id, attempt_id=None): + """GetTasks. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int environment_id: + :param int attempt_id: + :rtype: [ReleaseTask] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + query_parameters = {} + if attempt_id is not None: + query_parameters['attemptId'] = self._serialize.query('attempt_id', attempt_id, 'int') + response = self._send(http_method='GET', + location_id='36b276e0-3c70-4320-a63c-1a2e1466a0d1', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ReleaseTask]', response) + + def get_tasks_for_task_group(self, project, release_id, environment_id, release_deploy_phase_id): + """GetTasksForTaskGroup. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int environment_id: + :param int release_deploy_phase_id: + :rtype: [ReleaseTask] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if release_deploy_phase_id is not None: + route_values['releaseDeployPhaseId'] = self._serialize.url('release_deploy_phase_id', release_deploy_phase_id, 'int') + response = self._send(http_method='GET', + location_id='4259191d-4b0a-4409-9fb3-09f22ab9bc47', + version='4.0-preview.2', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ReleaseTask]', response) + + def get_artifact_type_definitions(self, project): + """GetArtifactTypeDefinitions. + [Preview API] + :param str project: Project ID or project name + :rtype: [ArtifactTypeDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='8efc2a3c-1fc8-4f6d-9822-75e98cecb48f', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ArtifactTypeDefinition]', response) + + def get_artifact_versions(self, project, release_definition_id): + """GetArtifactVersions. + [Preview API] + :param str project: Project ID or project name + :param int release_definition_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_definition_id is not None: + query_parameters['releaseDefinitionId'] = self._serialize.query('release_definition_id', release_definition_id, 'int') + response = self._send(http_method='GET', + location_id='30fc787e-a9e0-4a07-9fbc-3e903aa051d2', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ArtifactVersionQueryResult', response) + + def get_artifact_versions_for_sources(self, artifacts, project): + """GetArtifactVersionsForSources. + [Preview API] + :param [Artifact] artifacts: + :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(artifacts, '[Artifact]') + response = self._send(http_method='POST', + location_id='30fc787e-a9e0-4a07-9fbc-3e903aa051d2', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ArtifactVersionQueryResult', response) + + def get_release_work_items_refs(self, project, release_id, base_release_id=None, top=None): + """GetReleaseWorkItemsRefs. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int base_release_id: + :param int top: + :rtype: [ReleaseWorkItemRef] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if base_release_id is not None: + query_parameters['baseReleaseId'] = self._serialize.query('base_release_id', base_release_id, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='4f165cc0-875c-4768-b148-f12f78769fab', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ReleaseWorkItemRef]', response) + diff --git a/vsts/vsts/release/v4_1/__init__.py b/vsts/vsts/release/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/release/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/release/v4_1/models/__init__.py b/vsts/vsts/release/v4_1/models/__init__.py new file mode 100644 index 00000000..252e58aa --- /dev/null +++ b/vsts/vsts/release/v4_1/models/__init__.py @@ -0,0 +1,193 @@ +# -------------------------------------------------------------------------------------------- +# 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 .agent_artifact_definition import AgentArtifactDefinition +from .approval_options import ApprovalOptions +from .artifact import Artifact +from .artifact_metadata import ArtifactMetadata +from .artifact_source_reference import ArtifactSourceReference +from .artifact_type_definition import ArtifactTypeDefinition +from .artifact_version import ArtifactVersion +from .artifact_version_query_result import ArtifactVersionQueryResult +from .authorization_header import AuthorizationHeader +from .auto_trigger_issue import AutoTriggerIssue +from .build_version import BuildVersion +from .change import Change +from .condition import Condition +from .configuration_variable_value import ConfigurationVariableValue +from .data_source_binding_base import DataSourceBindingBase +from .definition_environment_reference import DefinitionEnvironmentReference +from .deployment import Deployment +from .deployment_attempt import DeploymentAttempt +from .deployment_job import DeploymentJob +from .deployment_query_parameters import DeploymentQueryParameters +from .deploy_phase import DeployPhase +from .email_recipients import EmailRecipients +from .environment_execution_policy import EnvironmentExecutionPolicy +from .environment_options import EnvironmentOptions +from .environment_retention_policy import EnvironmentRetentionPolicy +from .favorite_item import FavoriteItem +from .folder import Folder +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .input_descriptor import InputDescriptor +from .input_validation import InputValidation +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .input_values_query import InputValuesQuery +from .issue import Issue +from .mail_message import MailMessage +from .manual_intervention import ManualIntervention +from .manual_intervention_update_metadata import ManualInterventionUpdateMetadata +from .metric import Metric +from .pipeline_process import PipelineProcess +from .process_parameters import ProcessParameters +from .project_reference import ProjectReference +from .queued_release_data import QueuedReleaseData +from .reference_links import ReferenceLinks +from .release import Release +from .release_approval import ReleaseApproval +from .release_approval_history import ReleaseApprovalHistory +from .release_condition import ReleaseCondition +from .release_definition import ReleaseDefinition +from .release_definition_approvals import ReleaseDefinitionApprovals +from .release_definition_approval_step import ReleaseDefinitionApprovalStep +from .release_definition_deploy_step import ReleaseDefinitionDeployStep +from .release_definition_environment import ReleaseDefinitionEnvironment +from .release_definition_environment_step import ReleaseDefinitionEnvironmentStep +from .release_definition_environment_summary import ReleaseDefinitionEnvironmentSummary +from .release_definition_environment_template import ReleaseDefinitionEnvironmentTemplate +from .release_definition_gate import ReleaseDefinitionGate +from .release_definition_gates_options import ReleaseDefinitionGatesOptions +from .release_definition_gates_step import ReleaseDefinitionGatesStep +from .release_definition_revision import ReleaseDefinitionRevision +from .release_definition_shallow_reference import ReleaseDefinitionShallowReference +from .release_definition_summary import ReleaseDefinitionSummary +from .release_definition_undelete_parameter import ReleaseDefinitionUndeleteParameter +from .release_deploy_phase import ReleaseDeployPhase +from .release_environment import ReleaseEnvironment +from .release_environment_shallow_reference import ReleaseEnvironmentShallowReference +from .release_environment_update_metadata import ReleaseEnvironmentUpdateMetadata +from .release_gates import ReleaseGates +from .release_reference import ReleaseReference +from .release_revision import ReleaseRevision +from .release_schedule import ReleaseSchedule +from .release_settings import ReleaseSettings +from .release_shallow_reference import ReleaseShallowReference +from .release_start_metadata import ReleaseStartMetadata +from .release_task import ReleaseTask +from .release_task_attachment import ReleaseTaskAttachment +from .release_trigger_base import ReleaseTriggerBase +from .release_update_metadata import ReleaseUpdateMetadata +from .release_work_item_ref import ReleaseWorkItemRef +from .retention_policy import RetentionPolicy +from .retention_settings import RetentionSettings +from .summary_mail_section import SummaryMailSection +from .task_input_definition_base import TaskInputDefinitionBase +from .task_input_validation import TaskInputValidation +from .task_source_definition_base import TaskSourceDefinitionBase +from .variable_group import VariableGroup +from .variable_group_provider_data import VariableGroupProviderData +from .variable_value import VariableValue +from .workflow_task import WorkflowTask +from .workflow_task_reference import WorkflowTaskReference + +__all__ = [ + 'AgentArtifactDefinition', + 'ApprovalOptions', + 'Artifact', + 'ArtifactMetadata', + 'ArtifactSourceReference', + 'ArtifactTypeDefinition', + 'ArtifactVersion', + 'ArtifactVersionQueryResult', + 'AuthorizationHeader', + 'AutoTriggerIssue', + 'BuildVersion', + 'Change', + 'Condition', + 'ConfigurationVariableValue', + 'DataSourceBindingBase', + 'DefinitionEnvironmentReference', + 'Deployment', + 'DeploymentAttempt', + 'DeploymentJob', + 'DeploymentQueryParameters', + 'DeployPhase', + 'EmailRecipients', + 'EnvironmentExecutionPolicy', + 'EnvironmentOptions', + 'EnvironmentRetentionPolicy', + 'FavoriteItem', + 'Folder', + 'GraphSubjectBase', + 'IdentityRef', + 'InputDescriptor', + 'InputValidation', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'InputValuesQuery', + 'Issue', + 'MailMessage', + 'ManualIntervention', + 'ManualInterventionUpdateMetadata', + 'Metric', + 'PipelineProcess', + 'ProcessParameters', + 'ProjectReference', + 'QueuedReleaseData', + 'ReferenceLinks', + 'Release', + 'ReleaseApproval', + 'ReleaseApprovalHistory', + 'ReleaseCondition', + 'ReleaseDefinition', + 'ReleaseDefinitionApprovals', + 'ReleaseDefinitionApprovalStep', + 'ReleaseDefinitionDeployStep', + 'ReleaseDefinitionEnvironment', + 'ReleaseDefinitionEnvironmentStep', + 'ReleaseDefinitionEnvironmentSummary', + 'ReleaseDefinitionEnvironmentTemplate', + 'ReleaseDefinitionGate', + 'ReleaseDefinitionGatesOptions', + 'ReleaseDefinitionGatesStep', + 'ReleaseDefinitionRevision', + 'ReleaseDefinitionShallowReference', + 'ReleaseDefinitionSummary', + 'ReleaseDefinitionUndeleteParameter', + 'ReleaseDeployPhase', + 'ReleaseEnvironment', + 'ReleaseEnvironmentShallowReference', + 'ReleaseEnvironmentUpdateMetadata', + 'ReleaseGates', + 'ReleaseReference', + 'ReleaseRevision', + 'ReleaseSchedule', + 'ReleaseSettings', + 'ReleaseShallowReference', + 'ReleaseStartMetadata', + 'ReleaseTask', + 'ReleaseTaskAttachment', + 'ReleaseTriggerBase', + 'ReleaseUpdateMetadata', + 'ReleaseWorkItemRef', + 'RetentionPolicy', + 'RetentionSettings', + 'SummaryMailSection', + 'TaskInputDefinitionBase', + 'TaskInputValidation', + 'TaskSourceDefinitionBase', + 'VariableGroup', + 'VariableGroupProviderData', + 'VariableValue', + 'WorkflowTask', + 'WorkflowTaskReference', +] diff --git a/vsts/vsts/release/v4_1/models/agent_artifact_definition.py b/vsts/vsts/release/v4_1/models/agent_artifact_definition.py new file mode 100644 index 00000000..8e2ec362 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/agent_artifact_definition.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AgentArtifactDefinition(Model): + """AgentArtifactDefinition. + + :param alias: + :type alias: str + :param artifact_type: + :type artifact_type: object + :param details: + :type details: str + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'artifact_type': {'key': 'artifactType', 'type': 'object'}, + 'details': {'key': 'details', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, alias=None, artifact_type=None, details=None, name=None, version=None): + super(AgentArtifactDefinition, self).__init__() + self.alias = alias + self.artifact_type = artifact_type + self.details = details + self.name = name + self.version = version diff --git a/vsts/vsts/release/v4_1/models/approval_options.py b/vsts/vsts/release/v4_1/models/approval_options.py new file mode 100644 index 00000000..4a0ad1b8 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/approval_options.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ApprovalOptions(Model): + """ApprovalOptions. + + :param auto_triggered_and_previous_environment_approved_can_be_skipped: + :type auto_triggered_and_previous_environment_approved_can_be_skipped: bool + :param enforce_identity_revalidation: + :type enforce_identity_revalidation: bool + :param execution_order: + :type execution_order: object + :param release_creator_can_be_approver: + :type release_creator_can_be_approver: bool + :param required_approver_count: + :type required_approver_count: int + :param timeout_in_minutes: + :type timeout_in_minutes: int + """ + + _attribute_map = { + 'auto_triggered_and_previous_environment_approved_can_be_skipped': {'key': 'autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped', 'type': 'bool'}, + 'enforce_identity_revalidation': {'key': 'enforceIdentityRevalidation', 'type': 'bool'}, + 'execution_order': {'key': 'executionOrder', 'type': 'object'}, + 'release_creator_can_be_approver': {'key': 'releaseCreatorCanBeApprover', 'type': 'bool'}, + 'required_approver_count': {'key': 'requiredApproverCount', 'type': 'int'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'} + } + + def __init__(self, auto_triggered_and_previous_environment_approved_can_be_skipped=None, enforce_identity_revalidation=None, execution_order=None, release_creator_can_be_approver=None, required_approver_count=None, timeout_in_minutes=None): + super(ApprovalOptions, self).__init__() + self.auto_triggered_and_previous_environment_approved_can_be_skipped = auto_triggered_and_previous_environment_approved_can_be_skipped + self.enforce_identity_revalidation = enforce_identity_revalidation + self.execution_order = execution_order + self.release_creator_can_be_approver = release_creator_can_be_approver + self.required_approver_count = required_approver_count + self.timeout_in_minutes = timeout_in_minutes diff --git a/vsts/vsts/release/v4_1/models/artifact.py b/vsts/vsts/release/v4_1/models/artifact.py new file mode 100644 index 00000000..4bdf46a5 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/artifact.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Artifact(Model): + """Artifact. + + :param alias: Gets or sets alias. + :type alias: str + :param definition_reference: Gets or sets definition reference. e.g. {"project":{"id":"fed755ea-49c5-4399-acea-fd5b5aa90a6c","name":"myProject"},"definition":{"id":"1","name":"mybuildDefinition"},"connection":{"id":"1","name":"myConnection"}} + :type definition_reference: dict + :param is_primary: Gets or sets as artifact is primary or not. + :type is_primary: bool + :param source_id: + :type source_id: str + :param type: Gets or sets type. It can have value as 'Build', 'Jenkins', 'GitHub', 'Nuget', 'Team Build (external)', 'ExternalTFSBuild', 'Git', 'TFVC', 'ExternalTfsXamlBuild'. + :type type: str + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'definition_reference': {'key': 'definitionReference', 'type': '{ArtifactSourceReference}'}, + 'is_primary': {'key': 'isPrimary', 'type': 'bool'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, alias=None, definition_reference=None, is_primary=None, source_id=None, type=None): + super(Artifact, self).__init__() + self.alias = alias + self.definition_reference = definition_reference + self.is_primary = is_primary + self.source_id = source_id + self.type = type diff --git a/vsts/vsts/release/v4_1/models/artifact_metadata.py b/vsts/vsts/release/v4_1/models/artifact_metadata.py new file mode 100644 index 00000000..1acf2b3e --- /dev/null +++ b/vsts/vsts/release/v4_1/models/artifact_metadata.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactMetadata(Model): + """ArtifactMetadata. + + :param alias: Sets alias of artifact. + :type alias: str + :param instance_reference: Sets instance reference of artifact. e.g. for build artifact it is build number. + :type instance_reference: :class:`BuildVersion ` + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'instance_reference': {'key': 'instanceReference', 'type': 'BuildVersion'} + } + + def __init__(self, alias=None, instance_reference=None): + super(ArtifactMetadata, self).__init__() + self.alias = alias + self.instance_reference = instance_reference diff --git a/vsts/vsts/release/v4_1/models/artifact_source_reference.py b/vsts/vsts/release/v4_1/models/artifact_source_reference.py new file mode 100644 index 00000000..7f1fefd8 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/artifact_source_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactSourceReference(Model): + """ArtifactSourceReference. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ArtifactSourceReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/release/v4_1/models/artifact_type_definition.py b/vsts/vsts/release/v4_1/models/artifact_type_definition.py new file mode 100644 index 00000000..c5afc1c1 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/artifact_type_definition.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactTypeDefinition(Model): + """ArtifactTypeDefinition. + + :param display_name: + :type display_name: str + :param endpoint_type_id: + :type endpoint_type_id: str + :param input_descriptors: + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: + :type name: str + :param unique_source_identifier: + :type unique_source_identifier: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_type_id': {'key': 'endpointTypeId', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'unique_source_identifier': {'key': 'uniqueSourceIdentifier', 'type': 'str'} + } + + def __init__(self, display_name=None, endpoint_type_id=None, input_descriptors=None, name=None, unique_source_identifier=None): + super(ArtifactTypeDefinition, self).__init__() + self.display_name = display_name + self.endpoint_type_id = endpoint_type_id + self.input_descriptors = input_descriptors + self.name = name + self.unique_source_identifier = unique_source_identifier diff --git a/vsts/vsts/release/v4_1/models/artifact_version.py b/vsts/vsts/release/v4_1/models/artifact_version.py new file mode 100644 index 00000000..463e08b4 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/artifact_version.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactVersion(Model): + """ArtifactVersion. + + :param alias: + :type alias: str + :param default_version: + :type default_version: :class:`BuildVersion ` + :param error_message: + :type error_message: str + :param source_id: + :type source_id: str + :param versions: + :type versions: list of :class:`BuildVersion ` + """ + + _attribute_map = { + 'alias': {'key': 'alias', 'type': 'str'}, + 'default_version': {'key': 'defaultVersion', 'type': 'BuildVersion'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'source_id': {'key': 'sourceId', 'type': 'str'}, + 'versions': {'key': 'versions', 'type': '[BuildVersion]'} + } + + def __init__(self, alias=None, default_version=None, error_message=None, source_id=None, versions=None): + super(ArtifactVersion, self).__init__() + self.alias = alias + self.default_version = default_version + self.error_message = error_message + self.source_id = source_id + self.versions = versions diff --git a/vsts/vsts/release/v4_1/models/artifact_version_query_result.py b/vsts/vsts/release/v4_1/models/artifact_version_query_result.py new file mode 100644 index 00000000..8be98135 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/artifact_version_query_result.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ArtifactVersionQueryResult(Model): + """ArtifactVersionQueryResult. + + :param artifact_versions: + :type artifact_versions: list of :class:`ArtifactVersion ` + """ + + _attribute_map = { + 'artifact_versions': {'key': 'artifactVersions', 'type': '[ArtifactVersion]'} + } + + def __init__(self, artifact_versions=None): + super(ArtifactVersionQueryResult, self).__init__() + self.artifact_versions = artifact_versions diff --git a/vsts/vsts/release/v4_1/models/authorization_header.py b/vsts/vsts/release/v4_1/models/authorization_header.py new file mode 100644 index 00000000..337b6013 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/authorization_header.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class AuthorizationHeader(BaseSecuredObject): + """AuthorizationHeader. + + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(AuthorizationHeader, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/release/v4_1/models/auto_trigger_issue.py b/vsts/vsts/release/v4_1/models/auto_trigger_issue.py new file mode 100644 index 00000000..d564858d --- /dev/null +++ b/vsts/vsts/release/v4_1/models/auto_trigger_issue.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AutoTriggerIssue(Model): + """AutoTriggerIssue. + + :param issue: + :type issue: :class:`Issue ` + :param issue_source: + :type issue_source: object + :param project: + :type project: :class:`ProjectReference ` + :param release_definition_reference: + :type release_definition_reference: :class:`ReleaseDefinitionShallowReference ` + :param release_trigger_type: + :type release_trigger_type: object + """ + + _attribute_map = { + 'issue': {'key': 'issue', 'type': 'Issue'}, + 'issue_source': {'key': 'issueSource', 'type': 'object'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'release_definition_reference': {'key': 'releaseDefinitionReference', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_trigger_type': {'key': 'releaseTriggerType', 'type': 'object'} + } + + def __init__(self, issue=None, issue_source=None, project=None, release_definition_reference=None, release_trigger_type=None): + super(AutoTriggerIssue, self).__init__() + self.issue = issue + self.issue_source = issue_source + self.project = project + self.release_definition_reference = release_definition_reference + self.release_trigger_type = release_trigger_type diff --git a/vsts/vsts/release/v4_1/models/build_version.py b/vsts/vsts/release/v4_1/models/build_version.py new file mode 100644 index 00000000..945389d1 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/build_version.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildVersion(Model): + """BuildVersion. + + :param commit_message: + :type commit_message: str + :param id: + :type id: str + :param name: + :type name: str + :param source_branch: + :type source_branch: str + :param source_pull_request_id: PullRequestId or Commit Id for the Pull Request for which the release will publish status + :type source_pull_request_id: str + :param source_repository_id: + :type source_repository_id: str + :param source_repository_type: + :type source_repository_type: str + :param source_version: + :type source_version: str + """ + + _attribute_map = { + 'commit_message': {'key': 'commitMessage', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'source_branch': {'key': 'sourceBranch', 'type': 'str'}, + 'source_pull_request_id': {'key': 'sourcePullRequestId', 'type': 'str'}, + 'source_repository_id': {'key': 'sourceRepositoryId', 'type': 'str'}, + 'source_repository_type': {'key': 'sourceRepositoryType', 'type': 'str'}, + 'source_version': {'key': 'sourceVersion', 'type': 'str'} + } + + def __init__(self, commit_message=None, id=None, name=None, source_branch=None, source_pull_request_id=None, source_repository_id=None, source_repository_type=None, source_version=None): + super(BuildVersion, self).__init__() + self.commit_message = commit_message + self.id = id + self.name = name + self.source_branch = source_branch + self.source_pull_request_id = source_pull_request_id + self.source_repository_id = source_repository_id + self.source_repository_type = source_repository_type + self.source_version = source_version diff --git a/vsts/vsts/release/v4_1/models/change.py b/vsts/vsts/release/v4_1/models/change.py new file mode 100644 index 00000000..fbe01e1b --- /dev/null +++ b/vsts/vsts/release/v4_1/models/change.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 Change(Model): + """Change. + + :param author: The author of the change. + :type author: :class:`IdentityRef ` + :param change_type: The type of change. "commit", "changeset", etc. + :type change_type: str + :param display_uri: The location of a user-friendly representation of the resource. + :type display_uri: str + :param id: Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. + :type id: str + :param location: The location of the full representation of the resource. + :type location: str + :param message: A description of the change. This might be a commit message or changeset description. + :type message: str + :param pusher: The person or process that pushed the change. + :type pusher: str + :param timestamp: A timestamp for the change. + :type timestamp: datetime + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'change_type': {'key': 'changeType', 'type': 'str'}, + 'display_uri': {'key': 'displayUri', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'pusher': {'key': 'pusher', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'} + } + + def __init__(self, author=None, change_type=None, display_uri=None, id=None, location=None, message=None, pusher=None, timestamp=None): + super(Change, self).__init__() + self.author = author + self.change_type = change_type + self.display_uri = display_uri + self.id = id + self.location = location + self.message = message + self.pusher = pusher + self.timestamp = timestamp diff --git a/vsts/vsts/release/v4_1/models/condition.py b/vsts/vsts/release/v4_1/models/condition.py new file mode 100644 index 00000000..93cc3057 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/condition.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 Condition(Model): + """Condition. + + :param condition_type: Gets or sets the condition type. + :type condition_type: object + :param name: Gets or sets the name of the condition. e.g. 'ReleaseStarted'. + :type name: str + :param value: Gets or set value of the condition. + :type value: str + """ + + _attribute_map = { + 'condition_type': {'key': 'conditionType', 'type': 'object'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, condition_type=None, name=None, value=None): + super(Condition, self).__init__() + self.condition_type = condition_type + self.name = name + self.value = value diff --git a/vsts/vsts/release/v4_1/models/configuration_variable_value.py b/vsts/vsts/release/v4_1/models/configuration_variable_value.py new file mode 100644 index 00000000..4db7217a --- /dev/null +++ b/vsts/vsts/release/v4_1/models/configuration_variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ConfigurationVariableValue(Model): + """ConfigurationVariableValue. + + :param is_secret: Gets or sets as variable is secret or not. + :type is_secret: bool + :param value: Gets or sets value of the configuration variable. + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(ConfigurationVariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/release/v4_1/models/data_source_binding_base.py b/vsts/vsts/release/v4_1/models/data_source_binding_base.py new file mode 100644 index 00000000..8d11fcdf --- /dev/null +++ b/vsts/vsts/release/v4_1/models/data_source_binding_base.py @@ -0,0 +1,52 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class DataSourceBindingBase(BaseSecuredObject): + """DataSourceBindingBase. + + :param data_source_name: Gets or sets the name of the data source. + :type data_source_name: str + :param endpoint_id: Gets or sets the endpoint Id. + :type endpoint_id: str + :param endpoint_url: Gets or sets the url of the service endpoint. + :type endpoint_url: str + :param headers: Gets or sets the authorization headers. + :type headers: list of :class:`AuthorizationHeader ` + :param parameters: Gets or sets the parameters for the data source. + :type parameters: dict + :param result_selector: Gets or sets the result selector. + :type result_selector: str + :param result_template: Gets or sets the result template. + :type result_template: str + :param target: Gets or sets the target of the data source. + :type target: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[AuthorizationHeader]'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, data_source_name=None, endpoint_id=None, endpoint_url=None, headers=None, parameters=None, result_selector=None, result_template=None, target=None): + super(DataSourceBindingBase, self).__init__() + self.data_source_name = data_source_name + self.endpoint_id = endpoint_id + self.endpoint_url = endpoint_url + self.headers = headers + self.parameters = parameters + self.result_selector = result_selector + self.result_template = result_template + self.target = target diff --git a/vsts/vsts/release/v4_1/models/definition_environment_reference.py b/vsts/vsts/release/v4_1/models/definition_environment_reference.py new file mode 100644 index 00000000..06c56140 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/definition_environment_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DefinitionEnvironmentReference(Model): + """DefinitionEnvironmentReference. + + :param definition_environment_id: + :type definition_environment_id: int + :param definition_environment_name: + :type definition_environment_name: str + :param release_definition_id: + :type release_definition_id: int + :param release_definition_name: + :type release_definition_name: str + """ + + _attribute_map = { + 'definition_environment_id': {'key': 'definitionEnvironmentId', 'type': 'int'}, + 'definition_environment_name': {'key': 'definitionEnvironmentName', 'type': 'str'}, + 'release_definition_id': {'key': 'releaseDefinitionId', 'type': 'int'}, + 'release_definition_name': {'key': 'releaseDefinitionName', 'type': 'str'} + } + + def __init__(self, definition_environment_id=None, definition_environment_name=None, release_definition_id=None, release_definition_name=None): + super(DefinitionEnvironmentReference, self).__init__() + self.definition_environment_id = definition_environment_id + self.definition_environment_name = definition_environment_name + self.release_definition_id = release_definition_id + self.release_definition_name = release_definition_name diff --git a/vsts/vsts/release/v4_1/models/deploy_phase.py b/vsts/vsts/release/v4_1/models/deploy_phase.py new file mode 100644 index 00000000..6f902806 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/deploy_phase.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeployPhase(Model): + """DeployPhase. + + :param name: + :type name: str + :param phase_type: + :type phase_type: object + :param rank: + :type rank: int + :param workflow_tasks: + :type workflow_tasks: list of :class:`WorkflowTask ` + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'phase_type': {'key': 'phaseType', 'type': 'object'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'workflow_tasks': {'key': 'workflowTasks', 'type': '[WorkflowTask]'} + } + + def __init__(self, name=None, phase_type=None, rank=None, workflow_tasks=None): + super(DeployPhase, self).__init__() + self.name = name + self.phase_type = phase_type + self.rank = rank + self.workflow_tasks = workflow_tasks diff --git a/vsts/vsts/release/v4_1/models/deployment.py b/vsts/vsts/release/v4_1/models/deployment.py new file mode 100644 index 00000000..8cb4a228 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/deployment.py @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------- +# 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 Deployment(Model): + """Deployment. + + :param _links: Gets links to access the deployment. + :type _links: :class:`ReferenceLinks ` + :param attempt: Gets attempt number. + :type attempt: int + :param completed_on: Gets the date on which deployment is complete. + :type completed_on: datetime + :param conditions: Gets the list of condition associated with deployment. + :type conditions: list of :class:`Condition ` + :param definition_environment_id: Gets release definition environment id. + :type definition_environment_id: int + :param deployment_status: Gets status of the deployment. + :type deployment_status: object + :param id: Gets the unique identifier for deployment. + :type id: int + :param last_modified_by: Gets the identity who last modified the deployment. + :type last_modified_by: :class:`IdentityRef ` + :param last_modified_on: Gets the date on which deployment is last modified. + :type last_modified_on: datetime + :param operation_status: Gets operation status of deployment. + :type operation_status: object + :param post_deploy_approvals: Gets list of PostDeployApprovals. + :type post_deploy_approvals: list of :class:`ReleaseApproval ` + :param pre_deploy_approvals: Gets list of PreDeployApprovals. + :type pre_deploy_approvals: list of :class:`ReleaseApproval ` + :param queued_on: Gets the date on which deployment is queued. + :type queued_on: datetime + :param reason: Gets reason of deployment. + :type reason: object + :param release: Gets the reference of release. + :type release: :class:`ReleaseReference ` + :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which the deployment is associated. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_environment: Gets releaseEnvironmentReference which specifies the reference of the release environment to which the deployment is associated. + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :param requested_by: Gets the identity who requested. + :type requested_by: :class:`IdentityRef ` + :param requested_for: Gets the identity for whom deployment is requested. + :type requested_for: :class:`IdentityRef ` + :param scheduled_deployment_time: Gets the date on which deployment is scheduled. + :type scheduled_deployment_time: datetime + :param started_on: Gets the date on which deployment is started. + :type started_on: datetime + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'completed_on': {'key': 'completedOn', 'type': 'iso-8601'}, + 'conditions': {'key': 'conditions', 'type': '[Condition]'}, + 'definition_environment_id': {'key': 'definitionEnvironmentId', 'type': 'int'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'last_modified_on': {'key': 'lastModifiedOn', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'post_deploy_approvals': {'key': 'postDeployApprovals', 'type': '[ReleaseApproval]'}, + 'pre_deploy_approvals': {'key': 'preDeployApprovals', 'type': '[ReleaseApproval]'}, + 'queued_on': {'key': 'queuedOn', 'type': 'iso-8601'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_environment': {'key': 'releaseEnvironment', 'type': 'ReleaseEnvironmentShallowReference'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'requested_for': {'key': 'requestedFor', 'type': 'IdentityRef'}, + 'scheduled_deployment_time': {'key': 'scheduledDeploymentTime', 'type': 'iso-8601'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'} + } + + def __init__(self, _links=None, attempt=None, completed_on=None, conditions=None, definition_environment_id=None, deployment_status=None, id=None, last_modified_by=None, last_modified_on=None, operation_status=None, post_deploy_approvals=None, pre_deploy_approvals=None, queued_on=None, reason=None, release=None, release_definition=None, release_environment=None, requested_by=None, requested_for=None, scheduled_deployment_time=None, started_on=None): + super(Deployment, self).__init__() + self._links = _links + self.attempt = attempt + self.completed_on = completed_on + self.conditions = conditions + self.definition_environment_id = definition_environment_id + self.deployment_status = deployment_status + self.id = id + self.last_modified_by = last_modified_by + self.last_modified_on = last_modified_on + self.operation_status = operation_status + self.post_deploy_approvals = post_deploy_approvals + self.pre_deploy_approvals = pre_deploy_approvals + self.queued_on = queued_on + self.reason = reason + self.release = release + self.release_definition = release_definition + self.release_environment = release_environment + self.requested_by = requested_by + self.requested_for = requested_for + self.scheduled_deployment_time = scheduled_deployment_time + self.started_on = started_on diff --git a/vsts/vsts/release/v4_1/models/deployment_attempt.py b/vsts/vsts/release/v4_1/models/deployment_attempt.py new file mode 100644 index 00000000..9f2bf5e1 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/deployment_attempt.py @@ -0,0 +1,101 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentAttempt(Model): + """DeploymentAttempt. + + :param attempt: + :type attempt: int + :param deployment_id: + :type deployment_id: int + :param error_log: Error log to show any unexpected error that occurred during executing deploy step + :type error_log: str + :param has_started: Specifies whether deployment has started or not + :type has_started: bool + :param id: + :type id: int + :param issues: All the issues related to the deployment + :type issues: list of :class:`Issue ` + :param job: + :type job: :class:`ReleaseTask ` + :param last_modified_by: + :type last_modified_by: :class:`IdentityRef ` + :param last_modified_on: + :type last_modified_on: datetime + :param operation_status: + :type operation_status: object + :param post_deployment_gates: + :type post_deployment_gates: :class:`ReleaseGates ` + :param pre_deployment_gates: + :type pre_deployment_gates: :class:`ReleaseGates ` + :param queued_on: + :type queued_on: datetime + :param reason: + :type reason: object + :param release_deploy_phases: + :type release_deploy_phases: list of :class:`ReleaseDeployPhase ` + :param requested_by: + :type requested_by: :class:`IdentityRef ` + :param requested_for: + :type requested_for: :class:`IdentityRef ` + :param run_plan_id: + :type run_plan_id: str + :param status: + :type status: object + :param tasks: + :type tasks: list of :class:`ReleaseTask ` + """ + + _attribute_map = { + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'deployment_id': {'key': 'deploymentId', 'type': 'int'}, + 'error_log': {'key': 'errorLog', 'type': 'str'}, + 'has_started': {'key': 'hasStarted', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'issues': {'key': 'issues', 'type': '[Issue]'}, + 'job': {'key': 'job', 'type': 'ReleaseTask'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'last_modified_on': {'key': 'lastModifiedOn', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'post_deployment_gates': {'key': 'postDeploymentGates', 'type': 'ReleaseGates'}, + 'pre_deployment_gates': {'key': 'preDeploymentGates', 'type': 'ReleaseGates'}, + 'queued_on': {'key': 'queuedOn', 'type': 'iso-8601'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release_deploy_phases': {'key': 'releaseDeployPhases', 'type': '[ReleaseDeployPhase]'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'requested_for': {'key': 'requestedFor', 'type': 'IdentityRef'}, + 'run_plan_id': {'key': 'runPlanId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'tasks': {'key': 'tasks', 'type': '[ReleaseTask]'} + } + + def __init__(self, attempt=None, deployment_id=None, error_log=None, has_started=None, id=None, issues=None, job=None, last_modified_by=None, last_modified_on=None, operation_status=None, post_deployment_gates=None, pre_deployment_gates=None, queued_on=None, reason=None, release_deploy_phases=None, requested_by=None, requested_for=None, run_plan_id=None, status=None, tasks=None): + super(DeploymentAttempt, self).__init__() + self.attempt = attempt + self.deployment_id = deployment_id + self.error_log = error_log + self.has_started = has_started + self.id = id + self.issues = issues + self.job = job + self.last_modified_by = last_modified_by + self.last_modified_on = last_modified_on + self.operation_status = operation_status + self.post_deployment_gates = post_deployment_gates + self.pre_deployment_gates = pre_deployment_gates + self.queued_on = queued_on + self.reason = reason + self.release_deploy_phases = release_deploy_phases + self.requested_by = requested_by + self.requested_for = requested_for + self.run_plan_id = run_plan_id + self.status = status + self.tasks = tasks diff --git a/vsts/vsts/release/v4_1/models/deployment_job.py b/vsts/vsts/release/v4_1/models/deployment_job.py new file mode 100644 index 00000000..8bd40749 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/deployment_job.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentJob(Model): + """DeploymentJob. + + :param job: + :type job: :class:`ReleaseTask ` + :param tasks: + :type tasks: list of :class:`ReleaseTask ` + """ + + _attribute_map = { + 'job': {'key': 'job', 'type': 'ReleaseTask'}, + 'tasks': {'key': 'tasks', 'type': '[ReleaseTask]'} + } + + def __init__(self, job=None, tasks=None): + super(DeploymentJob, self).__init__() + self.job = job + self.tasks = tasks diff --git a/vsts/vsts/release/v4_1/models/deployment_query_parameters.py b/vsts/vsts/release/v4_1/models/deployment_query_parameters.py new file mode 100644 index 00000000..bc54c0ec --- /dev/null +++ b/vsts/vsts/release/v4_1/models/deployment_query_parameters.py @@ -0,0 +1,85 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentQueryParameters(Model): + """DeploymentQueryParameters. + + :param artifact_source_id: + :type artifact_source_id: str + :param artifact_type_id: + :type artifact_type_id: str + :param artifact_versions: + :type artifact_versions: list of str + :param deployments_per_environment: + :type deployments_per_environment: int + :param deployment_status: + :type deployment_status: object + :param environments: + :type environments: list of :class:`DefinitionEnvironmentReference ` + :param expands: + :type expands: object + :param is_deleted: + :type is_deleted: bool + :param latest_deployments_only: + :type latest_deployments_only: bool + :param max_deployments_per_environment: + :type max_deployments_per_environment: int + :param max_modified_time: + :type max_modified_time: datetime + :param min_modified_time: + :type min_modified_time: datetime + :param operation_status: + :type operation_status: object + :param query_order: + :type query_order: object + :param query_type: + :type query_type: object + :param source_branch: + :type source_branch: str + """ + + _attribute_map = { + 'artifact_source_id': {'key': 'artifactSourceId', 'type': 'str'}, + 'artifact_type_id': {'key': 'artifactTypeId', 'type': 'str'}, + 'artifact_versions': {'key': 'artifactVersions', 'type': '[str]'}, + 'deployments_per_environment': {'key': 'deploymentsPerEnvironment', 'type': 'int'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'object'}, + 'environments': {'key': 'environments', 'type': '[DefinitionEnvironmentReference]'}, + 'expands': {'key': 'expands', 'type': 'object'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'latest_deployments_only': {'key': 'latestDeploymentsOnly', 'type': 'bool'}, + 'max_deployments_per_environment': {'key': 'maxDeploymentsPerEnvironment', 'type': 'int'}, + 'max_modified_time': {'key': 'maxModifiedTime', 'type': 'iso-8601'}, + 'min_modified_time': {'key': 'minModifiedTime', 'type': 'iso-8601'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'query_order': {'key': 'queryOrder', 'type': 'object'}, + 'query_type': {'key': 'queryType', 'type': 'object'}, + 'source_branch': {'key': 'sourceBranch', 'type': 'str'} + } + + def __init__(self, artifact_source_id=None, artifact_type_id=None, artifact_versions=None, deployments_per_environment=None, deployment_status=None, environments=None, expands=None, is_deleted=None, latest_deployments_only=None, max_deployments_per_environment=None, max_modified_time=None, min_modified_time=None, operation_status=None, query_order=None, query_type=None, source_branch=None): + super(DeploymentQueryParameters, self).__init__() + self.artifact_source_id = artifact_source_id + self.artifact_type_id = artifact_type_id + self.artifact_versions = artifact_versions + self.deployments_per_environment = deployments_per_environment + self.deployment_status = deployment_status + self.environments = environments + self.expands = expands + self.is_deleted = is_deleted + self.latest_deployments_only = latest_deployments_only + self.max_deployments_per_environment = max_deployments_per_environment + self.max_modified_time = max_modified_time + self.min_modified_time = min_modified_time + self.operation_status = operation_status + self.query_order = query_order + self.query_type = query_type + self.source_branch = source_branch diff --git a/vsts/vsts/release/v4_1/models/email_recipients.py b/vsts/vsts/release/v4_1/models/email_recipients.py new file mode 100644 index 00000000..349b8915 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/email_recipients.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EmailRecipients(Model): + """EmailRecipients. + + :param email_addresses: + :type email_addresses: list of str + :param tfs_ids: + :type tfs_ids: list of str + """ + + _attribute_map = { + 'email_addresses': {'key': 'emailAddresses', 'type': '[str]'}, + 'tfs_ids': {'key': 'tfsIds', 'type': '[str]'} + } + + def __init__(self, email_addresses=None, tfs_ids=None): + super(EmailRecipients, self).__init__() + self.email_addresses = email_addresses + self.tfs_ids = tfs_ids diff --git a/vsts/vsts/release/v4_1/models/environment_execution_policy.py b/vsts/vsts/release/v4_1/models/environment_execution_policy.py new file mode 100644 index 00000000..5085c836 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/environment_execution_policy.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EnvironmentExecutionPolicy(Model): + """EnvironmentExecutionPolicy. + + :param concurrency_count: This policy decides, how many environments would be with Environment Runner. + :type concurrency_count: int + :param queue_depth_count: Queue depth in the EnvironmentQueue table, this table keeps the environment entries till Environment Runner is free [as per it's policy] to take another environment for running. + :type queue_depth_count: int + """ + + _attribute_map = { + 'concurrency_count': {'key': 'concurrencyCount', 'type': 'int'}, + 'queue_depth_count': {'key': 'queueDepthCount', 'type': 'int'} + } + + def __init__(self, concurrency_count=None, queue_depth_count=None): + super(EnvironmentExecutionPolicy, self).__init__() + self.concurrency_count = concurrency_count + self.queue_depth_count = queue_depth_count diff --git a/vsts/vsts/release/v4_1/models/environment_options.py b/vsts/vsts/release/v4_1/models/environment_options.py new file mode 100644 index 00000000..497bf25d --- /dev/null +++ b/vsts/vsts/release/v4_1/models/environment_options.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 EnvironmentOptions(Model): + """EnvironmentOptions. + + :param auto_link_work_items: + :type auto_link_work_items: bool + :param badge_enabled: + :type badge_enabled: bool + :param email_notification_type: + :type email_notification_type: str + :param email_recipients: + :type email_recipients: str + :param enable_access_token: + :type enable_access_token: bool + :param publish_deployment_status: + :type publish_deployment_status: bool + :param skip_artifacts_download: + :type skip_artifacts_download: bool + :param timeout_in_minutes: + :type timeout_in_minutes: int + """ + + _attribute_map = { + 'auto_link_work_items': {'key': 'autoLinkWorkItems', 'type': 'bool'}, + 'badge_enabled': {'key': 'badgeEnabled', 'type': 'bool'}, + 'email_notification_type': {'key': 'emailNotificationType', 'type': 'str'}, + 'email_recipients': {'key': 'emailRecipients', 'type': 'str'}, + 'enable_access_token': {'key': 'enableAccessToken', 'type': 'bool'}, + 'publish_deployment_status': {'key': 'publishDeploymentStatus', 'type': 'bool'}, + 'skip_artifacts_download': {'key': 'skipArtifactsDownload', 'type': 'bool'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'} + } + + def __init__(self, auto_link_work_items=None, badge_enabled=None, email_notification_type=None, email_recipients=None, enable_access_token=None, publish_deployment_status=None, skip_artifacts_download=None, timeout_in_minutes=None): + super(EnvironmentOptions, self).__init__() + self.auto_link_work_items = auto_link_work_items + self.badge_enabled = badge_enabled + self.email_notification_type = email_notification_type + self.email_recipients = email_recipients + self.enable_access_token = enable_access_token + self.publish_deployment_status = publish_deployment_status + self.skip_artifacts_download = skip_artifacts_download + self.timeout_in_minutes = timeout_in_minutes diff --git a/vsts/vsts/release/v4_1/models/environment_retention_policy.py b/vsts/vsts/release/v4_1/models/environment_retention_policy.py new file mode 100644 index 00000000..a391f806 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/environment_retention_policy.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 EnvironmentRetentionPolicy(Model): + """EnvironmentRetentionPolicy. + + :param days_to_keep: + :type days_to_keep: int + :param releases_to_keep: + :type releases_to_keep: int + :param retain_build: + :type retain_build: bool + """ + + _attribute_map = { + 'days_to_keep': {'key': 'daysToKeep', 'type': 'int'}, + 'releases_to_keep': {'key': 'releasesToKeep', 'type': 'int'}, + 'retain_build': {'key': 'retainBuild', 'type': 'bool'} + } + + def __init__(self, days_to_keep=None, releases_to_keep=None, retain_build=None): + super(EnvironmentRetentionPolicy, self).__init__() + self.days_to_keep = days_to_keep + self.releases_to_keep = releases_to_keep + self.retain_build = retain_build diff --git a/vsts/vsts/release/v4_1/models/favorite_item.py b/vsts/vsts/release/v4_1/models/favorite_item.py new file mode 100644 index 00000000..94bdd0be --- /dev/null +++ b/vsts/vsts/release/v4_1/models/favorite_item.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 FavoriteItem(Model): + """FavoriteItem. + + :param data: Application specific data for the entry + :type data: str + :param id: Unique Id of the the entry + :type id: str + :param name: Display text for favorite entry + :type name: str + :param type: Application specific favorite entry type. Empty or Null represents that Favorite item is a Folder + :type type: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, data=None, id=None, name=None, type=None): + super(FavoriteItem, self).__init__() + self.data = data + self.id = id + self.name = name + self.type = type diff --git a/vsts/vsts/release/v4_1/models/folder.py b/vsts/vsts/release/v4_1/models/folder.py new file mode 100644 index 00000000..46d77b5f --- /dev/null +++ b/vsts/vsts/release/v4_1/models/folder.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 Folder(Model): + """Folder. + + :param created_by: + :type created_by: :class:`IdentityRef ` + :param created_on: + :type created_on: datetime + :param description: + :type description: str + :param last_changed_by: + :type last_changed_by: :class:`IdentityRef ` + :param last_changed_date: + :type last_changed_date: datetime + :param path: + :type path: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'last_changed_by': {'key': 'lastChangedBy', 'type': 'IdentityRef'}, + 'last_changed_date': {'key': 'lastChangedDate', 'type': 'iso-8601'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, created_by=None, created_on=None, description=None, last_changed_by=None, last_changed_date=None, path=None): + super(Folder, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.description = description + self.last_changed_by = last_changed_by + self.last_changed_date = last_changed_date + self.path = path diff --git a/vsts/vsts/release/v4_1/models/identity_ref.py b/vsts/vsts/release/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/release/v4_1/models/input_descriptor.py b/vsts/vsts/release/v4_1/models/input_descriptor.py new file mode 100644 index 00000000..da334836 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/input_descriptor.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputDescriptor(Model): + """InputDescriptor. + + :param dependency_input_ids: The ids of all inputs that the value of this input is dependent on. + :type dependency_input_ids: list of str + :param description: Description of what this input is used for + :type description: str + :param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + :type group_name: str + :param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + :type has_dynamic_value_information: bool + :param id: Identifier for the subscription input + :type id: str + :param input_mode: Mode in which the value of this input should be entered + :type input_mode: object + :param is_confidential: Gets whether this input is confidential, such as for a password or application key + :type is_confidential: bool + :param name: Localized name which can be shown as a label for the subscription input + :type name: str + :param properties: Custom properties for the input which can be used by the service provider + :type properties: dict + :param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. + :type type: str + :param use_in_default_description: Gets whether this input is included in the default generated action description. + :type use_in_default_description: bool + :param validation: Information to use to validate this input's value + :type validation: :class:`InputValidation ` + :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. + :type value_hint: str + :param values: Information about possible values for this input + :type values: :class:`InputValues ` + """ + + _attribute_map = { + 'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_mode': {'key': 'inputMode', 'type': 'object'}, + 'is_confidential': {'key': 'isConfidential', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'}, + 'validation': {'key': 'validation', 'type': 'InputValidation'}, + 'value_hint': {'key': 'valueHint', 'type': 'str'}, + 'values': {'key': 'values', 'type': 'InputValues'} + } + + def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None): + super(InputDescriptor, self).__init__() + self.dependency_input_ids = dependency_input_ids + self.description = description + self.group_name = group_name + self.has_dynamic_value_information = has_dynamic_value_information + self.id = id + self.input_mode = input_mode + self.is_confidential = is_confidential + self.name = name + self.properties = properties + self.type = type + self.use_in_default_description = use_in_default_description + self.validation = validation + self.value_hint = value_hint + self.values = values diff --git a/vsts/vsts/release/v4_1/models/input_validation.py b/vsts/vsts/release/v4_1/models/input_validation.py new file mode 100644 index 00000000..f2f1a434 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/input_validation.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidation(Model): + """InputValidation. + + :param data_type: + :type data_type: object + :param is_required: + :type is_required: bool + :param max_length: + :type max_length: int + :param max_value: + :type max_value: decimal + :param min_length: + :type min_length: int + :param min_value: + :type min_value: decimal + :param pattern: + :type pattern: str + :param pattern_mismatch_error_message: + :type pattern_mismatch_error_message: str + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'object'}, + 'is_required': {'key': 'isRequired', 'type': 'bool'}, + 'max_length': {'key': 'maxLength', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'decimal'}, + 'min_length': {'key': 'minLength', 'type': 'int'}, + 'min_value': {'key': 'minValue', 'type': 'decimal'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'} + } + + def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None): + super(InputValidation, self).__init__() + self.data_type = data_type + self.is_required = is_required + self.max_length = max_length + self.max_value = max_value + self.min_length = min_length + self.min_value = min_value + self.pattern = pattern + self.pattern_mismatch_error_message = pattern_mismatch_error_message diff --git a/vsts/vsts/release/v4_1/models/input_value.py b/vsts/vsts/release/v4_1/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/release/v4_1/models/input_values.py b/vsts/vsts/release/v4_1/models/input_values.py new file mode 100644 index 00000000..69472f8d --- /dev/null +++ b/vsts/vsts/release/v4_1/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/release/v4_1/models/input_values_error.py b/vsts/vsts/release/v4_1/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/release/v4_1/models/input_values_query.py b/vsts/vsts/release/v4_1/models/input_values_query.py new file mode 100644 index 00000000..97687a61 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/input_values_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesQuery(Model): + """InputValuesQuery. + + :param current_values: + :type current_values: dict + :param input_values: The input values to return on input, and the result from the consumer on output. + :type input_values: list of :class:`InputValues ` + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, + 'resource': {'key': 'resource', 'type': 'object'} + } + + def __init__(self, current_values=None, input_values=None, resource=None): + super(InputValuesQuery, self).__init__() + self.current_values = current_values + self.input_values = input_values + self.resource = resource diff --git a/vsts/vsts/release/v4_1/models/issue.py b/vsts/vsts/release/v4_1/models/issue.py new file mode 100644 index 00000000..0e31522e --- /dev/null +++ b/vsts/vsts/release/v4_1/models/issue.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Issue(Model): + """Issue. + + :param issue_type: + :type issue_type: str + :param message: + :type message: str + """ + + _attribute_map = { + 'issue_type': {'key': 'issueType', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, issue_type=None, message=None): + super(Issue, self).__init__() + self.issue_type = issue_type + self.message = message diff --git a/vsts/vsts/release/v4_1/models/mail_message.py b/vsts/vsts/release/v4_1/models/mail_message.py new file mode 100644 index 00000000..ada7b400 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/mail_message.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 MailMessage(Model): + """MailMessage. + + :param body: + :type body: str + :param cC: + :type cC: :class:`EmailRecipients ` + :param in_reply_to: + :type in_reply_to: str + :param message_id: + :type message_id: str + :param reply_by: + :type reply_by: datetime + :param reply_to: + :type reply_to: :class:`EmailRecipients ` + :param sections: + :type sections: list of MailSectionType + :param sender_type: + :type sender_type: object + :param subject: + :type subject: str + :param to: + :type to: :class:`EmailRecipients ` + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'cC': {'key': 'cC', 'type': 'EmailRecipients'}, + 'in_reply_to': {'key': 'inReplyTo', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'reply_by': {'key': 'replyBy', 'type': 'iso-8601'}, + 'reply_to': {'key': 'replyTo', 'type': 'EmailRecipients'}, + 'sections': {'key': 'sections', 'type': '[MailSectionType]'}, + 'sender_type': {'key': 'senderType', 'type': 'object'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'to': {'key': 'to', 'type': 'EmailRecipients'} + } + + def __init__(self, body=None, cC=None, in_reply_to=None, message_id=None, reply_by=None, reply_to=None, sections=None, sender_type=None, subject=None, to=None): + super(MailMessage, self).__init__() + self.body = body + self.cC = cC + self.in_reply_to = in_reply_to + self.message_id = message_id + self.reply_by = reply_by + self.reply_to = reply_to + self.sections = sections + self.sender_type = sender_type + self.subject = subject + self.to = to diff --git a/vsts/vsts/release/v4_1/models/manual_intervention.py b/vsts/vsts/release/v4_1/models/manual_intervention.py new file mode 100644 index 00000000..baaf0124 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/manual_intervention.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 ManualIntervention(Model): + """ManualIntervention. + + :param approver: Gets or sets the identity who should approve. + :type approver: :class:`IdentityRef ` + :param comments: Gets or sets comments for approval. + :type comments: str + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param id: Gets the unique identifier for manual intervention. + :type id: int + :param instructions: Gets or sets instructions for approval. + :type instructions: str + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets or sets the name. + :type name: str + :param release: Gets releaseReference for manual intervention. + :type release: :class:`ReleaseShallowReference ` + :param release_definition: Gets releaseDefinitionReference for manual intervention. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_environment: Gets releaseEnvironmentReference for manual intervention. + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :param status: Gets or sets the status of the manual intervention. + :type status: object + :param task_instance_id: Get task instance identifier. + :type task_instance_id: str + :param url: Gets url to access the manual intervention. + :type url: str + """ + + _attribute_map = { + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + 'instructions': {'key': 'instructions', 'type': 'str'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'release': {'key': 'release', 'type': 'ReleaseShallowReference'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_environment': {'key': 'releaseEnvironment', 'type': 'ReleaseEnvironmentShallowReference'}, + 'status': {'key': 'status', 'type': 'object'}, + 'task_instance_id': {'key': 'taskInstanceId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, approver=None, comments=None, created_on=None, id=None, instructions=None, modified_on=None, name=None, release=None, release_definition=None, release_environment=None, status=None, task_instance_id=None, url=None): + super(ManualIntervention, self).__init__() + self.approver = approver + self.comments = comments + self.created_on = created_on + self.id = id + self.instructions = instructions + self.modified_on = modified_on + self.name = name + self.release = release + self.release_definition = release_definition + self.release_environment = release_environment + self.status = status + self.task_instance_id = task_instance_id + self.url = url diff --git a/vsts/vsts/release/v4_1/models/manual_intervention_update_metadata.py b/vsts/vsts/release/v4_1/models/manual_intervention_update_metadata.py new file mode 100644 index 00000000..7e5f445f --- /dev/null +++ b/vsts/vsts/release/v4_1/models/manual_intervention_update_metadata.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ManualInterventionUpdateMetadata(Model): + """ManualInterventionUpdateMetadata. + + :param comment: Sets the comment for manual intervention update. + :type comment: str + :param status: Sets the status of the manual intervention. + :type status: object + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, comment=None, status=None): + super(ManualInterventionUpdateMetadata, self).__init__() + self.comment = comment + self.status = status diff --git a/vsts/vsts/release/v4_1/models/metric.py b/vsts/vsts/release/v4_1/models/metric.py new file mode 100644 index 00000000..bb95c93e --- /dev/null +++ b/vsts/vsts/release/v4_1/models/metric.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Metric(Model): + """Metric. + + :param name: + :type name: str + :param value: + :type value: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'int'} + } + + def __init__(self, name=None, value=None): + super(Metric, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/release/v4_1/models/process_parameters.py b/vsts/vsts/release/v4_1/models/process_parameters.py new file mode 100644 index 00000000..d87b7635 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/process_parameters.py @@ -0,0 +1,32 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class ProcessParameters(BaseSecuredObject): + """ProcessParameters. + + :param data_source_bindings: + :type data_source_bindings: list of :class:`DataSourceBindingBase ` + :param inputs: + :type inputs: list of :class:`TaskInputDefinitionBase ` + :param source_definitions: + :type source_definitions: list of :class:`TaskSourceDefinitionBase ` + """ + + _attribute_map = { + 'data_source_bindings': {'key': 'dataSourceBindings', 'type': '[DataSourceBindingBase]'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinitionBase]'}, + 'source_definitions': {'key': 'sourceDefinitions', 'type': '[TaskSourceDefinitionBase]'} + } + + def __init__(self, data_source_bindings=None, inputs=None, source_definitions=None): + super(ProcessParameters, self).__init__() + self.data_source_bindings = data_source_bindings + self.inputs = inputs + self.source_definitions = source_definitions diff --git a/vsts/vsts/release/v4_1/models/project_reference.py b/vsts/vsts/release/v4_1/models/project_reference.py new file mode 100644 index 00000000..fee185de --- /dev/null +++ b/vsts/vsts/release/v4_1/models/project_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectReference(Model): + """ProjectReference. + + :param id: Gets the unique identifier of this field. + :type id: str + :param name: Gets name of project. + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ProjectReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/release/v4_1/models/queued_release_data.py b/vsts/vsts/release/v4_1/models/queued_release_data.py new file mode 100644 index 00000000..892670ff --- /dev/null +++ b/vsts/vsts/release/v4_1/models/queued_release_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 QueuedReleaseData(Model): + """QueuedReleaseData. + + :param project_id: + :type project_id: str + :param queue_position: + :type queue_position: int + :param release_id: + :type release_id: int + """ + + _attribute_map = { + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'queue_position': {'key': 'queuePosition', 'type': 'int'}, + 'release_id': {'key': 'releaseId', 'type': 'int'} + } + + def __init__(self, project_id=None, queue_position=None, release_id=None): + super(QueuedReleaseData, self).__init__() + self.project_id = project_id + self.queue_position = queue_position + self.release_id = release_id diff --git a/vsts/vsts/release/v4_1/models/reference_links.py b/vsts/vsts/release/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/release/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/release/v4_1/models/release.py b/vsts/vsts/release/v4_1/models/release.py new file mode 100644 index 00000000..2776ad93 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release.py @@ -0,0 +1,125 @@ +# -------------------------------------------------------------------------------------------- +# 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 Release(Model): + """Release. + + :param _links: Gets links to access the release. + :type _links: :class:`ReferenceLinks ` + :param artifacts: Gets or sets the list of artifacts. + :type artifacts: list of :class:`Artifact ` + :param comment: Gets or sets comment. + :type comment: str + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param definition_snapshot_revision: Gets revision number of definition snapshot. + :type definition_snapshot_revision: int + :param description: Gets or sets description of release. + :type description: str + :param environments: Gets list of environments. + :type environments: list of :class:`ReleaseEnvironment ` + :param id: Gets the unique identifier of this field. + :type id: int + :param keep_forever: Whether to exclude the release from retention policies. + :type keep_forever: bool + :param logs_container_url: Gets logs container url. + :type logs_container_url: str + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets name. + :type name: str + :param pool_name: Gets pool name. + :type pool_name: str + :param project_reference: Gets or sets project reference. + :type project_reference: :class:`ProjectReference ` + :param properties: + :type properties: :class:`object ` + :param reason: Gets reason of release. + :type reason: object + :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this release is associated. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_name_format: Gets release name format. + :type release_name_format: str + :param status: Gets status. + :type status: object + :param tags: Gets or sets list of tags. + :type tags: list of str + :param triggering_artifact_alias: + :type triggering_artifact_alias: str + :param url: + :type url: str + :param variable_groups: Gets the list of variable groups. + :type variable_groups: list of :class:`VariableGroup ` + :param variables: Gets or sets the dictionary of variables. + :type variables: dict + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'definition_snapshot_revision': {'key': 'definitionSnapshotRevision', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environments': {'key': 'environments', 'type': '[ReleaseEnvironment]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'keep_forever': {'key': 'keepForever', 'type': 'bool'}, + 'logs_container_url': {'key': 'logsContainerUrl', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool_name': {'key': 'poolName', 'type': 'str'}, + 'project_reference': {'key': 'projectReference', 'type': 'ProjectReference'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_name_format': {'key': 'releaseNameFormat', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'triggering_artifact_alias': {'key': 'triggeringArtifactAlias', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'variable_groups': {'key': 'variableGroups', 'type': '[VariableGroup]'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'} + } + + def __init__(self, _links=None, artifacts=None, comment=None, created_by=None, created_on=None, definition_snapshot_revision=None, description=None, environments=None, id=None, keep_forever=None, logs_container_url=None, modified_by=None, modified_on=None, name=None, pool_name=None, project_reference=None, properties=None, reason=None, release_definition=None, release_name_format=None, status=None, tags=None, triggering_artifact_alias=None, url=None, variable_groups=None, variables=None): + super(Release, self).__init__() + self._links = _links + self.artifacts = artifacts + self.comment = comment + self.created_by = created_by + self.created_on = created_on + self.definition_snapshot_revision = definition_snapshot_revision + self.description = description + self.environments = environments + self.id = id + self.keep_forever = keep_forever + self.logs_container_url = logs_container_url + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.pool_name = pool_name + self.project_reference = project_reference + self.properties = properties + self.reason = reason + self.release_definition = release_definition + self.release_name_format = release_name_format + self.status = status + self.tags = tags + self.triggering_artifact_alias = triggering_artifact_alias + self.url = url + self.variable_groups = variable_groups + self.variables = variables diff --git a/vsts/vsts/release/v4_1/models/release_approval.py b/vsts/vsts/release/v4_1/models/release_approval.py new file mode 100644 index 00000000..b560b210 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_approval.py @@ -0,0 +1,97 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseApproval(Model): + """ReleaseApproval. + + :param approval_type: Gets or sets the type of approval. + :type approval_type: object + :param approved_by: Gets the identity who approved. + :type approved_by: :class:`IdentityRef ` + :param approver: Gets or sets the identity who should approve. + :type approver: :class:`IdentityRef ` + :param attempt: Gets or sets attempt which specifies as which deployment attempt it belongs. + :type attempt: int + :param comments: Gets or sets comments for approval. + :type comments: str + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param history: Gets history which specifies all approvals associated with this approval. + :type history: list of :class:`ReleaseApprovalHistory ` + :param id: Gets the unique identifier of this field. + :type id: int + :param is_automated: Gets or sets as approval is automated or not. + :type is_automated: bool + :param is_notification_on: + :type is_notification_on: bool + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param rank: Gets or sets rank which specifies the order of the approval. e.g. Same rank denotes parallel approval. + :type rank: int + :param release: Gets releaseReference which specifies the reference of the release to which this approval is associated. + :type release: :class:`ReleaseShallowReference ` + :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this approval is associated. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_environment: Gets releaseEnvironmentReference which specifies the reference of the release environment to which this approval is associated. + :type release_environment: :class:`ReleaseEnvironmentShallowReference ` + :param revision: Gets the revision number. + :type revision: int + :param status: Gets or sets the status of the approval. + :type status: object + :param trial_number: + :type trial_number: int + :param url: Gets url to access the approval. + :type url: str + """ + + _attribute_map = { + 'approval_type': {'key': 'approvalType', 'type': 'object'}, + 'approved_by': {'key': 'approvedBy', 'type': 'IdentityRef'}, + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'attempt': {'key': 'attempt', 'type': 'int'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'history': {'key': 'history', 'type': '[ReleaseApprovalHistory]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'is_automated': {'key': 'isAutomated', 'type': 'bool'}, + 'is_notification_on': {'key': 'isNotificationOn', 'type': 'bool'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'release': {'key': 'release', 'type': 'ReleaseShallowReference'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_environment': {'key': 'releaseEnvironment', 'type': 'ReleaseEnvironmentShallowReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'object'}, + 'trial_number': {'key': 'trialNumber', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, approval_type=None, approved_by=None, approver=None, attempt=None, comments=None, created_on=None, history=None, id=None, is_automated=None, is_notification_on=None, modified_on=None, rank=None, release=None, release_definition=None, release_environment=None, revision=None, status=None, trial_number=None, url=None): + super(ReleaseApproval, self).__init__() + self.approval_type = approval_type + self.approved_by = approved_by + self.approver = approver + self.attempt = attempt + self.comments = comments + self.created_on = created_on + self.history = history + self.id = id + self.is_automated = is_automated + self.is_notification_on = is_notification_on + self.modified_on = modified_on + self.rank = rank + self.release = release + self.release_definition = release_definition + self.release_environment = release_environment + self.revision = revision + self.status = status + self.trial_number = trial_number + self.url = url diff --git a/vsts/vsts/release/v4_1/models/release_approval_history.py b/vsts/vsts/release/v4_1/models/release_approval_history.py new file mode 100644 index 00000000..80e2b748 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_approval_history.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseApprovalHistory(Model): + """ReleaseApprovalHistory. + + :param approver: + :type approver: :class:`IdentityRef ` + :param changed_by: + :type changed_by: :class:`IdentityRef ` + :param comments: + :type comments: str + :param created_on: + :type created_on: datetime + :param modified_on: + :type modified_on: datetime + :param revision: + :type revision: int + """ + + _attribute_map = { + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'comments': {'key': 'comments', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, approver=None, changed_by=None, comments=None, created_on=None, modified_on=None, revision=None): + super(ReleaseApprovalHistory, self).__init__() + self.approver = approver + self.changed_by = changed_by + self.comments = comments + self.created_on = created_on + self.modified_on = modified_on + self.revision = revision diff --git a/vsts/vsts/release/v4_1/models/release_condition.py b/vsts/vsts/release/v4_1/models/release_condition.py new file mode 100644 index 00000000..899e6493 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_condition.py @@ -0,0 +1,34 @@ +# -------------------------------------------------------------------------------------------- +# 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 .condition import Condition + + +class ReleaseCondition(Condition): + """ReleaseCondition. + + :param condition_type: Gets or sets the condition type. + :type condition_type: object + :param name: Gets or sets the name of the condition. e.g. 'ReleaseStarted'. + :type name: str + :param value: Gets or set value of the condition. + :type value: str + :param result: + :type result: bool + """ + + _attribute_map = { + 'condition_type': {'key': 'conditionType', 'type': 'object'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'bool'} + } + + def __init__(self, condition_type=None, name=None, value=None, result=None): + super(ReleaseCondition, self).__init__(condition_type=condition_type, name=name, value=value) + self.result = result diff --git a/vsts/vsts/release/v4_1/models/release_definition.py b/vsts/vsts/release/v4_1/models/release_definition.py new file mode 100644 index 00000000..47346209 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition.py @@ -0,0 +1,121 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinition(Model): + """ReleaseDefinition. + + :param _links: Gets links to access the release definition. + :type _links: :class:`ReferenceLinks ` + :param artifacts: Gets or sets the list of artifacts. + :type artifacts: list of :class:`Artifact ` + :param comment: Gets or sets comment. + :type comment: str + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param description: Gets or sets the description. + :type description: str + :param environments: Gets or sets the list of environments. + :type environments: list of :class:`ReleaseDefinitionEnvironment ` + :param id: Gets the unique identifier of this field. + :type id: int + :param is_deleted: Whether release definition is deleted. + :type is_deleted: bool + :param last_release: Gets the reference of last release. + :type last_release: :class:`ReleaseReference ` + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets or sets the name. + :type name: str + :param path: Gets or sets the path. + :type path: str + :param pipeline_process: Gets or sets pipeline process. + :type pipeline_process: :class:`PipelineProcess ` + :param properties: Gets or sets properties. + :type properties: :class:`object ` + :param release_name_format: Gets or sets the release name format. + :type release_name_format: str + :param retention_policy: + :type retention_policy: :class:`RetentionPolicy ` + :param revision: Gets the revision number. + :type revision: int + :param source: Gets or sets source of release definition. + :type source: object + :param tags: Gets or sets list of tags. + :type tags: list of str + :param triggers: Gets or sets the list of triggers. + :type triggers: list of :class:`ReleaseTriggerBase ` + :param url: Gets url to access the release definition. + :type url: str + :param variable_groups: Gets or sets the list of variable groups. + :type variable_groups: list of int + :param variables: Gets or sets the dictionary of variables. + :type variables: dict + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environments': {'key': 'environments', 'type': '[ReleaseDefinitionEnvironment]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'last_release': {'key': 'lastRelease', 'type': 'ReleaseReference'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'pipeline_process': {'key': 'pipelineProcess', 'type': 'PipelineProcess'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'release_name_format': {'key': 'releaseNameFormat', 'type': 'str'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'object'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'triggers': {'key': 'triggers', 'type': '[ReleaseTriggerBase]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'variable_groups': {'key': 'variableGroups', 'type': '[int]'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'} + } + + def __init__(self, _links=None, artifacts=None, comment=None, created_by=None, created_on=None, description=None, environments=None, id=None, is_deleted=None, last_release=None, modified_by=None, modified_on=None, name=None, path=None, pipeline_process=None, properties=None, release_name_format=None, retention_policy=None, revision=None, source=None, tags=None, triggers=None, url=None, variable_groups=None, variables=None): + super(ReleaseDefinition, self).__init__() + self._links = _links + self.artifacts = artifacts + self.comment = comment + self.created_by = created_by + self.created_on = created_on + self.description = description + self.environments = environments + self.id = id + self.is_deleted = is_deleted + self.last_release = last_release + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.path = path + self.pipeline_process = pipeline_process + self.properties = properties + self.release_name_format = release_name_format + self.retention_policy = retention_policy + self.revision = revision + self.source = source + self.tags = tags + self.triggers = triggers + self.url = url + self.variable_groups = variable_groups + self.variables = variables diff --git a/vsts/vsts/release/v4_1/models/release_definition_approval_step.py b/vsts/vsts/release/v4_1/models/release_definition_approval_step.py new file mode 100644 index 00000000..11401a39 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_approval_step.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------------------------- +# 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 .release_definition_environment_step import ReleaseDefinitionEnvironmentStep + + +class ReleaseDefinitionApprovalStep(ReleaseDefinitionEnvironmentStep): + """ReleaseDefinitionApprovalStep. + + :param id: + :type id: int + :param approver: + :type approver: :class:`IdentityRef ` + :param is_automated: + :type is_automated: bool + :param is_notification_on: + :type is_notification_on: bool + :param rank: + :type rank: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'approver': {'key': 'approver', 'type': 'IdentityRef'}, + 'is_automated': {'key': 'isAutomated', 'type': 'bool'}, + 'is_notification_on': {'key': 'isNotificationOn', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'} + } + + def __init__(self, id=None, approver=None, is_automated=None, is_notification_on=None, rank=None): + super(ReleaseDefinitionApprovalStep, self).__init__(id=id) + self.approver = approver + self.is_automated = is_automated + self.is_notification_on = is_notification_on + self.rank = rank diff --git a/vsts/vsts/release/v4_1/models/release_definition_approvals.py b/vsts/vsts/release/v4_1/models/release_definition_approvals.py new file mode 100644 index 00000000..507ae5d0 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_approvals.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionApprovals(Model): + """ReleaseDefinitionApprovals. + + :param approval_options: + :type approval_options: :class:`ApprovalOptions ` + :param approvals: + :type approvals: list of :class:`ReleaseDefinitionApprovalStep ` + """ + + _attribute_map = { + 'approval_options': {'key': 'approvalOptions', 'type': 'ApprovalOptions'}, + 'approvals': {'key': 'approvals', 'type': '[ReleaseDefinitionApprovalStep]'} + } + + def __init__(self, approval_options=None, approvals=None): + super(ReleaseDefinitionApprovals, self).__init__() + self.approval_options = approval_options + self.approvals = approvals diff --git a/vsts/vsts/release/v4_1/models/release_definition_deploy_step.py b/vsts/vsts/release/v4_1/models/release_definition_deploy_step.py new file mode 100644 index 00000000..90beaa78 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_deploy_step.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# 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 .release_definition_environment_step import ReleaseDefinitionEnvironmentStep + + +class ReleaseDefinitionDeployStep(ReleaseDefinitionEnvironmentStep): + """ReleaseDefinitionDeployStep. + + :param id: + :type id: int + :param tasks: The list of steps for this definition. + :type tasks: list of :class:`WorkflowTask ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'tasks': {'key': 'tasks', 'type': '[WorkflowTask]'} + } + + def __init__(self, id=None, tasks=None): + super(ReleaseDefinitionDeployStep, self).__init__(id=id) + self.tasks = tasks diff --git a/vsts/vsts/release/v4_1/models/release_definition_environment.py b/vsts/vsts/release/v4_1/models/release_definition_environment.py new file mode 100644 index 00000000..1fe164f6 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_environment.py @@ -0,0 +1,113 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironment(Model): + """ReleaseDefinitionEnvironment. + + :param badge_url: + :type badge_url: str + :param conditions: + :type conditions: list of :class:`Condition ` + :param demands: + :type demands: list of :class:`object ` + :param deploy_phases: + :type deploy_phases: list of :class:`DeployPhase ` + :param deploy_step: + :type deploy_step: :class:`ReleaseDefinitionDeployStep ` + :param environment_options: + :type environment_options: :class:`EnvironmentOptions ` + :param execution_policy: + :type execution_policy: :class:`EnvironmentExecutionPolicy ` + :param id: + :type id: int + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param post_deploy_approvals: + :type post_deploy_approvals: :class:`ReleaseDefinitionApprovals ` + :param post_deployment_gates: + :type post_deployment_gates: :class:`ReleaseDefinitionGatesStep ` + :param pre_deploy_approvals: + :type pre_deploy_approvals: :class:`ReleaseDefinitionApprovals ` + :param pre_deployment_gates: + :type pre_deployment_gates: :class:`ReleaseDefinitionGatesStep ` + :param process_parameters: + :type process_parameters: :class:`ProcessParameters ` + :param properties: + :type properties: :class:`object ` + :param queue_id: + :type queue_id: int + :param rank: + :type rank: int + :param retention_policy: + :type retention_policy: :class:`EnvironmentRetentionPolicy ` + :param run_options: + :type run_options: dict + :param schedules: + :type schedules: list of :class:`ReleaseSchedule ` + :param variable_groups: + :type variable_groups: list of int + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'badge_url': {'key': 'badgeUrl', 'type': 'str'}, + 'conditions': {'key': 'conditions', 'type': '[Condition]'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deploy_phases': {'key': 'deployPhases', 'type': '[DeployPhase]'}, + 'deploy_step': {'key': 'deployStep', 'type': 'ReleaseDefinitionDeployStep'}, + 'environment_options': {'key': 'environmentOptions', 'type': 'EnvironmentOptions'}, + 'execution_policy': {'key': 'executionPolicy', 'type': 'EnvironmentExecutionPolicy'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'post_deploy_approvals': {'key': 'postDeployApprovals', 'type': 'ReleaseDefinitionApprovals'}, + 'post_deployment_gates': {'key': 'postDeploymentGates', 'type': 'ReleaseDefinitionGatesStep'}, + 'pre_deploy_approvals': {'key': 'preDeployApprovals', 'type': 'ReleaseDefinitionApprovals'}, + 'pre_deployment_gates': {'key': 'preDeploymentGates', 'type': 'ReleaseDefinitionGatesStep'}, + 'process_parameters': {'key': 'processParameters', 'type': 'ProcessParameters'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'queue_id': {'key': 'queueId', 'type': 'int'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'EnvironmentRetentionPolicy'}, + 'run_options': {'key': 'runOptions', 'type': '{str}'}, + 'schedules': {'key': 'schedules', 'type': '[ReleaseSchedule]'}, + 'variable_groups': {'key': 'variableGroups', 'type': '[int]'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'} + } + + def __init__(self, badge_url=None, conditions=None, demands=None, deploy_phases=None, deploy_step=None, environment_options=None, execution_policy=None, id=None, name=None, owner=None, post_deploy_approvals=None, post_deployment_gates=None, pre_deploy_approvals=None, pre_deployment_gates=None, process_parameters=None, properties=None, queue_id=None, rank=None, retention_policy=None, run_options=None, schedules=None, variable_groups=None, variables=None): + super(ReleaseDefinitionEnvironment, self).__init__() + self.badge_url = badge_url + self.conditions = conditions + self.demands = demands + self.deploy_phases = deploy_phases + self.deploy_step = deploy_step + self.environment_options = environment_options + self.execution_policy = execution_policy + self.id = id + self.name = name + self.owner = owner + self.post_deploy_approvals = post_deploy_approvals + self.post_deployment_gates = post_deployment_gates + self.pre_deploy_approvals = pre_deploy_approvals + self.pre_deployment_gates = pre_deployment_gates + self.process_parameters = process_parameters + self.properties = properties + self.queue_id = queue_id + self.rank = rank + self.retention_policy = retention_policy + self.run_options = run_options + self.schedules = schedules + self.variable_groups = variable_groups + self.variables = variables diff --git a/vsts/vsts/release/v4_1/models/release_definition_environment_step.py b/vsts/vsts/release/v4_1/models/release_definition_environment_step.py new file mode 100644 index 00000000..f013f154 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_environment_step.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironmentStep(Model): + """ReleaseDefinitionEnvironmentStep. + + :param id: + :type id: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'} + } + + def __init__(self, id=None): + super(ReleaseDefinitionEnvironmentStep, self).__init__() + self.id = id diff --git a/vsts/vsts/release/v4_1/models/release_definition_environment_summary.py b/vsts/vsts/release/v4_1/models/release_definition_environment_summary.py new file mode 100644 index 00000000..9d54e386 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_environment_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironmentSummary(Model): + """ReleaseDefinitionEnvironmentSummary. + + :param id: + :type id: int + :param last_releases: + :type last_releases: list of :class:`ReleaseShallowReference ` + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'last_releases': {'key': 'lastReleases', 'type': '[ReleaseShallowReference]'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, last_releases=None, name=None): + super(ReleaseDefinitionEnvironmentSummary, self).__init__() + self.id = id + self.last_releases = last_releases + self.name = name diff --git a/vsts/vsts/release/v4_1/models/release_definition_environment_template.py b/vsts/vsts/release/v4_1/models/release_definition_environment_template.py new file mode 100644 index 00000000..2ed07976 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_environment_template.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionEnvironmentTemplate(Model): + """ReleaseDefinitionEnvironmentTemplate. + + :param can_delete: + :type can_delete: bool + :param category: + :type category: str + :param description: + :type description: str + :param environment: + :type environment: :class:`ReleaseDefinitionEnvironment ` + :param icon_task_id: + :type icon_task_id: str + :param icon_uri: + :type icon_uri: str + :param id: + :type id: str + :param is_deleted: + :type is_deleted: bool + :param name: + :type name: str + """ + + _attribute_map = { + 'can_delete': {'key': 'canDelete', 'type': 'bool'}, + 'category': {'key': 'category', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'environment': {'key': 'environment', 'type': 'ReleaseDefinitionEnvironment'}, + 'icon_task_id': {'key': 'iconTaskId', 'type': 'str'}, + 'icon_uri': {'key': 'iconUri', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, can_delete=None, category=None, description=None, environment=None, icon_task_id=None, icon_uri=None, id=None, is_deleted=None, name=None): + super(ReleaseDefinitionEnvironmentTemplate, self).__init__() + self.can_delete = can_delete + self.category = category + self.description = description + self.environment = environment + self.icon_task_id = icon_task_id + self.icon_uri = icon_uri + self.id = id + self.is_deleted = is_deleted + self.name = name diff --git a/vsts/vsts/release/v4_1/models/release_definition_gate.py b/vsts/vsts/release/v4_1/models/release_definition_gate.py new file mode 100644 index 00000000..7e8e44c7 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_gate.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionGate(Model): + """ReleaseDefinitionGate. + + :param tasks: + :type tasks: list of :class:`WorkflowTask ` + """ + + _attribute_map = { + 'tasks': {'key': 'tasks', 'type': '[WorkflowTask]'} + } + + def __init__(self, tasks=None): + super(ReleaseDefinitionGate, self).__init__() + self.tasks = tasks diff --git a/vsts/vsts/release/v4_1/models/release_definition_gates_options.py b/vsts/vsts/release/v4_1/models/release_definition_gates_options.py new file mode 100644 index 00000000..eb309367 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_gates_options.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionGatesOptions(Model): + """ReleaseDefinitionGatesOptions. + + :param is_enabled: + :type is_enabled: bool + :param sampling_interval: + :type sampling_interval: int + :param stabilization_time: + :type stabilization_time: int + :param timeout: + :type timeout: int + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'sampling_interval': {'key': 'samplingInterval', 'type': 'int'}, + 'stabilization_time': {'key': 'stabilizationTime', 'type': 'int'}, + 'timeout': {'key': 'timeout', 'type': 'int'} + } + + def __init__(self, is_enabled=None, sampling_interval=None, stabilization_time=None, timeout=None): + super(ReleaseDefinitionGatesOptions, self).__init__() + self.is_enabled = is_enabled + self.sampling_interval = sampling_interval + self.stabilization_time = stabilization_time + self.timeout = timeout diff --git a/vsts/vsts/release/v4_1/models/release_definition_gates_step.py b/vsts/vsts/release/v4_1/models/release_definition_gates_step.py new file mode 100644 index 00000000..cc3526e4 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_gates_step.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionGatesStep(Model): + """ReleaseDefinitionGatesStep. + + :param gates: + :type gates: list of :class:`ReleaseDefinitionGate ` + :param gates_options: + :type gates_options: :class:`ReleaseDefinitionGatesOptions ` + :param id: + :type id: int + """ + + _attribute_map = { + 'gates': {'key': 'gates', 'type': '[ReleaseDefinitionGate]'}, + 'gates_options': {'key': 'gatesOptions', 'type': 'ReleaseDefinitionGatesOptions'}, + 'id': {'key': 'id', 'type': 'int'} + } + + def __init__(self, gates=None, gates_options=None, id=None): + super(ReleaseDefinitionGatesStep, self).__init__() + self.gates = gates + self.gates_options = gates_options + self.id = id diff --git a/vsts/vsts/release/v4_1/models/release_definition_revision.py b/vsts/vsts/release/v4_1/models/release_definition_revision.py new file mode 100644 index 00000000..4434da86 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_revision.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionRevision(Model): + """ReleaseDefinitionRevision. + + :param api_version: Gets api-version for revision object. + :type api_version: str + :param changed_by: Gets the identity who did change. + :type changed_by: :class:`IdentityRef ` + :param changed_date: Gets date on which it got changed. + :type changed_date: datetime + :param change_type: Gets type of change. + :type change_type: object + :param comment: Gets comments for revision. + :type comment: str + :param definition_id: Get id of the definition. + :type definition_id: int + :param definition_url: Gets definition url. + :type definition_url: str + :param revision: Get revision number of the definition. + :type revision: int + """ + + _attribute_map = { + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'definition_url': {'key': 'definitionUrl', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, api_version=None, changed_by=None, changed_date=None, change_type=None, comment=None, definition_id=None, definition_url=None, revision=None): + super(ReleaseDefinitionRevision, self).__init__() + self.api_version = api_version + self.changed_by = changed_by + self.changed_date = changed_date + self.change_type = change_type + self.comment = comment + self.definition_id = definition_id + self.definition_url = definition_url + self.revision = revision diff --git a/vsts/vsts/release/v4_1/models/release_definition_shallow_reference.py b/vsts/vsts/release/v4_1/models/release_definition_shallow_reference.py new file mode 100644 index 00000000..7670d370 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_shallow_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionShallowReference(Model): + """ReleaseDefinitionShallowReference. + + :param _links: Gets the links to related resources, APIs, and views for the release definition. + :type _links: :class:`ReferenceLinks ` + :param id: Gets the unique identifier of release definition. + :type id: int + :param name: Gets or sets the name of the release definition. + :type name: str + :param url: Gets the REST API url to access the release definition. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None, url=None): + super(ReleaseDefinitionShallowReference, self).__init__() + self._links = _links + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/release/v4_1/models/release_definition_summary.py b/vsts/vsts/release/v4_1/models/release_definition_summary.py new file mode 100644 index 00000000..9139d942 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionSummary(Model): + """ReleaseDefinitionSummary. + + :param environments: + :type environments: list of :class:`ReleaseDefinitionEnvironmentSummary ` + :param release_definition: + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param releases: + :type releases: list of :class:`Release ` + """ + + _attribute_map = { + 'environments': {'key': 'environments', 'type': '[ReleaseDefinitionEnvironmentSummary]'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'releases': {'key': 'releases', 'type': '[Release]'} + } + + def __init__(self, environments=None, release_definition=None, releases=None): + super(ReleaseDefinitionSummary, self).__init__() + self.environments = environments + self.release_definition = release_definition + self.releases = releases diff --git a/vsts/vsts/release/v4_1/models/release_definition_undelete_parameter.py b/vsts/vsts/release/v4_1/models/release_definition_undelete_parameter.py new file mode 100644 index 00000000..24dca3de --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_definition_undelete_parameter.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDefinitionUndeleteParameter(Model): + """ReleaseDefinitionUndeleteParameter. + + :param comment: Gets or sets comment. + :type comment: str + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'} + } + + def __init__(self, comment=None): + super(ReleaseDefinitionUndeleteParameter, self).__init__() + self.comment = comment diff --git a/vsts/vsts/release/v4_1/models/release_deploy_phase.py b/vsts/vsts/release/v4_1/models/release_deploy_phase.py new file mode 100644 index 00000000..9c56f011 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_deploy_phase.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseDeployPhase(Model): + """ReleaseDeployPhase. + + :param deployment_jobs: + :type deployment_jobs: list of :class:`DeploymentJob ` + :param error_log: + :type error_log: str + :param id: + :type id: int + :param manual_interventions: + :type manual_interventions: list of :class:`ManualIntervention ` + :param name: + :type name: str + :param phase_id: + :type phase_id: str + :param phase_type: + :type phase_type: object + :param rank: + :type rank: int + :param run_plan_id: + :type run_plan_id: str + :param status: + :type status: object + """ + + _attribute_map = { + 'deployment_jobs': {'key': 'deploymentJobs', 'type': '[DeploymentJob]'}, + 'error_log': {'key': 'errorLog', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'manual_interventions': {'key': 'manualInterventions', 'type': '[ManualIntervention]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'phase_id': {'key': 'phaseId', 'type': 'str'}, + 'phase_type': {'key': 'phaseType', 'type': 'object'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'run_plan_id': {'key': 'runPlanId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, deployment_jobs=None, error_log=None, id=None, manual_interventions=None, name=None, phase_id=None, phase_type=None, rank=None, run_plan_id=None, status=None): + super(ReleaseDeployPhase, self).__init__() + self.deployment_jobs = deployment_jobs + self.error_log = error_log + self.id = id + self.manual_interventions = manual_interventions + self.name = name + self.phase_id = phase_id + self.phase_type = phase_type + self.rank = rank + self.run_plan_id = run_plan_id + self.status = status diff --git a/vsts/vsts/release/v4_1/models/release_environment.py b/vsts/vsts/release/v4_1/models/release_environment.py new file mode 100644 index 00000000..339ccefb --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_environment.py @@ -0,0 +1,157 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironment(Model): + """ReleaseEnvironment. + + :param conditions: Gets list of conditions. + :type conditions: list of :class:`ReleaseCondition ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param definition_environment_id: Gets definition environment id. + :type definition_environment_id: int + :param demands: Gets demands. + :type demands: list of :class:`object ` + :param deploy_phases_snapshot: Gets list of deploy phases snapshot. + :type deploy_phases_snapshot: list of :class:`DeployPhase ` + :param deploy_steps: Gets deploy steps. + :type deploy_steps: list of :class:`DeploymentAttempt ` + :param environment_options: Gets environment options. + :type environment_options: :class:`EnvironmentOptions ` + :param id: Gets the unique identifier of this field. + :type id: int + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets name. + :type name: str + :param next_scheduled_utc_time: Gets next scheduled UTC time. + :type next_scheduled_utc_time: datetime + :param owner: Gets the identity who is owner for release environment. + :type owner: :class:`IdentityRef ` + :param post_approvals_snapshot: Gets list of post deploy approvals snapshot. + :type post_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` + :param post_deploy_approvals: Gets list of post deploy approvals. + :type post_deploy_approvals: list of :class:`ReleaseApproval ` + :param post_deployment_gates_snapshot: + :type post_deployment_gates_snapshot: :class:`ReleaseDefinitionGatesStep ` + :param pre_approvals_snapshot: Gets list of pre deploy approvals snapshot. + :type pre_approvals_snapshot: :class:`ReleaseDefinitionApprovals ` + :param pre_deploy_approvals: Gets list of pre deploy approvals. + :type pre_deploy_approvals: list of :class:`ReleaseApproval ` + :param pre_deployment_gates_snapshot: + :type pre_deployment_gates_snapshot: :class:`ReleaseDefinitionGatesStep ` + :param process_parameters: Gets process parameters. + :type process_parameters: :class:`ProcessParameters ` + :param queue_id: Gets queue id. + :type queue_id: int + :param rank: Gets rank. + :type rank: int + :param release: Gets release reference which specifies the reference of the release to which this release environment is associated. + :type release: :class:`ReleaseShallowReference ` + :param release_created_by: Gets the identity who created release. + :type release_created_by: :class:`IdentityRef ` + :param release_definition: Gets releaseDefinitionReference which specifies the reference of the release definition to which this release environment is associated. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param release_description: Gets release description. + :type release_description: str + :param release_id: Gets release id. + :type release_id: int + :param scheduled_deployment_time: Gets schedule deployment time of release environment. + :type scheduled_deployment_time: datetime + :param schedules: Gets list of schedules. + :type schedules: list of :class:`ReleaseSchedule ` + :param status: Gets environment status. + :type status: object + :param time_to_deploy: Gets time to deploy. + :type time_to_deploy: number + :param trigger_reason: Gets trigger reason. + :type trigger_reason: str + :param variable_groups: Gets the list of variable groups. + :type variable_groups: list of :class:`VariableGroup ` + :param variables: Gets the dictionary of variables. + :type variables: dict + :param workflow_tasks: Gets list of workflow tasks. + :type workflow_tasks: list of :class:`WorkflowTask ` + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[ReleaseCondition]'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'definition_environment_id': {'key': 'definitionEnvironmentId', 'type': 'int'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deploy_phases_snapshot': {'key': 'deployPhasesSnapshot', 'type': '[DeployPhase]'}, + 'deploy_steps': {'key': 'deploySteps', 'type': '[DeploymentAttempt]'}, + 'environment_options': {'key': 'environmentOptions', 'type': 'EnvironmentOptions'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'next_scheduled_utc_time': {'key': 'nextScheduledUtcTime', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'post_approvals_snapshot': {'key': 'postApprovalsSnapshot', 'type': 'ReleaseDefinitionApprovals'}, + 'post_deploy_approvals': {'key': 'postDeployApprovals', 'type': '[ReleaseApproval]'}, + 'post_deployment_gates_snapshot': {'key': 'postDeploymentGatesSnapshot', 'type': 'ReleaseDefinitionGatesStep'}, + 'pre_approvals_snapshot': {'key': 'preApprovalsSnapshot', 'type': 'ReleaseDefinitionApprovals'}, + 'pre_deploy_approvals': {'key': 'preDeployApprovals', 'type': '[ReleaseApproval]'}, + 'pre_deployment_gates_snapshot': {'key': 'preDeploymentGatesSnapshot', 'type': 'ReleaseDefinitionGatesStep'}, + 'process_parameters': {'key': 'processParameters', 'type': 'ProcessParameters'}, + 'queue_id': {'key': 'queueId', 'type': 'int'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'release': {'key': 'release', 'type': 'ReleaseShallowReference'}, + 'release_created_by': {'key': 'releaseCreatedBy', 'type': 'IdentityRef'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'release_description': {'key': 'releaseDescription', 'type': 'str'}, + 'release_id': {'key': 'releaseId', 'type': 'int'}, + 'scheduled_deployment_time': {'key': 'scheduledDeploymentTime', 'type': 'iso-8601'}, + 'schedules': {'key': 'schedules', 'type': '[ReleaseSchedule]'}, + 'status': {'key': 'status', 'type': 'object'}, + 'time_to_deploy': {'key': 'timeToDeploy', 'type': 'number'}, + 'trigger_reason': {'key': 'triggerReason', 'type': 'str'}, + 'variable_groups': {'key': 'variableGroups', 'type': '[VariableGroup]'}, + 'variables': {'key': 'variables', 'type': '{ConfigurationVariableValue}'}, + 'workflow_tasks': {'key': 'workflowTasks', 'type': '[WorkflowTask]'} + } + + def __init__(self, conditions=None, created_on=None, definition_environment_id=None, demands=None, deploy_phases_snapshot=None, deploy_steps=None, environment_options=None, id=None, modified_on=None, name=None, next_scheduled_utc_time=None, owner=None, post_approvals_snapshot=None, post_deploy_approvals=None, post_deployment_gates_snapshot=None, pre_approvals_snapshot=None, pre_deploy_approvals=None, pre_deployment_gates_snapshot=None, process_parameters=None, queue_id=None, rank=None, release=None, release_created_by=None, release_definition=None, release_description=None, release_id=None, scheduled_deployment_time=None, schedules=None, status=None, time_to_deploy=None, trigger_reason=None, variable_groups=None, variables=None, workflow_tasks=None): + super(ReleaseEnvironment, self).__init__() + self.conditions = conditions + self.created_on = created_on + self.definition_environment_id = definition_environment_id + self.demands = demands + self.deploy_phases_snapshot = deploy_phases_snapshot + self.deploy_steps = deploy_steps + self.environment_options = environment_options + self.id = id + self.modified_on = modified_on + self.name = name + self.next_scheduled_utc_time = next_scheduled_utc_time + self.owner = owner + self.post_approvals_snapshot = post_approvals_snapshot + self.post_deploy_approvals = post_deploy_approvals + self.post_deployment_gates_snapshot = post_deployment_gates_snapshot + self.pre_approvals_snapshot = pre_approvals_snapshot + self.pre_deploy_approvals = pre_deploy_approvals + self.pre_deployment_gates_snapshot = pre_deployment_gates_snapshot + self.process_parameters = process_parameters + self.queue_id = queue_id + self.rank = rank + self.release = release + self.release_created_by = release_created_by + self.release_definition = release_definition + self.release_description = release_description + self.release_id = release_id + self.scheduled_deployment_time = scheduled_deployment_time + self.schedules = schedules + self.status = status + self.time_to_deploy = time_to_deploy + self.trigger_reason = trigger_reason + self.variable_groups = variable_groups + self.variables = variables + self.workflow_tasks = workflow_tasks diff --git a/vsts/vsts/release/v4_1/models/release_environment_shallow_reference.py b/vsts/vsts/release/v4_1/models/release_environment_shallow_reference.py new file mode 100644 index 00000000..fb04defc --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_environment_shallow_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironmentShallowReference(Model): + """ReleaseEnvironmentShallowReference. + + :param _links: Gets the links to related resources, APIs, and views for the release environment. + :type _links: :class:`ReferenceLinks ` + :param id: Gets the unique identifier of release environment. + :type id: int + :param name: Gets or sets the name of the release environment. + :type name: str + :param url: Gets the REST API url to access the release environment. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None, url=None): + super(ReleaseEnvironmentShallowReference, self).__init__() + self._links = _links + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/release/v4_1/models/release_environment_update_metadata.py b/vsts/vsts/release/v4_1/models/release_environment_update_metadata.py new file mode 100644 index 00000000..df5c0fed --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_environment_update_metadata.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironmentUpdateMetadata(Model): + """ReleaseEnvironmentUpdateMetadata. + + :param comment: Gets or sets comment. + :type comment: str + :param scheduled_deployment_time: Gets or sets scheduled deployment time. + :type scheduled_deployment_time: datetime + :param status: Gets or sets status of environment. + :type status: object + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'scheduled_deployment_time': {'key': 'scheduledDeploymentTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, comment=None, scheduled_deployment_time=None, status=None): + super(ReleaseEnvironmentUpdateMetadata, self).__init__() + self.comment = comment + self.scheduled_deployment_time = scheduled_deployment_time + self.status = status diff --git a/vsts/vsts/release/v4_1/models/release_gates.py b/vsts/vsts/release/v4_1/models/release_gates.py new file mode 100644 index 00000000..91d493fe --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_gates.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseGates(Model): + """ReleaseGates. + + :param deployment_jobs: + :type deployment_jobs: list of :class:`DeploymentJob ` + :param id: + :type id: int + :param last_modified_on: + :type last_modified_on: datetime + :param run_plan_id: + :type run_plan_id: str + :param stabilization_completed_on: + :type stabilization_completed_on: datetime + :param started_on: + :type started_on: datetime + :param status: + :type status: object + """ + + _attribute_map = { + 'deployment_jobs': {'key': 'deploymentJobs', 'type': '[DeploymentJob]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_modified_on': {'key': 'lastModifiedOn', 'type': 'iso-8601'}, + 'run_plan_id': {'key': 'runPlanId', 'type': 'str'}, + 'stabilization_completed_on': {'key': 'stabilizationCompletedOn', 'type': 'iso-8601'}, + 'started_on': {'key': 'startedOn', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, deployment_jobs=None, id=None, last_modified_on=None, run_plan_id=None, stabilization_completed_on=None, started_on=None, status=None): + super(ReleaseGates, self).__init__() + self.deployment_jobs = deployment_jobs + self.id = id + self.last_modified_on = last_modified_on + self.run_plan_id = run_plan_id + self.stabilization_completed_on = stabilization_completed_on + self.started_on = started_on + self.status = status diff --git a/vsts/vsts/release/v4_1/models/release_reference.py b/vsts/vsts/release/v4_1/models/release_reference.py new file mode 100644 index 00000000..9f014153 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_reference.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseReference(Model): + """ReleaseReference. + + :param _links: Gets links to access the release. + :type _links: :class:`ReferenceLinks ` + :param artifacts: Gets list of artifacts. + :type artifacts: list of :class:`Artifact ` + :param created_by: Gets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param description: Gets description. + :type description: str + :param id: Gets the unique identifier of this field. + :type id: int + :param modified_by: Gets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param name: Gets name of release. + :type name: str + :param reason: Gets reason for release. + :type reason: object + :param release_definition: Gets release definition shallow reference. + :type release_definition: :class:`ReleaseDefinitionShallowReference ` + :param url: + :type url: str + :param web_access_uri: + :type web_access_uri: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'artifacts': {'key': 'artifacts', 'type': '[Artifact]'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'name': {'key': 'name', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'object'}, + 'release_definition': {'key': 'releaseDefinition', 'type': 'ReleaseDefinitionShallowReference'}, + 'url': {'key': 'url', 'type': 'str'}, + 'web_access_uri': {'key': 'webAccessUri', 'type': 'str'} + } + + def __init__(self, _links=None, artifacts=None, created_by=None, created_on=None, description=None, id=None, modified_by=None, name=None, reason=None, release_definition=None, url=None, web_access_uri=None): + super(ReleaseReference, self).__init__() + self._links = _links + self.artifacts = artifacts + self.created_by = created_by + self.created_on = created_on + self.description = description + self.id = id + self.modified_by = modified_by + self.name = name + self.reason = reason + self.release_definition = release_definition + self.url = url + self.web_access_uri = web_access_uri diff --git a/vsts/vsts/release/v4_1/models/release_revision.py b/vsts/vsts/release/v4_1/models/release_revision.py new file mode 100644 index 00000000..970a85ae --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_revision.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseRevision(Model): + """ReleaseRevision. + + :param changed_by: + :type changed_by: :class:`IdentityRef ` + :param changed_date: + :type changed_date: datetime + :param change_details: + :type change_details: str + :param change_type: + :type change_type: str + :param comment: + :type comment: str + :param definition_snapshot_revision: + :type definition_snapshot_revision: int + :param release_id: + :type release_id: int + """ + + _attribute_map = { + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, + 'change_details': {'key': 'changeDetails', 'type': 'str'}, + 'change_type': {'key': 'changeType', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'definition_snapshot_revision': {'key': 'definitionSnapshotRevision', 'type': 'int'}, + 'release_id': {'key': 'releaseId', 'type': 'int'} + } + + def __init__(self, changed_by=None, changed_date=None, change_details=None, change_type=None, comment=None, definition_snapshot_revision=None, release_id=None): + super(ReleaseRevision, self).__init__() + self.changed_by = changed_by + self.changed_date = changed_date + self.change_details = change_details + self.change_type = change_type + self.comment = comment + self.definition_snapshot_revision = definition_snapshot_revision + self.release_id = release_id diff --git a/vsts/vsts/release/v4_1/models/release_schedule.py b/vsts/vsts/release/v4_1/models/release_schedule.py new file mode 100644 index 00000000..ac0b3f86 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_schedule.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseSchedule(Model): + """ReleaseSchedule. + + :param days_to_release: Days of the week to release + :type days_to_release: object + :param job_id: Team Foundation Job Definition Job Id + :type job_id: str + :param start_hours: Local time zone hour to start + :type start_hours: int + :param start_minutes: Local time zone minute to start + :type start_minutes: int + :param time_zone_id: Time zone Id of release schedule, such as 'UTC' + :type time_zone_id: str + """ + + _attribute_map = { + 'days_to_release': {'key': 'daysToRelease', 'type': 'object'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'start_hours': {'key': 'startHours', 'type': 'int'}, + 'start_minutes': {'key': 'startMinutes', 'type': 'int'}, + 'time_zone_id': {'key': 'timeZoneId', 'type': 'str'} + } + + def __init__(self, days_to_release=None, job_id=None, start_hours=None, start_minutes=None, time_zone_id=None): + super(ReleaseSchedule, self).__init__() + self.days_to_release = days_to_release + self.job_id = job_id + self.start_hours = start_hours + self.start_minutes = start_minutes + self.time_zone_id = time_zone_id diff --git a/vsts/vsts/release/v4_1/models/release_settings.py b/vsts/vsts/release/v4_1/models/release_settings.py new file mode 100644 index 00000000..d653e694 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseSettings(Model): + """ReleaseSettings. + + :param retention_settings: + :type retention_settings: :class:`RetentionSettings ` + """ + + _attribute_map = { + 'retention_settings': {'key': 'retentionSettings', 'type': 'RetentionSettings'} + } + + def __init__(self, retention_settings=None): + super(ReleaseSettings, self).__init__() + self.retention_settings = retention_settings diff --git a/vsts/vsts/release/v4_1/models/release_shallow_reference.py b/vsts/vsts/release/v4_1/models/release_shallow_reference.py new file mode 100644 index 00000000..beb09a38 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_shallow_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseShallowReference(Model): + """ReleaseShallowReference. + + :param _links: Gets the links to related resources, APIs, and views for the release. + :type _links: :class:`ReferenceLinks ` + :param id: Gets the unique identifier of release. + :type id: int + :param name: Gets or sets the name of the release. + :type name: str + :param url: Gets the REST API url to access the release. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None, url=None): + super(ReleaseShallowReference, self).__init__() + self._links = _links + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/release/v4_1/models/release_start_metadata.py b/vsts/vsts/release/v4_1/models/release_start_metadata.py new file mode 100644 index 00000000..0cf25dc4 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_start_metadata.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseStartMetadata(Model): + """ReleaseStartMetadata. + + :param artifacts: Sets list of artifact to create a release. + :type artifacts: list of :class:`ArtifactMetadata ` + :param definition_id: Sets definition Id to create a release. + :type definition_id: int + :param description: Sets description to create a release. + :type description: str + :param is_draft: Sets 'true' to create release in draft mode, 'false' otherwise. + :type is_draft: bool + :param manual_environments: Sets list of environments to manual as condition. + :type manual_environments: list of str + :param properties: + :type properties: :class:`object ` + :param reason: Sets reason to create a release. + :type reason: object + """ + + _attribute_map = { + 'artifacts': {'key': 'artifacts', 'type': '[ArtifactMetadata]'}, + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_draft': {'key': 'isDraft', 'type': 'bool'}, + 'manual_environments': {'key': 'manualEnvironments', 'type': '[str]'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'reason': {'key': 'reason', 'type': 'object'} + } + + def __init__(self, artifacts=None, definition_id=None, description=None, is_draft=None, manual_environments=None, properties=None, reason=None): + super(ReleaseStartMetadata, self).__init__() + self.artifacts = artifacts + self.definition_id = definition_id + self.description = description + self.is_draft = is_draft + self.manual_environments = manual_environments + self.properties = properties + self.reason = reason diff --git a/vsts/vsts/release/v4_1/models/release_task.py b/vsts/vsts/release/v4_1/models/release_task.py new file mode 100644 index 00000000..62213335 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_task.py @@ -0,0 +1,81 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseTask(Model): + """ReleaseTask. + + :param agent_name: + :type agent_name: str + :param date_ended: + :type date_ended: datetime + :param date_started: + :type date_started: datetime + :param finish_time: + :type finish_time: datetime + :param id: + :type id: int + :param issues: + :type issues: list of :class:`Issue ` + :param line_count: + :type line_count: long + :param log_url: + :type log_url: str + :param name: + :type name: str + :param percent_complete: + :type percent_complete: int + :param rank: + :type rank: int + :param start_time: + :type start_time: datetime + :param status: + :type status: object + :param task: + :type task: :class:`WorkflowTaskReference ` + :param timeline_record_id: + :type timeline_record_id: str + """ + + _attribute_map = { + 'agent_name': {'key': 'agentName', 'type': 'str'}, + 'date_ended': {'key': 'dateEnded', 'type': 'iso-8601'}, + 'date_started': {'key': 'dateStarted', 'type': 'iso-8601'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + 'issues': {'key': 'issues', 'type': '[Issue]'}, + 'line_count': {'key': 'lineCount', 'type': 'long'}, + 'log_url': {'key': 'logUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'}, + 'task': {'key': 'task', 'type': 'WorkflowTaskReference'}, + 'timeline_record_id': {'key': 'timelineRecordId', 'type': 'str'} + } + + def __init__(self, agent_name=None, date_ended=None, date_started=None, finish_time=None, id=None, issues=None, line_count=None, log_url=None, name=None, percent_complete=None, rank=None, start_time=None, status=None, task=None, timeline_record_id=None): + super(ReleaseTask, self).__init__() + self.agent_name = agent_name + self.date_ended = date_ended + self.date_started = date_started + self.finish_time = finish_time + self.id = id + self.issues = issues + self.line_count = line_count + self.log_url = log_url + self.name = name + self.percent_complete = percent_complete + self.rank = rank + self.start_time = start_time + self.status = status + self.task = task + self.timeline_record_id = timeline_record_id diff --git a/vsts/vsts/release/v4_1/models/release_trigger_base.py b/vsts/vsts/release/v4_1/models/release_trigger_base.py new file mode 100644 index 00000000..30c36fb3 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_trigger_base.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseTriggerBase(Model): + """ReleaseTriggerBase. + + :param trigger_type: + :type trigger_type: object + """ + + _attribute_map = { + 'trigger_type': {'key': 'triggerType', 'type': 'object'} + } + + def __init__(self, trigger_type=None): + super(ReleaseTriggerBase, self).__init__() + self.trigger_type = trigger_type diff --git a/vsts/vsts/release/v4_1/models/release_update_metadata.py b/vsts/vsts/release/v4_1/models/release_update_metadata.py new file mode 100644 index 00000000..24cad449 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_update_metadata.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseUpdateMetadata(Model): + """ReleaseUpdateMetadata. + + :param comment: Sets comment for release. + :type comment: str + :param keep_forever: Set 'true' to exclude the release from retention policies. + :type keep_forever: bool + :param manual_environments: Sets list of manual environments. + :type manual_environments: list of str + :param status: Sets status of the release. + :type status: object + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'keep_forever': {'key': 'keepForever', 'type': 'bool'}, + 'manual_environments': {'key': 'manualEnvironments', 'type': '[str]'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, comment=None, keep_forever=None, manual_environments=None, status=None): + super(ReleaseUpdateMetadata, self).__init__() + self.comment = comment + self.keep_forever = keep_forever + self.manual_environments = manual_environments + self.status = status diff --git a/vsts/vsts/release/v4_1/models/release_work_item_ref.py b/vsts/vsts/release/v4_1/models/release_work_item_ref.py new file mode 100644 index 00000000..9891d5a0 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/release_work_item_ref.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseWorkItemRef(Model): + """ReleaseWorkItemRef. + + :param assignee: + :type assignee: str + :param id: + :type id: str + :param state: + :type state: str + :param title: + :type title: str + :param type: + :type type: str + :param url: + :type url: str + """ + + _attribute_map = { + 'assignee': {'key': 'assignee', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, assignee=None, id=None, state=None, title=None, type=None, url=None): + super(ReleaseWorkItemRef, self).__init__() + self.assignee = assignee + self.id = id + self.state = state + self.title = title + self.type = type + self.url = url diff --git a/vsts/vsts/release/v4_1/models/retention_policy.py b/vsts/vsts/release/v4_1/models/retention_policy.py new file mode 100644 index 00000000..e070b170 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/retention_policy.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 RetentionPolicy(Model): + """RetentionPolicy. + + :param days_to_keep: + :type days_to_keep: int + """ + + _attribute_map = { + 'days_to_keep': {'key': 'daysToKeep', 'type': 'int'} + } + + def __init__(self, days_to_keep=None): + super(RetentionPolicy, self).__init__() + self.days_to_keep = days_to_keep diff --git a/vsts/vsts/release/v4_1/models/retention_settings.py b/vsts/vsts/release/v4_1/models/retention_settings.py new file mode 100644 index 00000000..ceb96feb --- /dev/null +++ b/vsts/vsts/release/v4_1/models/retention_settings.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 RetentionSettings(Model): + """RetentionSettings. + + :param days_to_keep_deleted_releases: + :type days_to_keep_deleted_releases: int + :param default_environment_retention_policy: + :type default_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` + :param maximum_environment_retention_policy: + :type maximum_environment_retention_policy: :class:`EnvironmentRetentionPolicy ` + """ + + _attribute_map = { + 'days_to_keep_deleted_releases': {'key': 'daysToKeepDeletedReleases', 'type': 'int'}, + 'default_environment_retention_policy': {'key': 'defaultEnvironmentRetentionPolicy', 'type': 'EnvironmentRetentionPolicy'}, + 'maximum_environment_retention_policy': {'key': 'maximumEnvironmentRetentionPolicy', 'type': 'EnvironmentRetentionPolicy'} + } + + def __init__(self, days_to_keep_deleted_releases=None, default_environment_retention_policy=None, maximum_environment_retention_policy=None): + super(RetentionSettings, self).__init__() + self.days_to_keep_deleted_releases = days_to_keep_deleted_releases + self.default_environment_retention_policy = default_environment_retention_policy + self.maximum_environment_retention_policy = maximum_environment_retention_policy diff --git a/vsts/vsts/release/v4_1/models/summary_mail_section.py b/vsts/vsts/release/v4_1/models/summary_mail_section.py new file mode 100644 index 00000000..b8f6a8ea --- /dev/null +++ b/vsts/vsts/release/v4_1/models/summary_mail_section.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SummaryMailSection(Model): + """SummaryMailSection. + + :param html_content: + :type html_content: str + :param rank: + :type rank: int + :param section_type: + :type section_type: object + :param title: + :type title: str + """ + + _attribute_map = { + 'html_content': {'key': 'htmlContent', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'section_type': {'key': 'sectionType', 'type': 'object'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, html_content=None, rank=None, section_type=None, title=None): + super(SummaryMailSection, self).__init__() + self.html_content = html_content + self.rank = rank + self.section_type = section_type + self.title = title diff --git a/vsts/vsts/release/v4_1/models/task_input_definition_base.py b/vsts/vsts/release/v4_1/models/task_input_definition_base.py new file mode 100644 index 00000000..0d84190d --- /dev/null +++ b/vsts/vsts/release/v4_1/models/task_input_definition_base.py @@ -0,0 +1,68 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class TaskInputDefinitionBase(BaseSecuredObject): + """TaskInputDefinitionBase. + + :param aliases: + :type aliases: list of str + :param default_value: + :type default_value: str + :param group_name: + :type group_name: str + :param help_mark_down: + :type help_mark_down: str + :param label: + :type label: str + :param name: + :type name: str + :param options: + :type options: dict + :param properties: + :type properties: dict + :param required: + :type required: bool + :param type: + :type type: str + :param validation: + :type validation: :class:`TaskInputValidation ` + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'aliases': {'key': 'aliases', 'type': '[str]'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation': {'key': 'validation', 'type': 'TaskInputValidation'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'} + } + + def __init__(self, aliases=None, default_value=None, group_name=None, help_mark_down=None, label=None, name=None, options=None, properties=None, required=None, type=None, validation=None, visible_rule=None): + super(TaskInputDefinitionBase, self).__init__() + self.aliases = aliases + self.default_value = default_value + self.group_name = group_name + self.help_mark_down = help_mark_down + self.label = label + self.name = name + self.options = options + self.properties = properties + self.required = required + self.type = type + self.validation = validation + self.visible_rule = visible_rule diff --git a/vsts/vsts/release/v4_1/models/task_input_validation.py b/vsts/vsts/release/v4_1/models/task_input_validation.py new file mode 100644 index 00000000..cc51abdd --- /dev/null +++ b/vsts/vsts/release/v4_1/models/task_input_validation.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class TaskInputValidation(BaseSecuredObject): + """TaskInputValidation. + + :param expression: Conditional expression + :type expression: str + :param message: Message explaining how user can correct if validation fails + :type message: str + """ + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, expression=None, message=None): + super(TaskInputValidation, self).__init__() + self.expression = expression + self.message = message diff --git a/vsts/vsts/release/v4_1/models/task_source_definition_base.py b/vsts/vsts/release/v4_1/models/task_source_definition_base.py new file mode 100644 index 00000000..79ba6579 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/task_source_definition_base.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class TaskSourceDefinitionBase(BaseSecuredObject): + """TaskSourceDefinitionBase. + + :param auth_key: + :type auth_key: str + :param endpoint: + :type endpoint: str + :param key_selector: + :type key_selector: str + :param selector: + :type selector: str + :param target: + :type target: str + """ + + _attribute_map = { + 'auth_key': {'key': 'authKey', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=None, target=None): + super(TaskSourceDefinitionBase, self).__init__() + self.auth_key = auth_key + self.endpoint = endpoint + self.key_selector = key_selector + self.selector = selector + self.target = target diff --git a/vsts/vsts/release/v4_1/models/variable_group.py b/vsts/vsts/release/v4_1/models/variable_group.py new file mode 100644 index 00000000..64db6038 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/variable_group.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableGroup(Model): + """VariableGroup. + + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets date on which it got created. + :type created_on: datetime + :param description: Gets or sets description. + :type description: str + :param id: Gets the unique identifier of this field. + :type id: int + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets date on which it got modified. + :type modified_on: datetime + :param name: Gets or sets name. + :type name: str + :param provider_data: Gets or sets provider data. + :type provider_data: :class:`VariableGroupProviderData ` + :param type: Gets or sets type. + :type type: str + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provider_data': {'key': 'providerData', 'type': 'VariableGroupProviderData'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{VariableValue}'} + } + + def __init__(self, created_by=None, created_on=None, description=None, id=None, modified_by=None, modified_on=None, name=None, provider_data=None, type=None, variables=None): + super(VariableGroup, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.description = description + self.id = id + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.provider_data = provider_data + self.type = type + self.variables = variables diff --git a/vsts/vsts/release/v4_1/models/variable_group_provider_data.py b/vsts/vsts/release/v4_1/models/variable_group_provider_data.py new file mode 100644 index 00000000..b86942f1 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/variable_group_provider_data.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VariableGroupProviderData(Model): + """VariableGroupProviderData. + + """ + + _attribute_map = { + } + + def __init__(self): + super(VariableGroupProviderData, self).__init__() diff --git a/vsts/vsts/release/v4_1/models/variable_value.py b/vsts/vsts/release/v4_1/models/variable_value.py new file mode 100644 index 00000000..035049c0 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableValue(Model): + """VariableValue. + + :param is_secret: + :type is_secret: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(VariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/release/v4_1/models/workflow_task.py b/vsts/vsts/release/v4_1/models/workflow_task.py new file mode 100644 index 00000000..14ef134c --- /dev/null +++ b/vsts/vsts/release/v4_1/models/workflow_task.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkflowTask(Model): + """WorkflowTask. + + :param always_run: + :type always_run: bool + :param condition: + :type condition: str + :param continue_on_error: + :type continue_on_error: bool + :param definition_type: + :type definition_type: str + :param enabled: + :type enabled: bool + :param inputs: + :type inputs: dict + :param name: + :type name: str + :param override_inputs: + :type override_inputs: dict + :param ref_name: + :type ref_name: str + :param task_id: + :type task_id: str + :param timeout_in_minutes: + :type timeout_in_minutes: int + :param version: + :type version: str + """ + + _attribute_map = { + 'always_run': {'key': 'alwaysRun', 'type': 'bool'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'continue_on_error': {'key': 'continueOnError', 'type': 'bool'}, + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'override_inputs': {'key': 'overrideInputs', 'type': '{str}'}, + 'ref_name': {'key': 'refName', 'type': 'str'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, always_run=None, condition=None, continue_on_error=None, definition_type=None, enabled=None, inputs=None, name=None, override_inputs=None, ref_name=None, task_id=None, timeout_in_minutes=None, version=None): + super(WorkflowTask, self).__init__() + self.always_run = always_run + self.condition = condition + self.continue_on_error = continue_on_error + self.definition_type = definition_type + self.enabled = enabled + self.inputs = inputs + self.name = name + self.override_inputs = override_inputs + self.ref_name = ref_name + self.task_id = task_id + self.timeout_in_minutes = timeout_in_minutes + self.version = version diff --git a/vsts/vsts/release/v4_1/models/workflow_task_reference.py b/vsts/vsts/release/v4_1/models/workflow_task_reference.py new file mode 100644 index 00000000..0a99eab3 --- /dev/null +++ b/vsts/vsts/release/v4_1/models/workflow_task_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkflowTaskReference(Model): + """WorkflowTaskReference. + + :param id: + :type id: str + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, name=None, version=None): + super(WorkflowTaskReference, self).__init__() + self.id = id + self.name = name + self.version = version diff --git a/vsts/vsts/release/v4_1/release_client.py b/vsts/vsts/release/v4_1/release_client.py new file mode 100644 index 00000000..06ecf5cc --- /dev/null +++ b/vsts/vsts/release/v4_1/release_client.py @@ -0,0 +1,764 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ReleaseClient(VssClient): + """Release + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ReleaseClient, 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 = 'efc2f575-36ef-48e9-b672-0c6fb4a48ac5' + + def get_approvals(self, project, assigned_to_filter=None, status_filter=None, release_ids_filter=None, type_filter=None, top=None, continuation_token=None, query_order=None, include_my_group_approvals=None): + """GetApprovals. + [Preview API] Get a list of approvals + :param str project: Project ID or project name + :param str assigned_to_filter: Approvals assigned to this user. + :param str status_filter: Approvals with this status. Default is 'pending'. + :param [int] release_ids_filter: Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4. + :param str type_filter: Approval with this type. + :param int top: Number of approvals to get. Default is 50. + :param int continuation_token: Gets the approvals after the continuation token provided. + :param str query_order: Gets the results in the defined order of created approvals. Default is 'descending'. + :param bool include_my_group_approvals: 'true' to include my group approvals. Default is 'false'. + :rtype: [ReleaseApproval] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if assigned_to_filter is not None: + query_parameters['assignedToFilter'] = self._serialize.query('assigned_to_filter', assigned_to_filter, 'str') + if status_filter is not None: + query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') + if release_ids_filter is not None: + release_ids_filter = ",".join(map(str, release_ids_filter)) + query_parameters['releaseIdsFilter'] = self._serialize.query('release_ids_filter', release_ids_filter, 'str') + if type_filter is not None: + query_parameters['typeFilter'] = self._serialize.query('type_filter', type_filter, 'str') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if include_my_group_approvals is not None: + query_parameters['includeMyGroupApprovals'] = self._serialize.query('include_my_group_approvals', include_my_group_approvals, 'bool') + response = self._send(http_method='GET', + location_id='b47c6458-e73b-47cb-a770-4df1e8813a91', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ReleaseApproval]', response) + + def update_release_approval(self, approval, project, approval_id): + """UpdateReleaseApproval. + [Preview API] Update status of an approval + :param :class:` ` approval: ReleaseApproval object having status, approver and comments. + :param str project: Project ID or project name + :param int approval_id: Id of the approval. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if approval_id is not None: + route_values['approvalId'] = self._serialize.url('approval_id', approval_id, 'int') + content = self._serialize.body(approval, 'ReleaseApproval') + response = self._send(http_method='PATCH', + location_id='9328e074-59fb-465a-89d9-b09c82ee5109', + version='4.1-preview.3', + route_values=route_values, + content=content) + return self._deserialize('ReleaseApproval', response) + + def get_task_attachment_content(self, project, release_id, environment_id, attempt_id, timeline_id, record_id, type, name): + """GetTaskAttachmentContent. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int environment_id: + :param int attempt_id: + :param str timeline_id: + :param str record_id: + :param str type: + :param str name: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if attempt_id is not None: + route_values['attemptId'] = self._serialize.url('attempt_id', attempt_id, 'int') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='c4071f6d-3697-46ca-858e-8b10ff09e52f', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_task_attachments(self, project, release_id, environment_id, attempt_id, timeline_id, type): + """GetTaskAttachments. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int environment_id: + :param int attempt_id: + :param str timeline_id: + :param str type: + :rtype: [ReleaseTaskAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if attempt_id is not None: + route_values['attemptId'] = self._serialize.url('attempt_id', attempt_id, 'int') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + response = self._send(http_method='GET', + location_id='214111ee-2415-4df2-8ed2-74417f7d61f9', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ReleaseTaskAttachment]', response) + + def create_release_definition(self, release_definition, project): + """CreateReleaseDefinition. + [Preview API] Create a release definition + :param :class:` ` release_definition: release definition object to create. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(release_definition, 'ReleaseDefinition') + response = self._send(http_method='POST', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.1-preview.3', + route_values=route_values, + content=content) + return self._deserialize('ReleaseDefinition', response) + + def delete_release_definition(self, project, definition_id, comment=None, force_delete=None): + """DeleteReleaseDefinition. + [Preview API] Delete a release definition. + :param str project: Project ID or project name + :param int definition_id: Id of the release definition. + :param str comment: Comment for deleting a release definition. + :param bool force_delete: 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + query_parameters = {} + if comment is not None: + query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + if force_delete is not None: + query_parameters['forceDelete'] = self._serialize.query('force_delete', force_delete, 'bool') + self._send(http_method='DELETE', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) + + def get_release_definition(self, project, definition_id, property_filters=None): + """GetReleaseDefinition. + [Preview API] Get a release definition. + :param str project: Project ID or project name + :param int definition_id: Id of the release definition. + :param [str] property_filters: A comma-delimited list of extended properties to retrieve. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + query_parameters = {} + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + response = self._send(http_method='GET', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReleaseDefinition', response) + + def get_release_definitions(self, project, search_text=None, expand=None, artifact_type=None, artifact_source_id=None, top=None, continuation_token=None, query_order=None, path=None, is_exact_name_match=None, tag_filter=None, property_filters=None, definition_id_filter=None, is_deleted=None): + """GetReleaseDefinitions. + [Preview API] Get a list of release definitions. + :param str project: Project ID or project name + :param str search_text: Get release definitions with names starting with searchText. + :param str expand: The properties that should be expanded in the list of Release definitions. + :param str artifact_type: Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + :param str artifact_source_id: Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + :param int top: Number of release definitions to get. + :param str continuation_token: Gets the release definitions after the continuation token provided. + :param str query_order: Gets the results in the defined order. Default is 'IdAscending'. + :param str path: Gets the release definitions under the specified path. + :param bool is_exact_name_match: 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'. + :param [str] tag_filter: A comma-delimited list of tags. Only release definitions with these tags will be returned. + :param [str] property_filters: A comma-delimited list of extended properties to retrieve. + :param [str] definition_id_filter: A comma-delimited list of release definitions to retrieve. + :param bool is_deleted: 'true' to get release definitions that has been deleted. Default is 'false' + :rtype: [ReleaseDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if search_text is not None: + query_parameters['searchText'] = self._serialize.query('search_text', search_text, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + if artifact_type is not None: + query_parameters['artifactType'] = self._serialize.query('artifact_type', artifact_type, 'str') + if artifact_source_id is not None: + query_parameters['artifactSourceId'] = self._serialize.query('artifact_source_id', artifact_source_id, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if is_exact_name_match is not None: + query_parameters['isExactNameMatch'] = self._serialize.query('is_exact_name_match', is_exact_name_match, 'bool') + if tag_filter is not None: + tag_filter = ",".join(tag_filter) + query_parameters['tagFilter'] = self._serialize.query('tag_filter', tag_filter, 'str') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + if definition_id_filter is not None: + definition_id_filter = ",".join(definition_id_filter) + query_parameters['definitionIdFilter'] = self._serialize.query('definition_id_filter', definition_id_filter, 'str') + if is_deleted is not None: + query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool') + response = self._send(http_method='GET', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ReleaseDefinition]', response) + + def update_release_definition(self, release_definition, project): + """UpdateReleaseDefinition. + [Preview API] Update a release definition. + :param :class:` ` release_definition: Release definition object to update. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(release_definition, 'ReleaseDefinition') + response = self._send(http_method='PUT', + location_id='d8f96f24-8ea7-4cb6-baab-2df8fc515665', + version='4.1-preview.3', + route_values=route_values, + content=content) + return self._deserialize('ReleaseDefinition', response) + + def get_deployments(self, project, definition_id=None, definition_environment_id=None, created_by=None, min_modified_time=None, max_modified_time=None, deployment_status=None, operation_status=None, latest_attempts_only=None, query_order=None, top=None, continuation_token=None, created_for=None, min_started_time=None, max_started_time=None): + """GetDeployments. + [Preview API] + :param str project: Project ID or project name + :param int definition_id: + :param int definition_environment_id: + :param str created_by: + :param datetime min_modified_time: + :param datetime max_modified_time: + :param str deployment_status: + :param str operation_status: + :param bool latest_attempts_only: + :param str query_order: + :param int top: + :param int continuation_token: + :param str created_for: + :param datetime min_started_time: + :param datetime max_started_time: + :rtype: [Deployment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') + if definition_environment_id is not None: + query_parameters['definitionEnvironmentId'] = self._serialize.query('definition_environment_id', definition_environment_id, 'int') + if created_by is not None: + query_parameters['createdBy'] = self._serialize.query('created_by', created_by, 'str') + if min_modified_time is not None: + query_parameters['minModifiedTime'] = self._serialize.query('min_modified_time', min_modified_time, 'iso-8601') + if max_modified_time is not None: + query_parameters['maxModifiedTime'] = self._serialize.query('max_modified_time', max_modified_time, 'iso-8601') + if deployment_status is not None: + query_parameters['deploymentStatus'] = self._serialize.query('deployment_status', deployment_status, 'str') + if operation_status is not None: + query_parameters['operationStatus'] = self._serialize.query('operation_status', operation_status, 'str') + if latest_attempts_only is not None: + query_parameters['latestAttemptsOnly'] = self._serialize.query('latest_attempts_only', latest_attempts_only, 'bool') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') + if created_for is not None: + query_parameters['createdFor'] = self._serialize.query('created_for', created_for, 'str') + if min_started_time is not None: + query_parameters['minStartedTime'] = self._serialize.query('min_started_time', min_started_time, 'iso-8601') + if max_started_time is not None: + query_parameters['maxStartedTime'] = self._serialize.query('max_started_time', max_started_time, 'iso-8601') + response = self._send(http_method='GET', + location_id='b005ef73-cddc-448e-9ba2-5193bf36b19f', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Deployment]', response) + + def update_release_environment(self, environment_update_data, project, release_id, environment_id): + """UpdateReleaseEnvironment. + [Preview API] Update the status of a release environment + :param :class:` ` environment_update_data: Environment update meta data. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int environment_id: Id of release environment. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + content = self._serialize.body(environment_update_data, 'ReleaseEnvironmentUpdateMetadata') + response = self._send(http_method='PATCH', + location_id='a7e426b1-03dc-48af-9dfe-c98bac612dcb', + version='4.1-preview.5', + route_values=route_values, + content=content) + return self._deserialize('ReleaseEnvironment', response) + + def get_logs(self, project, release_id): + """GetLogs. + [Preview API] Get logs for a release Id. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='c37fbab5-214b-48e4-a55b-cb6b4f6e4038', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('object', response) + + def get_task_log(self, project, release_id, environment_id, release_deploy_phase_id, task_id, start_line=None, end_line=None): + """GetTaskLog. + [Preview API] Gets the task log of a release as a plain text file. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int environment_id: Id of release environment. + :param int release_deploy_phase_id: Release deploy phase Id. + :param int task_id: ReleaseTask Id for the log. + :param long start_line: Starting line number for logs + :param long end_line: Ending line number for logs + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if environment_id is not None: + route_values['environmentId'] = self._serialize.url('environment_id', environment_id, 'int') + if release_deploy_phase_id is not None: + route_values['releaseDeployPhaseId'] = self._serialize.url('release_deploy_phase_id', release_deploy_phase_id, 'int') + if task_id is not None: + route_values['taskId'] = self._serialize.url('task_id', task_id, 'int') + query_parameters = {} + if start_line is not None: + query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') + if end_line is not None: + query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') + response = self._send(http_method='GET', + location_id='17c91af7-09fd-4256-bff1-c24ee4f73bc0', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_manual_intervention(self, project, release_id, manual_intervention_id): + """GetManualIntervention. + [Preview API] Get manual intervention for a given release and manual intervention id. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int manual_intervention_id: Id of the manual intervention. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if manual_intervention_id is not None: + route_values['manualInterventionId'] = self._serialize.url('manual_intervention_id', manual_intervention_id, 'int') + response = self._send(http_method='GET', + location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ManualIntervention', response) + + def get_manual_interventions(self, project, release_id): + """GetManualInterventions. + [Preview API] List all manual interventions for a given release. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :rtype: [ManualIntervention] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + response = self._send(http_method='GET', + location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ManualIntervention]', response) + + def update_manual_intervention(self, manual_intervention_update_metadata, project, release_id, manual_intervention_id): + """UpdateManualIntervention. + [Preview API] Update manual intervention. + :param :class:` ` manual_intervention_update_metadata: Meta data to update manual intervention. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int manual_intervention_id: Id of the manual intervention. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + if manual_intervention_id is not None: + route_values['manualInterventionId'] = self._serialize.url('manual_intervention_id', manual_intervention_id, 'int') + content = self._serialize.body(manual_intervention_update_metadata, 'ManualInterventionUpdateMetadata') + response = self._send(http_method='PATCH', + location_id='616c46e4-f370-4456-adaa-fbaf79c7b79e', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ManualIntervention', response) + + def get_releases(self, project=None, definition_id=None, definition_environment_id=None, search_text=None, created_by=None, status_filter=None, environment_status_filter=None, min_created_time=None, max_created_time=None, query_order=None, top=None, continuation_token=None, expand=None, artifact_type_id=None, source_id=None, artifact_version_id=None, source_branch_filter=None, is_deleted=None, tag_filter=None, property_filters=None, release_id_filter=None): + """GetReleases. + [Preview API] Get a list of releases + :param str project: Project ID or project name + :param int definition_id: Releases from this release definition Id. + :param int definition_environment_id: + :param str search_text: Releases with names starting with searchText. + :param str created_by: Releases created by this user. + :param str status_filter: Releases that have this status. + :param int environment_status_filter: + :param datetime min_created_time: Releases that were created after this time. + :param datetime max_created_time: Releases that were created before this time. + :param str query_order: Gets the results in the defined order of created date for releases. Default is descending. + :param int top: Number of releases to get. Default is 50. + :param int continuation_token: Gets the releases after the continuation token provided. + :param str expand: The property that should be expanded in the list of releases. + :param str artifact_type_id: Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + :param str source_id: Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + :param str artifact_version_id: Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId. + :param str source_branch_filter: Releases with given sourceBranchFilter will be returned. + :param bool is_deleted: Gets the soft deleted releases, if true. + :param [str] tag_filter: A comma-delimited list of tags. Only releases with these tags will be returned. + :param [str] property_filters: A comma-delimited list of extended properties to retrieve. + :param [int] release_id_filter: A comma-delimited list of releases Ids. Only releases with these Ids will be returned. + :rtype: [Release] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') + if definition_environment_id is not None: + query_parameters['definitionEnvironmentId'] = self._serialize.query('definition_environment_id', definition_environment_id, 'int') + if search_text is not None: + query_parameters['searchText'] = self._serialize.query('search_text', search_text, 'str') + if created_by is not None: + query_parameters['createdBy'] = self._serialize.query('created_by', created_by, 'str') + if status_filter is not None: + query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') + if environment_status_filter is not None: + query_parameters['environmentStatusFilter'] = self._serialize.query('environment_status_filter', environment_status_filter, 'int') + if min_created_time is not None: + query_parameters['minCreatedTime'] = self._serialize.query('min_created_time', min_created_time, 'iso-8601') + if max_created_time is not None: + query_parameters['maxCreatedTime'] = self._serialize.query('max_created_time', max_created_time, 'iso-8601') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + if artifact_type_id is not None: + query_parameters['artifactTypeId'] = self._serialize.query('artifact_type_id', artifact_type_id, 'str') + if source_id is not None: + query_parameters['sourceId'] = self._serialize.query('source_id', source_id, 'str') + if artifact_version_id is not None: + query_parameters['artifactVersionId'] = self._serialize.query('artifact_version_id', artifact_version_id, 'str') + if source_branch_filter is not None: + query_parameters['sourceBranchFilter'] = self._serialize.query('source_branch_filter', source_branch_filter, 'str') + if is_deleted is not None: + query_parameters['isDeleted'] = self._serialize.query('is_deleted', is_deleted, 'bool') + if tag_filter is not None: + tag_filter = ",".join(tag_filter) + query_parameters['tagFilter'] = self._serialize.query('tag_filter', tag_filter, 'str') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + if release_id_filter is not None: + release_id_filter = ",".join(map(str, release_id_filter)) + query_parameters['releaseIdFilter'] = self._serialize.query('release_id_filter', release_id_filter, 'str') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.1-preview.6', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Release]', response) + + def create_release(self, release_start_metadata, project): + """CreateRelease. + [Preview API] Create a release. + :param :class:` ` release_start_metadata: Metadata to create a release. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(release_start_metadata, 'ReleaseStartMetadata') + response = self._send(http_method='POST', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.1-preview.6', + route_values=route_values, + content=content) + return self._deserialize('Release', response) + + def get_release(self, project, release_id, approval_filters=None, property_filters=None): + """GetRelease. + [Preview API] Get a Release + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param str approval_filters: A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default + :param [str] property_filters: A comma-delimited list of properties to include in the results. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if approval_filters is not None: + query_parameters['approvalFilters'] = self._serialize.query('approval_filters', approval_filters, 'str') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.1-preview.6', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Release', response) + + def get_release_definition_summary(self, project, definition_id, release_count, include_artifact=None, definition_environment_ids_filter=None): + """GetReleaseDefinitionSummary. + [Preview API] Get release summary of a given definition Id. + :param str project: Project ID or project name + :param int definition_id: Id of the definition to get release summary. + :param int release_count: Count of releases to be included in summary. + :param bool include_artifact: Include artifact details.Default is 'false'. + :param [int] definition_environment_ids_filter: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') + if release_count is not None: + query_parameters['releaseCount'] = self._serialize.query('release_count', release_count, 'int') + if include_artifact is not None: + query_parameters['includeArtifact'] = self._serialize.query('include_artifact', include_artifact, 'bool') + if definition_environment_ids_filter is not None: + definition_environment_ids_filter = ",".join(map(str, definition_environment_ids_filter)) + query_parameters['definitionEnvironmentIdsFilter'] = self._serialize.query('definition_environment_ids_filter', definition_environment_ids_filter, 'str') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.1-preview.6', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ReleaseDefinitionSummary', response) + + def get_release_revision(self, project, release_id, definition_snapshot_revision): + """GetReleaseRevision. + [Preview API] Get release for a given revision number. + :param str project: Project ID or project name + :param int release_id: Id of the release. + :param int definition_snapshot_revision: Definition snapshot revision number. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + query_parameters = {} + if definition_snapshot_revision is not None: + query_parameters['definitionSnapshotRevision'] = self._serialize.query('definition_snapshot_revision', definition_snapshot_revision, 'int') + response = self._send(http_method='GET', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.1-preview.6', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def update_release(self, release, project, release_id): + """UpdateRelease. + [Preview API] Update a complete release object. + :param :class:` ` release: Release object for update. + :param str project: Project ID or project name + :param int release_id: Id of the release to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + content = self._serialize.body(release, 'Release') + response = self._send(http_method='PUT', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.1-preview.6', + route_values=route_values, + content=content) + return self._deserialize('Release', response) + + def update_release_resource(self, release_update_metadata, project, release_id): + """UpdateReleaseResource. + [Preview API] Update few properties of a release. + :param :class:` ` release_update_metadata: Properties of release to update. + :param str project: Project ID or project name + :param int release_id: Id of the release to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if release_id is not None: + route_values['releaseId'] = self._serialize.url('release_id', release_id, 'int') + content = self._serialize.body(release_update_metadata, 'ReleaseUpdateMetadata') + response = self._send(http_method='PATCH', + location_id='a166fde7-27ad-408e-ba75-703c2cc9d500', + version='4.1-preview.6', + route_values=route_values, + content=content) + return self._deserialize('Release', response) + + def get_definition_revision(self, project, definition_id, revision): + """GetDefinitionRevision. + [Preview API] Get release definition for a given definitionId and revision + :param str project: Project ID or project name + :param int definition_id: Id of the definition. + :param int revision: Id of the revision. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + if revision is not None: + route_values['revision'] = self._serialize.url('revision', revision, 'int') + response = self._send(http_method='GET', + location_id='258b82e0-9d41-43f3-86d6-fef14ddd44bc', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_release_definition_history(self, project, definition_id): + """GetReleaseDefinitionHistory. + [Preview API] Get revision history for a release definition + :param str project: Project ID or project name + :param int definition_id: Id of the definition. + :rtype: [ReleaseDefinitionRevision] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + response = self._send(http_method='GET', + location_id='258b82e0-9d41-43f3-86d6-fef14ddd44bc', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[ReleaseDefinitionRevision]', response) + diff --git a/vsts/vsts/security/__init__.py b/vsts/vsts/security/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/security/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/security/v4_0/__init__.py b/vsts/vsts/security/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/security/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/security/v4_0/models/__init__.py b/vsts/vsts/security/v4_0/models/__init__.py new file mode 100644 index 00000000..fe4c0453 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/__init__.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------------------------- +# 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 .access_control_entry import AccessControlEntry +from .access_control_list import AccessControlList +from .access_control_lists_collection import AccessControlListsCollection +from .ace_extended_information import AceExtendedInformation +from .action_definition import ActionDefinition +from .permission_evaluation import PermissionEvaluation +from .permission_evaluation_batch import PermissionEvaluationBatch +from .security_namespace_description import SecurityNamespaceDescription + +__all__ = [ + 'AccessControlEntry', + 'AccessControlList', + 'AccessControlListsCollection', + 'AceExtendedInformation', + 'ActionDefinition', + 'PermissionEvaluation', + 'PermissionEvaluationBatch', + 'SecurityNamespaceDescription', +] diff --git a/vsts/vsts/security/v4_0/models/access_control_entry.py b/vsts/vsts/security/v4_0/models/access_control_entry.py new file mode 100644 index 00000000..f524a101 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/access_control_entry.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccessControlEntry(Model): + """AccessControlEntry. + + :param allow: The set of permission bits that represent the actions that the associated descriptor is allowed to perform. + :type allow: int + :param deny: The set of permission bits that represent the actions that the associated descriptor is not allowed to perform. + :type deny: int + :param descriptor: The descriptor for the user this AccessControlEntry applies to. + :type descriptor: :class:`str ` + :param extended_info: This value, when set, reports the inherited and effective information for the associated descriptor. This value is only set on AccessControlEntries returned by the QueryAccessControlList(s) call when its includeExtendedInfo parameter is set to true. + :type extended_info: :class:`AceExtendedInformation ` + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'int'}, + 'deny': {'key': 'deny', 'type': 'int'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AceExtendedInformation'} + } + + def __init__(self, allow=None, deny=None, descriptor=None, extended_info=None): + super(AccessControlEntry, self).__init__() + self.allow = allow + self.deny = deny + self.descriptor = descriptor + self.extended_info = extended_info diff --git a/vsts/vsts/security/v4_0/models/access_control_list.py b/vsts/vsts/security/v4_0/models/access_control_list.py new file mode 100644 index 00000000..24bf1bc1 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/access_control_list.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccessControlList(Model): + """AccessControlList. + + :param aces_dictionary: Storage of permissions keyed on the identity the permission is for. + :type aces_dictionary: dict + :param include_extended_info: True if this ACL holds ACEs that have extended information. + :type include_extended_info: bool + :param inherit_permissions: True if the given token inherits permissions from parents. + :type inherit_permissions: bool + :param token: The token that this AccessControlList is for. + :type token: str + """ + + _attribute_map = { + 'aces_dictionary': {'key': 'acesDictionary', 'type': '{AccessControlEntry}'}, + 'include_extended_info': {'key': 'includeExtendedInfo', 'type': 'bool'}, + 'inherit_permissions': {'key': 'inheritPermissions', 'type': 'bool'}, + 'token': {'key': 'token', 'type': 'str'} + } + + def __init__(self, aces_dictionary=None, include_extended_info=None, inherit_permissions=None, token=None): + super(AccessControlList, self).__init__() + self.aces_dictionary = aces_dictionary + self.include_extended_info = include_extended_info + self.inherit_permissions = inherit_permissions + self.token = token diff --git a/vsts/vsts/security/v4_0/models/access_control_lists_collection.py b/vsts/vsts/security/v4_0/models/access_control_lists_collection.py new file mode 100644 index 00000000..c6ecd6d0 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/access_control_lists_collection.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessControlListsCollection(Model): + """AccessControlListsCollection. + + """ + + _attribute_map = { + } + + def __init__(self): + super(AccessControlListsCollection, self).__init__() diff --git a/vsts/vsts/security/v4_0/models/ace_extended_information.py b/vsts/vsts/security/v4_0/models/ace_extended_information.py new file mode 100644 index 00000000..9c639473 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/ace_extended_information.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AceExtendedInformation(Model): + """AceExtendedInformation. + + :param effective_allow: This is the combination of all of the explicit and inherited permissions for this identity on this token. These are the permissions used when determining if a given user has permission to perform an action. + :type effective_allow: int + :param effective_deny: This is the combination of all of the explicit and inherited permissions for this identity on this token. These are the permissions used when determining if a given user has permission to perform an action. + :type effective_deny: int + :param inherited_allow: These are the permissions that are inherited for this identity on this token. If the token does not inherit permissions this will be 0. Note that any permissions that have been explicitly set on this token for this identity, or any groups that this identity is a part of, are not included here. + :type inherited_allow: int + :param inherited_deny: These are the permissions that are inherited for this identity on this token. If the token does not inherit permissions this will be 0. Note that any permissions that have been explicitly set on this token for this identity, or any groups that this identity is a part of, are not included here. + :type inherited_deny: int + """ + + _attribute_map = { + 'effective_allow': {'key': 'effectiveAllow', 'type': 'int'}, + 'effective_deny': {'key': 'effectiveDeny', 'type': 'int'}, + 'inherited_allow': {'key': 'inheritedAllow', 'type': 'int'}, + 'inherited_deny': {'key': 'inheritedDeny', 'type': 'int'} + } + + def __init__(self, effective_allow=None, effective_deny=None, inherited_allow=None, inherited_deny=None): + super(AceExtendedInformation, self).__init__() + self.effective_allow = effective_allow + self.effective_deny = effective_deny + self.inherited_allow = inherited_allow + self.inherited_deny = inherited_deny diff --git a/vsts/vsts/security/v4_0/models/action_definition.py b/vsts/vsts/security/v4_0/models/action_definition.py new file mode 100644 index 00000000..87b96fd9 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/action_definition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ActionDefinition(Model): + """ActionDefinition. + + :param bit: The bit mask integer for this action. Must be a power of 2. + :type bit: int + :param display_name: The localized display name for this action. + :type display_name: str + :param name: The non-localized name for this action. + :type name: str + :param namespace_id: The namespace that this action belongs to. This will only be used for reading from the database. + :type namespace_id: str + """ + + _attribute_map = { + 'bit': {'key': 'bit', 'type': 'int'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'namespace_id': {'key': 'namespaceId', 'type': 'str'} + } + + def __init__(self, bit=None, display_name=None, name=None, namespace_id=None): + super(ActionDefinition, self).__init__() + self.bit = bit + self.display_name = display_name + self.name = name + self.namespace_id = namespace_id diff --git a/vsts/vsts/security/v4_0/models/permission_evaluation.py b/vsts/vsts/security/v4_0/models/permission_evaluation.py new file mode 100644 index 00000000..85764cf6 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/permission_evaluation.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 PermissionEvaluation(Model): + """PermissionEvaluation. + + :param permissions: Permission bit for this evaluated permission. + :type permissions: int + :param security_namespace_id: Security namespace identifier for this evaluated permission. + :type security_namespace_id: str + :param token: Security namespace-specific token for this evaluated permission. + :type token: str + :param value: Permission evaluation value. + :type value: bool + """ + + _attribute_map = { + 'permissions': {'key': 'permissions', 'type': 'int'}, + 'security_namespace_id': {'key': 'securityNamespaceId', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'} + } + + def __init__(self, permissions=None, security_namespace_id=None, token=None, value=None): + super(PermissionEvaluation, self).__init__() + self.permissions = permissions + self.security_namespace_id = security_namespace_id + self.token = token + self.value = value diff --git a/vsts/vsts/security/v4_0/models/permission_evaluation_batch.py b/vsts/vsts/security/v4_0/models/permission_evaluation_batch.py new file mode 100644 index 00000000..b43422f9 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/permission_evaluation_batch.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PermissionEvaluationBatch(Model): + """PermissionEvaluationBatch. + + :param always_allow_administrators: + :type always_allow_administrators: bool + :param evaluations: Array of permission evaluations to evaluate. + :type evaluations: list of :class:`PermissionEvaluation ` + """ + + _attribute_map = { + 'always_allow_administrators': {'key': 'alwaysAllowAdministrators', 'type': 'bool'}, + 'evaluations': {'key': 'evaluations', 'type': '[PermissionEvaluation]'} + } + + def __init__(self, always_allow_administrators=None, evaluations=None): + super(PermissionEvaluationBatch, self).__init__() + self.always_allow_administrators = always_allow_administrators + self.evaluations = evaluations diff --git a/vsts/vsts/security/v4_0/models/security_namespace_description.py b/vsts/vsts/security/v4_0/models/security_namespace_description.py new file mode 100644 index 00000000..afe85130 --- /dev/null +++ b/vsts/vsts/security/v4_0/models/security_namespace_description.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 SecurityNamespaceDescription(Model): + """SecurityNamespaceDescription. + + :param actions: The list of actions that this Security Namespace is responsible for securing. + :type actions: list of :class:`ActionDefinition ` + :param dataspace_category: This is the dataspace category that describes where the security information for this SecurityNamespace should be stored. + :type dataspace_category: str + :param display_name: This localized name for this namespace. + :type display_name: str + :param element_length: If the security tokens this namespace will be operating on need to be split on certain character lengths to determine its elements, that length should be specified here. If not, this value will be -1. + :type element_length: int + :param extension_type: This is the type of the extension that should be loaded from the plugins directory for extending this security namespace. + :type extension_type: str + :param is_remotable: If true, the security namespace is remotable, allowing another service to proxy the namespace. + :type is_remotable: bool + :param name: This non-localized for this namespace. + :type name: str + :param namespace_id: The unique identifier for this namespace. + :type namespace_id: str + :param read_permission: The permission bits needed by a user in order to read security data on the Security Namespace. + :type read_permission: int + :param separator_value: If the security tokens this namespace will be operating on need to be split on certain characters to determine its elements that character should be specified here. If not, this value will be the null character. + :type separator_value: str + :param structure_value: Used to send information about the structure of the security namespace over the web service. + :type structure_value: int + :param system_bit_mask: The bits reserved by system store + :type system_bit_mask: int + :param use_token_translator: If true, the security service will expect an ISecurityDataspaceTokenTranslator plugin to exist for this namespace + :type use_token_translator: bool + :param write_permission: The permission bits needed by a user in order to modify security data on the Security Namespace. + :type write_permission: int + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[ActionDefinition]'}, + 'dataspace_category': {'key': 'dataspaceCategory', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'element_length': {'key': 'elementLength', 'type': 'int'}, + 'extension_type': {'key': 'extensionType', 'type': 'str'}, + 'is_remotable': {'key': 'isRemotable', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'namespace_id': {'key': 'namespaceId', 'type': 'str'}, + 'read_permission': {'key': 'readPermission', 'type': 'int'}, + 'separator_value': {'key': 'separatorValue', 'type': 'str'}, + 'structure_value': {'key': 'structureValue', 'type': 'int'}, + 'system_bit_mask': {'key': 'systemBitMask', 'type': 'int'}, + 'use_token_translator': {'key': 'useTokenTranslator', 'type': 'bool'}, + 'write_permission': {'key': 'writePermission', 'type': 'int'} + } + + def __init__(self, actions=None, dataspace_category=None, display_name=None, element_length=None, extension_type=None, is_remotable=None, name=None, namespace_id=None, read_permission=None, separator_value=None, structure_value=None, system_bit_mask=None, use_token_translator=None, write_permission=None): + super(SecurityNamespaceDescription, self).__init__() + self.actions = actions + self.dataspace_category = dataspace_category + self.display_name = display_name + self.element_length = element_length + self.extension_type = extension_type + self.is_remotable = is_remotable + self.name = name + self.namespace_id = namespace_id + self.read_permission = read_permission + self.separator_value = separator_value + self.structure_value = structure_value + self.system_bit_mask = system_bit_mask + self.use_token_translator = use_token_translator + self.write_permission = write_permission diff --git a/vsts/vsts/security/v4_0/security_client.py b/vsts/vsts/security/v4_0/security_client.py new file mode 100644 index 00000000..7aceba1a --- /dev/null +++ b/vsts/vsts/security/v4_0/security_client.py @@ -0,0 +1,235 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class SecurityClient(VssClient): + """Security + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(SecurityClient, 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 remove_access_control_entries(self, security_namespace_id, token=None, descriptors=None): + """RemoveAccessControlEntries. + :param str security_namespace_id: + :param str token: + :param str descriptors: + :rtype: bool + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if token is not None: + query_parameters['token'] = self._serialize.query('token', token, 'str') + if descriptors is not None: + query_parameters['descriptors'] = self._serialize.query('descriptors', descriptors, 'str') + response = self._send(http_method='DELETE', + location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('bool', response) + + def set_access_control_entries(self, container, security_namespace_id): + """SetAccessControlEntries. + :param :class:` ` container: + :param str security_namespace_id: + :rtype: [AccessControlEntry] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + content = self._serialize.body(container, 'object') + response = self._send(http_method='POST', + location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AccessControlEntry]', response) + + def query_access_control_lists(self, security_namespace_id, token=None, descriptors=None, include_extended_info=None, recurse=None): + """QueryAccessControlLists. + :param str security_namespace_id: + :param str token: + :param str descriptors: + :param bool include_extended_info: + :param bool recurse: + :rtype: [AccessControlList] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if token is not None: + query_parameters['token'] = self._serialize.query('token', token, 'str') + if descriptors is not None: + query_parameters['descriptors'] = self._serialize.query('descriptors', descriptors, 'str') + if include_extended_info is not None: + query_parameters['includeExtendedInfo'] = self._serialize.query('include_extended_info', include_extended_info, 'bool') + if recurse is not None: + query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool') + response = self._send(http_method='GET', + location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[AccessControlList]', response) + + def remove_access_control_lists(self, security_namespace_id, tokens=None, recurse=None): + """RemoveAccessControlLists. + :param str security_namespace_id: + :param str tokens: + :param bool recurse: + :rtype: bool + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if tokens is not None: + query_parameters['tokens'] = self._serialize.query('tokens', tokens, 'str') + if recurse is not None: + query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool') + response = self._send(http_method='DELETE', + location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('bool', response) + + def set_access_control_lists(self, access_control_lists, security_namespace_id): + """SetAccessControlLists. + :param :class:` ` access_control_lists: + :param str security_namespace_id: + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + content = self._serialize.body(access_control_lists, 'VssJsonCollectionWrapper') + self._send(http_method='POST', + location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', + version='4.0', + route_values=route_values, + content=content) + + def has_permissions_batch(self, eval_batch): + """HasPermissionsBatch. + Perform a batch of "has permission" checks. This methods does not aggregate the results nor does it shortcircut if one of the permissions evaluates to false. + :param :class:` ` eval_batch: + :rtype: :class:` ` + """ + content = self._serialize.body(eval_batch, 'PermissionEvaluationBatch') + response = self._send(http_method='POST', + location_id='cf1faa59-1b63-4448-bf04-13d981a46f5d', + version='4.0', + content=content) + return self._deserialize('PermissionEvaluationBatch', response) + + def has_permissions(self, security_namespace_id, permissions=None, tokens=None, always_allow_administrators=None, delimiter=None): + """HasPermissions. + :param str security_namespace_id: + :param int permissions: + :param str tokens: + :param bool always_allow_administrators: + :param str delimiter: + :rtype: [bool] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + if permissions is not None: + route_values['permissions'] = self._serialize.url('permissions', permissions, 'int') + query_parameters = {} + if tokens is not None: + query_parameters['tokens'] = self._serialize.query('tokens', tokens, 'str') + if always_allow_administrators is not None: + query_parameters['alwaysAllowAdministrators'] = self._serialize.query('always_allow_administrators', always_allow_administrators, 'bool') + if delimiter is not None: + query_parameters['delimiter'] = self._serialize.query('delimiter', delimiter, 'str') + response = self._send(http_method='GET', + location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[bool]', response) + + def remove_permission(self, security_namespace_id, permissions=None, token=None, descriptor=None): + """RemovePermission. + :param str security_namespace_id: + :param int permissions: + :param str token: + :param str descriptor: + :rtype: :class:` ` + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + if permissions is not None: + route_values['permissions'] = self._serialize.url('permissions', permissions, 'int') + query_parameters = {} + if token is not None: + query_parameters['token'] = self._serialize.query('token', token, 'str') + if descriptor is not None: + query_parameters['descriptor'] = self._serialize.query('descriptor', descriptor, 'str') + response = self._send(http_method='DELETE', + location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AccessControlEntry', response) + + def query_security_namespaces(self, security_namespace_id, local_only=None): + """QuerySecurityNamespaces. + :param str security_namespace_id: + :param bool local_only: + :rtype: [SecurityNamespaceDescription] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if local_only is not None: + query_parameters['localOnly'] = self._serialize.query('local_only', local_only, 'bool') + response = self._send(http_method='GET', + location_id='ce7b9f95-fde9-4be8-a86d-83b366f0b87a', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[SecurityNamespaceDescription]', response) + + def set_inherit_flag(self, container, security_namespace_id): + """SetInheritFlag. + :param :class:` ` container: + :param str security_namespace_id: + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + content = self._serialize.body(container, 'object') + self._send(http_method='POST', + location_id='ce7b9f95-fde9-4be8-a86d-83b366f0b87a', + version='4.0', + route_values=route_values, + content=content) + diff --git a/vsts/vsts/security/v4_1/__init__.py b/vsts/vsts/security/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/security/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/security/v4_1/models/__init__.py b/vsts/vsts/security/v4_1/models/__init__.py new file mode 100644 index 00000000..fe4c0453 --- /dev/null +++ b/vsts/vsts/security/v4_1/models/__init__.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------------------------- +# 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 .access_control_entry import AccessControlEntry +from .access_control_list import AccessControlList +from .access_control_lists_collection import AccessControlListsCollection +from .ace_extended_information import AceExtendedInformation +from .action_definition import ActionDefinition +from .permission_evaluation import PermissionEvaluation +from .permission_evaluation_batch import PermissionEvaluationBatch +from .security_namespace_description import SecurityNamespaceDescription + +__all__ = [ + 'AccessControlEntry', + 'AccessControlList', + 'AccessControlListsCollection', + 'AceExtendedInformation', + 'ActionDefinition', + 'PermissionEvaluation', + 'PermissionEvaluationBatch', + 'SecurityNamespaceDescription', +] diff --git a/vsts/vsts/security/v4_1/models/access_control_entry.py b/vsts/vsts/security/v4_1/models/access_control_entry.py new file mode 100644 index 00000000..f7b4921f --- /dev/null +++ b/vsts/vsts/security/v4_1/models/access_control_entry.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccessControlEntry(Model): + """AccessControlEntry. + + :param allow: The set of permission bits that represent the actions that the associated descriptor is allowed to perform. + :type allow: int + :param deny: The set of permission bits that represent the actions that the associated descriptor is not allowed to perform. + :type deny: int + :param descriptor: The descriptor for the user this AccessControlEntry applies to. + :type descriptor: :class:`str ` + :param extended_info: This value, when set, reports the inherited and effective information for the associated descriptor. This value is only set on AccessControlEntries returned by the QueryAccessControlList(s) call when its includeExtendedInfo parameter is set to true. + :type extended_info: :class:`AceExtendedInformation ` + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'int'}, + 'deny': {'key': 'deny', 'type': 'int'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'AceExtendedInformation'} + } + + def __init__(self, allow=None, deny=None, descriptor=None, extended_info=None): + super(AccessControlEntry, self).__init__() + self.allow = allow + self.deny = deny + self.descriptor = descriptor + self.extended_info = extended_info diff --git a/vsts/vsts/security/v4_1/models/access_control_list.py b/vsts/vsts/security/v4_1/models/access_control_list.py new file mode 100644 index 00000000..24bf1bc1 --- /dev/null +++ b/vsts/vsts/security/v4_1/models/access_control_list.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AccessControlList(Model): + """AccessControlList. + + :param aces_dictionary: Storage of permissions keyed on the identity the permission is for. + :type aces_dictionary: dict + :param include_extended_info: True if this ACL holds ACEs that have extended information. + :type include_extended_info: bool + :param inherit_permissions: True if the given token inherits permissions from parents. + :type inherit_permissions: bool + :param token: The token that this AccessControlList is for. + :type token: str + """ + + _attribute_map = { + 'aces_dictionary': {'key': 'acesDictionary', 'type': '{AccessControlEntry}'}, + 'include_extended_info': {'key': 'includeExtendedInfo', 'type': 'bool'}, + 'inherit_permissions': {'key': 'inheritPermissions', 'type': 'bool'}, + 'token': {'key': 'token', 'type': 'str'} + } + + def __init__(self, aces_dictionary=None, include_extended_info=None, inherit_permissions=None, token=None): + super(AccessControlList, self).__init__() + self.aces_dictionary = aces_dictionary + self.include_extended_info = include_extended_info + self.inherit_permissions = inherit_permissions + self.token = token diff --git a/vsts/vsts/security/v4_1/models/access_control_lists_collection.py b/vsts/vsts/security/v4_1/models/access_control_lists_collection.py new file mode 100644 index 00000000..c6ecd6d0 --- /dev/null +++ b/vsts/vsts/security/v4_1/models/access_control_lists_collection.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AccessControlListsCollection(Model): + """AccessControlListsCollection. + + """ + + _attribute_map = { + } + + def __init__(self): + super(AccessControlListsCollection, self).__init__() diff --git a/vsts/vsts/security/v4_1/models/ace_extended_information.py b/vsts/vsts/security/v4_1/models/ace_extended_information.py new file mode 100644 index 00000000..9c639473 --- /dev/null +++ b/vsts/vsts/security/v4_1/models/ace_extended_information.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AceExtendedInformation(Model): + """AceExtendedInformation. + + :param effective_allow: This is the combination of all of the explicit and inherited permissions for this identity on this token. These are the permissions used when determining if a given user has permission to perform an action. + :type effective_allow: int + :param effective_deny: This is the combination of all of the explicit and inherited permissions for this identity on this token. These are the permissions used when determining if a given user has permission to perform an action. + :type effective_deny: int + :param inherited_allow: These are the permissions that are inherited for this identity on this token. If the token does not inherit permissions this will be 0. Note that any permissions that have been explicitly set on this token for this identity, or any groups that this identity is a part of, are not included here. + :type inherited_allow: int + :param inherited_deny: These are the permissions that are inherited for this identity on this token. If the token does not inherit permissions this will be 0. Note that any permissions that have been explicitly set on this token for this identity, or any groups that this identity is a part of, are not included here. + :type inherited_deny: int + """ + + _attribute_map = { + 'effective_allow': {'key': 'effectiveAllow', 'type': 'int'}, + 'effective_deny': {'key': 'effectiveDeny', 'type': 'int'}, + 'inherited_allow': {'key': 'inheritedAllow', 'type': 'int'}, + 'inherited_deny': {'key': 'inheritedDeny', 'type': 'int'} + } + + def __init__(self, effective_allow=None, effective_deny=None, inherited_allow=None, inherited_deny=None): + super(AceExtendedInformation, self).__init__() + self.effective_allow = effective_allow + self.effective_deny = effective_deny + self.inherited_allow = inherited_allow + self.inherited_deny = inherited_deny diff --git a/vsts/vsts/security/v4_1/models/action_definition.py b/vsts/vsts/security/v4_1/models/action_definition.py new file mode 100644 index 00000000..87b96fd9 --- /dev/null +++ b/vsts/vsts/security/v4_1/models/action_definition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ActionDefinition(Model): + """ActionDefinition. + + :param bit: The bit mask integer for this action. Must be a power of 2. + :type bit: int + :param display_name: The localized display name for this action. + :type display_name: str + :param name: The non-localized name for this action. + :type name: str + :param namespace_id: The namespace that this action belongs to. This will only be used for reading from the database. + :type namespace_id: str + """ + + _attribute_map = { + 'bit': {'key': 'bit', 'type': 'int'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'namespace_id': {'key': 'namespaceId', 'type': 'str'} + } + + def __init__(self, bit=None, display_name=None, name=None, namespace_id=None): + super(ActionDefinition, self).__init__() + self.bit = bit + self.display_name = display_name + self.name = name + self.namespace_id = namespace_id diff --git a/vsts/vsts/security/v4_1/models/permission_evaluation.py b/vsts/vsts/security/v4_1/models/permission_evaluation.py new file mode 100644 index 00000000..85764cf6 --- /dev/null +++ b/vsts/vsts/security/v4_1/models/permission_evaluation.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 PermissionEvaluation(Model): + """PermissionEvaluation. + + :param permissions: Permission bit for this evaluated permission. + :type permissions: int + :param security_namespace_id: Security namespace identifier for this evaluated permission. + :type security_namespace_id: str + :param token: Security namespace-specific token for this evaluated permission. + :type token: str + :param value: Permission evaluation value. + :type value: bool + """ + + _attribute_map = { + 'permissions': {'key': 'permissions', 'type': 'int'}, + 'security_namespace_id': {'key': 'securityNamespaceId', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bool'} + } + + def __init__(self, permissions=None, security_namespace_id=None, token=None, value=None): + super(PermissionEvaluation, self).__init__() + self.permissions = permissions + self.security_namespace_id = security_namespace_id + self.token = token + self.value = value diff --git a/vsts/vsts/security/v4_1/models/permission_evaluation_batch.py b/vsts/vsts/security/v4_1/models/permission_evaluation_batch.py new file mode 100644 index 00000000..ae6b6dc5 --- /dev/null +++ b/vsts/vsts/security/v4_1/models/permission_evaluation_batch.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PermissionEvaluationBatch(Model): + """PermissionEvaluationBatch. + + :param always_allow_administrators: + :type always_allow_administrators: bool + :param evaluations: Array of permission evaluations to evaluate. + :type evaluations: list of :class:`PermissionEvaluation ` + """ + + _attribute_map = { + 'always_allow_administrators': {'key': 'alwaysAllowAdministrators', 'type': 'bool'}, + 'evaluations': {'key': 'evaluations', 'type': '[PermissionEvaluation]'} + } + + def __init__(self, always_allow_administrators=None, evaluations=None): + super(PermissionEvaluationBatch, self).__init__() + self.always_allow_administrators = always_allow_administrators + self.evaluations = evaluations diff --git a/vsts/vsts/security/v4_1/models/security_namespace_description.py b/vsts/vsts/security/v4_1/models/security_namespace_description.py new file mode 100644 index 00000000..40faea8e --- /dev/null +++ b/vsts/vsts/security/v4_1/models/security_namespace_description.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 SecurityNamespaceDescription(Model): + """SecurityNamespaceDescription. + + :param actions: The list of actions that this Security Namespace is responsible for securing. + :type actions: list of :class:`ActionDefinition ` + :param dataspace_category: This is the dataspace category that describes where the security information for this SecurityNamespace should be stored. + :type dataspace_category: str + :param display_name: This localized name for this namespace. + :type display_name: str + :param element_length: If the security tokens this namespace will be operating on need to be split on certain character lengths to determine its elements, that length should be specified here. If not, this value will be -1. + :type element_length: int + :param extension_type: This is the type of the extension that should be loaded from the plugins directory for extending this security namespace. + :type extension_type: str + :param is_remotable: If true, the security namespace is remotable, allowing another service to proxy the namespace. + :type is_remotable: bool + :param name: This non-localized for this namespace. + :type name: str + :param namespace_id: The unique identifier for this namespace. + :type namespace_id: str + :param read_permission: The permission bits needed by a user in order to read security data on the Security Namespace. + :type read_permission: int + :param separator_value: If the security tokens this namespace will be operating on need to be split on certain characters to determine its elements that character should be specified here. If not, this value will be the null character. + :type separator_value: str + :param structure_value: Used to send information about the structure of the security namespace over the web service. + :type structure_value: int + :param system_bit_mask: The bits reserved by system store + :type system_bit_mask: int + :param use_token_translator: If true, the security service will expect an ISecurityDataspaceTokenTranslator plugin to exist for this namespace + :type use_token_translator: bool + :param write_permission: The permission bits needed by a user in order to modify security data on the Security Namespace. + :type write_permission: int + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[ActionDefinition]'}, + 'dataspace_category': {'key': 'dataspaceCategory', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'element_length': {'key': 'elementLength', 'type': 'int'}, + 'extension_type': {'key': 'extensionType', 'type': 'str'}, + 'is_remotable': {'key': 'isRemotable', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'namespace_id': {'key': 'namespaceId', 'type': 'str'}, + 'read_permission': {'key': 'readPermission', 'type': 'int'}, + 'separator_value': {'key': 'separatorValue', 'type': 'str'}, + 'structure_value': {'key': 'structureValue', 'type': 'int'}, + 'system_bit_mask': {'key': 'systemBitMask', 'type': 'int'}, + 'use_token_translator': {'key': 'useTokenTranslator', 'type': 'bool'}, + 'write_permission': {'key': 'writePermission', 'type': 'int'} + } + + def __init__(self, actions=None, dataspace_category=None, display_name=None, element_length=None, extension_type=None, is_remotable=None, name=None, namespace_id=None, read_permission=None, separator_value=None, structure_value=None, system_bit_mask=None, use_token_translator=None, write_permission=None): + super(SecurityNamespaceDescription, self).__init__() + self.actions = actions + self.dataspace_category = dataspace_category + self.display_name = display_name + self.element_length = element_length + self.extension_type = extension_type + self.is_remotable = is_remotable + self.name = name + self.namespace_id = namespace_id + self.read_permission = read_permission + self.separator_value = separator_value + self.structure_value = structure_value + self.system_bit_mask = system_bit_mask + self.use_token_translator = use_token_translator + self.write_permission = write_permission diff --git a/vsts/vsts/security/v4_1/security_client.py b/vsts/vsts/security/v4_1/security_client.py new file mode 100644 index 00000000..1e051591 --- /dev/null +++ b/vsts/vsts/security/v4_1/security_client.py @@ -0,0 +1,228 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class SecurityClient(VssClient): + """Security + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(SecurityClient, 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 remove_access_control_entries(self, security_namespace_id, token=None, descriptors=None): + """RemoveAccessControlEntries. + [Preview API] Remove the specified ACEs from the ACL belonging to the specified token. + :param str security_namespace_id: + :param str token: + :param str descriptors: + :rtype: bool + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if token is not None: + query_parameters['token'] = self._serialize.query('token', token, 'str') + if descriptors is not None: + query_parameters['descriptors'] = self._serialize.query('descriptors', descriptors, 'str') + response = self._send(http_method='DELETE', + location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('bool', response) + + def set_access_control_entries(self, container, security_namespace_id): + """SetAccessControlEntries. + [Preview API] Add or update ACEs in the ACL for the provided token. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced. + :param :class:` ` container: + :param str security_namespace_id: + :rtype: [AccessControlEntry] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + content = self._serialize.body(container, 'object') + response = self._send(http_method='POST', + location_id='ac08c8ff-4323-4b08-af90-bcd018d380ce', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AccessControlEntry]', response) + + def query_access_control_lists(self, security_namespace_id, token=None, descriptors=None, include_extended_info=None, recurse=None): + """QueryAccessControlLists. + [Preview API] Return a list of access control lists for the specified security namespace and token. + :param str security_namespace_id: Security namespace identifier. + :param str token: Security token + :param str descriptors: + :param bool include_extended_info: If true, populate the extended information properties for the access control entries contained in the returned lists. + :param bool recurse: If true and this is a hierarchical namespace, return child ACLs of the specified token. + :rtype: [AccessControlList] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if token is not None: + query_parameters['token'] = self._serialize.query('token', token, 'str') + if descriptors is not None: + query_parameters['descriptors'] = self._serialize.query('descriptors', descriptors, 'str') + if include_extended_info is not None: + query_parameters['includeExtendedInfo'] = self._serialize.query('include_extended_info', include_extended_info, 'bool') + if recurse is not None: + query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool') + response = self._send(http_method='GET', + location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[AccessControlList]', response) + + def remove_access_control_lists(self, security_namespace_id, tokens=None, recurse=None): + """RemoveAccessControlLists. + [Preview API] Remove access control lists under the specfied security namespace. + :param str security_namespace_id: Security namespace identifier. + :param str tokens: One or more comma-separated security tokens + :param bool recurse: If true and this is a hierarchical namespace, also remove child ACLs of the specified tokens. + :rtype: bool + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if tokens is not None: + query_parameters['tokens'] = self._serialize.query('tokens', tokens, 'str') + if recurse is not None: + query_parameters['recurse'] = self._serialize.query('recurse', recurse, 'bool') + response = self._send(http_method='DELETE', + location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('bool', response) + + def set_access_control_lists(self, access_control_lists, security_namespace_id): + """SetAccessControlLists. + [Preview API] Create one or more access control lists. + :param :class:` ` access_control_lists: + :param str security_namespace_id: Security namespace identifier. + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + content = self._serialize.body(access_control_lists, 'VssJsonCollectionWrapper') + self._send(http_method='POST', + location_id='18a2ad18-7571-46ae-bec7-0c7da1495885', + version='4.1-preview.1', + route_values=route_values, + content=content) + + def has_permissions_batch(self, eval_batch): + """HasPermissionsBatch. + [Preview API] Evaluates multiple permissions for the callign user. Note: This methods does not aggregate the results nor does it short-circut if one of the permissions evaluates to false. + :param :class:` ` eval_batch: The set of permissions to check. + :rtype: :class:` ` + """ + content = self._serialize.body(eval_batch, 'PermissionEvaluationBatch') + response = self._send(http_method='POST', + location_id='cf1faa59-1b63-4448-bf04-13d981a46f5d', + version='4.1-preview.1', + content=content) + return self._deserialize('PermissionEvaluationBatch', response) + + def has_permissions(self, security_namespace_id, permissions=None, tokens=None, always_allow_administrators=None, delimiter=None): + """HasPermissions. + [Preview API] Evaluates whether the caller has the specified permissions on the specified set of security tokens. + :param str security_namespace_id: Security namespace identifier. + :param int permissions: Permissions to evaluate. + :param str tokens: One or more security tokens to evaluate. + :param bool always_allow_administrators: If true and if the caller is an administrator, always return true. + :param str delimiter: Optional security token separator. Defaults to ",". + :rtype: [bool] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + if permissions is not None: + route_values['permissions'] = self._serialize.url('permissions', permissions, 'int') + query_parameters = {} + if tokens is not None: + query_parameters['tokens'] = self._serialize.query('tokens', tokens, 'str') + if always_allow_administrators is not None: + query_parameters['alwaysAllowAdministrators'] = self._serialize.query('always_allow_administrators', always_allow_administrators, 'bool') + if delimiter is not None: + query_parameters['delimiter'] = self._serialize.query('delimiter', delimiter, 'str') + response = self._send(http_method='GET', + location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[bool]', response) + + def remove_permission(self, security_namespace_id, permissions=None, token=None, descriptor=None): + """RemovePermission. + [Preview API] Removes the specified permissions from the caller or specified user or group. + :param str security_namespace_id: Security namespace identifier. + :param int permissions: Permissions to remove. + :param str token: Security token to remove permissions for. + :param str descriptor: Identity descriptor of the user to remove permissions for. Defaults to the caller. + :rtype: :class:` ` + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + if permissions is not None: + route_values['permissions'] = self._serialize.url('permissions', permissions, 'int') + query_parameters = {} + if token is not None: + query_parameters['token'] = self._serialize.query('token', token, 'str') + if descriptor is not None: + query_parameters['descriptor'] = self._serialize.query('descriptor', descriptor, 'str') + response = self._send(http_method='DELETE', + location_id='dd3b8bd6-c7fc-4cbd-929a-933d9c011c9d', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AccessControlEntry', response) + + def query_security_namespaces(self, security_namespace_id, local_only=None): + """QuerySecurityNamespaces. + [Preview API] + :param str security_namespace_id: + :param bool local_only: + :rtype: [SecurityNamespaceDescription] + """ + route_values = {} + if security_namespace_id is not None: + route_values['securityNamespaceId'] = self._serialize.url('security_namespace_id', security_namespace_id, 'str') + query_parameters = {} + if local_only is not None: + query_parameters['localOnly'] = self._serialize.query('local_only', local_only, 'bool') + response = self._send(http_method='GET', + location_id='ce7b9f95-fde9-4be8-a86d-83b366f0b87a', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[SecurityNamespaceDescription]', response) + diff --git a/vsts/vsts/service_hooks/__init__.py b/vsts/vsts/service_hooks/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/service_hooks/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/service_hooks/v4_0/__init__.py b/vsts/vsts/service_hooks/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/service_hooks/v4_0/models/__init__.py b/vsts/vsts/service_hooks/v4_0/models/__init__.py new file mode 100644 index 00000000..30e3e5ee --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/__init__.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 .consumer import Consumer +from .consumer_action import ConsumerAction +from .event import Event +from .event_type_descriptor import EventTypeDescriptor +from .external_configuration_descriptor import ExternalConfigurationDescriptor +from .formatted_event_message import FormattedEventMessage +from .identity_ref import IdentityRef +from .input_descriptor import InputDescriptor +from .input_filter import InputFilter +from .input_filter_condition import InputFilterCondition +from .input_validation import InputValidation +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .input_values_query import InputValuesQuery +from .notification import Notification +from .notification_details import NotificationDetails +from .notification_results_summary_detail import NotificationResultsSummaryDetail +from .notifications_query import NotificationsQuery +from .notification_summary import NotificationSummary +from .publisher import Publisher +from .publisher_event import PublisherEvent +from .publishers_query import PublishersQuery +from .reference_links import ReferenceLinks +from .resource_container import ResourceContainer +from .session_token import SessionToken +from .subscription import Subscription +from .subscriptions_query import SubscriptionsQuery +from .versioned_resource import VersionedResource + +__all__ = [ + 'Consumer', + 'ConsumerAction', + 'Event', + 'EventTypeDescriptor', + 'ExternalConfigurationDescriptor', + 'FormattedEventMessage', + 'IdentityRef', + 'InputDescriptor', + 'InputFilter', + 'InputFilterCondition', + 'InputValidation', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'InputValuesQuery', + 'Notification', + 'NotificationDetails', + 'NotificationResultsSummaryDetail', + 'NotificationsQuery', + 'NotificationSummary', + 'Publisher', + 'PublisherEvent', + 'PublishersQuery', + 'ReferenceLinks', + 'ResourceContainer', + 'SessionToken', + 'Subscription', + 'SubscriptionsQuery', + 'VersionedResource', +] diff --git a/vsts/vsts/service_hooks/v4_0/models/consumer.py b/vsts/vsts/service_hooks/v4_0/models/consumer.py new file mode 100644 index 00000000..39ccb20f --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/consumer.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 Consumer(Model): + """Consumer. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param actions: Gets this consumer's actions. + :type actions: list of :class:`ConsumerAction ` + :param authentication_type: Gets or sets this consumer's authentication type. + :type authentication_type: object + :param description: Gets or sets this consumer's localized description. + :type description: str + :param external_configuration: Non-null only if subscriptions for this consumer are configured externally. + :type external_configuration: :class:`ExternalConfigurationDescriptor ` + :param id: Gets or sets this consumer's identifier. + :type id: str + :param image_url: Gets or sets this consumer's image URL, if any. + :type image_url: str + :param information_url: Gets or sets this consumer's information URL, if any. + :type information_url: str + :param input_descriptors: Gets or sets this consumer's input descriptors. + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: Gets or sets this consumer's localized name. + :type name: str + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'actions': {'key': 'actions', 'type': '[ConsumerAction]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'external_configuration': {'key': 'externalConfiguration', 'type': 'ExternalConfigurationDescriptor'}, + 'id': {'key': 'id', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'}, + 'information_url': {'key': 'informationUrl', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, actions=None, authentication_type=None, description=None, external_configuration=None, id=None, image_url=None, information_url=None, input_descriptors=None, name=None, url=None): + super(Consumer, self).__init__() + self._links = _links + self.actions = actions + self.authentication_type = authentication_type + self.description = description + self.external_configuration = external_configuration + self.id = id + self.image_url = image_url + self.information_url = information_url + self.input_descriptors = input_descriptors + self.name = name + self.url = url diff --git a/vsts/vsts/service_hooks/v4_0/models/consumer_action.py b/vsts/vsts/service_hooks/v4_0/models/consumer_action.py new file mode 100644 index 00000000..34960000 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/consumer_action.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 ConsumerAction(Model): + """ConsumerAction. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param allow_resource_version_override: Gets or sets the flag indicating if resource version can be overridden when creating or editing a subscription. + :type allow_resource_version_override: bool + :param consumer_id: Gets or sets the identifier of the consumer to which this action belongs. + :type consumer_id: str + :param description: Gets or sets this action's localized description. + :type description: str + :param id: Gets or sets this action's identifier. + :type id: str + :param input_descriptors: Gets or sets this action's input descriptors. + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: Gets or sets this action's localized name. + :type name: str + :param supported_event_types: Gets or sets this action's supported event identifiers. + :type supported_event_types: list of str + :param supported_resource_versions: Gets or sets this action's supported resource versions. + :type supported_resource_versions: dict + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allow_resource_version_override': {'key': 'allowResourceVersionOverride', 'type': 'bool'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_event_types': {'key': 'supportedEventTypes', 'type': '[str]'}, + 'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '{[str]}'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, allow_resource_version_override=None, consumer_id=None, description=None, id=None, input_descriptors=None, name=None, supported_event_types=None, supported_resource_versions=None, url=None): + super(ConsumerAction, self).__init__() + self._links = _links + self.allow_resource_version_override = allow_resource_version_override + self.consumer_id = consumer_id + self.description = description + self.id = id + self.input_descriptors = input_descriptors + self.name = name + self.supported_event_types = supported_event_types + self.supported_resource_versions = supported_resource_versions + self.url = url diff --git a/vsts/vsts/service_hooks/v4_0/models/event.py b/vsts/vsts/service_hooks/v4_0/models/event.py new file mode 100644 index 00000000..a4e448f9 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/event.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 Event(Model): + """Event. + + :param created_date: Gets or sets the UTC-based date and time that this event was created. + :type created_date: datetime + :param detailed_message: Gets or sets the detailed message associated with this event. + :type detailed_message: :class:`FormattedEventMessage ` + :param event_type: Gets or sets the type of this event. + :type event_type: str + :param id: Gets or sets the unique identifier of this event. + :type id: str + :param message: Gets or sets the (brief) message associated with this event. + :type message: :class:`FormattedEventMessage ` + :param publisher_id: Gets or sets the identifier of the publisher that raised this event. + :type publisher_id: str + :param resource: Gets or sets the data associated with this event. + :type resource: object + :param resource_containers: Gets or sets the resource containers. + :type resource_containers: dict + :param resource_version: Gets or sets the version of the data associated with this event. + :type resource_version: str + :param session_token: Gets or sets the Session Token that can be used in further interactions + :type session_token: :class:`SessionToken ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'detailed_message': {'key': 'detailedMessage', 'type': 'FormattedEventMessage'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'FormattedEventMessage'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'object'}, + 'resource_containers': {'key': 'resourceContainers', 'type': '{ResourceContainer}'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'str'}, + 'session_token': {'key': 'sessionToken', 'type': 'SessionToken'} + } + + def __init__(self, created_date=None, detailed_message=None, event_type=None, id=None, message=None, publisher_id=None, resource=None, resource_containers=None, resource_version=None, session_token=None): + super(Event, self).__init__() + self.created_date = created_date + self.detailed_message = detailed_message + self.event_type = event_type + self.id = id + self.message = message + self.publisher_id = publisher_id + self.resource = resource + self.resource_containers = resource_containers + self.resource_version = resource_version + self.session_token = session_token diff --git a/vsts/vsts/service_hooks/v4_0/models/event_type_descriptor.py b/vsts/vsts/service_hooks/v4_0/models/event_type_descriptor.py new file mode 100644 index 00000000..18e95e09 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/event_type_descriptor.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventTypeDescriptor(Model): + """EventTypeDescriptor. + + :param description: A localized description of the event type + :type description: str + :param id: A unique id for the event type + :type id: str + :param input_descriptors: Event-specific inputs + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: A localized friendly name for the event type + :type name: str + :param publisher_id: A unique id for the publisher of this event type + :type publisher_id: str + :param supported_resource_versions: Supported versions for the event's resource payloads. + :type supported_resource_versions: list of str + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '[str]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, input_descriptors=None, name=None, publisher_id=None, supported_resource_versions=None, url=None): + super(EventTypeDescriptor, self).__init__() + self.description = description + self.id = id + self.input_descriptors = input_descriptors + self.name = name + self.publisher_id = publisher_id + self.supported_resource_versions = supported_resource_versions + self.url = url diff --git a/vsts/vsts/service_hooks/v4_0/models/external_configuration_descriptor.py b/vsts/vsts/service_hooks/v4_0/models/external_configuration_descriptor.py new file mode 100644 index 00000000..c2ab4f98 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/external_configuration_descriptor.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExternalConfigurationDescriptor(Model): + """ExternalConfigurationDescriptor. + + :param create_subscription_url: Url of the site to create this type of subscription. + :type create_subscription_url: str + :param edit_subscription_property_name: The name of an input property that contains the URL to edit a subscription. + :type edit_subscription_property_name: str + :param hosted_only: True if the external configuration applies only to hosted. + :type hosted_only: bool + """ + + _attribute_map = { + 'create_subscription_url': {'key': 'createSubscriptionUrl', 'type': 'str'}, + 'edit_subscription_property_name': {'key': 'editSubscriptionPropertyName', 'type': 'str'}, + 'hosted_only': {'key': 'hostedOnly', 'type': 'bool'} + } + + def __init__(self, create_subscription_url=None, edit_subscription_property_name=None, hosted_only=None): + super(ExternalConfigurationDescriptor, self).__init__() + self.create_subscription_url = create_subscription_url + self.edit_subscription_property_name = edit_subscription_property_name + self.hosted_only = hosted_only diff --git a/vsts/vsts/service_hooks/v4_0/models/formatted_event_message.py b/vsts/vsts/service_hooks/v4_0/models/formatted_event_message.py new file mode 100644 index 00000000..7d513262 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/formatted_event_message.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 FormattedEventMessage(Model): + """FormattedEventMessage. + + :param html: Gets or sets the html format of the message + :type html: str + :param markdown: Gets or sets the markdown format of the message + :type markdown: str + :param text: Gets or sets the raw text of the message + :type text: str + """ + + _attribute_map = { + 'html': {'key': 'html', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'} + } + + def __init__(self, html=None, markdown=None, text=None): + super(FormattedEventMessage, self).__init__() + self.html = html + self.markdown = markdown + self.text = text diff --git a/vsts/vsts/service_hooks/v4_0/models/identity_ref.py b/vsts/vsts/service_hooks/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/service_hooks/v4_0/models/input_descriptor.py b/vsts/vsts/service_hooks/v4_0/models/input_descriptor.py new file mode 100644 index 00000000..860efdcc --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_descriptor.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputDescriptor(Model): + """InputDescriptor. + + :param dependency_input_ids: The ids of all inputs that the value of this input is dependent on. + :type dependency_input_ids: list of str + :param description: Description of what this input is used for + :type description: str + :param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + :type group_name: str + :param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + :type has_dynamic_value_information: bool + :param id: Identifier for the subscription input + :type id: str + :param input_mode: Mode in which the value of this input should be entered + :type input_mode: object + :param is_confidential: Gets whether this input is confidential, such as for a password or application key + :type is_confidential: bool + :param name: Localized name which can be shown as a label for the subscription input + :type name: str + :param properties: Custom properties for the input which can be used by the service provider + :type properties: dict + :param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. + :type type: str + :param use_in_default_description: Gets whether this input is included in the default generated action description. + :type use_in_default_description: bool + :param validation: Information to use to validate this input's value + :type validation: :class:`InputValidation ` + :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. + :type value_hint: str + :param values: Information about possible values for this input + :type values: :class:`InputValues ` + """ + + _attribute_map = { + 'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_mode': {'key': 'inputMode', 'type': 'object'}, + 'is_confidential': {'key': 'isConfidential', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'}, + 'validation': {'key': 'validation', 'type': 'InputValidation'}, + 'value_hint': {'key': 'valueHint', 'type': 'str'}, + 'values': {'key': 'values', 'type': 'InputValues'} + } + + def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None): + super(InputDescriptor, self).__init__() + self.dependency_input_ids = dependency_input_ids + self.description = description + self.group_name = group_name + self.has_dynamic_value_information = has_dynamic_value_information + self.id = id + self.input_mode = input_mode + self.is_confidential = is_confidential + self.name = name + self.properties = properties + self.type = type + self.use_in_default_description = use_in_default_description + self.validation = validation + self.value_hint = value_hint + self.values = values diff --git a/vsts/vsts/service_hooks/v4_0/models/input_filter.py b/vsts/vsts/service_hooks/v4_0/models/input_filter.py new file mode 100644 index 00000000..e13adab6 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_filter.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputFilter(Model): + """InputFilter. + + :param conditions: Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. + :type conditions: list of :class:`InputFilterCondition ` + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[InputFilterCondition]'} + } + + def __init__(self, conditions=None): + super(InputFilter, self).__init__() + self.conditions = conditions diff --git a/vsts/vsts/service_hooks/v4_0/models/input_filter_condition.py b/vsts/vsts/service_hooks/v4_0/models/input_filter_condition.py new file mode 100644 index 00000000..1a514738 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_filter_condition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputFilterCondition(Model): + """InputFilterCondition. + + :param case_sensitive: Whether or not to do a case sensitive match + :type case_sensitive: bool + :param input_id: The Id of the input to filter on + :type input_id: str + :param input_value: The "expected" input value to compare with the actual input value + :type input_value: str + :param operator: The operator applied between the expected and actual input value + :type operator: object + """ + + _attribute_map = { + 'case_sensitive': {'key': 'caseSensitive', 'type': 'bool'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'input_value': {'key': 'inputValue', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'} + } + + def __init__(self, case_sensitive=None, input_id=None, input_value=None, operator=None): + super(InputFilterCondition, self).__init__() + self.case_sensitive = case_sensitive + self.input_id = input_id + self.input_value = input_value + self.operator = operator diff --git a/vsts/vsts/service_hooks/v4_0/models/input_validation.py b/vsts/vsts/service_hooks/v4_0/models/input_validation.py new file mode 100644 index 00000000..f2f1a434 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_validation.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidation(Model): + """InputValidation. + + :param data_type: + :type data_type: object + :param is_required: + :type is_required: bool + :param max_length: + :type max_length: int + :param max_value: + :type max_value: decimal + :param min_length: + :type min_length: int + :param min_value: + :type min_value: decimal + :param pattern: + :type pattern: str + :param pattern_mismatch_error_message: + :type pattern_mismatch_error_message: str + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'object'}, + 'is_required': {'key': 'isRequired', 'type': 'bool'}, + 'max_length': {'key': 'maxLength', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'decimal'}, + 'min_length': {'key': 'minLength', 'type': 'int'}, + 'min_value': {'key': 'minValue', 'type': 'decimal'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'} + } + + def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None): + super(InputValidation, self).__init__() + self.data_type = data_type + self.is_required = is_required + self.max_length = max_length + self.max_value = max_value + self.min_length = min_length + self.min_value = min_value + self.pattern = pattern + self.pattern_mismatch_error_message = pattern_mismatch_error_message diff --git a/vsts/vsts/service_hooks/v4_0/models/input_value.py b/vsts/vsts/service_hooks/v4_0/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/service_hooks/v4_0/models/input_values.py b/vsts/vsts/service_hooks/v4_0/models/input_values.py new file mode 100644 index 00000000..15d047fe --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/service_hooks/v4_0/models/input_values_error.py b/vsts/vsts/service_hooks/v4_0/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/service_hooks/v4_0/models/input_values_query.py b/vsts/vsts/service_hooks/v4_0/models/input_values_query.py new file mode 100644 index 00000000..26e4c954 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/input_values_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesQuery(Model): + """InputValuesQuery. + + :param current_values: + :type current_values: dict + :param input_values: The input values to return on input, and the result from the consumer on output. + :type input_values: list of :class:`InputValues ` + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, + 'resource': {'key': 'resource', 'type': 'object'} + } + + def __init__(self, current_values=None, input_values=None, resource=None): + super(InputValuesQuery, self).__init__() + self.current_values = current_values + self.input_values = input_values + self.resource = resource diff --git a/vsts/vsts/service_hooks/v4_0/models/notification.py b/vsts/vsts/service_hooks/v4_0/models/notification.py new file mode 100644 index 00000000..6e6c71af --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/notification.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 Notification(Model): + """Notification. + + :param created_date: Gets or sets date and time that this result was created. + :type created_date: datetime + :param details: Details about this notification (if available) + :type details: :class:`NotificationDetails ` + :param event_id: The event id associated with this notification + :type event_id: str + :param id: The notification id + :type id: int + :param modified_date: Gets or sets date and time that this result was last modified. + :type modified_date: datetime + :param result: Result of the notification + :type result: object + :param status: Status of the notification + :type status: object + :param subscriber_id: The subscriber Id associated with this notification. This is the last identity who touched in the subscription. In case of test notifications it can be the tester if the subscription is not created yet. + :type subscriber_id: str + :param subscription_id: The subscription id associated with this notification + :type subscription_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'details': {'key': 'details', 'type': 'NotificationDetails'}, + 'event_id': {'key': 'eventId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'result': {'key': 'result', 'type': 'object'}, + 'status': {'key': 'status', 'type': 'object'}, + 'subscriber_id': {'key': 'subscriberId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, created_date=None, details=None, event_id=None, id=None, modified_date=None, result=None, status=None, subscriber_id=None, subscription_id=None): + super(Notification, self).__init__() + self.created_date = created_date + self.details = details + self.event_id = event_id + self.id = id + self.modified_date = modified_date + self.result = result + self.status = status + self.subscriber_id = subscriber_id + self.subscription_id = subscription_id diff --git a/vsts/vsts/service_hooks/v4_0/models/notification_details.py b/vsts/vsts/service_hooks/v4_0/models/notification_details.py new file mode 100644 index 00000000..f71beb0a --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/notification_details.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationDetails(Model): + """NotificationDetails. + + :param completed_date: Gets or sets the time that this notification was completed (response received from the consumer) + :type completed_date: datetime + :param consumer_action_id: Gets or sets this notification detail's consumer action identifier. + :type consumer_action_id: str + :param consumer_id: Gets or sets this notification detail's consumer identifier. + :type consumer_id: str + :param consumer_inputs: Gets or sets this notification detail's consumer inputs. + :type consumer_inputs: dict + :param dequeued_date: Gets or sets the time that this notification was dequeued for processing + :type dequeued_date: datetime + :param error_detail: Gets or sets this notification detail's error detail. + :type error_detail: str + :param error_message: Gets or sets this notification detail's error message. + :type error_message: str + :param event: Gets or sets this notification detail's event content. + :type event: :class:`Event ` + :param event_type: Gets or sets this notification detail's event type. + :type event_type: str + :param processed_date: Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer) + :type processed_date: datetime + :param publisher_id: Gets or sets this notification detail's publisher identifier. + :type publisher_id: str + :param publisher_inputs: Gets or sets this notification detail's publisher inputs. + :type publisher_inputs: dict + :param queued_date: Gets or sets the time that this notification was queued (created) + :type queued_date: datetime + :param request: Gets or sets this notification detail's request. + :type request: str + :param request_attempts: Number of requests attempted to be sent to the consumer + :type request_attempts: int + :param request_duration: Duration of the request to the consumer in seconds + :type request_duration: number + :param response: Gets or sets this notification detail's reponse. + :type response: str + """ + + _attribute_map = { + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'}, + 'dequeued_date': {'key': 'dequeuedDate', 'type': 'iso-8601'}, + 'error_detail': {'key': 'errorDetail', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'event': {'key': 'event', 'type': 'Event'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'processed_date': {'key': 'processedDate', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, + 'queued_date': {'key': 'queuedDate', 'type': 'iso-8601'}, + 'request': {'key': 'request', 'type': 'str'}, + 'request_attempts': {'key': 'requestAttempts', 'type': 'int'}, + 'request_duration': {'key': 'requestDuration', 'type': 'number'}, + 'response': {'key': 'response', 'type': 'str'} + } + + def __init__(self, completed_date=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, dequeued_date=None, error_detail=None, error_message=None, event=None, event_type=None, processed_date=None, publisher_id=None, publisher_inputs=None, queued_date=None, request=None, request_attempts=None, request_duration=None, response=None): + super(NotificationDetails, self).__init__() + self.completed_date = completed_date + self.consumer_action_id = consumer_action_id + self.consumer_id = consumer_id + self.consumer_inputs = consumer_inputs + self.dequeued_date = dequeued_date + self.error_detail = error_detail + self.error_message = error_message + self.event = event + self.event_type = event_type + self.processed_date = processed_date + self.publisher_id = publisher_id + self.publisher_inputs = publisher_inputs + self.queued_date = queued_date + self.request = request + self.request_attempts = request_attempts + self.request_duration = request_duration + self.response = response diff --git a/vsts/vsts/service_hooks/v4_0/models/notification_results_summary_detail.py b/vsts/vsts/service_hooks/v4_0/models/notification_results_summary_detail.py new file mode 100644 index 00000000..eb8819fa --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/notification_results_summary_detail.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationResultsSummaryDetail(Model): + """NotificationResultsSummaryDetail. + + :param notification_count: Count of notification sent out with a matching result. + :type notification_count: int + :param result: Result of the notification + :type result: object + """ + + _attribute_map = { + 'notification_count': {'key': 'notificationCount', 'type': 'int'}, + 'result': {'key': 'result', 'type': 'object'} + } + + def __init__(self, notification_count=None, result=None): + super(NotificationResultsSummaryDetail, self).__init__() + self.notification_count = notification_count + self.result = result diff --git a/vsts/vsts/service_hooks/v4_0/models/notification_summary.py b/vsts/vsts/service_hooks/v4_0/models/notification_summary.py new file mode 100644 index 00000000..b212ac0a --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/notification_summary.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSummary(Model): + """NotificationSummary. + + :param results: The notification results for this particular subscription. + :type results: list of :class:`NotificationResultsSummaryDetail ` + :param subscription_id: The subscription id associated with this notification + :type subscription_id: str + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[NotificationResultsSummaryDetail]'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, results=None, subscription_id=None): + super(NotificationSummary, self).__init__() + self.results = results + self.subscription_id = subscription_id diff --git a/vsts/vsts/service_hooks/v4_0/models/notifications_query.py b/vsts/vsts/service_hooks/v4_0/models/notifications_query.py new file mode 100644 index 00000000..5c70f4a7 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/notifications_query.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationsQuery(Model): + """NotificationsQuery. + + :param associated_subscriptions: The subscriptions associated with the notifications returned from the query + :type associated_subscriptions: list of :class:`Subscription ` + :param include_details: If true, we will return all notification history for the query provided; otherwise, the summary is returned. + :type include_details: bool + :param max_created_date: Optional maximum date at which the notification was created + :type max_created_date: datetime + :param max_results: Optional maximum number of overall results to include + :type max_results: int + :param max_results_per_subscription: Optional maximum number of results for each subscription. Only takes effect when a list of subscription ids is supplied in the query. + :type max_results_per_subscription: int + :param min_created_date: Optional minimum date at which the notification was created + :type min_created_date: datetime + :param publisher_id: Optional publisher id to restrict the results to + :type publisher_id: str + :param results: Results from the query + :type results: list of :class:`Notification ` + :param result_type: Optional notification result type to filter results to + :type result_type: object + :param status: Optional notification status to filter results to + :type status: object + :param subscription_ids: Optional list of subscription ids to restrict the results to + :type subscription_ids: list of str + :param summary: Summary of notifications - the count of each result type (success, fail, ..). + :type summary: list of :class:`NotificationSummary ` + """ + + _attribute_map = { + 'associated_subscriptions': {'key': 'associatedSubscriptions', 'type': '[Subscription]'}, + 'include_details': {'key': 'includeDetails', 'type': 'bool'}, + 'max_created_date': {'key': 'maxCreatedDate', 'type': 'iso-8601'}, + 'max_results': {'key': 'maxResults', 'type': 'int'}, + 'max_results_per_subscription': {'key': 'maxResultsPerSubscription', 'type': 'int'}, + 'min_created_date': {'key': 'minCreatedDate', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'results': {'key': 'results', 'type': '[Notification]'}, + 'result_type': {'key': 'resultType', 'type': 'object'}, + 'status': {'key': 'status', 'type': 'object'}, + 'subscription_ids': {'key': 'subscriptionIds', 'type': '[str]'}, + 'summary': {'key': 'summary', 'type': '[NotificationSummary]'} + } + + def __init__(self, associated_subscriptions=None, include_details=None, max_created_date=None, max_results=None, max_results_per_subscription=None, min_created_date=None, publisher_id=None, results=None, result_type=None, status=None, subscription_ids=None, summary=None): + super(NotificationsQuery, self).__init__() + self.associated_subscriptions = associated_subscriptions + self.include_details = include_details + self.max_created_date = max_created_date + self.max_results = max_results + self.max_results_per_subscription = max_results_per_subscription + self.min_created_date = min_created_date + self.publisher_id = publisher_id + self.results = results + self.result_type = result_type + self.status = status + self.subscription_ids = subscription_ids + self.summary = summary diff --git a/vsts/vsts/service_hooks/v4_0/models/publisher.py b/vsts/vsts/service_hooks/v4_0/models/publisher.py new file mode 100644 index 00000000..7ebd4d78 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/publisher.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 Publisher(Model): + """Publisher. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param description: Gets this publisher's localized description. + :type description: str + :param id: Gets this publisher's identifier. + :type id: str + :param input_descriptors: Publisher-specific inputs + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: Gets this publisher's localized name. + :type name: str + :param service_instance_type: The service instance type of the first party publisher. + :type service_instance_type: str + :param supported_events: Gets this publisher's supported event types. + :type supported_events: list of :class:`EventTypeDescriptor ` + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'supported_events': {'key': 'supportedEvents', 'type': '[EventTypeDescriptor]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, description=None, id=None, input_descriptors=None, name=None, service_instance_type=None, supported_events=None, url=None): + super(Publisher, self).__init__() + self._links = _links + self.description = description + self.id = id + self.input_descriptors = input_descriptors + self.name = name + self.service_instance_type = service_instance_type + self.supported_events = supported_events + self.url = url diff --git a/vsts/vsts/service_hooks/v4_0/models/publisher_event.py b/vsts/vsts/service_hooks/v4_0/models/publisher_event.py new file mode 100644 index 00000000..91e4c2e0 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/publisher_event.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherEvent(Model): + """PublisherEvent. + + :param diagnostics: Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notificaton. + :type diagnostics: dict + :param event: The event being published + :type event: :class:`Event ` + :param notification_id: Gets or sets the id of the notification. + :type notification_id: int + :param other_resource_versions: Gets or sets the array of older supported resource versions. + :type other_resource_versions: list of :class:`VersionedResource ` + :param publisher_input_filters: Optional publisher-input filters which restricts the set of subscriptions which are triggered by the event + :type publisher_input_filters: list of :class:`InputFilter ` + :param subscription: Gets or sets matchd hooks subscription which caused this event. + :type subscription: :class:`Subscription ` + """ + + _attribute_map = { + 'diagnostics': {'key': 'diagnostics', 'type': '{str}'}, + 'event': {'key': 'event', 'type': 'Event'}, + 'notification_id': {'key': 'notificationId', 'type': 'int'}, + 'other_resource_versions': {'key': 'otherResourceVersions', 'type': '[VersionedResource]'}, + 'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'}, + 'subscription': {'key': 'subscription', 'type': 'Subscription'} + } + + def __init__(self, diagnostics=None, event=None, notification_id=None, other_resource_versions=None, publisher_input_filters=None, subscription=None): + super(PublisherEvent, self).__init__() + self.diagnostics = diagnostics + self.event = event + self.notification_id = notification_id + self.other_resource_versions = other_resource_versions + self.publisher_input_filters = publisher_input_filters + self.subscription = subscription diff --git a/vsts/vsts/service_hooks/v4_0/models/publishers_query.py b/vsts/vsts/service_hooks/v4_0/models/publishers_query.py new file mode 100644 index 00000000..e75169b9 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/publishers_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishersQuery(Model): + """PublishersQuery. + + :param publisher_ids: Optional list of publisher ids to restrict the results to + :type publisher_ids: list of str + :param publisher_inputs: Filter for publisher inputs + :type publisher_inputs: dict + :param results: Results from the query + :type results: list of :class:`Publisher ` + """ + + _attribute_map = { + 'publisher_ids': {'key': 'publisherIds', 'type': '[str]'}, + 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, + 'results': {'key': 'results', 'type': '[Publisher]'} + } + + def __init__(self, publisher_ids=None, publisher_inputs=None, results=None): + super(PublishersQuery, self).__init__() + self.publisher_ids = publisher_ids + self.publisher_inputs = publisher_inputs + self.results = results diff --git a/vsts/vsts/service_hooks/v4_0/models/reference_links.py b/vsts/vsts/service_hooks/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/service_hooks/v4_0/models/resource_container.py b/vsts/vsts/service_hooks/v4_0/models/resource_container.py new file mode 100644 index 00000000..593a8f5d --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/resource_container.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResourceContainer(Model): + """ResourceContainer. + + :param base_url: Gets or sets the container's base URL, i.e. the URL of the host (collection, application, or deploument) containing the container resource. + :type base_url: str + :param id: Gets or sets the container's specific Id. + :type id: str + :param name: Gets or sets the container's name. + :type name: str + :param url: Gets or sets the container's REST API URL. + :type url: str + """ + + _attribute_map = { + 'base_url': {'key': 'baseUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, base_url=None, id=None, name=None, url=None): + super(ResourceContainer, self).__init__() + self.base_url = base_url + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/service_hooks/v4_0/models/session_token.py b/vsts/vsts/service_hooks/v4_0/models/session_token.py new file mode 100644 index 00000000..4f2df67f --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/session_token.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SessionToken(Model): + """SessionToken. + + :param error: The error message in case of error + :type error: str + :param token: The access token + :type token: str + :param valid_to: The expiration date in UTC + :type valid_to: datetime + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'} + } + + def __init__(self, error=None, token=None, valid_to=None): + super(SessionToken, self).__init__() + self.error = error + self.token = token + self.valid_to = valid_to diff --git a/vsts/vsts/service_hooks/v4_0/models/subscription.py b/vsts/vsts/service_hooks/v4_0/models/subscription.py new file mode 100644 index 00000000..853db6ce --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/subscription.py @@ -0,0 +1,97 @@ +# -------------------------------------------------------------------------------------------- +# 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 Subscription(Model): + """Subscription. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param action_description: + :type action_description: str + :param consumer_action_id: + :type consumer_action_id: str + :param consumer_id: + :type consumer_id: str + :param consumer_inputs: Consumer input values + :type consumer_inputs: dict + :param created_by: + :type created_by: :class:`IdentityRef ` + :param created_date: + :type created_date: datetime + :param event_description: + :type event_description: str + :param event_type: + :type event_type: str + :param id: + :type id: str + :param modified_by: + :type modified_by: :class:`IdentityRef ` + :param modified_date: + :type modified_date: datetime + :param probation_retries: + :type probation_retries: number + :param publisher_id: + :type publisher_id: str + :param publisher_inputs: Publisher input values + :type publisher_inputs: dict + :param resource_version: + :type resource_version: str + :param status: + :type status: object + :param subscriber: + :type subscriber: :class:`IdentityRef ` + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'action_description': {'key': 'actionDescription', 'type': 'str'}, + 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'event_description': {'key': 'eventDescription', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'probation_retries': {'key': 'probationRetries', 'type': 'number'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, action_description=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, created_by=None, created_date=None, event_description=None, event_type=None, id=None, modified_by=None, modified_date=None, probation_retries=None, publisher_id=None, publisher_inputs=None, resource_version=None, status=None, subscriber=None, url=None): + super(Subscription, self).__init__() + self._links = _links + self.action_description = action_description + self.consumer_action_id = consumer_action_id + self.consumer_id = consumer_id + self.consumer_inputs = consumer_inputs + self.created_by = created_by + self.created_date = created_date + self.event_description = event_description + self.event_type = event_type + self.id = id + self.modified_by = modified_by + self.modified_date = modified_date + self.probation_retries = probation_retries + self.publisher_id = publisher_id + self.publisher_inputs = publisher_inputs + self.resource_version = resource_version + self.status = status + self.subscriber = subscriber + self.url = url diff --git a/vsts/vsts/service_hooks/v4_0/models/subscriptions_query.py b/vsts/vsts/service_hooks/v4_0/models/subscriptions_query.py new file mode 100644 index 00000000..6287a494 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/subscriptions_query.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionsQuery(Model): + """SubscriptionsQuery. + + :param consumer_action_id: Optional consumer action id to restrict the results to (null for any) + :type consumer_action_id: str + :param consumer_id: Optional consumer id to restrict the results to (null for any) + :type consumer_id: str + :param consumer_input_filters: Filter for subscription consumer inputs + :type consumer_input_filters: list of :class:`InputFilter ` + :param event_type: Optional event type id to restrict the results to (null for any) + :type event_type: str + :param publisher_id: Optional publisher id to restrict the results to (null for any) + :type publisher_id: str + :param publisher_input_filters: Filter for subscription publisher inputs + :type publisher_input_filters: list of :class:`InputFilter ` + :param results: Results from the query + :type results: list of :class:`Subscription ` + :param subscriber_id: Optional subscriber filter. + :type subscriber_id: str + """ + + _attribute_map = { + 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'consumer_input_filters': {'key': 'consumerInputFilters', 'type': '[InputFilter]'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'}, + 'results': {'key': 'results', 'type': '[Subscription]'}, + 'subscriber_id': {'key': 'subscriberId', 'type': 'str'} + } + + def __init__(self, consumer_action_id=None, consumer_id=None, consumer_input_filters=None, event_type=None, publisher_id=None, publisher_input_filters=None, results=None, subscriber_id=None): + super(SubscriptionsQuery, self).__init__() + self.consumer_action_id = consumer_action_id + self.consumer_id = consumer_id + self.consumer_input_filters = consumer_input_filters + self.event_type = event_type + self.publisher_id = publisher_id + self.publisher_input_filters = publisher_input_filters + self.results = results + self.subscriber_id = subscriber_id diff --git a/vsts/vsts/service_hooks/v4_0/models/versioned_resource.py b/vsts/vsts/service_hooks/v4_0/models/versioned_resource.py new file mode 100644 index 00000000..c55dbd04 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/models/versioned_resource.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 VersionedResource(Model): + """VersionedResource. + + :param compatible_with: Gets or sets the reference to the compatible version. + :type compatible_with: str + :param resource: Gets or sets the resource data. + :type resource: object + :param resource_version: Gets or sets the version of the resource data. + :type resource_version: str + """ + + _attribute_map = { + 'compatible_with': {'key': 'compatibleWith', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'object'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'str'} + } + + def __init__(self, compatible_with=None, resource=None, resource_version=None): + super(VersionedResource, self).__init__() + self.compatible_with = compatible_with + self.resource = resource + self.resource_version = resource_version diff --git a/vsts/vsts/service_hooks/v4_0/service_hooks_client.py b/vsts/vsts/service_hooks/v4_0/service_hooks_client.py new file mode 100644 index 00000000..54d93785 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_0/service_hooks_client.py @@ -0,0 +1,369 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ServiceHooksClient(VssClient): + """ServiceHooks + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ServiceHooksClient, 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 get_consumer_action(self, consumer_id, consumer_action_id, publisher_id=None): + """GetConsumerAction. + :param str consumer_id: + :param str consumer_action_id: + :param str publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if consumer_id is not None: + route_values['consumerId'] = self._serialize.url('consumer_id', consumer_id, 'str') + if consumer_action_id is not None: + route_values['consumerActionId'] = self._serialize.url('consumer_action_id', consumer_action_id, 'str') + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ConsumerAction', response) + + def list_consumer_actions(self, consumer_id, publisher_id=None): + """ListConsumerActions. + :param str consumer_id: + :param str publisher_id: + :rtype: [ConsumerAction] + """ + route_values = {} + if consumer_id is not None: + route_values['consumerId'] = self._serialize.url('consumer_id', consumer_id, 'str') + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ConsumerAction]', response) + + def get_consumer(self, consumer_id, publisher_id=None): + """GetConsumer. + :param str consumer_id: + :param str publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if consumer_id is not None: + route_values['consumerId'] = self._serialize.url('consumer_id', consumer_id, 'str') + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Consumer', response) + + def list_consumers(self, publisher_id=None): + """ListConsumers. + :param str publisher_id: + :rtype: [Consumer] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Consumer]', response) + + def get_event_type(self, publisher_id, event_type_id): + """GetEventType. + :param str publisher_id: + :param str event_type_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + if event_type_id is not None: + route_values['eventTypeId'] = self._serialize.url('event_type_id', event_type_id, 'str') + response = self._send(http_method='GET', + location_id='db4777cd-8e08-4a84-8ba3-c974ea033718', + version='4.0', + route_values=route_values) + return self._deserialize('EventTypeDescriptor', response) + + def list_event_types(self, publisher_id): + """ListEventTypes. + :param str publisher_id: + :rtype: [EventTypeDescriptor] + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='db4777cd-8e08-4a84-8ba3-c974ea033718', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[EventTypeDescriptor]', response) + + def publish_external_event(self, publisher_id, channel_id=None): + """PublishExternalEvent. + :param str publisher_id: + :param str channel_id: + :rtype: [PublisherEvent] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + if channel_id is not None: + query_parameters['channelId'] = self._serialize.query('channel_id', channel_id, 'str') + response = self._send(http_method='POST', + location_id='e0e0a1c9-beeb-4fb7-a8c8-b18e3161a50e', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[PublisherEvent]', response) + + def get_notification(self, subscription_id, notification_id): + """GetNotification. + :param str subscription_id: + :param int notification_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + if notification_id is not None: + route_values['notificationId'] = self._serialize.url('notification_id', notification_id, 'int') + response = self._send(http_method='GET', + location_id='0c62d343-21b0-4732-997b-017fde84dc28', + version='4.0', + route_values=route_values) + return self._deserialize('Notification', response) + + def get_notifications(self, subscription_id, max_results=None, status=None, result=None): + """GetNotifications. + :param str subscription_id: + :param int max_results: + :param str status: + :param str result: + :rtype: [Notification] + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + query_parameters = {} + if max_results is not None: + query_parameters['maxResults'] = self._serialize.query('max_results', max_results, 'int') + if status is not None: + query_parameters['status'] = self._serialize.query('status', status, 'str') + if result is not None: + query_parameters['result'] = self._serialize.query('result', result, 'str') + response = self._send(http_method='GET', + location_id='0c62d343-21b0-4732-997b-017fde84dc28', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Notification]', response) + + def query_notifications(self, query): + """QueryNotifications. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'NotificationsQuery') + response = self._send(http_method='POST', + location_id='1a57562f-160a-4b5c-9185-905e95b39d36', + version='4.0', + content=content) + return self._deserialize('NotificationsQuery', response) + + def query_input_values(self, input_values_query, publisher_id): + """QueryInputValues. + :param :class:` ` input_values_query: + :param str publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + content = self._serialize.body(input_values_query, 'InputValuesQuery') + response = self._send(http_method='POST', + location_id='d815d352-a566-4dc1-a3e3-fd245acf688c', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('InputValuesQuery', response) + + def get_publisher(self, publisher_id): + """GetPublisher. + :param str publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', + version='4.0', + route_values=route_values) + return self._deserialize('Publisher', response) + + def list_publishers(self): + """ListPublishers. + :rtype: [Publisher] + """ + response = self._send(http_method='GET', + location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', + version='4.0', + returns_collection=True) + return self._deserialize('[Publisher]', response) + + def query_publishers(self, query): + """QueryPublishers. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'PublishersQuery') + response = self._send(http_method='POST', + location_id='99b44a8a-65a8-4670-8f3e-e7f7842cce64', + version='4.0', + content=content) + return self._deserialize('PublishersQuery', response) + + def create_subscription(self, subscription): + """CreateSubscription. + :param :class:` ` subscription: + :rtype: :class:` ` + """ + content = self._serialize.body(subscription, 'Subscription') + response = self._send(http_method='POST', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.0', + content=content) + return self._deserialize('Subscription', response) + + def delete_subscription(self, subscription_id): + """DeleteSubscription. + :param str subscription_id: + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + self._send(http_method='DELETE', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.0', + route_values=route_values) + + def get_subscription(self, subscription_id): + """GetSubscription. + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + response = self._send(http_method='GET', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.0', + route_values=route_values) + return self._deserialize('Subscription', response) + + def list_subscriptions(self, publisher_id=None, event_type=None, consumer_id=None, consumer_action_id=None): + """ListSubscriptions. + :param str publisher_id: + :param str event_type: + :param str consumer_id: + :param str consumer_action_id: + :rtype: [Subscription] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + if event_type is not None: + query_parameters['eventType'] = self._serialize.query('event_type', event_type, 'str') + if consumer_id is not None: + query_parameters['consumerId'] = self._serialize.query('consumer_id', consumer_id, 'str') + if consumer_action_id is not None: + query_parameters['consumerActionId'] = self._serialize.query('consumer_action_id', consumer_action_id, 'str') + response = self._send(http_method='GET', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Subscription]', response) + + def replace_subscription(self, subscription, subscription_id=None): + """ReplaceSubscription. + :param :class:` ` subscription: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(subscription, 'Subscription') + response = self._send(http_method='PUT', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('Subscription', response) + + def create_subscriptions_query(self, query): + """CreateSubscriptionsQuery. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'SubscriptionsQuery') + response = self._send(http_method='POST', + location_id='c7c3c1cf-9e05-4c0d-a425-a0f922c2c6ed', + version='4.0', + content=content) + return self._deserialize('SubscriptionsQuery', response) + + def create_test_notification(self, test_notification, use_real_data=None): + """CreateTestNotification. + :param :class:` ` test_notification: + :param bool use_real_data: + :rtype: :class:` ` + """ + query_parameters = {} + if use_real_data is not None: + query_parameters['useRealData'] = self._serialize.query('use_real_data', use_real_data, 'bool') + content = self._serialize.body(test_notification, 'Notification') + response = self._send(http_method='POST', + location_id='1139462c-7e27-4524-a997-31b9b73551fe', + version='4.0', + query_parameters=query_parameters, + content=content) + return self._deserialize('Notification', response) + diff --git a/vsts/vsts/service_hooks/v4_1/__init__.py b/vsts/vsts/service_hooks/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/service_hooks/v4_1/models/__init__.py b/vsts/vsts/service_hooks/v4_1/models/__init__.py new file mode 100644 index 00000000..5548104e --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/__init__.py @@ -0,0 +1,79 @@ +# -------------------------------------------------------------------------------------------- +# 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 .consumer import Consumer +from .consumer_action import ConsumerAction +from .event import Event +from .event_type_descriptor import EventTypeDescriptor +from .external_configuration_descriptor import ExternalConfigurationDescriptor +from .formatted_event_message import FormattedEventMessage +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .input_descriptor import InputDescriptor +from .input_filter import InputFilter +from .input_filter_condition import InputFilterCondition +from .input_validation import InputValidation +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .input_values_query import InputValuesQuery +from .notification import Notification +from .notification_details import NotificationDetails +from .notification_results_summary_detail import NotificationResultsSummaryDetail +from .notifications_query import NotificationsQuery +from .notification_summary import NotificationSummary +from .publisher import Publisher +from .publisher_event import PublisherEvent +from .publishers_query import PublishersQuery +from .reference_links import ReferenceLinks +from .resource_container import ResourceContainer +from .session_token import SessionToken +from .subscription import Subscription +from .subscription_diagnostics import SubscriptionDiagnostics +from .subscriptions_query import SubscriptionsQuery +from .subscription_tracing import SubscriptionTracing +from .update_subscripiton_diagnostics_parameters import UpdateSubscripitonDiagnosticsParameters +from .update_subscripiton_tracing_parameters import UpdateSubscripitonTracingParameters +from .versioned_resource import VersionedResource + +__all__ = [ + 'Consumer', + 'ConsumerAction', + 'Event', + 'EventTypeDescriptor', + 'ExternalConfigurationDescriptor', + 'FormattedEventMessage', + 'GraphSubjectBase', + 'IdentityRef', + 'InputDescriptor', + 'InputFilter', + 'InputFilterCondition', + 'InputValidation', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'InputValuesQuery', + 'Notification', + 'NotificationDetails', + 'NotificationResultsSummaryDetail', + 'NotificationsQuery', + 'NotificationSummary', + 'Publisher', + 'PublisherEvent', + 'PublishersQuery', + 'ReferenceLinks', + 'ResourceContainer', + 'SessionToken', + 'Subscription', + 'SubscriptionDiagnostics', + 'SubscriptionsQuery', + 'SubscriptionTracing', + 'UpdateSubscripitonDiagnosticsParameters', + 'UpdateSubscripitonTracingParameters', + 'VersionedResource', +] diff --git a/vsts/vsts/service_hooks/v4_1/models/consumer.py b/vsts/vsts/service_hooks/v4_1/models/consumer.py new file mode 100644 index 00000000..93077591 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/consumer.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 Consumer(Model): + """Consumer. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param actions: Gets this consumer's actions. + :type actions: list of :class:`ConsumerAction ` + :param authentication_type: Gets or sets this consumer's authentication type. + :type authentication_type: object + :param description: Gets or sets this consumer's localized description. + :type description: str + :param external_configuration: Non-null only if subscriptions for this consumer are configured externally. + :type external_configuration: :class:`ExternalConfigurationDescriptor ` + :param id: Gets or sets this consumer's identifier. + :type id: str + :param image_url: Gets or sets this consumer's image URL, if any. + :type image_url: str + :param information_url: Gets or sets this consumer's information URL, if any. + :type information_url: str + :param input_descriptors: Gets or sets this consumer's input descriptors. + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: Gets or sets this consumer's localized name. + :type name: str + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'actions': {'key': 'actions', 'type': '[ConsumerAction]'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'external_configuration': {'key': 'externalConfiguration', 'type': 'ExternalConfigurationDescriptor'}, + 'id': {'key': 'id', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'}, + 'information_url': {'key': 'informationUrl', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, actions=None, authentication_type=None, description=None, external_configuration=None, id=None, image_url=None, information_url=None, input_descriptors=None, name=None, url=None): + super(Consumer, self).__init__() + self._links = _links + self.actions = actions + self.authentication_type = authentication_type + self.description = description + self.external_configuration = external_configuration + self.id = id + self.image_url = image_url + self.information_url = information_url + self.input_descriptors = input_descriptors + self.name = name + self.url = url diff --git a/vsts/vsts/service_hooks/v4_1/models/consumer_action.py b/vsts/vsts/service_hooks/v4_1/models/consumer_action.py new file mode 100644 index 00000000..c1e08907 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/consumer_action.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 ConsumerAction(Model): + """ConsumerAction. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param allow_resource_version_override: Gets or sets the flag indicating if resource version can be overridden when creating or editing a subscription. + :type allow_resource_version_override: bool + :param consumer_id: Gets or sets the identifier of the consumer to which this action belongs. + :type consumer_id: str + :param description: Gets or sets this action's localized description. + :type description: str + :param id: Gets or sets this action's identifier. + :type id: str + :param input_descriptors: Gets or sets this action's input descriptors. + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: Gets or sets this action's localized name. + :type name: str + :param supported_event_types: Gets or sets this action's supported event identifiers. + :type supported_event_types: list of str + :param supported_resource_versions: Gets or sets this action's supported resource versions. + :type supported_resource_versions: dict + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allow_resource_version_override': {'key': 'allowResourceVersionOverride', 'type': 'bool'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'supported_event_types': {'key': 'supportedEventTypes', 'type': '[str]'}, + 'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '{[str]}'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, allow_resource_version_override=None, consumer_id=None, description=None, id=None, input_descriptors=None, name=None, supported_event_types=None, supported_resource_versions=None, url=None): + super(ConsumerAction, self).__init__() + self._links = _links + self.allow_resource_version_override = allow_resource_version_override + self.consumer_id = consumer_id + self.description = description + self.id = id + self.input_descriptors = input_descriptors + self.name = name + self.supported_event_types = supported_event_types + self.supported_resource_versions = supported_resource_versions + self.url = url diff --git a/vsts/vsts/service_hooks/v4_1/models/event.py b/vsts/vsts/service_hooks/v4_1/models/event.py new file mode 100644 index 00000000..36d8845b --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/event.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 Event(Model): + """Event. + + :param created_date: Gets or sets the UTC-based date and time that this event was created. + :type created_date: datetime + :param detailed_message: Gets or sets the detailed message associated with this event. + :type detailed_message: :class:`FormattedEventMessage ` + :param event_type: Gets or sets the type of this event. + :type event_type: str + :param id: Gets or sets the unique identifier of this event. + :type id: str + :param message: Gets or sets the (brief) message associated with this event. + :type message: :class:`FormattedEventMessage ` + :param publisher_id: Gets or sets the identifier of the publisher that raised this event. + :type publisher_id: str + :param resource: Gets or sets the data associated with this event. + :type resource: object + :param resource_containers: Gets or sets the resource containers. + :type resource_containers: dict + :param resource_version: Gets or sets the version of the data associated with this event. + :type resource_version: str + :param session_token: Gets or sets the Session Token that can be used in further interactions + :type session_token: :class:`SessionToken ` + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'detailed_message': {'key': 'detailedMessage', 'type': 'FormattedEventMessage'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'FormattedEventMessage'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'object'}, + 'resource_containers': {'key': 'resourceContainers', 'type': '{ResourceContainer}'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'str'}, + 'session_token': {'key': 'sessionToken', 'type': 'SessionToken'} + } + + def __init__(self, created_date=None, detailed_message=None, event_type=None, id=None, message=None, publisher_id=None, resource=None, resource_containers=None, resource_version=None, session_token=None): + super(Event, self).__init__() + self.created_date = created_date + self.detailed_message = detailed_message + self.event_type = event_type + self.id = id + self.message = message + self.publisher_id = publisher_id + self.resource = resource + self.resource_containers = resource_containers + self.resource_version = resource_version + self.session_token = session_token diff --git a/vsts/vsts/service_hooks/v4_1/models/event_type_descriptor.py b/vsts/vsts/service_hooks/v4_1/models/event_type_descriptor.py new file mode 100644 index 00000000..a6dac171 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/event_type_descriptor.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 EventTypeDescriptor(Model): + """EventTypeDescriptor. + + :param description: A localized description of the event type + :type description: str + :param id: A unique id for the event type + :type id: str + :param input_descriptors: Event-specific inputs + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: A localized friendly name for the event type + :type name: str + :param publisher_id: A unique id for the publisher of this event type + :type publisher_id: str + :param supported_resource_versions: Supported versions for the event's resource payloads. + :type supported_resource_versions: list of str + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'supported_resource_versions': {'key': 'supportedResourceVersions', 'type': '[str]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, input_descriptors=None, name=None, publisher_id=None, supported_resource_versions=None, url=None): + super(EventTypeDescriptor, self).__init__() + self.description = description + self.id = id + self.input_descriptors = input_descriptors + self.name = name + self.publisher_id = publisher_id + self.supported_resource_versions = supported_resource_versions + self.url = url diff --git a/vsts/vsts/service_hooks/v4_1/models/external_configuration_descriptor.py b/vsts/vsts/service_hooks/v4_1/models/external_configuration_descriptor.py new file mode 100644 index 00000000..c2ab4f98 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/external_configuration_descriptor.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ExternalConfigurationDescriptor(Model): + """ExternalConfigurationDescriptor. + + :param create_subscription_url: Url of the site to create this type of subscription. + :type create_subscription_url: str + :param edit_subscription_property_name: The name of an input property that contains the URL to edit a subscription. + :type edit_subscription_property_name: str + :param hosted_only: True if the external configuration applies only to hosted. + :type hosted_only: bool + """ + + _attribute_map = { + 'create_subscription_url': {'key': 'createSubscriptionUrl', 'type': 'str'}, + 'edit_subscription_property_name': {'key': 'editSubscriptionPropertyName', 'type': 'str'}, + 'hosted_only': {'key': 'hostedOnly', 'type': 'bool'} + } + + def __init__(self, create_subscription_url=None, edit_subscription_property_name=None, hosted_only=None): + super(ExternalConfigurationDescriptor, self).__init__() + self.create_subscription_url = create_subscription_url + self.edit_subscription_property_name = edit_subscription_property_name + self.hosted_only = hosted_only diff --git a/vsts/vsts/service_hooks/v4_1/models/formatted_event_message.py b/vsts/vsts/service_hooks/v4_1/models/formatted_event_message.py new file mode 100644 index 00000000..7d513262 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/formatted_event_message.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 FormattedEventMessage(Model): + """FormattedEventMessage. + + :param html: Gets or sets the html format of the message + :type html: str + :param markdown: Gets or sets the markdown format of the message + :type markdown: str + :param text: Gets or sets the raw text of the message + :type text: str + """ + + _attribute_map = { + 'html': {'key': 'html', 'type': 'str'}, + 'markdown': {'key': 'markdown', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'} + } + + def __init__(self, html=None, markdown=None, text=None): + super(FormattedEventMessage, self).__init__() + self.html = html + self.markdown = markdown + self.text = text diff --git a/vsts/vsts/service_hooks/v4_1/models/identity_ref.py b/vsts/vsts/service_hooks/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/service_hooks/v4_1/models/input_descriptor.py b/vsts/vsts/service_hooks/v4_1/models/input_descriptor.py new file mode 100644 index 00000000..da334836 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_descriptor.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputDescriptor(Model): + """InputDescriptor. + + :param dependency_input_ids: The ids of all inputs that the value of this input is dependent on. + :type dependency_input_ids: list of str + :param description: Description of what this input is used for + :type description: str + :param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + :type group_name: str + :param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + :type has_dynamic_value_information: bool + :param id: Identifier for the subscription input + :type id: str + :param input_mode: Mode in which the value of this input should be entered + :type input_mode: object + :param is_confidential: Gets whether this input is confidential, such as for a password or application key + :type is_confidential: bool + :param name: Localized name which can be shown as a label for the subscription input + :type name: str + :param properties: Custom properties for the input which can be used by the service provider + :type properties: dict + :param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. + :type type: str + :param use_in_default_description: Gets whether this input is included in the default generated action description. + :type use_in_default_description: bool + :param validation: Information to use to validate this input's value + :type validation: :class:`InputValidation ` + :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. + :type value_hint: str + :param values: Information about possible values for this input + :type values: :class:`InputValues ` + """ + + _attribute_map = { + 'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_mode': {'key': 'inputMode', 'type': 'object'}, + 'is_confidential': {'key': 'isConfidential', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'}, + 'validation': {'key': 'validation', 'type': 'InputValidation'}, + 'value_hint': {'key': 'valueHint', 'type': 'str'}, + 'values': {'key': 'values', 'type': 'InputValues'} + } + + def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None): + super(InputDescriptor, self).__init__() + self.dependency_input_ids = dependency_input_ids + self.description = description + self.group_name = group_name + self.has_dynamic_value_information = has_dynamic_value_information + self.id = id + self.input_mode = input_mode + self.is_confidential = is_confidential + self.name = name + self.properties = properties + self.type = type + self.use_in_default_description = use_in_default_description + self.validation = validation + self.value_hint = value_hint + self.values = values diff --git a/vsts/vsts/service_hooks/v4_1/models/input_filter.py b/vsts/vsts/service_hooks/v4_1/models/input_filter.py new file mode 100644 index 00000000..91d219dc --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_filter.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputFilter(Model): + """InputFilter. + + :param conditions: Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. + :type conditions: list of :class:`InputFilterCondition ` + """ + + _attribute_map = { + 'conditions': {'key': 'conditions', 'type': '[InputFilterCondition]'} + } + + def __init__(self, conditions=None): + super(InputFilter, self).__init__() + self.conditions = conditions diff --git a/vsts/vsts/service_hooks/v4_1/models/input_filter_condition.py b/vsts/vsts/service_hooks/v4_1/models/input_filter_condition.py new file mode 100644 index 00000000..1a514738 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_filter_condition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputFilterCondition(Model): + """InputFilterCondition. + + :param case_sensitive: Whether or not to do a case sensitive match + :type case_sensitive: bool + :param input_id: The Id of the input to filter on + :type input_id: str + :param input_value: The "expected" input value to compare with the actual input value + :type input_value: str + :param operator: The operator applied between the expected and actual input value + :type operator: object + """ + + _attribute_map = { + 'case_sensitive': {'key': 'caseSensitive', 'type': 'bool'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'input_value': {'key': 'inputValue', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'} + } + + def __init__(self, case_sensitive=None, input_id=None, input_value=None, operator=None): + super(InputFilterCondition, self).__init__() + self.case_sensitive = case_sensitive + self.input_id = input_id + self.input_value = input_value + self.operator = operator diff --git a/vsts/vsts/service_hooks/v4_1/models/input_validation.py b/vsts/vsts/service_hooks/v4_1/models/input_validation.py new file mode 100644 index 00000000..f2f1a434 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_validation.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidation(Model): + """InputValidation. + + :param data_type: + :type data_type: object + :param is_required: + :type is_required: bool + :param max_length: + :type max_length: int + :param max_value: + :type max_value: decimal + :param min_length: + :type min_length: int + :param min_value: + :type min_value: decimal + :param pattern: + :type pattern: str + :param pattern_mismatch_error_message: + :type pattern_mismatch_error_message: str + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'object'}, + 'is_required': {'key': 'isRequired', 'type': 'bool'}, + 'max_length': {'key': 'maxLength', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'decimal'}, + 'min_length': {'key': 'minLength', 'type': 'int'}, + 'min_value': {'key': 'minValue', 'type': 'decimal'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'} + } + + def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None): + super(InputValidation, self).__init__() + self.data_type = data_type + self.is_required = is_required + self.max_length = max_length + self.max_value = max_value + self.min_length = min_length + self.min_value = min_value + self.pattern = pattern + self.pattern_mismatch_error_message = pattern_mismatch_error_message diff --git a/vsts/vsts/service_hooks/v4_1/models/input_value.py b/vsts/vsts/service_hooks/v4_1/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/service_hooks/v4_1/models/input_values.py b/vsts/vsts/service_hooks/v4_1/models/input_values.py new file mode 100644 index 00000000..69472f8d --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/service_hooks/v4_1/models/input_values_error.py b/vsts/vsts/service_hooks/v4_1/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/service_hooks/v4_1/models/input_values_query.py b/vsts/vsts/service_hooks/v4_1/models/input_values_query.py new file mode 100644 index 00000000..97687a61 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/input_values_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesQuery(Model): + """InputValuesQuery. + + :param current_values: + :type current_values: dict + :param input_values: The input values to return on input, and the result from the consumer on output. + :type input_values: list of :class:`InputValues ` + :param resource: Subscription containing information about the publisher/consumer and the current input values + :type resource: object + """ + + _attribute_map = { + 'current_values': {'key': 'currentValues', 'type': '{str}'}, + 'input_values': {'key': 'inputValues', 'type': '[InputValues]'}, + 'resource': {'key': 'resource', 'type': 'object'} + } + + def __init__(self, current_values=None, input_values=None, resource=None): + super(InputValuesQuery, self).__init__() + self.current_values = current_values + self.input_values = input_values + self.resource = resource diff --git a/vsts/vsts/service_hooks/v4_1/models/notification.py b/vsts/vsts/service_hooks/v4_1/models/notification.py new file mode 100644 index 00000000..0bcbd8b5 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/notification.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 Notification(Model): + """Notification. + + :param created_date: Gets or sets date and time that this result was created. + :type created_date: datetime + :param details: Details about this notification (if available) + :type details: :class:`NotificationDetails ` + :param event_id: The event id associated with this notification + :type event_id: str + :param id: The notification id + :type id: int + :param modified_date: Gets or sets date and time that this result was last modified. + :type modified_date: datetime + :param result: Result of the notification + :type result: object + :param status: Status of the notification + :type status: object + :param subscriber_id: The subscriber Id associated with this notification. This is the last identity who touched in the subscription. In case of test notifications it can be the tester if the subscription is not created yet. + :type subscriber_id: str + :param subscription_id: The subscription id associated with this notification + :type subscription_id: str + """ + + _attribute_map = { + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'details': {'key': 'details', 'type': 'NotificationDetails'}, + 'event_id': {'key': 'eventId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'result': {'key': 'result', 'type': 'object'}, + 'status': {'key': 'status', 'type': 'object'}, + 'subscriber_id': {'key': 'subscriberId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, created_date=None, details=None, event_id=None, id=None, modified_date=None, result=None, status=None, subscriber_id=None, subscription_id=None): + super(Notification, self).__init__() + self.created_date = created_date + self.details = details + self.event_id = event_id + self.id = id + self.modified_date = modified_date + self.result = result + self.status = status + self.subscriber_id = subscriber_id + self.subscription_id = subscription_id diff --git a/vsts/vsts/service_hooks/v4_1/models/notification_details.py b/vsts/vsts/service_hooks/v4_1/models/notification_details.py new file mode 100644 index 00000000..ba1d96ab --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/notification_details.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationDetails(Model): + """NotificationDetails. + + :param completed_date: Gets or sets the time that this notification was completed (response received from the consumer) + :type completed_date: datetime + :param consumer_action_id: Gets or sets this notification detail's consumer action identifier. + :type consumer_action_id: str + :param consumer_id: Gets or sets this notification detail's consumer identifier. + :type consumer_id: str + :param consumer_inputs: Gets or sets this notification detail's consumer inputs. + :type consumer_inputs: dict + :param dequeued_date: Gets or sets the time that this notification was dequeued for processing + :type dequeued_date: datetime + :param error_detail: Gets or sets this notification detail's error detail. + :type error_detail: str + :param error_message: Gets or sets this notification detail's error message. + :type error_message: str + :param event: Gets or sets this notification detail's event content. + :type event: :class:`Event ` + :param event_type: Gets or sets this notification detail's event type. + :type event_type: str + :param processed_date: Gets or sets the time that this notification was finished processing (just before the request is sent to the consumer) + :type processed_date: datetime + :param publisher_id: Gets or sets this notification detail's publisher identifier. + :type publisher_id: str + :param publisher_inputs: Gets or sets this notification detail's publisher inputs. + :type publisher_inputs: dict + :param queued_date: Gets or sets the time that this notification was queued (created) + :type queued_date: datetime + :param request: Gets or sets this notification detail's request. + :type request: str + :param request_attempts: Number of requests attempted to be sent to the consumer + :type request_attempts: int + :param request_duration: Duration of the request to the consumer in seconds + :type request_duration: number + :param response: Gets or sets this notification detail's reponse. + :type response: str + """ + + _attribute_map = { + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'}, + 'dequeued_date': {'key': 'dequeuedDate', 'type': 'iso-8601'}, + 'error_detail': {'key': 'errorDetail', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'event': {'key': 'event', 'type': 'Event'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'processed_date': {'key': 'processedDate', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, + 'queued_date': {'key': 'queuedDate', 'type': 'iso-8601'}, + 'request': {'key': 'request', 'type': 'str'}, + 'request_attempts': {'key': 'requestAttempts', 'type': 'int'}, + 'request_duration': {'key': 'requestDuration', 'type': 'number'}, + 'response': {'key': 'response', 'type': 'str'} + } + + def __init__(self, completed_date=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, dequeued_date=None, error_detail=None, error_message=None, event=None, event_type=None, processed_date=None, publisher_id=None, publisher_inputs=None, queued_date=None, request=None, request_attempts=None, request_duration=None, response=None): + super(NotificationDetails, self).__init__() + self.completed_date = completed_date + self.consumer_action_id = consumer_action_id + self.consumer_id = consumer_id + self.consumer_inputs = consumer_inputs + self.dequeued_date = dequeued_date + self.error_detail = error_detail + self.error_message = error_message + self.event = event + self.event_type = event_type + self.processed_date = processed_date + self.publisher_id = publisher_id + self.publisher_inputs = publisher_inputs + self.queued_date = queued_date + self.request = request + self.request_attempts = request_attempts + self.request_duration = request_duration + self.response = response diff --git a/vsts/vsts/service_hooks/v4_1/models/notification_results_summary_detail.py b/vsts/vsts/service_hooks/v4_1/models/notification_results_summary_detail.py new file mode 100644 index 00000000..eb8819fa --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/notification_results_summary_detail.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationResultsSummaryDetail(Model): + """NotificationResultsSummaryDetail. + + :param notification_count: Count of notification sent out with a matching result. + :type notification_count: int + :param result: Result of the notification + :type result: object + """ + + _attribute_map = { + 'notification_count': {'key': 'notificationCount', 'type': 'int'}, + 'result': {'key': 'result', 'type': 'object'} + } + + def __init__(self, notification_count=None, result=None): + super(NotificationResultsSummaryDetail, self).__init__() + self.notification_count = notification_count + self.result = result diff --git a/vsts/vsts/service_hooks/v4_1/models/notification_summary.py b/vsts/vsts/service_hooks/v4_1/models/notification_summary.py new file mode 100644 index 00000000..30ad4809 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/notification_summary.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationSummary(Model): + """NotificationSummary. + + :param results: The notification results for this particular subscription. + :type results: list of :class:`NotificationResultsSummaryDetail ` + :param subscription_id: The subscription id associated with this notification + :type subscription_id: str + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': '[NotificationResultsSummaryDetail]'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'} + } + + def __init__(self, results=None, subscription_id=None): + super(NotificationSummary, self).__init__() + self.results = results + self.subscription_id = subscription_id diff --git a/vsts/vsts/service_hooks/v4_1/models/notifications_query.py b/vsts/vsts/service_hooks/v4_1/models/notifications_query.py new file mode 100644 index 00000000..6f7cd92a --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/notifications_query.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 NotificationsQuery(Model): + """NotificationsQuery. + + :param associated_subscriptions: The subscriptions associated with the notifications returned from the query + :type associated_subscriptions: list of :class:`Subscription ` + :param include_details: If true, we will return all notification history for the query provided; otherwise, the summary is returned. + :type include_details: bool + :param max_created_date: Optional maximum date at which the notification was created + :type max_created_date: datetime + :param max_results: Optional maximum number of overall results to include + :type max_results: int + :param max_results_per_subscription: Optional maximum number of results for each subscription. Only takes effect when a list of subscription ids is supplied in the query. + :type max_results_per_subscription: int + :param min_created_date: Optional minimum date at which the notification was created + :type min_created_date: datetime + :param publisher_id: Optional publisher id to restrict the results to + :type publisher_id: str + :param results: Results from the query + :type results: list of :class:`Notification ` + :param result_type: Optional notification result type to filter results to + :type result_type: object + :param status: Optional notification status to filter results to + :type status: object + :param subscription_ids: Optional list of subscription ids to restrict the results to + :type subscription_ids: list of str + :param summary: Summary of notifications - the count of each result type (success, fail, ..). + :type summary: list of :class:`NotificationSummary ` + """ + + _attribute_map = { + 'associated_subscriptions': {'key': 'associatedSubscriptions', 'type': '[Subscription]'}, + 'include_details': {'key': 'includeDetails', 'type': 'bool'}, + 'max_created_date': {'key': 'maxCreatedDate', 'type': 'iso-8601'}, + 'max_results': {'key': 'maxResults', 'type': 'int'}, + 'max_results_per_subscription': {'key': 'maxResultsPerSubscription', 'type': 'int'}, + 'min_created_date': {'key': 'minCreatedDate', 'type': 'iso-8601'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'results': {'key': 'results', 'type': '[Notification]'}, + 'result_type': {'key': 'resultType', 'type': 'object'}, + 'status': {'key': 'status', 'type': 'object'}, + 'subscription_ids': {'key': 'subscriptionIds', 'type': '[str]'}, + 'summary': {'key': 'summary', 'type': '[NotificationSummary]'} + } + + def __init__(self, associated_subscriptions=None, include_details=None, max_created_date=None, max_results=None, max_results_per_subscription=None, min_created_date=None, publisher_id=None, results=None, result_type=None, status=None, subscription_ids=None, summary=None): + super(NotificationsQuery, self).__init__() + self.associated_subscriptions = associated_subscriptions + self.include_details = include_details + self.max_created_date = max_created_date + self.max_results = max_results + self.max_results_per_subscription = max_results_per_subscription + self.min_created_date = min_created_date + self.publisher_id = publisher_id + self.results = results + self.result_type = result_type + self.status = status + self.subscription_ids = subscription_ids + self.summary = summary diff --git a/vsts/vsts/service_hooks/v4_1/models/publisher.py b/vsts/vsts/service_hooks/v4_1/models/publisher.py new file mode 100644 index 00000000..065981f8 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/publisher.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 Publisher(Model): + """Publisher. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param description: Gets this publisher's localized description. + :type description: str + :param id: Gets this publisher's identifier. + :type id: str + :param input_descriptors: Publisher-specific inputs + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: Gets this publisher's localized name. + :type name: str + :param service_instance_type: The service instance type of the first party publisher. + :type service_instance_type: str + :param supported_events: Gets this publisher's supported event types. + :type supported_events: list of :class:`EventTypeDescriptor ` + :param url: The url for this resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_instance_type': {'key': 'serviceInstanceType', 'type': 'str'}, + 'supported_events': {'key': 'supportedEvents', 'type': '[EventTypeDescriptor]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, description=None, id=None, input_descriptors=None, name=None, service_instance_type=None, supported_events=None, url=None): + super(Publisher, self).__init__() + self._links = _links + self.description = description + self.id = id + self.input_descriptors = input_descriptors + self.name = name + self.service_instance_type = service_instance_type + self.supported_events = supported_events + self.url = url diff --git a/vsts/vsts/service_hooks/v4_1/models/publisher_event.py b/vsts/vsts/service_hooks/v4_1/models/publisher_event.py new file mode 100644 index 00000000..56ceb122 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/publisher_event.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublisherEvent(Model): + """PublisherEvent. + + :param diagnostics: Add key/value pairs which will be stored with a published notification in the SH service DB. This key/value pairs are for diagnostic purposes only and will have not effect on the delivery of a notificaton. + :type diagnostics: dict + :param event: The event being published + :type event: :class:`Event ` + :param other_resource_versions: Gets or sets the array of older supported resource versions. + :type other_resource_versions: list of :class:`VersionedResource ` + :param publisher_input_filters: Optional publisher-input filters which restricts the set of subscriptions which are triggered by the event + :type publisher_input_filters: list of :class:`InputFilter ` + :param subscription: Gets or sets matchd hooks subscription which caused this event. + :type subscription: :class:`Subscription ` + """ + + _attribute_map = { + 'diagnostics': {'key': 'diagnostics', 'type': '{str}'}, + 'event': {'key': 'event', 'type': 'Event'}, + 'other_resource_versions': {'key': 'otherResourceVersions', 'type': '[VersionedResource]'}, + 'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'}, + 'subscription': {'key': 'subscription', 'type': 'Subscription'} + } + + def __init__(self, diagnostics=None, event=None, other_resource_versions=None, publisher_input_filters=None, subscription=None): + super(PublisherEvent, self).__init__() + self.diagnostics = diagnostics + self.event = event + self.other_resource_versions = other_resource_versions + self.publisher_input_filters = publisher_input_filters + self.subscription = subscription diff --git a/vsts/vsts/service_hooks/v4_1/models/publishers_query.py b/vsts/vsts/service_hooks/v4_1/models/publishers_query.py new file mode 100644 index 00000000..27ace09c --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/publishers_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishersQuery(Model): + """PublishersQuery. + + :param publisher_ids: Optional list of publisher ids to restrict the results to + :type publisher_ids: list of str + :param publisher_inputs: Filter for publisher inputs + :type publisher_inputs: dict + :param results: Results from the query + :type results: list of :class:`Publisher ` + """ + + _attribute_map = { + 'publisher_ids': {'key': 'publisherIds', 'type': '[str]'}, + 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, + 'results': {'key': 'results', 'type': '[Publisher]'} + } + + def __init__(self, publisher_ids=None, publisher_inputs=None, results=None): + super(PublishersQuery, self).__init__() + self.publisher_ids = publisher_ids + self.publisher_inputs = publisher_inputs + self.results = results diff --git a/vsts/vsts/service_hooks/v4_1/models/reference_links.py b/vsts/vsts/service_hooks/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/service_hooks/v4_1/models/resource_container.py b/vsts/vsts/service_hooks/v4_1/models/resource_container.py new file mode 100644 index 00000000..593a8f5d --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/resource_container.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResourceContainer(Model): + """ResourceContainer. + + :param base_url: Gets or sets the container's base URL, i.e. the URL of the host (collection, application, or deploument) containing the container resource. + :type base_url: str + :param id: Gets or sets the container's specific Id. + :type id: str + :param name: Gets or sets the container's name. + :type name: str + :param url: Gets or sets the container's REST API URL. + :type url: str + """ + + _attribute_map = { + 'base_url': {'key': 'baseUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, base_url=None, id=None, name=None, url=None): + super(ResourceContainer, self).__init__() + self.base_url = base_url + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/service_hooks/v4_1/models/session_token.py b/vsts/vsts/service_hooks/v4_1/models/session_token.py new file mode 100644 index 00000000..4f2df67f --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/session_token.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SessionToken(Model): + """SessionToken. + + :param error: The error message in case of error + :type error: str + :param token: The access token + :type token: str + :param valid_to: The expiration date in UTC + :type valid_to: datetime + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + 'valid_to': {'key': 'validTo', 'type': 'iso-8601'} + } + + def __init__(self, error=None, token=None, valid_to=None): + super(SessionToken, self).__init__() + self.error = error + self.token = token + self.valid_to = valid_to diff --git a/vsts/vsts/service_hooks/v4_1/models/subscription.py b/vsts/vsts/service_hooks/v4_1/models/subscription.py new file mode 100644 index 00000000..1991f641 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/subscription.py @@ -0,0 +1,97 @@ +# -------------------------------------------------------------------------------------------- +# 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 Subscription(Model): + """Subscription. + + :param _links: Reference Links + :type _links: :class:`ReferenceLinks ` + :param action_description: + :type action_description: str + :param consumer_action_id: + :type consumer_action_id: str + :param consumer_id: + :type consumer_id: str + :param consumer_inputs: Consumer input values + :type consumer_inputs: dict + :param created_by: + :type created_by: :class:`IdentityRef ` + :param created_date: + :type created_date: datetime + :param event_description: + :type event_description: str + :param event_type: + :type event_type: str + :param id: + :type id: str + :param modified_by: + :type modified_by: :class:`IdentityRef ` + :param modified_date: + :type modified_date: datetime + :param probation_retries: + :type probation_retries: number + :param publisher_id: + :type publisher_id: str + :param publisher_inputs: Publisher input values + :type publisher_inputs: dict + :param resource_version: + :type resource_version: str + :param status: + :type status: object + :param subscriber: + :type subscriber: :class:`IdentityRef ` + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'action_description': {'key': 'actionDescription', 'type': 'str'}, + 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'consumer_inputs': {'key': 'consumerInputs', 'type': '{str}'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'event_description': {'key': 'eventDescription', 'type': 'str'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'probation_retries': {'key': 'probationRetries', 'type': 'number'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_inputs': {'key': 'publisherInputs', 'type': '{str}'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'subscriber': {'key': 'subscriber', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, action_description=None, consumer_action_id=None, consumer_id=None, consumer_inputs=None, created_by=None, created_date=None, event_description=None, event_type=None, id=None, modified_by=None, modified_date=None, probation_retries=None, publisher_id=None, publisher_inputs=None, resource_version=None, status=None, subscriber=None, url=None): + super(Subscription, self).__init__() + self._links = _links + self.action_description = action_description + self.consumer_action_id = consumer_action_id + self.consumer_id = consumer_id + self.consumer_inputs = consumer_inputs + self.created_by = created_by + self.created_date = created_date + self.event_description = event_description + self.event_type = event_type + self.id = id + self.modified_by = modified_by + self.modified_date = modified_date + self.probation_retries = probation_retries + self.publisher_id = publisher_id + self.publisher_inputs = publisher_inputs + self.resource_version = resource_version + self.status = status + self.subscriber = subscriber + self.url = url diff --git a/vsts/vsts/service_hooks/v4_1/models/subscriptions_query.py b/vsts/vsts/service_hooks/v4_1/models/subscriptions_query.py new file mode 100644 index 00000000..262e8bec --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/subscriptions_query.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 SubscriptionsQuery(Model): + """SubscriptionsQuery. + + :param consumer_action_id: Optional consumer action id to restrict the results to (null for any) + :type consumer_action_id: str + :param consumer_id: Optional consumer id to restrict the results to (null for any) + :type consumer_id: str + :param consumer_input_filters: Filter for subscription consumer inputs + :type consumer_input_filters: list of :class:`InputFilter ` + :param event_type: Optional event type id to restrict the results to (null for any) + :type event_type: str + :param publisher_id: Optional publisher id to restrict the results to (null for any) + :type publisher_id: str + :param publisher_input_filters: Filter for subscription publisher inputs + :type publisher_input_filters: list of :class:`InputFilter ` + :param results: Results from the query + :type results: list of :class:`Subscription ` + :param subscriber_id: Optional subscriber filter. + :type subscriber_id: str + """ + + _attribute_map = { + 'consumer_action_id': {'key': 'consumerActionId', 'type': 'str'}, + 'consumer_id': {'key': 'consumerId', 'type': 'str'}, + 'consumer_input_filters': {'key': 'consumerInputFilters', 'type': '[InputFilter]'}, + 'event_type': {'key': 'eventType', 'type': 'str'}, + 'publisher_id': {'key': 'publisherId', 'type': 'str'}, + 'publisher_input_filters': {'key': 'publisherInputFilters', 'type': '[InputFilter]'}, + 'results': {'key': 'results', 'type': '[Subscription]'}, + 'subscriber_id': {'key': 'subscriberId', 'type': 'str'} + } + + def __init__(self, consumer_action_id=None, consumer_id=None, consumer_input_filters=None, event_type=None, publisher_id=None, publisher_input_filters=None, results=None, subscriber_id=None): + super(SubscriptionsQuery, self).__init__() + self.consumer_action_id = consumer_action_id + self.consumer_id = consumer_id + self.consumer_input_filters = consumer_input_filters + self.event_type = event_type + self.publisher_id = publisher_id + self.publisher_input_filters = publisher_input_filters + self.results = results + self.subscriber_id = subscriber_id diff --git a/vsts/vsts/service_hooks/v4_1/models/versioned_resource.py b/vsts/vsts/service_hooks/v4_1/models/versioned_resource.py new file mode 100644 index 00000000..c55dbd04 --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/models/versioned_resource.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 VersionedResource(Model): + """VersionedResource. + + :param compatible_with: Gets or sets the reference to the compatible version. + :type compatible_with: str + :param resource: Gets or sets the resource data. + :type resource: object + :param resource_version: Gets or sets the version of the resource data. + :type resource_version: str + """ + + _attribute_map = { + 'compatible_with': {'key': 'compatibleWith', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'object'}, + 'resource_version': {'key': 'resourceVersion', 'type': 'str'} + } + + def __init__(self, compatible_with=None, resource=None, resource_version=None): + super(VersionedResource, self).__init__() + self.compatible_with = compatible_with + self.resource = resource + self.resource_version = resource_version diff --git a/vsts/vsts/service_hooks/v4_1/service_hooks_client.py b/vsts/vsts/service_hooks/v4_1/service_hooks_client.py new file mode 100644 index 00000000..5f873e8d --- /dev/null +++ b/vsts/vsts/service_hooks/v4_1/service_hooks_client.py @@ -0,0 +1,404 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class ServiceHooksClient(VssClient): + """ServiceHooks + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ServiceHooksClient, 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 get_consumer_action(self, consumer_id, consumer_action_id, publisher_id=None): + """GetConsumerAction. + [Preview API] Get details about a specific consumer action. + :param str consumer_id: ID for a consumer. + :param str consumer_action_id: ID for a consumerActionId. + :param str publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if consumer_id is not None: + route_values['consumerId'] = self._serialize.url('consumer_id', consumer_id, 'str') + if consumer_action_id is not None: + route_values['consumerActionId'] = self._serialize.url('consumer_action_id', consumer_action_id, 'str') + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ConsumerAction', response) + + def list_consumer_actions(self, consumer_id, publisher_id=None): + """ListConsumerActions. + [Preview API] Get a list of consumer actions for a specific consumer. + :param str consumer_id: ID for a consumer. + :param str publisher_id: + :rtype: [ConsumerAction] + """ + route_values = {} + if consumer_id is not None: + route_values['consumerId'] = self._serialize.url('consumer_id', consumer_id, 'str') + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='c3428e90-7a69-4194-8ed8-0f153185ee0d', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ConsumerAction]', response) + + def get_consumer(self, consumer_id, publisher_id=None): + """GetConsumer. + [Preview API] Get a specific consumer service. Optionally filter out consumer actions that do not support any event types for the specified publisher. + :param str consumer_id: ID for a consumer. + :param str publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if consumer_id is not None: + route_values['consumerId'] = self._serialize.url('consumer_id', consumer_id, 'str') + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Consumer', response) + + def list_consumers(self, publisher_id=None): + """ListConsumers. + [Preview API] Get a list of available service hook consumer services. Optionally filter by consumers that support at least one event type from the specific publisher. + :param str publisher_id: + :rtype: [Consumer] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='4301c514-5f34-4f5d-a145-f0ea7b5b7d19', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Consumer]', response) + + def get_subscription_diagnostics(self, subscription_id): + """GetSubscriptionDiagnostics. + [Preview API] + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + response = self._send(http_method='GET', + location_id='3b36bcb5-02ad-43c6-bbfa-6dfc6f8e9d68', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('SubscriptionDiagnostics', response) + + def update_subscription_diagnostics(self, update_parameters, subscription_id): + """UpdateSubscriptionDiagnostics. + [Preview API] + :param :class:` ` update_parameters: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(update_parameters, 'UpdateSubscripitonDiagnosticsParameters') + response = self._send(http_method='PUT', + location_id='3b36bcb5-02ad-43c6-bbfa-6dfc6f8e9d68', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('SubscriptionDiagnostics', response) + + def get_event_type(self, publisher_id, event_type_id): + """GetEventType. + [Preview API] Get a specific event type. + :param str publisher_id: ID for a publisher. + :param str event_type_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + if event_type_id is not None: + route_values['eventTypeId'] = self._serialize.url('event_type_id', event_type_id, 'str') + response = self._send(http_method='GET', + location_id='db4777cd-8e08-4a84-8ba3-c974ea033718', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('EventTypeDescriptor', response) + + def list_event_types(self, publisher_id): + """ListEventTypes. + [Preview API] Get the event types for a specific publisher. + :param str publisher_id: ID for a publisher. + :rtype: [EventTypeDescriptor] + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='db4777cd-8e08-4a84-8ba3-c974ea033718', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[EventTypeDescriptor]', response) + + def get_notification(self, subscription_id, notification_id): + """GetNotification. + [Preview API] Get a specific notification for a subscription. + :param str subscription_id: ID for a subscription. + :param int notification_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + if notification_id is not None: + route_values['notificationId'] = self._serialize.url('notification_id', notification_id, 'int') + response = self._send(http_method='GET', + location_id='0c62d343-21b0-4732-997b-017fde84dc28', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('Notification', response) + + def get_notifications(self, subscription_id, max_results=None, status=None, result=None): + """GetNotifications. + [Preview API] Get a list of notifications for a specific subscription. A notification includes details about the event, the request to and the response from the consumer service. + :param str subscription_id: ID for a subscription. + :param int max_results: Maximum number of notifications to return. Default is **100**. + :param str status: Get only notifications with this status. + :param str result: Get only notifications with this result type. + :rtype: [Notification] + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + query_parameters = {} + if max_results is not None: + query_parameters['maxResults'] = self._serialize.query('max_results', max_results, 'int') + if status is not None: + query_parameters['status'] = self._serialize.query('status', status, 'str') + if result is not None: + query_parameters['result'] = self._serialize.query('result', result, 'str') + response = self._send(http_method='GET', + location_id='0c62d343-21b0-4732-997b-017fde84dc28', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Notification]', response) + + def query_notifications(self, query): + """QueryNotifications. + [Preview API] Query for notifications. A notification includes details about the event, the request to and the response from the consumer service. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'NotificationsQuery') + response = self._send(http_method='POST', + location_id='1a57562f-160a-4b5c-9185-905e95b39d36', + version='4.1-preview.1', + content=content) + return self._deserialize('NotificationsQuery', response) + + def query_input_values(self, input_values_query, publisher_id): + """QueryInputValues. + [Preview API] + :param :class:` ` input_values_query: + :param str publisher_id: + :rtype: :class:` ` + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + content = self._serialize.body(input_values_query, 'InputValuesQuery') + response = self._send(http_method='POST', + location_id='d815d352-a566-4dc1-a3e3-fd245acf688c', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('InputValuesQuery', response) + + def get_publisher(self, publisher_id): + """GetPublisher. + [Preview API] Get a specific service hooks publisher. + :param str publisher_id: ID for a publisher. + :rtype: :class:` ` + """ + route_values = {} + if publisher_id is not None: + route_values['publisherId'] = self._serialize.url('publisher_id', publisher_id, 'str') + response = self._send(http_method='GET', + location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('Publisher', response) + + def list_publishers(self): + """ListPublishers. + [Preview API] Get a list of publishers. + :rtype: [Publisher] + """ + response = self._send(http_method='GET', + location_id='1e83a210-5b53-43bc-90f0-d476a4e5d731', + version='4.1-preview.1', + returns_collection=True) + return self._deserialize('[Publisher]', response) + + def query_publishers(self, query): + """QueryPublishers. + [Preview API] Query for service hook publishers. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'PublishersQuery') + response = self._send(http_method='POST', + location_id='99b44a8a-65a8-4670-8f3e-e7f7842cce64', + version='4.1-preview.1', + content=content) + return self._deserialize('PublishersQuery', response) + + def create_subscription(self, subscription): + """CreateSubscription. + [Preview API] Create a subscription. + :param :class:` ` subscription: Subscription to be created. + :rtype: :class:` ` + """ + content = self._serialize.body(subscription, 'Subscription') + response = self._send(http_method='POST', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.1-preview.1', + content=content) + return self._deserialize('Subscription', response) + + def delete_subscription(self, subscription_id): + """DeleteSubscription. + [Preview API] Delete a specific service hooks subscription. + :param str subscription_id: ID for a subscription. + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + self._send(http_method='DELETE', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.1-preview.1', + route_values=route_values) + + def get_subscription(self, subscription_id): + """GetSubscription. + [Preview API] Get a specific service hooks subscription. + :param str subscription_id: ID for a subscription. + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + response = self._send(http_method='GET', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('Subscription', response) + + def list_subscriptions(self, publisher_id=None, event_type=None, consumer_id=None, consumer_action_id=None): + """ListSubscriptions. + [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 consumer_id: ID for a consumer. + :param str consumer_action_id: ID for a consumerActionId. + :rtype: [Subscription] + """ + query_parameters = {} + if publisher_id is not None: + query_parameters['publisherId'] = self._serialize.query('publisher_id', publisher_id, 'str') + if event_type is not None: + query_parameters['eventType'] = self._serialize.query('event_type', event_type, 'str') + if consumer_id is not None: + query_parameters['consumerId'] = self._serialize.query('consumer_id', consumer_id, 'str') + if consumer_action_id is not None: + query_parameters['consumerActionId'] = self._serialize.query('consumer_action_id', consumer_action_id, 'str') + response = self._send(http_method='GET', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Subscription]', response) + + def replace_subscription(self, subscription, subscription_id=None): + """ReplaceSubscription. + [Preview API] Update a subscription. ID for a subscription that you wish to update. + :param :class:` ` subscription: + :param str subscription_id: + :rtype: :class:` ` + """ + route_values = {} + if subscription_id is not None: + route_values['subscriptionId'] = self._serialize.url('subscription_id', subscription_id, 'str') + content = self._serialize.body(subscription, 'Subscription') + response = self._send(http_method='PUT', + location_id='fc50d02a-849f-41fb-8af1-0a5216103269', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Subscription', response) + + def create_subscriptions_query(self, query): + """CreateSubscriptionsQuery. + [Preview API] Query for service hook subscriptions. + :param :class:` ` query: + :rtype: :class:` ` + """ + content = self._serialize.body(query, 'SubscriptionsQuery') + response = self._send(http_method='POST', + location_id='c7c3c1cf-9e05-4c0d-a425-a0f922c2c6ed', + version='4.1-preview.1', + content=content) + return self._deserialize('SubscriptionsQuery', response) + + def create_test_notification(self, test_notification, use_real_data=None): + """CreateTestNotification. + [Preview API] Sends a test notification. This is useful for verifying the configuration of an updated or new service hooks subscription. + :param :class:` ` test_notification: + :param bool use_real_data: Only allow testing with real data in existing subscriptions. + :rtype: :class:` ` + """ + query_parameters = {} + if use_real_data is not None: + query_parameters['useRealData'] = self._serialize.query('use_real_data', use_real_data, 'bool') + content = self._serialize.body(test_notification, 'Notification') + response = self._send(http_method='POST', + location_id='1139462c-7e27-4524-a997-31b9b73551fe', + version='4.1-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('Notification', response) + diff --git a/vsts/vsts/task/__init__.py b/vsts/vsts/task/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/task/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/task/v4_0/__init__.py b/vsts/vsts/task/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/task/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/task/v4_0/models/__init__.py b/vsts/vsts/task/v4_0/models/__init__.py new file mode 100644 index 00000000..f21600b9 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/__init__.py @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------------------------- +# 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 .issue import Issue +from .job_option import JobOption +from .mask_hint import MaskHint +from .plan_environment import PlanEnvironment +from .project_reference import ProjectReference +from .reference_links import ReferenceLinks +from .task_attachment import TaskAttachment +from .task_log import TaskLog +from .task_log_reference import TaskLogReference +from .task_orchestration_container import TaskOrchestrationContainer +from .task_orchestration_item import TaskOrchestrationItem +from .task_orchestration_owner import TaskOrchestrationOwner +from .task_orchestration_plan import TaskOrchestrationPlan +from .task_orchestration_plan_groups_queue_metrics import TaskOrchestrationPlanGroupsQueueMetrics +from .task_orchestration_plan_reference import TaskOrchestrationPlanReference +from .task_orchestration_queued_plan import TaskOrchestrationQueuedPlan +from .task_orchestration_queued_plan_group import TaskOrchestrationQueuedPlanGroup +from .task_reference import TaskReference +from .timeline import Timeline +from .timeline_record import TimelineRecord +from .timeline_reference import TimelineReference +from .variable_value import VariableValue + +__all__ = [ + 'Issue', + 'JobOption', + 'MaskHint', + 'PlanEnvironment', + 'ProjectReference', + 'ReferenceLinks', + 'TaskAttachment', + 'TaskLog', + 'TaskLogReference', + 'TaskOrchestrationContainer', + 'TaskOrchestrationItem', + 'TaskOrchestrationOwner', + 'TaskOrchestrationPlan', + 'TaskOrchestrationPlanGroupsQueueMetrics', + 'TaskOrchestrationPlanReference', + 'TaskOrchestrationQueuedPlan', + 'TaskOrchestrationQueuedPlanGroup', + 'TaskReference', + 'Timeline', + 'TimelineRecord', + 'TimelineReference', + 'VariableValue', +] diff --git a/vsts/vsts/task/v4_0/models/issue.py b/vsts/vsts/task/v4_0/models/issue.py new file mode 100644 index 00000000..02b96b6e --- /dev/null +++ b/vsts/vsts/task/v4_0/models/issue.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 Issue(Model): + """Issue. + + :param category: + :type category: str + :param data: + :type data: dict + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, category=None, data=None, message=None, type=None): + super(Issue, self).__init__() + self.category = category + self.data = data + self.message = message + self.type = type diff --git a/vsts/vsts/task/v4_0/models/job_option.py b/vsts/vsts/task/v4_0/models/job_option.py new file mode 100644 index 00000000..223a3167 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/job_option.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 JobOption(Model): + """JobOption. + + :param data: + :type data: dict + :param id: Gets the id of the option. + :type id: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, data=None, id=None): + super(JobOption, self).__init__() + self.data = data + self.id = id diff --git a/vsts/vsts/task/v4_0/models/mask_hint.py b/vsts/vsts/task/v4_0/models/mask_hint.py new file mode 100644 index 00000000..9fa07965 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/mask_hint.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MaskHint(Model): + """MaskHint. + + :param type: + :type type: object + :param value: + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'object'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, type=None, value=None): + super(MaskHint, self).__init__() + self.type = type + self.value = value diff --git a/vsts/vsts/task/v4_0/models/plan_environment.py b/vsts/vsts/task/v4_0/models/plan_environment.py new file mode 100644 index 00000000..a0b58aaa --- /dev/null +++ b/vsts/vsts/task/v4_0/models/plan_environment.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PlanEnvironment(Model): + """PlanEnvironment. + + :param mask: + :type mask: list of :class:`MaskHint ` + :param options: + :type options: dict + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'mask': {'key': 'mask', 'type': '[MaskHint]'}, + 'options': {'key': 'options', 'type': '{JobOption}'}, + 'variables': {'key': 'variables', 'type': '{str}'} + } + + def __init__(self, mask=None, options=None, variables=None): + super(PlanEnvironment, self).__init__() + self.mask = mask + self.options = options + self.variables = variables diff --git a/vsts/vsts/task/v4_0/models/project_reference.py b/vsts/vsts/task/v4_0/models/project_reference.py new file mode 100644 index 00000000..8fd6ad8e --- /dev/null +++ b/vsts/vsts/task/v4_0/models/project_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectReference(Model): + """ProjectReference. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ProjectReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/task/v4_0/models/reference_links.py b/vsts/vsts/task/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/task/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/task/v4_0/models/task_attachment.py b/vsts/vsts/task/v4_0/models/task_attachment.py new file mode 100644 index 00000000..28b013b2 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_attachment.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAttachment(Model): + """TaskAttachment. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param created_on: + :type created_on: datetime + :param last_changed_by: + :type last_changed_by: str + :param last_changed_on: + :type last_changed_on: datetime + :param name: + :type name: str + :param record_id: + :type record_id: str + :param timeline_id: + :type timeline_id: str + :param type: + :type type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'last_changed_by': {'key': 'lastChangedBy', 'type': 'str'}, + 'last_changed_on': {'key': 'lastChangedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'record_id': {'key': 'recordId', 'type': 'str'}, + 'timeline_id': {'key': 'timelineId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, _links=None, created_on=None, last_changed_by=None, last_changed_on=None, name=None, record_id=None, timeline_id=None, type=None): + super(TaskAttachment, self).__init__() + self._links = _links + self.created_on = created_on + self.last_changed_by = last_changed_by + self.last_changed_on = last_changed_on + self.name = name + self.record_id = record_id + self.timeline_id = timeline_id + self.type = type diff --git a/vsts/vsts/task/v4_0/models/task_log.py b/vsts/vsts/task/v4_0/models/task_log.py new file mode 100644 index 00000000..491146e9 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_log.py @@ -0,0 +1,47 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_log_reference import TaskLogReference + + +class TaskLog(TaskLogReference): + """TaskLog. + + :param id: + :type id: int + :param location: + :type location: str + :param created_on: + :type created_on: datetime + :param index_location: + :type index_location: str + :param last_changed_on: + :type last_changed_on: datetime + :param line_count: + :type line_count: long + :param path: + :type path: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'index_location': {'key': 'indexLocation', 'type': 'str'}, + 'last_changed_on': {'key': 'lastChangedOn', 'type': 'iso-8601'}, + 'line_count': {'key': 'lineCount', 'type': 'long'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, id=None, location=None, created_on=None, index_location=None, last_changed_on=None, line_count=None, path=None): + super(TaskLog, self).__init__(id=id, location=location) + self.created_on = created_on + self.index_location = index_location + self.last_changed_on = last_changed_on + self.line_count = line_count + self.path = path diff --git a/vsts/vsts/task/v4_0/models/task_log_reference.py b/vsts/vsts/task/v4_0/models/task_log_reference.py new file mode 100644 index 00000000..f544e25e --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_log_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskLogReference(Model): + """TaskLogReference. + + :param id: + :type id: int + :param location: + :type location: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'} + } + + def __init__(self, id=None, location=None): + super(TaskLogReference, self).__init__() + self.id = id + self.location = location diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_container.py b/vsts/vsts/task/v4_0/models/task_orchestration_container.py new file mode 100644 index 00000000..88ab4fcc --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_container.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_orchestration_item import TaskOrchestrationItem + + +class TaskOrchestrationContainer(TaskOrchestrationItem): + """TaskOrchestrationContainer. + + :param item_type: + :type item_type: object + :param children: + :type children: list of :class:`TaskOrchestrationItem ` + :param continue_on_error: + :type continue_on_error: bool + :param data: + :type data: dict + :param max_concurrency: + :type max_concurrency: int + :param parallel: + :type parallel: bool + :param rollback: + :type rollback: :class:`TaskOrchestrationContainer ` + """ + + _attribute_map = { + 'item_type': {'key': 'itemType', 'type': 'object'}, + 'children': {'key': 'children', 'type': '[TaskOrchestrationItem]'}, + 'continue_on_error': {'key': 'continueOnError', 'type': 'bool'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'max_concurrency': {'key': 'maxConcurrency', 'type': 'int'}, + 'parallel': {'key': 'parallel', 'type': 'bool'}, + 'rollback': {'key': 'rollback', 'type': 'TaskOrchestrationContainer'} + } + + def __init__(self, item_type=None, children=None, continue_on_error=None, data=None, max_concurrency=None, parallel=None, rollback=None): + super(TaskOrchestrationContainer, self).__init__(item_type=item_type) + self.children = children + self.continue_on_error = continue_on_error + self.data = data + self.max_concurrency = max_concurrency + self.parallel = parallel + self.rollback = rollback diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_item.py b/vsts/vsts/task/v4_0/models/task_orchestration_item.py new file mode 100644 index 00000000..e65ab5e6 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_item.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationItem(Model): + """TaskOrchestrationItem. + + :param item_type: + :type item_type: object + """ + + _attribute_map = { + 'item_type': {'key': 'itemType', 'type': 'object'} + } + + def __init__(self, item_type=None): + super(TaskOrchestrationItem, self).__init__() + self.item_type = item_type diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_owner.py b/vsts/vsts/task/v4_0/models/task_orchestration_owner.py new file mode 100644 index 00000000..fe2ec448 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_owner.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationOwner(Model): + """TaskOrchestrationOwner. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param id: + :type id: int + :param name: + :type name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None): + super(TaskOrchestrationOwner, self).__init__() + self._links = _links + self.id = id + self.name = name diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_plan.py b/vsts/vsts/task/v4_0/models/task_orchestration_plan.py new file mode 100644 index 00000000..4a812d3f --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_plan.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_orchestration_plan_reference import TaskOrchestrationPlanReference + + +class TaskOrchestrationPlan(TaskOrchestrationPlanReference): + """TaskOrchestrationPlan. + + :param artifact_location: + :type artifact_location: str + :param artifact_uri: + :type artifact_uri: str + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_id: + :type plan_id: str + :param plan_type: + :type plan_type: str + :param scope_identifier: + :type scope_identifier: str + :param version: + :type version: int + :param environment: + :type environment: :class:`PlanEnvironment ` + :param finish_time: + :type finish_time: datetime + :param implementation: + :type implementation: :class:`TaskOrchestrationContainer ` + :param plan_group: + :type plan_group: str + :param requested_by_id: + :type requested_by_id: str + :param requested_for_id: + :type requested_for_id: str + :param result: + :type result: object + :param result_code: + :type result_code: str + :param start_time: + :type start_time: datetime + :param state: + :type state: object + :param timeline: + :type timeline: :class:`TimelineReference ` + """ + + _attribute_map = { + 'artifact_location': {'key': 'artifactLocation', 'type': 'str'}, + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'environment': {'key': 'environment', 'type': 'PlanEnvironment'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'implementation': {'key': 'implementation', 'type': 'TaskOrchestrationContainer'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'requested_by_id': {'key': 'requestedById', 'type': 'str'}, + 'requested_for_id': {'key': 'requestedForId', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'object'}, + 'timeline': {'key': 'timeline', 'type': 'TimelineReference'} + } + + def __init__(self, artifact_location=None, artifact_uri=None, definition=None, owner=None, plan_id=None, plan_type=None, scope_identifier=None, version=None, environment=None, finish_time=None, implementation=None, plan_group=None, requested_by_id=None, requested_for_id=None, result=None, result_code=None, start_time=None, state=None, timeline=None): + super(TaskOrchestrationPlan, self).__init__(artifact_location=artifact_location, artifact_uri=artifact_uri, definition=definition, owner=owner, plan_id=plan_id, plan_type=plan_type, scope_identifier=scope_identifier, version=version) + self.environment = environment + self.finish_time = finish_time + self.implementation = implementation + self.plan_group = plan_group + self.requested_by_id = requested_by_id + self.requested_for_id = requested_for_id + self.result = result + self.result_code = result_code + self.start_time = start_time + self.state = state + self.timeline = timeline diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_plan_groups_queue_metrics.py b/vsts/vsts/task/v4_0/models/task_orchestration_plan_groups_queue_metrics.py new file mode 100644 index 00000000..90bcfd29 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_plan_groups_queue_metrics.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationPlanGroupsQueueMetrics(Model): + """TaskOrchestrationPlanGroupsQueueMetrics. + + :param count: + :type count: int + :param status: + :type status: object + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, count=None, status=None): + super(TaskOrchestrationPlanGroupsQueueMetrics, self).__init__() + self.count = count + self.status = status diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_plan_reference.py b/vsts/vsts/task/v4_0/models/task_orchestration_plan_reference.py new file mode 100644 index 00000000..b5ec0b09 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_plan_reference.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationPlanReference(Model): + """TaskOrchestrationPlanReference. + + :param artifact_location: + :type artifact_location: str + :param artifact_uri: + :type artifact_uri: str + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_id: + :type plan_id: str + :param plan_type: + :type plan_type: str + :param scope_identifier: + :type scope_identifier: str + :param version: + :type version: int + """ + + _attribute_map = { + 'artifact_location': {'key': 'artifactLocation', 'type': 'str'}, + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'} + } + + def __init__(self, artifact_location=None, artifact_uri=None, definition=None, owner=None, plan_id=None, plan_type=None, scope_identifier=None, version=None): + super(TaskOrchestrationPlanReference, self).__init__() + self.artifact_location = artifact_location + self.artifact_uri = artifact_uri + self.definition = definition + self.owner = owner + self.plan_id = plan_id + self.plan_type = plan_type + self.scope_identifier = scope_identifier + self.version = version diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_queued_plan.py b/vsts/vsts/task/v4_0/models/task_orchestration_queued_plan.py new file mode 100644 index 00000000..c06421b3 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_queued_plan.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationQueuedPlan(Model): + """TaskOrchestrationQueuedPlan. + + :param assign_time: + :type assign_time: datetime + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_group: + :type plan_group: str + :param plan_id: + :type plan_id: str + :param pool_id: + :type pool_id: int + :param queue_position: + :type queue_position: int + :param queue_time: + :type queue_time: datetime + :param scope_identifier: + :type scope_identifier: str + """ + + _attribute_map = { + 'assign_time': {'key': 'assignTime', 'type': 'iso-8601'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'pool_id': {'key': 'poolId', 'type': 'int'}, + 'queue_position': {'key': 'queuePosition', 'type': 'int'}, + 'queue_time': {'key': 'queueTime', 'type': 'iso-8601'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'} + } + + def __init__(self, assign_time=None, definition=None, owner=None, plan_group=None, plan_id=None, pool_id=None, queue_position=None, queue_time=None, scope_identifier=None): + super(TaskOrchestrationQueuedPlan, self).__init__() + self.assign_time = assign_time + self.definition = definition + self.owner = owner + self.plan_group = plan_group + self.plan_id = plan_id + self.pool_id = pool_id + self.queue_position = queue_position + self.queue_time = queue_time + self.scope_identifier = scope_identifier diff --git a/vsts/vsts/task/v4_0/models/task_orchestration_queued_plan_group.py b/vsts/vsts/task/v4_0/models/task_orchestration_queued_plan_group.py new file mode 100644 index 00000000..60069a93 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_orchestration_queued_plan_group.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationQueuedPlanGroup(Model): + """TaskOrchestrationQueuedPlanGroup. + + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_group: + :type plan_group: str + :param plans: + :type plans: list of :class:`TaskOrchestrationQueuedPlan ` + :param project: + :type project: :class:`ProjectReference ` + :param queue_position: + :type queue_position: int + """ + + _attribute_map = { + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'plans': {'key': 'plans', 'type': '[TaskOrchestrationQueuedPlan]'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'queue_position': {'key': 'queuePosition', 'type': 'int'} + } + + def __init__(self, definition=None, owner=None, plan_group=None, plans=None, project=None, queue_position=None): + super(TaskOrchestrationQueuedPlanGroup, self).__init__() + self.definition = definition + self.owner = owner + self.plan_group = plan_group + self.plans = plans + self.project = project + self.queue_position = queue_position diff --git a/vsts/vsts/task/v4_0/models/task_reference.py b/vsts/vsts/task/v4_0/models/task_reference.py new file mode 100644 index 00000000..3ff1dd7b --- /dev/null +++ b/vsts/vsts/task/v4_0/models/task_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskReference(Model): + """TaskReference. + + :param id: + :type id: str + :param inputs: + :type inputs: dict + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, inputs=None, name=None, version=None): + super(TaskReference, self).__init__() + self.id = id + self.inputs = inputs + self.name = name + self.version = version diff --git a/vsts/vsts/task/v4_0/models/timeline.py b/vsts/vsts/task/v4_0/models/timeline.py new file mode 100644 index 00000000..95dc6c3e --- /dev/null +++ b/vsts/vsts/task/v4_0/models/timeline.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 .timeline_reference import TimelineReference + + +class Timeline(TimelineReference): + """Timeline. + + :param change_id: + :type change_id: int + :param id: + :type id: str + :param location: + :type location: str + :param last_changed_by: + :type last_changed_by: str + :param last_changed_on: + :type last_changed_on: datetime + :param records: + :type records: list of :class:`TimelineRecord ` + """ + + _attribute_map = { + 'change_id': {'key': 'changeId', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'last_changed_by': {'key': 'lastChangedBy', 'type': 'str'}, + 'last_changed_on': {'key': 'lastChangedOn', 'type': 'iso-8601'}, + 'records': {'key': 'records', 'type': '[TimelineRecord]'} + } + + def __init__(self, change_id=None, id=None, location=None, last_changed_by=None, last_changed_on=None, records=None): + super(Timeline, self).__init__(change_id=change_id, id=id, location=location) + self.last_changed_by = last_changed_by + self.last_changed_on = last_changed_on + self.records = records diff --git a/vsts/vsts/task/v4_0/models/timeline_record.py b/vsts/vsts/task/v4_0/models/timeline_record.py new file mode 100644 index 00000000..d1297125 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/timeline_record.py @@ -0,0 +1,117 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineRecord(Model): + """TimelineRecord. + + :param change_id: + :type change_id: int + :param current_operation: + :type current_operation: str + :param details: + :type details: :class:`TimelineReference ` + :param error_count: + :type error_count: int + :param finish_time: + :type finish_time: datetime + :param id: + :type id: str + :param issues: + :type issues: list of :class:`Issue ` + :param last_modified: + :type last_modified: datetime + :param location: + :type location: str + :param log: + :type log: :class:`TaskLogReference ` + :param name: + :type name: str + :param order: + :type order: int + :param parent_id: + :type parent_id: str + :param percent_complete: + :type percent_complete: int + :param ref_name: + :type ref_name: str + :param result: + :type result: object + :param result_code: + :type result_code: str + :param start_time: + :type start_time: datetime + :param state: + :type state: object + :param task: + :type task: :class:`TaskReference ` + :param type: + :type type: str + :param variables: + :type variables: dict + :param warning_count: + :type warning_count: int + :param worker_name: + :type worker_name: str + """ + + _attribute_map = { + 'change_id': {'key': 'changeId', 'type': 'int'}, + 'current_operation': {'key': 'currentOperation', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'TimelineReference'}, + 'error_count': {'key': 'errorCount', 'type': 'int'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'issues': {'key': 'issues', 'type': '[Issue]'}, + 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, + 'location': {'key': 'location', 'type': 'str'}, + 'log': {'key': 'log', 'type': 'TaskLogReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'parent_id': {'key': 'parentId', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'ref_name': {'key': 'refName', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'object'}, + 'task': {'key': 'task', 'type': 'TaskReference'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{VariableValue}'}, + 'warning_count': {'key': 'warningCount', 'type': 'int'}, + 'worker_name': {'key': 'workerName', 'type': 'str'} + } + + def __init__(self, change_id=None, current_operation=None, details=None, error_count=None, finish_time=None, id=None, issues=None, last_modified=None, location=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, ref_name=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, variables=None, warning_count=None, worker_name=None): + super(TimelineRecord, self).__init__() + self.change_id = change_id + self.current_operation = current_operation + self.details = details + self.error_count = error_count + self.finish_time = finish_time + self.id = id + self.issues = issues + self.last_modified = last_modified + self.location = location + self.log = log + self.name = name + self.order = order + self.parent_id = parent_id + self.percent_complete = percent_complete + self.ref_name = ref_name + self.result = result + self.result_code = result_code + self.start_time = start_time + self.state = state + self.task = task + self.type = type + self.variables = variables + self.warning_count = warning_count + self.worker_name = worker_name diff --git a/vsts/vsts/task/v4_0/models/timeline_reference.py b/vsts/vsts/task/v4_0/models/timeline_reference.py new file mode 100644 index 00000000..8755a8c4 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/timeline_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineReference(Model): + """TimelineReference. + + :param change_id: + :type change_id: int + :param id: + :type id: str + :param location: + :type location: str + """ + + _attribute_map = { + 'change_id': {'key': 'changeId', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'} + } + + def __init__(self, change_id=None, id=None, location=None): + super(TimelineReference, self).__init__() + self.change_id = change_id + self.id = id + self.location = location diff --git a/vsts/vsts/task/v4_0/models/variable_value.py b/vsts/vsts/task/v4_0/models/variable_value.py new file mode 100644 index 00000000..035049c0 --- /dev/null +++ b/vsts/vsts/task/v4_0/models/variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableValue(Model): + """VariableValue. + + :param is_secret: + :type is_secret: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(VariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/task/v4_0/task_client.py b/vsts/vsts/task/v4_0/task_client.py new file mode 100644 index 00000000..4cfdcdfd --- /dev/null +++ b/vsts/vsts/task/v4_0/task_client.py @@ -0,0 +1,555 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TaskClient(VssClient): + """Task + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TaskClient, 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 get_plan_attachments(self, scope_identifier, hub_name, plan_id, type): + """GetPlanAttachments. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str type: + :rtype: [TaskAttachment] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + response = self._send(http_method='GET', + location_id='eb55e5d6-2f30-4295-b5ed-38da50b1fc52', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskAttachment]', response) + + def create_attachment(self, upload_stream, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): + """CreateAttachment. + [Preview API] + :param object upload_stream: Stream to upload + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :param str name: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.0-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('TaskAttachment', response) + + def get_attachment(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): + """GetAttachment. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :param str name: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('TaskAttachment', response) + + def get_attachment_content(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): + """GetAttachmentContent. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :param str name: + :rtype: object + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_attachments(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type): + """GetAttachments. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :rtype: [TaskAttachment] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + response = self._send(http_method='GET', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskAttachment]', response) + + def append_timeline_record_feed(self, lines, scope_identifier, hub_name, plan_id, timeline_id, record_id): + """AppendTimelineRecordFeed. + :param :class:` ` lines: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + content = self._serialize.body(lines, 'VssJsonCollectionWrapper') + self._send(http_method='POST', + location_id='858983e4-19bd-4c5e-864c-507b59b58b12', + version='4.0', + route_values=route_values, + content=content) + + def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, log_id): + """AppendLogContent. + :param object upload_stream: Stream to upload + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param int log_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.0', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('TaskLog', response) + + def create_log(self, log, scope_identifier, hub_name, plan_id): + """CreateLog. + :param :class:` ` log: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + content = self._serialize.body(log, 'TaskLog') + response = self._send(http_method='POST', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskLog', response) + + def get_log(self, scope_identifier, hub_name, plan_id, log_id, start_line=None, end_line=None): + """GetLog. + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param int log_id: + :param long start_line: + :param long end_line: + :rtype: [str] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') + query_parameters = {} + if start_line is not None: + query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') + if end_line is not None: + query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') + response = self._send(http_method='GET', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_logs(self, scope_identifier, hub_name, plan_id): + """GetLogs. + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: [TaskLog] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + response = self._send(http_method='GET', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskLog]', response) + + def get_plan_groups_queue_metrics(self, scope_identifier, hub_name): + """GetPlanGroupsQueueMetrics. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :rtype: [TaskOrchestrationPlanGroupsQueueMetrics] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + response = self._send(http_method='GET', + location_id='038fd4d5-cda7-44ca-92c0-935843fee1a7', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskOrchestrationPlanGroupsQueueMetrics]', response) + + def get_queued_plan_groups(self, scope_identifier, hub_name, status_filter=None, count=None): + """GetQueuedPlanGroups. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str status_filter: + :param int count: + :rtype: [TaskOrchestrationQueuedPlanGroup] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + query_parameters = {} + if status_filter is not None: + query_parameters['statusFilter'] = self._serialize.query('status_filter', status_filter, 'str') + if count is not None: + query_parameters['count'] = self._serialize.query('count', count, 'int') + response = self._send(http_method='GET', + location_id='0dd73091-3e36-4f43-b443-1b76dd426d84', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskOrchestrationQueuedPlanGroup]', response) + + def get_queued_plan_group(self, scope_identifier, hub_name, plan_group): + """GetQueuedPlanGroup. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_group: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_group is not None: + route_values['planGroup'] = self._serialize.url('plan_group', plan_group, 'str') + response = self._send(http_method='GET', + location_id='65fd0708-bc1e-447b-a731-0587c5464e5b', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('TaskOrchestrationQueuedPlanGroup', response) + + def get_plan(self, scope_identifier, hub_name, plan_id): + """GetPlan. + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + response = self._send(http_method='GET', + location_id='5cecd946-d704-471e-a45f-3b4064fcfaba', + version='4.0', + route_values=route_values) + return self._deserialize('TaskOrchestrationPlan', response) + + def get_records(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None): + """GetRecords. + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param int change_id: + :rtype: [TimelineRecord] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + query_parameters = {} + if change_id is not None: + query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') + response = self._send(http_method='GET', + location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TimelineRecord]', response) + + def update_records(self, records, scope_identifier, hub_name, plan_id, timeline_id): + """UpdateRecords. + :param :class:` ` records: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :rtype: [TimelineRecord] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + content = self._serialize.body(records, 'VssJsonCollectionWrapper') + response = self._send(http_method='PATCH', + location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TimelineRecord]', response) + + def create_timeline(self, timeline, scope_identifier, hub_name, plan_id): + """CreateTimeline. + :param :class:` ` timeline: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + content = self._serialize.body(timeline, 'Timeline') + response = self._send(http_method='POST', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('Timeline', response) + + def delete_timeline(self, scope_identifier, hub_name, plan_id, timeline_id): + """DeleteTimeline. + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + self._send(http_method='DELETE', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.0', + route_values=route_values) + + def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None, include_records=None): + """GetTimeline. + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param int change_id: + :param bool include_records: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + query_parameters = {} + if change_id is not None: + query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') + if include_records is not None: + query_parameters['includeRecords'] = self._serialize.query('include_records', include_records, 'bool') + response = self._send(http_method='GET', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Timeline', response) + + def get_timelines(self, scope_identifier, hub_name, plan_id): + """GetTimelines. + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: [Timeline] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + response = self._send(http_method='GET', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[Timeline]', response) + diff --git a/vsts/vsts/task/v4_1/__init__.py b/vsts/vsts/task/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/task/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/task/v4_1/models/__init__.py b/vsts/vsts/task/v4_1/models/__init__.py new file mode 100644 index 00000000..f21600b9 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/__init__.py @@ -0,0 +1,55 @@ +# -------------------------------------------------------------------------------------------- +# 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 .issue import Issue +from .job_option import JobOption +from .mask_hint import MaskHint +from .plan_environment import PlanEnvironment +from .project_reference import ProjectReference +from .reference_links import ReferenceLinks +from .task_attachment import TaskAttachment +from .task_log import TaskLog +from .task_log_reference import TaskLogReference +from .task_orchestration_container import TaskOrchestrationContainer +from .task_orchestration_item import TaskOrchestrationItem +from .task_orchestration_owner import TaskOrchestrationOwner +from .task_orchestration_plan import TaskOrchestrationPlan +from .task_orchestration_plan_groups_queue_metrics import TaskOrchestrationPlanGroupsQueueMetrics +from .task_orchestration_plan_reference import TaskOrchestrationPlanReference +from .task_orchestration_queued_plan import TaskOrchestrationQueuedPlan +from .task_orchestration_queued_plan_group import TaskOrchestrationQueuedPlanGroup +from .task_reference import TaskReference +from .timeline import Timeline +from .timeline_record import TimelineRecord +from .timeline_reference import TimelineReference +from .variable_value import VariableValue + +__all__ = [ + 'Issue', + 'JobOption', + 'MaskHint', + 'PlanEnvironment', + 'ProjectReference', + 'ReferenceLinks', + 'TaskAttachment', + 'TaskLog', + 'TaskLogReference', + 'TaskOrchestrationContainer', + 'TaskOrchestrationItem', + 'TaskOrchestrationOwner', + 'TaskOrchestrationPlan', + 'TaskOrchestrationPlanGroupsQueueMetrics', + 'TaskOrchestrationPlanReference', + 'TaskOrchestrationQueuedPlan', + 'TaskOrchestrationQueuedPlanGroup', + 'TaskReference', + 'Timeline', + 'TimelineRecord', + 'TimelineReference', + 'VariableValue', +] diff --git a/vsts/vsts/task/v4_1/models/issue.py b/vsts/vsts/task/v4_1/models/issue.py new file mode 100644 index 00000000..02b96b6e --- /dev/null +++ b/vsts/vsts/task/v4_1/models/issue.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 Issue(Model): + """Issue. + + :param category: + :type category: str + :param data: + :type data: dict + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, category=None, data=None, message=None, type=None): + super(Issue, self).__init__() + self.category = category + self.data = data + self.message = message + self.type = type diff --git a/vsts/vsts/task/v4_1/models/job_option.py b/vsts/vsts/task/v4_1/models/job_option.py new file mode 100644 index 00000000..223a3167 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/job_option.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 JobOption(Model): + """JobOption. + + :param data: + :type data: dict + :param id: Gets the id of the option. + :type id: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, data=None, id=None): + super(JobOption, self).__init__() + self.data = data + self.id = id diff --git a/vsts/vsts/task/v4_1/models/mask_hint.py b/vsts/vsts/task/v4_1/models/mask_hint.py new file mode 100644 index 00000000..9fa07965 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/mask_hint.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MaskHint(Model): + """MaskHint. + + :param type: + :type type: object + :param value: + :type value: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'object'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, type=None, value=None): + super(MaskHint, self).__init__() + self.type = type + self.value = value diff --git a/vsts/vsts/task/v4_1/models/plan_environment.py b/vsts/vsts/task/v4_1/models/plan_environment.py new file mode 100644 index 00000000..c39fc3a5 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/plan_environment.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PlanEnvironment(Model): + """PlanEnvironment. + + :param mask: + :type mask: list of :class:`MaskHint ` + :param options: + :type options: dict + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'mask': {'key': 'mask', 'type': '[MaskHint]'}, + 'options': {'key': 'options', 'type': '{JobOption}'}, + 'variables': {'key': 'variables', 'type': '{str}'} + } + + def __init__(self, mask=None, options=None, variables=None): + super(PlanEnvironment, self).__init__() + self.mask = mask + self.options = options + self.variables = variables diff --git a/vsts/vsts/task/v4_1/models/project_reference.py b/vsts/vsts/task/v4_1/models/project_reference.py new file mode 100644 index 00000000..8fd6ad8e --- /dev/null +++ b/vsts/vsts/task/v4_1/models/project_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectReference(Model): + """ProjectReference. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ProjectReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/task/v4_1/models/reference_links.py b/vsts/vsts/task/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/task/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/task/v4_1/models/task_attachment.py b/vsts/vsts/task/v4_1/models/task_attachment.py new file mode 100644 index 00000000..8ac213bc --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_attachment.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAttachment(Model): + """TaskAttachment. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param created_on: + :type created_on: datetime + :param last_changed_by: + :type last_changed_by: str + :param last_changed_on: + :type last_changed_on: datetime + :param name: + :type name: str + :param record_id: + :type record_id: str + :param timeline_id: + :type timeline_id: str + :param type: + :type type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'last_changed_by': {'key': 'lastChangedBy', 'type': 'str'}, + 'last_changed_on': {'key': 'lastChangedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'record_id': {'key': 'recordId', 'type': 'str'}, + 'timeline_id': {'key': 'timelineId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, _links=None, created_on=None, last_changed_by=None, last_changed_on=None, name=None, record_id=None, timeline_id=None, type=None): + super(TaskAttachment, self).__init__() + self._links = _links + self.created_on = created_on + self.last_changed_by = last_changed_by + self.last_changed_on = last_changed_on + self.name = name + self.record_id = record_id + self.timeline_id = timeline_id + self.type = type diff --git a/vsts/vsts/task/v4_1/models/task_log.py b/vsts/vsts/task/v4_1/models/task_log.py new file mode 100644 index 00000000..491146e9 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_log.py @@ -0,0 +1,47 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_log_reference import TaskLogReference + + +class TaskLog(TaskLogReference): + """TaskLog. + + :param id: + :type id: int + :param location: + :type location: str + :param created_on: + :type created_on: datetime + :param index_location: + :type index_location: str + :param last_changed_on: + :type last_changed_on: datetime + :param line_count: + :type line_count: long + :param path: + :type path: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'index_location': {'key': 'indexLocation', 'type': 'str'}, + 'last_changed_on': {'key': 'lastChangedOn', 'type': 'iso-8601'}, + 'line_count': {'key': 'lineCount', 'type': 'long'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, id=None, location=None, created_on=None, index_location=None, last_changed_on=None, line_count=None, path=None): + super(TaskLog, self).__init__(id=id, location=location) + self.created_on = created_on + self.index_location = index_location + self.last_changed_on = last_changed_on + self.line_count = line_count + self.path = path diff --git a/vsts/vsts/task/v4_1/models/task_log_reference.py b/vsts/vsts/task/v4_1/models/task_log_reference.py new file mode 100644 index 00000000..f544e25e --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_log_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskLogReference(Model): + """TaskLogReference. + + :param id: + :type id: int + :param location: + :type location: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'location': {'key': 'location', 'type': 'str'} + } + + def __init__(self, id=None, location=None): + super(TaskLogReference, self).__init__() + self.id = id + self.location = location diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_container.py b/vsts/vsts/task/v4_1/models/task_orchestration_container.py new file mode 100644 index 00000000..6e091970 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_container.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_orchestration_item import TaskOrchestrationItem + + +class TaskOrchestrationContainer(TaskOrchestrationItem): + """TaskOrchestrationContainer. + + :param item_type: + :type item_type: object + :param children: + :type children: list of :class:`TaskOrchestrationItem ` + :param continue_on_error: + :type continue_on_error: bool + :param data: + :type data: dict + :param max_concurrency: + :type max_concurrency: int + :param parallel: + :type parallel: bool + :param rollback: + :type rollback: :class:`TaskOrchestrationContainer ` + """ + + _attribute_map = { + 'item_type': {'key': 'itemType', 'type': 'object'}, + 'children': {'key': 'children', 'type': '[TaskOrchestrationItem]'}, + 'continue_on_error': {'key': 'continueOnError', 'type': 'bool'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'max_concurrency': {'key': 'maxConcurrency', 'type': 'int'}, + 'parallel': {'key': 'parallel', 'type': 'bool'}, + 'rollback': {'key': 'rollback', 'type': 'TaskOrchestrationContainer'} + } + + def __init__(self, item_type=None, children=None, continue_on_error=None, data=None, max_concurrency=None, parallel=None, rollback=None): + super(TaskOrchestrationContainer, self).__init__(item_type=item_type) + self.children = children + self.continue_on_error = continue_on_error + self.data = data + self.max_concurrency = max_concurrency + self.parallel = parallel + self.rollback = rollback diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_item.py b/vsts/vsts/task/v4_1/models/task_orchestration_item.py new file mode 100644 index 00000000..e65ab5e6 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_item.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationItem(Model): + """TaskOrchestrationItem. + + :param item_type: + :type item_type: object + """ + + _attribute_map = { + 'item_type': {'key': 'itemType', 'type': 'object'} + } + + def __init__(self, item_type=None): + super(TaskOrchestrationItem, self).__init__() + self.item_type = item_type diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_owner.py b/vsts/vsts/task/v4_1/models/task_orchestration_owner.py new file mode 100644 index 00000000..c7831775 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_owner.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationOwner(Model): + """TaskOrchestrationOwner. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param id: + :type id: int + :param name: + :type name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None): + super(TaskOrchestrationOwner, self).__init__() + self._links = _links + self.id = id + self.name = name diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_plan.py b/vsts/vsts/task/v4_1/models/task_orchestration_plan.py new file mode 100644 index 00000000..0f888ae5 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_plan.py @@ -0,0 +1,88 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_orchestration_plan_reference import TaskOrchestrationPlanReference + + +class TaskOrchestrationPlan(TaskOrchestrationPlanReference): + """TaskOrchestrationPlan. + + :param artifact_location: + :type artifact_location: str + :param artifact_uri: + :type artifact_uri: str + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_group: + :type plan_group: str + :param plan_id: + :type plan_id: str + :param plan_type: + :type plan_type: str + :param scope_identifier: + :type scope_identifier: str + :param version: + :type version: int + :param environment: + :type environment: :class:`PlanEnvironment ` + :param finish_time: + :type finish_time: datetime + :param implementation: + :type implementation: :class:`TaskOrchestrationContainer ` + :param requested_by_id: + :type requested_by_id: str + :param requested_for_id: + :type requested_for_id: str + :param result: + :type result: object + :param result_code: + :type result_code: str + :param start_time: + :type start_time: datetime + :param state: + :type state: object + :param timeline: + :type timeline: :class:`TimelineReference ` + """ + + _attribute_map = { + 'artifact_location': {'key': 'artifactLocation', 'type': 'str'}, + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'environment': {'key': 'environment', 'type': 'PlanEnvironment'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'implementation': {'key': 'implementation', 'type': 'TaskOrchestrationContainer'}, + 'requested_by_id': {'key': 'requestedById', 'type': 'str'}, + 'requested_for_id': {'key': 'requestedForId', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'object'}, + 'timeline': {'key': 'timeline', 'type': 'TimelineReference'} + } + + def __init__(self, artifact_location=None, artifact_uri=None, definition=None, owner=None, plan_group=None, plan_id=None, plan_type=None, scope_identifier=None, version=None, environment=None, finish_time=None, implementation=None, requested_by_id=None, requested_for_id=None, result=None, result_code=None, start_time=None, state=None, timeline=None): + super(TaskOrchestrationPlan, self).__init__(artifact_location=artifact_location, artifact_uri=artifact_uri, definition=definition, owner=owner, plan_group=plan_group, plan_id=plan_id, plan_type=plan_type, scope_identifier=scope_identifier, version=version) + self.environment = environment + self.finish_time = finish_time + self.implementation = implementation + self.requested_by_id = requested_by_id + self.requested_for_id = requested_for_id + self.result = result + self.result_code = result_code + self.start_time = start_time + self.state = state + self.timeline = timeline diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_plan_groups_queue_metrics.py b/vsts/vsts/task/v4_1/models/task_orchestration_plan_groups_queue_metrics.py new file mode 100644 index 00000000..90bcfd29 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_plan_groups_queue_metrics.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationPlanGroupsQueueMetrics(Model): + """TaskOrchestrationPlanGroupsQueueMetrics. + + :param count: + :type count: int + :param status: + :type status: object + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, count=None, status=None): + super(TaskOrchestrationPlanGroupsQueueMetrics, self).__init__() + self.count = count + self.status = status diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_plan_reference.py b/vsts/vsts/task/v4_1/models/task_orchestration_plan_reference.py new file mode 100644 index 00000000..9dd58580 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_plan_reference.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationPlanReference(Model): + """TaskOrchestrationPlanReference. + + :param artifact_location: + :type artifact_location: str + :param artifact_uri: + :type artifact_uri: str + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_group: + :type plan_group: str + :param plan_id: + :type plan_id: str + :param plan_type: + :type plan_type: str + :param scope_identifier: + :type scope_identifier: str + :param version: + :type version: int + """ + + _attribute_map = { + 'artifact_location': {'key': 'artifactLocation', 'type': 'str'}, + 'artifact_uri': {'key': 'artifactUri', 'type': 'str'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'} + } + + def __init__(self, artifact_location=None, artifact_uri=None, definition=None, owner=None, plan_group=None, plan_id=None, plan_type=None, scope_identifier=None, version=None): + super(TaskOrchestrationPlanReference, self).__init__() + self.artifact_location = artifact_location + self.artifact_uri = artifact_uri + self.definition = definition + self.owner = owner + self.plan_group = plan_group + self.plan_id = plan_id + self.plan_type = plan_type + self.scope_identifier = scope_identifier + self.version = version diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_queued_plan.py b/vsts/vsts/task/v4_1/models/task_orchestration_queued_plan.py new file mode 100644 index 00000000..e6d8ee60 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_queued_plan.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationQueuedPlan(Model): + """TaskOrchestrationQueuedPlan. + + :param assign_time: + :type assign_time: datetime + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_group: + :type plan_group: str + :param plan_id: + :type plan_id: str + :param pool_id: + :type pool_id: int + :param queue_position: + :type queue_position: int + :param queue_time: + :type queue_time: datetime + :param scope_identifier: + :type scope_identifier: str + """ + + _attribute_map = { + 'assign_time': {'key': 'assignTime', 'type': 'iso-8601'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'pool_id': {'key': 'poolId', 'type': 'int'}, + 'queue_position': {'key': 'queuePosition', 'type': 'int'}, + 'queue_time': {'key': 'queueTime', 'type': 'iso-8601'}, + 'scope_identifier': {'key': 'scopeIdentifier', 'type': 'str'} + } + + def __init__(self, assign_time=None, definition=None, owner=None, plan_group=None, plan_id=None, pool_id=None, queue_position=None, queue_time=None, scope_identifier=None): + super(TaskOrchestrationQueuedPlan, self).__init__() + self.assign_time = assign_time + self.definition = definition + self.owner = owner + self.plan_group = plan_group + self.plan_id = plan_id + self.pool_id = pool_id + self.queue_position = queue_position + self.queue_time = queue_time + self.scope_identifier = scope_identifier diff --git a/vsts/vsts/task/v4_1/models/task_orchestration_queued_plan_group.py b/vsts/vsts/task/v4_1/models/task_orchestration_queued_plan_group.py new file mode 100644 index 00000000..1c0219a5 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_orchestration_queued_plan_group.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationQueuedPlanGroup(Model): + """TaskOrchestrationQueuedPlanGroup. + + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_group: + :type plan_group: str + :param plans: + :type plans: list of :class:`TaskOrchestrationQueuedPlan ` + :param project: + :type project: :class:`ProjectReference ` + :param queue_position: + :type queue_position: int + """ + + _attribute_map = { + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'plans': {'key': 'plans', 'type': '[TaskOrchestrationQueuedPlan]'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'queue_position': {'key': 'queuePosition', 'type': 'int'} + } + + def __init__(self, definition=None, owner=None, plan_group=None, plans=None, project=None, queue_position=None): + super(TaskOrchestrationQueuedPlanGroup, self).__init__() + self.definition = definition + self.owner = owner + self.plan_group = plan_group + self.plans = plans + self.project = project + self.queue_position = queue_position diff --git a/vsts/vsts/task/v4_1/models/task_reference.py b/vsts/vsts/task/v4_1/models/task_reference.py new file mode 100644 index 00000000..3ff1dd7b --- /dev/null +++ b/vsts/vsts/task/v4_1/models/task_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskReference(Model): + """TaskReference. + + :param id: + :type id: str + :param inputs: + :type inputs: dict + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, inputs=None, name=None, version=None): + super(TaskReference, self).__init__() + self.id = id + self.inputs = inputs + self.name = name + self.version = version diff --git a/vsts/vsts/task/v4_1/models/timeline.py b/vsts/vsts/task/v4_1/models/timeline.py new file mode 100644 index 00000000..c4f9f1b3 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/timeline.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 .timeline_reference import TimelineReference + + +class Timeline(TimelineReference): + """Timeline. + + :param change_id: + :type change_id: int + :param id: + :type id: str + :param location: + :type location: str + :param last_changed_by: + :type last_changed_by: str + :param last_changed_on: + :type last_changed_on: datetime + :param records: + :type records: list of :class:`TimelineRecord ` + """ + + _attribute_map = { + 'change_id': {'key': 'changeId', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'last_changed_by': {'key': 'lastChangedBy', 'type': 'str'}, + 'last_changed_on': {'key': 'lastChangedOn', 'type': 'iso-8601'}, + 'records': {'key': 'records', 'type': '[TimelineRecord]'} + } + + def __init__(self, change_id=None, id=None, location=None, last_changed_by=None, last_changed_on=None, records=None): + super(Timeline, self).__init__(change_id=change_id, id=id, location=location) + self.last_changed_by = last_changed_by + self.last_changed_on = last_changed_on + self.records = records diff --git a/vsts/vsts/task/v4_1/models/timeline_record.py b/vsts/vsts/task/v4_1/models/timeline_record.py new file mode 100644 index 00000000..455e8bf0 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/timeline_record.py @@ -0,0 +1,117 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineRecord(Model): + """TimelineRecord. + + :param change_id: + :type change_id: int + :param current_operation: + :type current_operation: str + :param details: + :type details: :class:`TimelineReference ` + :param error_count: + :type error_count: int + :param finish_time: + :type finish_time: datetime + :param id: + :type id: str + :param issues: + :type issues: list of :class:`Issue ` + :param last_modified: + :type last_modified: datetime + :param location: + :type location: str + :param log: + :type log: :class:`TaskLogReference ` + :param name: + :type name: str + :param order: + :type order: int + :param parent_id: + :type parent_id: str + :param percent_complete: + :type percent_complete: int + :param ref_name: + :type ref_name: str + :param result: + :type result: object + :param result_code: + :type result_code: str + :param start_time: + :type start_time: datetime + :param state: + :type state: object + :param task: + :type task: :class:`TaskReference ` + :param type: + :type type: str + :param variables: + :type variables: dict + :param warning_count: + :type warning_count: int + :param worker_name: + :type worker_name: str + """ + + _attribute_map = { + 'change_id': {'key': 'changeId', 'type': 'int'}, + 'current_operation': {'key': 'currentOperation', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'TimelineReference'}, + 'error_count': {'key': 'errorCount', 'type': 'int'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'issues': {'key': 'issues', 'type': '[Issue]'}, + 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, + 'location': {'key': 'location', 'type': 'str'}, + 'log': {'key': 'log', 'type': 'TaskLogReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'parent_id': {'key': 'parentId', 'type': 'str'}, + 'percent_complete': {'key': 'percentComplete', 'type': 'int'}, + 'ref_name': {'key': 'refName', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'result_code': {'key': 'resultCode', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'object'}, + 'task': {'key': 'task', 'type': 'TaskReference'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{VariableValue}'}, + 'warning_count': {'key': 'warningCount', 'type': 'int'}, + 'worker_name': {'key': 'workerName', 'type': 'str'} + } + + def __init__(self, change_id=None, current_operation=None, details=None, error_count=None, finish_time=None, id=None, issues=None, last_modified=None, location=None, log=None, name=None, order=None, parent_id=None, percent_complete=None, ref_name=None, result=None, result_code=None, start_time=None, state=None, task=None, type=None, variables=None, warning_count=None, worker_name=None): + super(TimelineRecord, self).__init__() + self.change_id = change_id + self.current_operation = current_operation + self.details = details + self.error_count = error_count + self.finish_time = finish_time + self.id = id + self.issues = issues + self.last_modified = last_modified + self.location = location + self.log = log + self.name = name + self.order = order + self.parent_id = parent_id + self.percent_complete = percent_complete + self.ref_name = ref_name + self.result = result + self.result_code = result_code + self.start_time = start_time + self.state = state + self.task = task + self.type = type + self.variables = variables + self.warning_count = warning_count + self.worker_name = worker_name diff --git a/vsts/vsts/task/v4_1/models/timeline_reference.py b/vsts/vsts/task/v4_1/models/timeline_reference.py new file mode 100644 index 00000000..8755a8c4 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/timeline_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineReference(Model): + """TimelineReference. + + :param change_id: + :type change_id: int + :param id: + :type id: str + :param location: + :type location: str + """ + + _attribute_map = { + 'change_id': {'key': 'changeId', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'} + } + + def __init__(self, change_id=None, id=None, location=None): + super(TimelineReference, self).__init__() + self.change_id = change_id + self.id = id + self.location = location diff --git a/vsts/vsts/task/v4_1/models/variable_value.py b/vsts/vsts/task/v4_1/models/variable_value.py new file mode 100644 index 00000000..035049c0 --- /dev/null +++ b/vsts/vsts/task/v4_1/models/variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableValue(Model): + """VariableValue. + + :param is_secret: + :type is_secret: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(VariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/task/v4_1/task_client.py b/vsts/vsts/task/v4_1/task_client.py new file mode 100644 index 00000000..c15c8639 --- /dev/null +++ b/vsts/vsts/task/v4_1/task_client.py @@ -0,0 +1,451 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TaskClient(VssClient): + """Task + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TaskClient, 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 get_plan_attachments(self, scope_identifier, hub_name, plan_id, type): + """GetPlanAttachments. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str type: + :rtype: [TaskAttachment] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + response = self._send(http_method='GET', + location_id='eb55e5d6-2f30-4295-b5ed-38da50b1fc52', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskAttachment]', response) + + def create_attachment(self, upload_stream, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): + """CreateAttachment. + [Preview API] + :param object upload_stream: Stream to upload + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :param str name: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='PUT', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('TaskAttachment', response) + + def get_attachment(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): + """GetAttachment. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :param str name: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TaskAttachment', response) + + def get_attachment_content(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type, name): + """GetAttachmentContent. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :param str name: + :rtype: object + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_attachments(self, scope_identifier, hub_name, plan_id, timeline_id, record_id, type): + """GetAttachments. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param str record_id: + :param str type: + :rtype: [TaskAttachment] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + if record_id is not None: + route_values['recordId'] = self._serialize.url('record_id', record_id, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + response = self._send(http_method='GET', + location_id='7898f959-9cdf-4096-b29e-7f293031629e', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskAttachment]', response) + + def append_log_content(self, upload_stream, scope_identifier, hub_name, plan_id, log_id): + """AppendLogContent. + [Preview API] + :param object upload_stream: Stream to upload + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param int log_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('TaskLog', response) + + def create_log(self, log, scope_identifier, hub_name, plan_id): + """CreateLog. + [Preview API] + :param :class:` ` log: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + content = self._serialize.body(log, 'TaskLog') + response = self._send(http_method='POST', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskLog', response) + + def get_log(self, scope_identifier, hub_name, plan_id, log_id, start_line=None, end_line=None): + """GetLog. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param int log_id: + :param long start_line: + :param long end_line: + :rtype: [str] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') + query_parameters = {} + if start_line is not None: + query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') + if end_line is not None: + query_parameters['endLine'] = self._serialize.query('end_line', end_line, 'long') + response = self._send(http_method='GET', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_logs(self, scope_identifier, hub_name, plan_id): + """GetLogs. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: [TaskLog] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + response = self._send(http_method='GET', + location_id='46f5667d-263a-4684-91b1-dff7fdcf64e2', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskLog]', response) + + def get_records(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None): + """GetRecords. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param int change_id: + :rtype: [TimelineRecord] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + query_parameters = {} + if change_id is not None: + query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') + response = self._send(http_method='GET', + location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TimelineRecord]', response) + + def update_records(self, records, scope_identifier, hub_name, plan_id, timeline_id): + """UpdateRecords. + [Preview API] + :param :class:` ` records: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :rtype: [TimelineRecord] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + content = self._serialize.body(records, 'VssJsonCollectionWrapper') + response = self._send(http_method='PATCH', + location_id='8893bc5b-35b2-4be7-83cb-99e683551db4', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TimelineRecord]', response) + + def create_timeline(self, timeline, scope_identifier, hub_name, plan_id): + """CreateTimeline. + [Preview API] + :param :class:` ` timeline: + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + content = self._serialize.body(timeline, 'Timeline') + response = self._send(http_method='POST', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Timeline', response) + + def delete_timeline(self, scope_identifier, hub_name, plan_id, timeline_id): + """DeleteTimeline. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + self._send(http_method='DELETE', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.1-preview.1', + route_values=route_values) + + def get_timeline(self, scope_identifier, hub_name, plan_id, timeline_id, change_id=None, include_records=None): + """GetTimeline. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :param str timeline_id: + :param int change_id: + :param bool include_records: + :rtype: :class:` ` + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') + query_parameters = {} + if change_id is not None: + query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') + if include_records is not None: + query_parameters['includeRecords'] = self._serialize.query('include_records', include_records, 'bool') + response = self._send(http_method='GET', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Timeline', response) + + def get_timelines(self, scope_identifier, hub_name, plan_id): + """GetTimelines. + [Preview API] + :param str scope_identifier: The project GUID to scope the request + :param str hub_name: The name of the server hub: "build" for the Build server or "rm" for the Release Management server + :param str plan_id: + :rtype: [Timeline] + """ + route_values = {} + if scope_identifier is not None: + route_values['scopeIdentifier'] = self._serialize.url('scope_identifier', scope_identifier, 'str') + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'str') + response = self._send(http_method='GET', + location_id='83597576-cc2c-453c-bea6-2882ae6a1653', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[Timeline]', response) + diff --git a/vsts/vsts/task_agent/__init__.py b/vsts/vsts/task_agent/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/task_agent/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/task_agent/v4_0/__init__.py b/vsts/vsts/task_agent/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/task_agent/v4_0/models/__init__.py b/vsts/vsts/task_agent/v4_0/models/__init__.py new file mode 100644 index 00000000..fa9ad95d --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/__init__.py @@ -0,0 +1,189 @@ +# -------------------------------------------------------------------------------------------- +# 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 .aad_oauth_token_request import AadOauthTokenRequest +from .aad_oauth_token_result import AadOauthTokenResult +from .authorization_header import AuthorizationHeader +from .azure_subscription import AzureSubscription +from .azure_subscription_query_result import AzureSubscriptionQueryResult +from .data_source import DataSource +from .data_source_binding import DataSourceBinding +from .data_source_binding_base import DataSourceBindingBase +from .data_source_details import DataSourceDetails +from .dependency_binding import DependencyBinding +from .dependency_data import DependencyData +from .depends_on import DependsOn +from .deployment_group import DeploymentGroup +from .deployment_group_metrics import DeploymentGroupMetrics +from .deployment_group_reference import DeploymentGroupReference +from .deployment_machine import DeploymentMachine +from .deployment_machine_group import DeploymentMachineGroup +from .deployment_machine_group_reference import DeploymentMachineGroupReference +from .endpoint_authorization import EndpointAuthorization +from .endpoint_url import EndpointUrl +from .help_link import HelpLink +from .identity_ref import IdentityRef +from .input_descriptor import InputDescriptor +from .input_validation import InputValidation +from .input_validation_request import InputValidationRequest +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .metrics_column_meta_data import MetricsColumnMetaData +from .metrics_columns_header import MetricsColumnsHeader +from .metrics_row import MetricsRow +from .package_metadata import PackageMetadata +from .package_version import PackageVersion +from .project_reference import ProjectReference +from .publish_task_group_metadata import PublishTaskGroupMetadata +from .reference_links import ReferenceLinks +from .result_transformation_details import ResultTransformationDetails +from .secure_file import SecureFile +from .service_endpoint import ServiceEndpoint +from .service_endpoint_authentication_scheme import ServiceEndpointAuthenticationScheme +from .service_endpoint_details import ServiceEndpointDetails +from .service_endpoint_execution_data import ServiceEndpointExecutionData +from .service_endpoint_execution_record import ServiceEndpointExecutionRecord +from .service_endpoint_execution_records_input import ServiceEndpointExecutionRecordsInput +from .service_endpoint_request import ServiceEndpointRequest +from .service_endpoint_request_result import ServiceEndpointRequestResult +from .service_endpoint_type import ServiceEndpointType +from .task_agent import TaskAgent +from .task_agent_authorization import TaskAgentAuthorization +from .task_agent_job_request import TaskAgentJobRequest +from .task_agent_message import TaskAgentMessage +from .task_agent_pool import TaskAgentPool +from .task_agent_pool_maintenance_definition import TaskAgentPoolMaintenanceDefinition +from .task_agent_pool_maintenance_job import TaskAgentPoolMaintenanceJob +from .task_agent_pool_maintenance_job_target_agent import TaskAgentPoolMaintenanceJobTargetAgent +from .task_agent_pool_maintenance_options import TaskAgentPoolMaintenanceOptions +from .task_agent_pool_maintenance_retention_policy import TaskAgentPoolMaintenanceRetentionPolicy +from .task_agent_pool_maintenance_schedule import TaskAgentPoolMaintenanceSchedule +from .task_agent_pool_reference import TaskAgentPoolReference +from .task_agent_public_key import TaskAgentPublicKey +from .task_agent_queue import TaskAgentQueue +from .task_agent_reference import TaskAgentReference +from .task_agent_session import TaskAgentSession +from .task_agent_session_key import TaskAgentSessionKey +from .task_agent_update import TaskAgentUpdate +from .task_agent_update_reason import TaskAgentUpdateReason +from .task_definition import TaskDefinition +from .task_definition_endpoint import TaskDefinitionEndpoint +from .task_definition_reference import TaskDefinitionReference +from .task_execution import TaskExecution +from .task_group import TaskGroup +from .task_group_definition import TaskGroupDefinition +from .task_group_revision import TaskGroupRevision +from .task_group_step import TaskGroupStep +from .task_hub_license_details import TaskHubLicenseDetails +from .task_input_definition import TaskInputDefinition +from .task_input_definition_base import TaskInputDefinitionBase +from .task_input_validation import TaskInputValidation +from .task_orchestration_owner import TaskOrchestrationOwner +from .task_output_variable import TaskOutputVariable +from .task_package_metadata import TaskPackageMetadata +from .task_reference import TaskReference +from .task_source_definition import TaskSourceDefinition +from .task_source_definition_base import TaskSourceDefinitionBase +from .task_version import TaskVersion +from .validation_item import ValidationItem +from .variable_group import VariableGroup +from .variable_group_provider_data import VariableGroupProviderData +from .variable_value import VariableValue + +__all__ = [ + 'AadOauthTokenRequest', + 'AadOauthTokenResult', + 'AuthorizationHeader', + 'AzureSubscription', + 'AzureSubscriptionQueryResult', + 'DataSource', + 'DataSourceBinding', + 'DataSourceBindingBase', + 'DataSourceDetails', + 'DependencyBinding', + 'DependencyData', + 'DependsOn', + 'DeploymentGroup', + 'DeploymentGroupMetrics', + 'DeploymentGroupReference', + 'DeploymentMachine', + 'DeploymentMachineGroup', + 'DeploymentMachineGroupReference', + 'EndpointAuthorization', + 'EndpointUrl', + 'HelpLink', + 'IdentityRef', + 'InputDescriptor', + 'InputValidation', + 'InputValidationRequest', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'MetricsColumnMetaData', + 'MetricsColumnsHeader', + 'MetricsRow', + 'PackageMetadata', + 'PackageVersion', + 'ProjectReference', + 'PublishTaskGroupMetadata', + 'ReferenceLinks', + 'ResultTransformationDetails', + 'SecureFile', + 'ServiceEndpoint', + 'ServiceEndpointAuthenticationScheme', + 'ServiceEndpointDetails', + 'ServiceEndpointExecutionData', + 'ServiceEndpointExecutionRecord', + 'ServiceEndpointExecutionRecordsInput', + 'ServiceEndpointRequest', + 'ServiceEndpointRequestResult', + 'ServiceEndpointType', + 'TaskAgent', + 'TaskAgentAuthorization', + 'TaskAgentJobRequest', + 'TaskAgentMessage', + 'TaskAgentPool', + 'TaskAgentPoolMaintenanceDefinition', + 'TaskAgentPoolMaintenanceJob', + 'TaskAgentPoolMaintenanceJobTargetAgent', + 'TaskAgentPoolMaintenanceOptions', + 'TaskAgentPoolMaintenanceRetentionPolicy', + 'TaskAgentPoolMaintenanceSchedule', + 'TaskAgentPoolReference', + 'TaskAgentPublicKey', + 'TaskAgentQueue', + 'TaskAgentReference', + 'TaskAgentSession', + 'TaskAgentSessionKey', + 'TaskAgentUpdate', + 'TaskAgentUpdateReason', + 'TaskDefinition', + 'TaskDefinitionEndpoint', + 'TaskDefinitionReference', + 'TaskExecution', + 'TaskGroup', + 'TaskGroupDefinition', + 'TaskGroupRevision', + 'TaskGroupStep', + 'TaskHubLicenseDetails', + 'TaskInputDefinition', + 'TaskInputDefinitionBase', + 'TaskInputValidation', + 'TaskOrchestrationOwner', + 'TaskOutputVariable', + 'TaskPackageMetadata', + 'TaskReference', + 'TaskSourceDefinition', + 'TaskSourceDefinitionBase', + 'TaskVersion', + 'ValidationItem', + 'VariableGroup', + 'VariableGroupProviderData', + 'VariableValue', +] diff --git a/vsts/vsts/task_agent/v4_0/models/aad_oauth_token_request.py b/vsts/vsts/task_agent/v4_0/models/aad_oauth_token_request.py new file mode 100644 index 00000000..e5ad3183 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/aad_oauth_token_request.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AadOauthTokenRequest(Model): + """AadOauthTokenRequest. + + :param refresh: + :type refresh: bool + :param resource: + :type resource: str + :param tenant_id: + :type tenant_id: str + :param token: + :type token: str + """ + + _attribute_map = { + 'refresh': {'key': 'refresh', 'type': 'bool'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'} + } + + def __init__(self, refresh=None, resource=None, tenant_id=None, token=None): + super(AadOauthTokenRequest, self).__init__() + self.refresh = refresh + self.resource = resource + self.tenant_id = tenant_id + self.token = token diff --git a/vsts/vsts/task_agent/v4_0/models/aad_oauth_token_result.py b/vsts/vsts/task_agent/v4_0/models/aad_oauth_token_result.py new file mode 100644 index 00000000..b3cd8c2e --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/aad_oauth_token_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AadOauthTokenResult(Model): + """AadOauthTokenResult. + + :param access_token: + :type access_token: str + :param refresh_token_cache: + :type refresh_token_cache: str + """ + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'refresh_token_cache': {'key': 'refreshTokenCache', 'type': 'str'} + } + + def __init__(self, access_token=None, refresh_token_cache=None): + super(AadOauthTokenResult, self).__init__() + self.access_token = access_token + self.refresh_token_cache = refresh_token_cache diff --git a/vsts/vsts/task_agent/v4_0/models/authorization_header.py b/vsts/vsts/task_agent/v4_0/models/authorization_header.py new file mode 100644 index 00000000..015e6775 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/authorization_header.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AuthorizationHeader(Model): + """AuthorizationHeader. + + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(AuthorizationHeader, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/models/azure_subscription.py b/vsts/vsts/task_agent/v4_0/models/azure_subscription.py new file mode 100644 index 00000000..ffd4994d --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/azure_subscription.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzureSubscription(Model): + """AzureSubscription. + + :param display_name: + :type display_name: str + :param subscription_id: + :type subscription_id: str + :param subscription_tenant_id: + :type subscription_tenant_id: str + :param subscription_tenant_name: + :type subscription_tenant_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'subscription_tenant_id': {'key': 'subscriptionTenantId', 'type': 'str'}, + 'subscription_tenant_name': {'key': 'subscriptionTenantName', 'type': 'str'} + } + + def __init__(self, display_name=None, subscription_id=None, subscription_tenant_id=None, subscription_tenant_name=None): + super(AzureSubscription, self).__init__() + self.display_name = display_name + self.subscription_id = subscription_id + self.subscription_tenant_id = subscription_tenant_id + self.subscription_tenant_name = subscription_tenant_name diff --git a/vsts/vsts/task_agent/v4_0/models/azure_subscription_query_result.py b/vsts/vsts/task_agent/v4_0/models/azure_subscription_query_result.py new file mode 100644 index 00000000..97759cfc --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/azure_subscription_query_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzureSubscriptionQueryResult(Model): + """AzureSubscriptionQueryResult. + + :param error_message: + :type error_message: str + :param value: + :type value: list of :class:`AzureSubscription ` + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureSubscription]'} + } + + def __init__(self, error_message=None, value=None): + super(AzureSubscriptionQueryResult, self).__init__() + self.error_message = error_message + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/models/data_source.py b/vsts/vsts/task_agent/v4_0/models/data_source.py new file mode 100644 index 00000000..0c24d5c3 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/data_source.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataSource(Model): + """DataSource. + + :param endpoint_url: + :type endpoint_url: str + :param name: + :type name: str + :param resource_url: + :type resource_url: str + :param result_selector: + :type result_selector: str + """ + + _attribute_map = { + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'} + } + + def __init__(self, endpoint_url=None, name=None, resource_url=None, result_selector=None): + super(DataSource, self).__init__() + self.endpoint_url = endpoint_url + self.name = name + self.resource_url = resource_url + self.result_selector = result_selector diff --git a/vsts/vsts/task_agent/v4_0/models/data_source_binding.py b/vsts/vsts/task_agent/v4_0/models/data_source_binding.py new file mode 100644 index 00000000..c71d590d --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/data_source_binding.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 .data_source_binding_base import DataSourceBindingBase + + +class DataSourceBinding(DataSourceBindingBase): + """DataSourceBinding. + + :param data_source_name: + :type data_source_name: str + :param endpoint_id: + :type endpoint_id: str + :param endpoint_url: + :type endpoint_url: str + :param parameters: + :type parameters: dict + :param result_selector: + :type result_selector: str + :param result_template: + :type result_template: str + :param target: + :type target: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, data_source_name=None, endpoint_id=None, endpoint_url=None, parameters=None, result_selector=None, result_template=None, target=None): + super(DataSourceBinding, self).__init__(data_source_name=data_source_name, endpoint_id=endpoint_id, endpoint_url=endpoint_url, parameters=parameters, result_selector=result_selector, result_template=result_template, target=target) diff --git a/vsts/vsts/task_agent/v4_0/models/data_source_binding_base.py b/vsts/vsts/task_agent/v4_0/models/data_source_binding_base.py new file mode 100644 index 00000000..e2c6e8d5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/data_source_binding_base.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataSourceBindingBase(Model): + """DataSourceBindingBase. + + :param data_source_name: + :type data_source_name: str + :param endpoint_id: + :type endpoint_id: str + :param endpoint_url: + :type endpoint_url: str + :param parameters: + :type parameters: dict + :param result_selector: + :type result_selector: str + :param result_template: + :type result_template: str + :param target: + :type target: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, data_source_name=None, endpoint_id=None, endpoint_url=None, parameters=None, result_selector=None, result_template=None, target=None): + super(DataSourceBindingBase, self).__init__() + self.data_source_name = data_source_name + self.endpoint_id = endpoint_id + self.endpoint_url = endpoint_url + self.parameters = parameters + self.result_selector = result_selector + self.result_template = result_template + self.target = target diff --git a/vsts/vsts/task_agent/v4_0/models/data_source_details.py b/vsts/vsts/task_agent/v4_0/models/data_source_details.py new file mode 100644 index 00000000..11123d04 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/data_source_details.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataSourceDetails(Model): + """DataSourceDetails. + + :param data_source_name: + :type data_source_name: str + :param data_source_url: + :type data_source_url: str + :param parameters: + :type parameters: dict + :param resource_url: + :type resource_url: str + :param result_selector: + :type result_selector: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'data_source_url': {'key': 'dataSourceUrl', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'} + } + + def __init__(self, data_source_name=None, data_source_url=None, parameters=None, resource_url=None, result_selector=None): + super(DataSourceDetails, self).__init__() + self.data_source_name = data_source_name + self.data_source_url = data_source_url + self.parameters = parameters + self.resource_url = resource_url + self.result_selector = result_selector diff --git a/vsts/vsts/task_agent/v4_0/models/dependency_binding.py b/vsts/vsts/task_agent/v4_0/models/dependency_binding.py new file mode 100644 index 00000000..e8eb3ac1 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/dependency_binding.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DependencyBinding(Model): + """DependencyBinding. + + :param key: + :type key: str + :param value: + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, key=None, value=None): + super(DependencyBinding, self).__init__() + self.key = key + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/models/dependency_data.py b/vsts/vsts/task_agent/v4_0/models/dependency_data.py new file mode 100644 index 00000000..3faa1790 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/dependency_data.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DependencyData(Model): + """DependencyData. + + :param input: + :type input: str + :param map: + :type map: list of { key: str; value: [{ key: str; value: str }] } + """ + + _attribute_map = { + 'input': {'key': 'input', 'type': 'str'}, + 'map': {'key': 'map', 'type': '[{ key: str; value: [{ key: str; value: str }] }]'} + } + + def __init__(self, input=None, map=None): + super(DependencyData, self).__init__() + self.input = input + self.map = map diff --git a/vsts/vsts/task_agent/v4_0/models/depends_on.py b/vsts/vsts/task_agent/v4_0/models/depends_on.py new file mode 100644 index 00000000..df3eb111 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/depends_on.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DependsOn(Model): + """DependsOn. + + :param input: + :type input: str + :param map: + :type map: list of :class:`DependencyBinding ` + """ + + _attribute_map = { + 'input': {'key': 'input', 'type': 'str'}, + 'map': {'key': 'map', 'type': '[DependencyBinding]'} + } + + def __init__(self, input=None, map=None): + super(DependsOn, self).__init__() + self.input = input + self.map = map diff --git a/vsts/vsts/task_agent/v4_0/models/deployment_group.py b/vsts/vsts/task_agent/v4_0/models/deployment_group.py new file mode 100644 index 00000000..dc4a1432 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/deployment_group.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 .deployment_group_reference import DeploymentGroupReference + + +class DeploymentGroup(DeploymentGroupReference): + """DeploymentGroup. + + :param id: + :type id: int + :param name: + :type name: str + :param pool: + :type pool: :class:`TaskAgentPoolReference ` + :param project: + :type project: :class:`ProjectReference ` + :param description: + :type description: str + :param machine_count: + :type machine_count: int + :param machines: + :type machines: list of :class:`DeploymentMachine ` + :param machine_tags: + :type machine_tags: list of str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'machine_count': {'key': 'machineCount', 'type': 'int'}, + 'machines': {'key': 'machines', 'type': '[DeploymentMachine]'}, + 'machine_tags': {'key': 'machineTags', 'type': '[str]'} + } + + def __init__(self, id=None, name=None, pool=None, project=None, description=None, machine_count=None, machines=None, machine_tags=None): + super(DeploymentGroup, self).__init__(id=id, name=name, pool=pool, project=project) + self.description = description + self.machine_count = machine_count + self.machines = machines + self.machine_tags = machine_tags diff --git a/vsts/vsts/task_agent/v4_0/models/deployment_group_metrics.py b/vsts/vsts/task_agent/v4_0/models/deployment_group_metrics.py new file mode 100644 index 00000000..b4081350 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/deployment_group_metrics.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentGroupMetrics(Model): + """DeploymentGroupMetrics. + + :param columns_header: + :type columns_header: :class:`MetricsColumnsHeader ` + :param deployment_group: + :type deployment_group: :class:`DeploymentGroupReference ` + :param rows: + :type rows: list of :class:`MetricsRow ` + """ + + _attribute_map = { + 'columns_header': {'key': 'columnsHeader', 'type': 'MetricsColumnsHeader'}, + 'deployment_group': {'key': 'deploymentGroup', 'type': 'DeploymentGroupReference'}, + 'rows': {'key': 'rows', 'type': '[MetricsRow]'} + } + + def __init__(self, columns_header=None, deployment_group=None, rows=None): + super(DeploymentGroupMetrics, self).__init__() + self.columns_header = columns_header + self.deployment_group = deployment_group + self.rows = rows diff --git a/vsts/vsts/task_agent/v4_0/models/deployment_group_reference.py b/vsts/vsts/task_agent/v4_0/models/deployment_group_reference.py new file mode 100644 index 00000000..5baac38f --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/deployment_group_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentGroupReference(Model): + """DeploymentGroupReference. + + :param id: + :type id: int + :param name: + :type name: str + :param pool: + :type pool: :class:`TaskAgentPoolReference ` + :param project: + :type project: :class:`ProjectReference ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'} + } + + def __init__(self, id=None, name=None, pool=None, project=None): + super(DeploymentGroupReference, self).__init__() + self.id = id + self.name = name + self.pool = pool + self.project = project diff --git a/vsts/vsts/task_agent/v4_0/models/deployment_machine.py b/vsts/vsts/task_agent/v4_0/models/deployment_machine.py new file mode 100644 index 00000000..243eea37 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/deployment_machine.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentMachine(Model): + """DeploymentMachine. + + :param agent: + :type agent: :class:`TaskAgent ` + :param id: + :type id: int + :param tags: + :type tags: list of str + """ + + _attribute_map = { + 'agent': {'key': 'agent', 'type': 'TaskAgent'}, + 'id': {'key': 'id', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '[str]'} + } + + def __init__(self, agent=None, id=None, tags=None): + super(DeploymentMachine, self).__init__() + self.agent = agent + self.id = id + self.tags = tags diff --git a/vsts/vsts/task_agent/v4_0/models/deployment_machine_group.py b/vsts/vsts/task_agent/v4_0/models/deployment_machine_group.py new file mode 100644 index 00000000..045bb631 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/deployment_machine_group.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 .deployment_machine_group_reference import DeploymentMachineGroupReference + + +class DeploymentMachineGroup(DeploymentMachineGroupReference): + """DeploymentMachineGroup. + + :param id: + :type id: int + :param name: + :type name: str + :param pool: + :type pool: :class:`TaskAgentPoolReference ` + :param project: + :type project: :class:`ProjectReference ` + :param machines: + :type machines: list of :class:`DeploymentMachine ` + :param size: + :type size: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'machines': {'key': 'machines', 'type': '[DeploymentMachine]'}, + 'size': {'key': 'size', 'type': 'int'} + } + + def __init__(self, id=None, name=None, pool=None, project=None, machines=None, size=None): + super(DeploymentMachineGroup, self).__init__(id=id, name=name, pool=pool, project=project) + self.machines = machines + self.size = size diff --git a/vsts/vsts/task_agent/v4_0/models/deployment_machine_group_reference.py b/vsts/vsts/task_agent/v4_0/models/deployment_machine_group_reference.py new file mode 100644 index 00000000..f5ae9bbd --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/deployment_machine_group_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentMachineGroupReference(Model): + """DeploymentMachineGroupReference. + + :param id: + :type id: int + :param name: + :type name: str + :param pool: + :type pool: :class:`TaskAgentPoolReference ` + :param project: + :type project: :class:`ProjectReference ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'} + } + + def __init__(self, id=None, name=None, pool=None, project=None): + super(DeploymentMachineGroupReference, self).__init__() + self.id = id + self.name = name + self.pool = pool + self.project = project diff --git a/vsts/vsts/task_agent/v4_0/models/endpoint_authorization.py b/vsts/vsts/task_agent/v4_0/models/endpoint_authorization.py new file mode 100644 index 00000000..5a8f642c --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/endpoint_authorization.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EndpointAuthorization(Model): + """EndpointAuthorization. + + :param parameters: + :type parameters: dict + :param scheme: + :type scheme: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'scheme': {'key': 'scheme', 'type': 'str'} + } + + def __init__(self, parameters=None, scheme=None): + super(EndpointAuthorization, self).__init__() + self.parameters = parameters + self.scheme = scheme diff --git a/vsts/vsts/task_agent/v4_0/models/endpoint_url.py b/vsts/vsts/task_agent/v4_0/models/endpoint_url.py new file mode 100644 index 00000000..9eddf9c3 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/endpoint_url.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 EndpointUrl(Model): + """EndpointUrl. + + :param depends_on: + :type depends_on: :class:`DependsOn ` + :param display_name: + :type display_name: str + :param help_text: + :type help_text: str + :param is_visible: + :type is_visible: str + :param value: + :type value: str + """ + + _attribute_map = { + 'depends_on': {'key': 'dependsOn', 'type': 'DependsOn'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'help_text': {'key': 'helpText', 'type': 'str'}, + 'is_visible': {'key': 'isVisible', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, depends_on=None, display_name=None, help_text=None, is_visible=None, value=None): + super(EndpointUrl, self).__init__() + self.depends_on = depends_on + self.display_name = display_name + self.help_text = help_text + self.is_visible = is_visible + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/models/help_link.py b/vsts/vsts/task_agent/v4_0/models/help_link.py new file mode 100644 index 00000000..b48e4910 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/help_link.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 HelpLink(Model): + """HelpLink. + + :param text: + :type text: str + :param url: + :type url: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, text=None, url=None): + super(HelpLink, self).__init__() + self.text = text + self.url = url diff --git a/vsts/vsts/task_agent/v4_0/models/identity_ref.py b/vsts/vsts/task_agent/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/task_agent/v4_0/models/input_descriptor.py b/vsts/vsts/task_agent/v4_0/models/input_descriptor.py new file mode 100644 index 00000000..860efdcc --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/input_descriptor.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputDescriptor(Model): + """InputDescriptor. + + :param dependency_input_ids: The ids of all inputs that the value of this input is dependent on. + :type dependency_input_ids: list of str + :param description: Description of what this input is used for + :type description: str + :param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + :type group_name: str + :param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + :type has_dynamic_value_information: bool + :param id: Identifier for the subscription input + :type id: str + :param input_mode: Mode in which the value of this input should be entered + :type input_mode: object + :param is_confidential: Gets whether this input is confidential, such as for a password or application key + :type is_confidential: bool + :param name: Localized name which can be shown as a label for the subscription input + :type name: str + :param properties: Custom properties for the input which can be used by the service provider + :type properties: dict + :param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. + :type type: str + :param use_in_default_description: Gets whether this input is included in the default generated action description. + :type use_in_default_description: bool + :param validation: Information to use to validate this input's value + :type validation: :class:`InputValidation ` + :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. + :type value_hint: str + :param values: Information about possible values for this input + :type values: :class:`InputValues ` + """ + + _attribute_map = { + 'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_mode': {'key': 'inputMode', 'type': 'object'}, + 'is_confidential': {'key': 'isConfidential', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'}, + 'validation': {'key': 'validation', 'type': 'InputValidation'}, + 'value_hint': {'key': 'valueHint', 'type': 'str'}, + 'values': {'key': 'values', 'type': 'InputValues'} + } + + def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None): + super(InputDescriptor, self).__init__() + self.dependency_input_ids = dependency_input_ids + self.description = description + self.group_name = group_name + self.has_dynamic_value_information = has_dynamic_value_information + self.id = id + self.input_mode = input_mode + self.is_confidential = is_confidential + self.name = name + self.properties = properties + self.type = type + self.use_in_default_description = use_in_default_description + self.validation = validation + self.value_hint = value_hint + self.values = values diff --git a/vsts/vsts/task_agent/v4_0/models/input_validation.py b/vsts/vsts/task_agent/v4_0/models/input_validation.py new file mode 100644 index 00000000..f2f1a434 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/input_validation.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidation(Model): + """InputValidation. + + :param data_type: + :type data_type: object + :param is_required: + :type is_required: bool + :param max_length: + :type max_length: int + :param max_value: + :type max_value: decimal + :param min_length: + :type min_length: int + :param min_value: + :type min_value: decimal + :param pattern: + :type pattern: str + :param pattern_mismatch_error_message: + :type pattern_mismatch_error_message: str + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'object'}, + 'is_required': {'key': 'isRequired', 'type': 'bool'}, + 'max_length': {'key': 'maxLength', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'decimal'}, + 'min_length': {'key': 'minLength', 'type': 'int'}, + 'min_value': {'key': 'minValue', 'type': 'decimal'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'} + } + + def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None): + super(InputValidation, self).__init__() + self.data_type = data_type + self.is_required = is_required + self.max_length = max_length + self.max_value = max_value + self.min_length = min_length + self.min_value = min_value + self.pattern = pattern + self.pattern_mismatch_error_message = pattern_mismatch_error_message diff --git a/vsts/vsts/task_agent/v4_0/models/input_validation_request.py b/vsts/vsts/task_agent/v4_0/models/input_validation_request.py new file mode 100644 index 00000000..74fb2e1f --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/input_validation_request.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidationRequest(Model): + """InputValidationRequest. + + :param inputs: + :type inputs: dict + """ + + _attribute_map = { + 'inputs': {'key': 'inputs', 'type': '{ValidationItem}'} + } + + def __init__(self, inputs=None): + super(InputValidationRequest, self).__init__() + self.inputs = inputs diff --git a/vsts/vsts/task_agent/v4_0/models/input_value.py b/vsts/vsts/task_agent/v4_0/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/models/input_values.py b/vsts/vsts/task_agent/v4_0/models/input_values.py new file mode 100644 index 00000000..15d047fe --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/task_agent/v4_0/models/input_values_error.py b/vsts/vsts/task_agent/v4_0/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/task_agent/v4_0/models/metrics_column_meta_data.py b/vsts/vsts/task_agent/v4_0/models/metrics_column_meta_data.py new file mode 100644 index 00000000..8fde3da2 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/metrics_column_meta_data.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetricsColumnMetaData(Model): + """MetricsColumnMetaData. + + :param column_name: + :type column_name: str + :param column_value_type: + :type column_value_type: str + """ + + _attribute_map = { + 'column_name': {'key': 'columnName', 'type': 'str'}, + 'column_value_type': {'key': 'columnValueType', 'type': 'str'} + } + + def __init__(self, column_name=None, column_value_type=None): + super(MetricsColumnMetaData, self).__init__() + self.column_name = column_name + self.column_value_type = column_value_type diff --git a/vsts/vsts/task_agent/v4_0/models/metrics_columns_header.py b/vsts/vsts/task_agent/v4_0/models/metrics_columns_header.py new file mode 100644 index 00000000..420f235f --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/metrics_columns_header.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetricsColumnsHeader(Model): + """MetricsColumnsHeader. + + :param dimensions: + :type dimensions: list of :class:`MetricsColumnMetaData ` + :param metrics: + :type metrics: list of :class:`MetricsColumnMetaData ` + """ + + _attribute_map = { + 'dimensions': {'key': 'dimensions', 'type': '[MetricsColumnMetaData]'}, + 'metrics': {'key': 'metrics', 'type': '[MetricsColumnMetaData]'} + } + + def __init__(self, dimensions=None, metrics=None): + super(MetricsColumnsHeader, self).__init__() + self.dimensions = dimensions + self.metrics = metrics diff --git a/vsts/vsts/task_agent/v4_0/models/metrics_row.py b/vsts/vsts/task_agent/v4_0/models/metrics_row.py new file mode 100644 index 00000000..225673ad --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/metrics_row.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetricsRow(Model): + """MetricsRow. + + :param dimensions: + :type dimensions: list of str + :param metrics: + :type metrics: list of str + """ + + _attribute_map = { + 'dimensions': {'key': 'dimensions', 'type': '[str]'}, + 'metrics': {'key': 'metrics', 'type': '[str]'} + } + + def __init__(self, dimensions=None, metrics=None): + super(MetricsRow, self).__init__() + self.dimensions = dimensions + self.metrics = metrics diff --git a/vsts/vsts/task_agent/v4_0/models/package_metadata.py b/vsts/vsts/task_agent/v4_0/models/package_metadata.py new file mode 100644 index 00000000..8c5124bf --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/package_metadata.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 PackageMetadata(Model): + """PackageMetadata. + + :param created_on: The date the package was created + :type created_on: datetime + :param download_url: A direct link to download the package. + :type download_url: str + :param filename: The UI uses this to display instructions, i.e. "unzip MyAgent.zip" + :type filename: str + :param hash_value: MD5 hash as a base64 string + :type hash_value: str + :param info_url: A link to documentation + :type info_url: str + :param platform: The platform (win7, linux, etc.) + :type platform: str + :param type: The type of package (e.g. "agent") + :type type: str + :param version: The package version. + :type version: :class:`PackageVersion ` + """ + + _attribute_map = { + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'download_url': {'key': 'downloadUrl', 'type': 'str'}, + 'filename': {'key': 'filename', 'type': 'str'}, + 'hash_value': {'key': 'hashValue', 'type': 'str'}, + 'info_url': {'key': 'infoUrl', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'PackageVersion'} + } + + def __init__(self, created_on=None, download_url=None, filename=None, hash_value=None, info_url=None, platform=None, type=None, version=None): + super(PackageMetadata, self).__init__() + self.created_on = created_on + self.download_url = download_url + self.filename = filename + self.hash_value = hash_value + self.info_url = info_url + self.platform = platform + self.type = type + self.version = version diff --git a/vsts/vsts/task_agent/v4_0/models/package_version.py b/vsts/vsts/task_agent/v4_0/models/package_version.py new file mode 100644 index 00000000..3742cdc0 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/package_version.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PackageVersion(Model): + """PackageVersion. + + :param major: + :type major: int + :param minor: + :type minor: int + :param patch: + :type patch: int + """ + + _attribute_map = { + 'major': {'key': 'major', 'type': 'int'}, + 'minor': {'key': 'minor', 'type': 'int'}, + 'patch': {'key': 'patch', 'type': 'int'} + } + + def __init__(self, major=None, minor=None, patch=None): + super(PackageVersion, self).__init__() + self.major = major + self.minor = minor + self.patch = patch diff --git a/vsts/vsts/task_agent/v4_0/models/project_reference.py b/vsts/vsts/task_agent/v4_0/models/project_reference.py new file mode 100644 index 00000000..8fd6ad8e --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/project_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectReference(Model): + """ProjectReference. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ProjectReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/task_agent/v4_0/models/publish_task_group_metadata.py b/vsts/vsts/task_agent/v4_0/models/publish_task_group_metadata.py new file mode 100644 index 00000000..527821b5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/publish_task_group_metadata.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishTaskGroupMetadata(Model): + """PublishTaskGroupMetadata. + + :param comment: + :type comment: str + :param parent_definition_revision: + :type parent_definition_revision: int + :param preview: + :type preview: bool + :param task_group_id: + :type task_group_id: str + :param task_group_revision: + :type task_group_revision: int + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'parent_definition_revision': {'key': 'parentDefinitionRevision', 'type': 'int'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'task_group_id': {'key': 'taskGroupId', 'type': 'str'}, + 'task_group_revision': {'key': 'taskGroupRevision', 'type': 'int'} + } + + def __init__(self, comment=None, parent_definition_revision=None, preview=None, task_group_id=None, task_group_revision=None): + super(PublishTaskGroupMetadata, self).__init__() + self.comment = comment + self.parent_definition_revision = parent_definition_revision + self.preview = preview + self.task_group_id = task_group_id + self.task_group_revision = task_group_revision diff --git a/vsts/vsts/task_agent/v4_0/models/reference_links.py b/vsts/vsts/task_agent/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/task_agent/v4_0/models/result_transformation_details.py b/vsts/vsts/task_agent/v4_0/models/result_transformation_details.py new file mode 100644 index 00000000..eff9b132 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/result_transformation_details.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResultTransformationDetails(Model): + """ResultTransformationDetails. + + :param result_template: + :type result_template: str + """ + + _attribute_map = { + 'result_template': {'key': 'resultTemplate', 'type': 'str'} + } + + def __init__(self, result_template=None): + super(ResultTransformationDetails, self).__init__() + self.result_template = result_template diff --git a/vsts/vsts/task_agent/v4_0/models/secure_file.py b/vsts/vsts/task_agent/v4_0/models/secure_file.py new file mode 100644 index 00000000..b570efc5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/secure_file.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 SecureFile(Model): + """SecureFile. + + :param created_by: + :type created_by: :class:`IdentityRef ` + :param created_on: + :type created_on: datetime + :param id: + :type id: str + :param modified_by: + :type modified_by: :class:`IdentityRef ` + :param modified_on: + :type modified_on: datetime + :param name: + :type name: str + :param properties: + :type properties: dict + :param ticket: + :type ticket: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'ticket': {'key': 'ticket', 'type': 'str'} + } + + def __init__(self, created_by=None, created_on=None, id=None, modified_by=None, modified_on=None, name=None, properties=None, ticket=None): + super(SecureFile, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.id = id + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.properties = properties + self.ticket = ticket diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint.py new file mode 100644 index 00000000..6e1d91cf --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpoint(Model): + """ServiceEndpoint. + + :param administrators_group: + :type administrators_group: :class:`IdentityRef ` + :param authorization: Gets or sets the authorization data for talking to the endpoint. + :type authorization: :class:`EndpointAuthorization ` + :param created_by: The Gets or sets Identity reference for the user who created the Service endpoint + :type created_by: :class:`IdentityRef ` + :param data: + :type data: dict + :param description: Gets or Sets description of endpoint + :type description: str + :param group_scope_id: + :type group_scope_id: str + :param id: Gets or sets the identifier of this endpoint. + :type id: str + :param is_ready: EndPoint state indictor + :type is_ready: bool + :param name: Gets or sets the friendly name of the endpoint. + :type name: str + :param operation_status: Error message during creation/deletion of endpoint + :type operation_status: :class:`object ` + :param readers_group: + :type readers_group: :class:`IdentityRef ` + :param type: Gets or sets the type of the endpoint. + :type type: str + :param url: Gets or sets the url of the endpoint. + :type url: str + """ + + _attribute_map = { + 'administrators_group': {'key': 'administratorsGroup', 'type': 'IdentityRef'}, + 'authorization': {'key': 'authorization', 'type': 'EndpointAuthorization'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_scope_id': {'key': 'groupScopeId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_ready': {'key': 'isReady', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'readers_group': {'key': 'readersGroup', 'type': 'IdentityRef'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, administrators_group=None, authorization=None, created_by=None, data=None, description=None, group_scope_id=None, id=None, is_ready=None, name=None, operation_status=None, readers_group=None, type=None, url=None): + super(ServiceEndpoint, self).__init__() + self.administrators_group = administrators_group + self.authorization = authorization + self.created_by = created_by + self.data = data + self.description = description + self.group_scope_id = group_scope_id + self.id = id + self.is_ready = is_ready + self.name = name + self.operation_status = operation_status + self.readers_group = readers_group + self.type = type + self.url = url diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_authentication_scheme.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_authentication_scheme.py new file mode 100644 index 00000000..0eb2ccc0 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_authentication_scheme.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointAuthenticationScheme(Model): + """ServiceEndpointAuthenticationScheme. + + :param authorization_headers: + :type authorization_headers: list of :class:`AuthorizationHeader ` + :param display_name: + :type display_name: str + :param input_descriptors: + :type input_descriptors: list of :class:`InputDescriptor ` + :param scheme: + :type scheme: str + """ + + _attribute_map = { + 'authorization_headers': {'key': 'authorizationHeaders', 'type': '[AuthorizationHeader]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'scheme': {'key': 'scheme', 'type': 'str'} + } + + def __init__(self, authorization_headers=None, display_name=None, input_descriptors=None, scheme=None): + super(ServiceEndpointAuthenticationScheme, self).__init__() + self.authorization_headers = authorization_headers + self.display_name = display_name + self.input_descriptors = input_descriptors + self.scheme = scheme diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_details.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_details.py new file mode 100644 index 00000000..7f45faac --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_details.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointDetails(Model): + """ServiceEndpointDetails. + + :param authorization: + :type authorization: :class:`EndpointAuthorization ` + :param data: + :type data: dict + :param type: + :type type: str + :param url: + :type url: str + """ + + _attribute_map = { + 'authorization': {'key': 'authorization', 'type': 'EndpointAuthorization'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, authorization=None, data=None, type=None, url=None): + super(ServiceEndpointDetails, self).__init__() + self.authorization = authorization + self.data = data + self.type = type + self.url = url diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_data.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_data.py new file mode 100644 index 00000000..bb835c35 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_data.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointExecutionData(Model): + """ServiceEndpointExecutionData. + + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param finish_time: + :type finish_time: datetime + :param id: + :type id: long + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_type: + :type plan_type: str + :param result: + :type result: object + :param start_time: + :type start_time: datetime + """ + + _attribute_map = { + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'} + } + + def __init__(self, definition=None, finish_time=None, id=None, owner=None, plan_type=None, result=None, start_time=None): + super(ServiceEndpointExecutionData, self).__init__() + self.definition = definition + self.finish_time = finish_time + self.id = id + self.owner = owner + self.plan_type = plan_type + self.result = result + self.start_time = start_time diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_record.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_record.py new file mode 100644 index 00000000..1bbbffe6 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_record.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointExecutionRecord(Model): + """ServiceEndpointExecutionRecord. + + :param data: + :type data: :class:`ServiceEndpointExecutionData ` + :param endpoint_id: + :type endpoint_id: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'ServiceEndpointExecutionData'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'} + } + + def __init__(self, data=None, endpoint_id=None): + super(ServiceEndpointExecutionRecord, self).__init__() + self.data = data + self.endpoint_id = endpoint_id diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_records_input.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_records_input.py new file mode 100644 index 00000000..0329e350 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_execution_records_input.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointExecutionRecordsInput(Model): + """ServiceEndpointExecutionRecordsInput. + + :param data: + :type data: :class:`ServiceEndpointExecutionData ` + :param endpoint_ids: + :type endpoint_ids: list of str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'ServiceEndpointExecutionData'}, + 'endpoint_ids': {'key': 'endpointIds', 'type': '[str]'} + } + + def __init__(self, data=None, endpoint_ids=None): + super(ServiceEndpointExecutionRecordsInput, self).__init__() + self.data = data + self.endpoint_ids = endpoint_ids diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_request.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_request.py new file mode 100644 index 00000000..20f7b6ef --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_request.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointRequest(Model): + """ServiceEndpointRequest. + + :param data_source_details: + :type data_source_details: :class:`DataSourceDetails ` + :param result_transformation_details: + :type result_transformation_details: :class:`ResultTransformationDetails ` + :param service_endpoint_details: + :type service_endpoint_details: :class:`ServiceEndpointDetails ` + """ + + _attribute_map = { + 'data_source_details': {'key': 'dataSourceDetails', 'type': 'DataSourceDetails'}, + 'result_transformation_details': {'key': 'resultTransformationDetails', 'type': 'ResultTransformationDetails'}, + 'service_endpoint_details': {'key': 'serviceEndpointDetails', 'type': 'ServiceEndpointDetails'} + } + + def __init__(self, data_source_details=None, result_transformation_details=None, service_endpoint_details=None): + super(ServiceEndpointRequest, self).__init__() + self.data_source_details = data_source_details + self.result_transformation_details = result_transformation_details + self.service_endpoint_details = service_endpoint_details diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_request_result.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_request_result.py new file mode 100644 index 00000000..28d4d094 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_request_result.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointRequestResult(Model): + """ServiceEndpointRequestResult. + + :param error_message: + :type error_message: str + :param result: + :type result: :class:`object ` + :param status_code: + :type status_code: object + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'status_code': {'key': 'statusCode', 'type': 'object'} + } + + def __init__(self, error_message=None, result=None, status_code=None): + super(ServiceEndpointRequestResult, self).__init__() + self.error_message = error_message + self.result = result + self.status_code = status_code diff --git a/vsts/vsts/task_agent/v4_0/models/service_endpoint_type.py b/vsts/vsts/task_agent/v4_0/models/service_endpoint_type.py new file mode 100644 index 00000000..b03c1f24 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/service_endpoint_type.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointType(Model): + """ServiceEndpointType. + + :param authentication_schemes: + :type authentication_schemes: list of :class:`ServiceEndpointAuthenticationScheme ` + :param data_sources: + :type data_sources: list of :class:`DataSource ` + :param dependency_data: + :type dependency_data: list of :class:`DependencyData ` + :param description: + :type description: str + :param display_name: + :type display_name: str + :param endpoint_url: + :type endpoint_url: :class:`EndpointUrl ` + :param help_link: + :type help_link: :class:`HelpLink ` + :param help_mark_down: + :type help_mark_down: str + :param icon_url: + :type icon_url: str + :param input_descriptors: + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: + :type name: str + """ + + _attribute_map = { + 'authentication_schemes': {'key': 'authenticationSchemes', 'type': '[ServiceEndpointAuthenticationScheme]'}, + 'data_sources': {'key': 'dataSources', 'type': '[DataSource]'}, + 'dependency_data': {'key': 'dependencyData', 'type': '[DependencyData]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'EndpointUrl'}, + 'help_link': {'key': 'helpLink', 'type': 'HelpLink'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, authentication_schemes=None, data_sources=None, dependency_data=None, description=None, display_name=None, endpoint_url=None, help_link=None, help_mark_down=None, icon_url=None, input_descriptors=None, name=None): + super(ServiceEndpointType, self).__init__() + self.authentication_schemes = authentication_schemes + self.data_sources = data_sources + self.dependency_data = dependency_data + self.description = description + self.display_name = display_name + self.endpoint_url = endpoint_url + self.help_link = help_link + self.help_mark_down = help_mark_down + self.icon_url = icon_url + self.input_descriptors = input_descriptors + self.name = name diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent.py b/vsts/vsts/task_agent/v4_0/models/task_agent.py new file mode 100644 index 00000000..231787dc --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent.py @@ -0,0 +1,75 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_agent_reference import TaskAgentReference + + +class TaskAgent(TaskAgentReference): + """TaskAgent. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param enabled: Gets or sets a value indicating whether or not this agent should be enabled for job execution. + :type enabled: bool + :param id: Gets the identifier of the agent. + :type id: int + :param name: Gets the name of the agent. + :type name: str + :param status: Gets the current connectivity status of the agent. + :type status: object + :param version: Gets the version of the agent. + :type version: str + :param assigned_request: Gets the request which is currently assigned to this agent. + :type assigned_request: :class:`TaskAgentJobRequest ` + :param authorization: Gets or sets the authorization information for this agent. + :type authorization: :class:`TaskAgentAuthorization ` + :param created_on: Gets the date on which this agent was created. + :type created_on: datetime + :param max_parallelism: Gets or sets the maximum job parallelism allowed on this host. + :type max_parallelism: int + :param pending_update: Gets the pending update for this agent. + :type pending_update: :class:`TaskAgentUpdate ` + :param properties: + :type properties: :class:`object ` + :param status_changed_on: Gets the date on which the last connectivity status change occurred. + :type status_changed_on: datetime + :param system_capabilities: + :type system_capabilities: dict + :param user_capabilities: + :type user_capabilities: dict + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'str'}, + 'assigned_request': {'key': 'assignedRequest', 'type': 'TaskAgentJobRequest'}, + 'authorization': {'key': 'authorization', 'type': 'TaskAgentAuthorization'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'max_parallelism': {'key': 'maxParallelism', 'type': 'int'}, + 'pending_update': {'key': 'pendingUpdate', 'type': 'TaskAgentUpdate'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'status_changed_on': {'key': 'statusChangedOn', 'type': 'iso-8601'}, + 'system_capabilities': {'key': 'systemCapabilities', 'type': '{str}'}, + 'user_capabilities': {'key': 'userCapabilities', 'type': '{str}'} + } + + def __init__(self, _links=None, enabled=None, id=None, name=None, status=None, version=None, assigned_request=None, authorization=None, created_on=None, max_parallelism=None, pending_update=None, properties=None, status_changed_on=None, system_capabilities=None, user_capabilities=None): + super(TaskAgent, self).__init__(_links=_links, enabled=enabled, id=id, name=name, status=status, version=version) + self.assigned_request = assigned_request + self.authorization = authorization + self.created_on = created_on + self.max_parallelism = max_parallelism + self.pending_update = pending_update + self.properties = properties + self.status_changed_on = status_changed_on + self.system_capabilities = system_capabilities + self.user_capabilities = user_capabilities diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_authorization.py b/vsts/vsts/task_agent/v4_0/models/task_agent_authorization.py new file mode 100644 index 00000000..b30ced21 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_authorization.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentAuthorization(Model): + """TaskAgentAuthorization. + + :param authorization_url: Gets or sets the endpoint used to obtain access tokens from the configured token service. + :type authorization_url: str + :param client_id: Gets or sets the client identifier for this agent. + :type client_id: str + :param public_key: Gets or sets the public key used to verify the identity of this agent. + :type public_key: :class:`TaskAgentPublicKey ` + """ + + _attribute_map = { + 'authorization_url': {'key': 'authorizationUrl', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'public_key': {'key': 'publicKey', 'type': 'TaskAgentPublicKey'} + } + + def __init__(self, authorization_url=None, client_id=None, public_key=None): + super(TaskAgentAuthorization, self).__init__() + self.authorization_url = authorization_url + self.client_id = client_id + self.public_key = public_key diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_job_request.py b/vsts/vsts/task_agent/v4_0/models/task_agent_job_request.py new file mode 100644 index 00000000..51343a5f --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_job_request.py @@ -0,0 +1,101 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentJobRequest(Model): + """TaskAgentJobRequest. + + :param assign_time: + :type assign_time: datetime + :param data: + :type data: dict + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param demands: + :type demands: list of :class:`object ` + :param finish_time: + :type finish_time: datetime + :param host_id: + :type host_id: str + :param job_id: + :type job_id: str + :param job_name: + :type job_name: str + :param locked_until: + :type locked_until: datetime + :param matched_agents: + :type matched_agents: list of :class:`TaskAgentReference ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_id: + :type plan_id: str + :param plan_type: + :type plan_type: str + :param queue_time: + :type queue_time: datetime + :param receive_time: + :type receive_time: datetime + :param request_id: + :type request_id: long + :param reserved_agent: + :type reserved_agent: :class:`TaskAgentReference ` + :param result: + :type result: object + :param scope_id: + :type scope_id: str + :param service_owner: + :type service_owner: str + """ + + _attribute_map = { + 'assign_time': {'key': 'assignTime', 'type': 'iso-8601'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'host_id': {'key': 'hostId', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'locked_until': {'key': 'lockedUntil', 'type': 'iso-8601'}, + 'matched_agents': {'key': 'matchedAgents', 'type': '[TaskAgentReference]'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'queue_time': {'key': 'queueTime', 'type': 'iso-8601'}, + 'receive_time': {'key': 'receiveTime', 'type': 'iso-8601'}, + 'request_id': {'key': 'requestId', 'type': 'long'}, + 'reserved_agent': {'key': 'reservedAgent', 'type': 'TaskAgentReference'}, + 'result': {'key': 'result', 'type': 'object'}, + 'scope_id': {'key': 'scopeId', 'type': 'str'}, + 'service_owner': {'key': 'serviceOwner', 'type': 'str'} + } + + def __init__(self, assign_time=None, data=None, definition=None, demands=None, finish_time=None, host_id=None, job_id=None, job_name=None, locked_until=None, matched_agents=None, owner=None, plan_id=None, plan_type=None, queue_time=None, receive_time=None, request_id=None, reserved_agent=None, result=None, scope_id=None, service_owner=None): + super(TaskAgentJobRequest, self).__init__() + self.assign_time = assign_time + self.data = data + self.definition = definition + self.demands = demands + self.finish_time = finish_time + self.host_id = host_id + self.job_id = job_id + self.job_name = job_name + self.locked_until = locked_until + self.matched_agents = matched_agents + self.owner = owner + self.plan_id = plan_id + self.plan_type = plan_type + self.queue_time = queue_time + self.receive_time = receive_time + self.request_id = request_id + self.reserved_agent = reserved_agent + self.result = result + self.scope_id = scope_id + self.service_owner = service_owner diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_message.py b/vsts/vsts/task_agent/v4_0/models/task_agent_message.py new file mode 100644 index 00000000..5b4e7a78 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_message.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentMessage(Model): + """TaskAgentMessage. + + :param body: Gets or sets the body of the message. If the IV property is provided the body will need to be decrypted using the TaskAgentSession.EncryptionKey value in addition to the IV. + :type body: str + :param iV: Gets or sets the intialization vector used to encrypt this message. + :type iV: list of number + :param message_id: Gets or sets the message identifier. + :type message_id: long + :param message_type: Gets or sets the message type, describing the data contract found in TaskAgentMessage.Body. + :type message_type: str + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'iV': {'key': 'iV', 'type': '[number]'}, + 'message_id': {'key': 'messageId', 'type': 'long'}, + 'message_type': {'key': 'messageType', 'type': 'str'} + } + + def __init__(self, body=None, iV=None, message_id=None, message_type=None): + super(TaskAgentMessage, self).__init__() + self.body = body + self.iV = iV + self.message_id = message_id + self.message_type = message_type diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool.py new file mode 100644 index 00000000..f74bd876 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool.py @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_agent_pool_reference import TaskAgentPoolReference + + +class TaskAgentPool(TaskAgentPoolReference): + """TaskAgentPool. + + :param id: + :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 name: + :type name: str + :param pool_type: Gets or sets the type of the pool + :type pool_type: object + :param scope: + :type scope: str + :param auto_provision: Gets or sets a value indicating whether or not a queue should be automatically provisioned for each project collection or not. + :type auto_provision: bool + :param created_by: Gets the identity who created this pool. The creator of the pool is automatically added into the administrators group for the pool on creation. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets the date/time of the pool creation. + :type created_on: datetime + :param properties: + :type properties: :class:`object ` + :param size: Gets the current size of the pool. + :type size: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool_type': {'key': 'poolType', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'auto_provision': {'key': 'autoProvision', 'type': 'bool'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'size': {'key': 'size', 'type': 'int'} + } + + def __init__(self, id=None, is_hosted=None, name=None, pool_type=None, scope=None, auto_provision=None, created_by=None, created_on=None, properties=None, size=None): + super(TaskAgentPool, self).__init__(id=id, is_hosted=is_hosted, name=name, pool_type=pool_type, scope=scope) + self.auto_provision = auto_provision + self.created_by = created_by + self.created_on = created_on + self.properties = properties + self.size = size diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_definition.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_definition.py new file mode 100644 index 00000000..be8c1134 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_definition.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceDefinition(Model): + """TaskAgentPoolMaintenanceDefinition. + + :param enabled: Enable maintenance + :type enabled: bool + :param id: Id + :type id: int + :param job_timeout_in_minutes: Maintenance job timeout per agent + :type job_timeout_in_minutes: int + :param max_concurrent_agents_percentage: Max percentage of agents within a pool running maintenance job at given time + :type max_concurrent_agents_percentage: int + :param options: + :type options: :class:`TaskAgentPoolMaintenanceOptions ` + :param pool: Pool reference for the maintenance definition + :type pool: :class:`TaskAgentPoolReference ` + :param retention_policy: + :type retention_policy: :class:`TaskAgentPoolMaintenanceRetentionPolicy ` + :param schedule_setting: + :type schedule_setting: :class:`TaskAgentPoolMaintenanceSchedule ` + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'job_timeout_in_minutes': {'key': 'jobTimeoutInMinutes', 'type': 'int'}, + 'max_concurrent_agents_percentage': {'key': 'maxConcurrentAgentsPercentage', 'type': 'int'}, + 'options': {'key': 'options', 'type': 'TaskAgentPoolMaintenanceOptions'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'TaskAgentPoolMaintenanceRetentionPolicy'}, + 'schedule_setting': {'key': 'scheduleSetting', 'type': 'TaskAgentPoolMaintenanceSchedule'} + } + + def __init__(self, enabled=None, id=None, job_timeout_in_minutes=None, max_concurrent_agents_percentage=None, options=None, pool=None, retention_policy=None, schedule_setting=None): + super(TaskAgentPoolMaintenanceDefinition, self).__init__() + self.enabled = enabled + self.id = id + self.job_timeout_in_minutes = job_timeout_in_minutes + self.max_concurrent_agents_percentage = max_concurrent_agents_percentage + self.options = options + self.pool = pool + self.retention_policy = retention_policy + self.schedule_setting = schedule_setting diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_job.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_job.py new file mode 100644 index 00000000..ecc14bac --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_job.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceJob(Model): + """TaskAgentPoolMaintenanceJob. + + :param definition_id: The maintenance definition for the maintenance job + :type definition_id: int + :param error_count: The total error counts during the maintenance job + :type error_count: int + :param finish_time: Time that the maintenance job was completed + :type finish_time: datetime + :param job_id: Id of the maintenance job + :type job_id: int + :param logs_download_url: The log download url for the maintenance job + :type logs_download_url: str + :param orchestration_id: Orchestration/Plan Id for the maintenance job + :type orchestration_id: str + :param pool: Pool reference for the maintenance job + :type pool: :class:`TaskAgentPoolReference ` + :param queue_time: Time that the maintenance job was queued + :type queue_time: datetime + :param requested_by: The identity that queued the maintenance job + :type requested_by: :class:`IdentityRef ` + :param result: The maintenance job result + :type result: object + :param start_time: Time that the maintenance job was started + :type start_time: datetime + :param status: Status of the maintenance job + :type status: object + :param target_agents: + :type target_agents: list of :class:`TaskAgentPoolMaintenanceJobTargetAgent ` + :param warning_count: The total warning counts during the maintenance job + :type warning_count: int + """ + + _attribute_map = { + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'error_count': {'key': 'errorCount', 'type': 'int'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'int'}, + 'logs_download_url': {'key': 'logsDownloadUrl', 'type': 'str'}, + 'orchestration_id': {'key': 'orchestrationId', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'queue_time': {'key': 'queueTime', 'type': 'iso-8601'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'result': {'key': 'result', 'type': 'object'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'}, + 'target_agents': {'key': 'targetAgents', 'type': '[TaskAgentPoolMaintenanceJobTargetAgent]'}, + 'warning_count': {'key': 'warningCount', 'type': 'int'} + } + + def __init__(self, definition_id=None, error_count=None, finish_time=None, job_id=None, logs_download_url=None, orchestration_id=None, pool=None, queue_time=None, requested_by=None, result=None, start_time=None, status=None, target_agents=None, warning_count=None): + super(TaskAgentPoolMaintenanceJob, self).__init__() + self.definition_id = definition_id + self.error_count = error_count + self.finish_time = finish_time + self.job_id = job_id + self.logs_download_url = logs_download_url + self.orchestration_id = orchestration_id + self.pool = pool + self.queue_time = queue_time + self.requested_by = requested_by + self.result = result + self.start_time = start_time + self.status = status + self.target_agents = target_agents + self.warning_count = warning_count diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_job_target_agent.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_job_target_agent.py new file mode 100644 index 00000000..f55a5246 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_job_target_agent.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceJobTargetAgent(Model): + """TaskAgentPoolMaintenanceJobTargetAgent. + + :param agent: + :type agent: :class:`TaskAgentReference ` + :param job_id: + :type job_id: int + :param result: + :type result: object + :param status: + :type status: object + """ + + _attribute_map = { + 'agent': {'key': 'agent', 'type': 'TaskAgentReference'}, + 'job_id': {'key': 'jobId', 'type': 'int'}, + 'result': {'key': 'result', 'type': 'object'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, agent=None, job_id=None, result=None, status=None): + super(TaskAgentPoolMaintenanceJobTargetAgent, self).__init__() + self.agent = agent + self.job_id = job_id + self.result = result + self.status = status diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_options.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_options.py new file mode 100644 index 00000000..7c6690dd --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_options.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceOptions(Model): + """TaskAgentPoolMaintenanceOptions. + + :param working_directory_expiration_in_days: time to consider a System.DefaultWorkingDirectory is stale + :type working_directory_expiration_in_days: int + """ + + _attribute_map = { + 'working_directory_expiration_in_days': {'key': 'workingDirectoryExpirationInDays', 'type': 'int'} + } + + def __init__(self, working_directory_expiration_in_days=None): + super(TaskAgentPoolMaintenanceOptions, self).__init__() + self.working_directory_expiration_in_days = working_directory_expiration_in_days diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_retention_policy.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_retention_policy.py new file mode 100644 index 00000000..4f9c1434 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_retention_policy.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceRetentionPolicy(Model): + """TaskAgentPoolMaintenanceRetentionPolicy. + + :param number_of_history_records_to_keep: Number of records to keep for maintenance job executed with this definition. + :type number_of_history_records_to_keep: int + """ + + _attribute_map = { + 'number_of_history_records_to_keep': {'key': 'numberOfHistoryRecordsToKeep', 'type': 'int'} + } + + def __init__(self, number_of_history_records_to_keep=None): + super(TaskAgentPoolMaintenanceRetentionPolicy, self).__init__() + self.number_of_history_records_to_keep = number_of_history_records_to_keep diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_schedule.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_schedule.py new file mode 100644 index 00000000..4395a005 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_maintenance_schedule.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceSchedule(Model): + """TaskAgentPoolMaintenanceSchedule. + + :param days_to_build: Days for a build (flags enum for days of the week) + :type days_to_build: object + :param schedule_job_id: The Job Id of the Scheduled job that will queue the pool maintenance job. + :type schedule_job_id: str + :param start_hours: Local timezone hour to start + :type start_hours: int + :param start_minutes: Local timezone minute to start + :type start_minutes: int + :param time_zone_id: Time zone of the build schedule (string representation of the time zone id) + :type time_zone_id: str + """ + + _attribute_map = { + 'days_to_build': {'key': 'daysToBuild', 'type': 'object'}, + 'schedule_job_id': {'key': 'scheduleJobId', 'type': 'str'}, + 'start_hours': {'key': 'startHours', 'type': 'int'}, + 'start_minutes': {'key': 'startMinutes', 'type': 'int'}, + 'time_zone_id': {'key': 'timeZoneId', 'type': 'str'} + } + + def __init__(self, days_to_build=None, schedule_job_id=None, start_hours=None, start_minutes=None, time_zone_id=None): + super(TaskAgentPoolMaintenanceSchedule, self).__init__() + self.days_to_build = days_to_build + self.schedule_job_id = schedule_job_id + self.start_hours = start_hours + self.start_minutes = start_minutes + self.time_zone_id = time_zone_id diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_pool_reference.py b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_reference.py new file mode 100644 index 00000000..d553c3af --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_pool_reference.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolReference(Model): + """TaskAgentPoolReference. + + :param id: + :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 name: + :type name: str + :param pool_type: Gets or sets the type of the pool + :type pool_type: object + :param scope: + :type scope: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool_type': {'key': 'poolType', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'str'} + } + + def __init__(self, id=None, is_hosted=None, name=None, pool_type=None, scope=None): + super(TaskAgentPoolReference, self).__init__() + self.id = id + self.is_hosted = is_hosted + self.name = name + self.pool_type = pool_type + self.scope = scope diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_public_key.py b/vsts/vsts/task_agent/v4_0/models/task_agent_public_key.py new file mode 100644 index 00000000..32ad5940 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_public_key.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPublicKey(Model): + """TaskAgentPublicKey. + + :param exponent: Gets or sets the exponent for the public key. + :type exponent: list of number + :param modulus: Gets or sets the modulus for the public key. + :type modulus: list of number + """ + + _attribute_map = { + 'exponent': {'key': 'exponent', 'type': '[number]'}, + 'modulus': {'key': 'modulus', 'type': '[number]'} + } + + def __init__(self, exponent=None, modulus=None): + super(TaskAgentPublicKey, self).__init__() + self.exponent = exponent + self.modulus = modulus diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_queue.py b/vsts/vsts/task_agent/v4_0/models/task_agent_queue.py new file mode 100644 index 00000000..ec4e341b --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_queue.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentQueue(Model): + """TaskAgentQueue. + + :param id: + :type id: int + :param name: + :type name: str + :param pool: + :type pool: :class:`TaskAgentPoolReference ` + :param project_id: + :type project_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project_id': {'key': 'projectId', 'type': 'str'} + } + + def __init__(self, id=None, name=None, pool=None, project_id=None): + super(TaskAgentQueue, self).__init__() + self.id = id + self.name = name + self.pool = pool + self.project_id = project_id diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_reference.py b/vsts/vsts/task_agent/v4_0/models/task_agent_reference.py new file mode 100644 index 00000000..b608b2f1 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_reference.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentReference(Model): + """TaskAgentReference. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param enabled: Gets or sets a value indicating whether or not this agent should be enabled for job execution. + :type enabled: bool + :param id: Gets the identifier of the agent. + :type id: int + :param name: Gets the name of the agent. + :type name: str + :param status: Gets the current connectivity status of the agent. + :type status: object + :param version: Gets the version of the agent. + :type version: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, _links=None, enabled=None, id=None, name=None, status=None, version=None): + super(TaskAgentReference, self).__init__() + self._links = _links + self.enabled = enabled + self.id = id + self.name = name + self.status = status + self.version = version diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_session.py b/vsts/vsts/task_agent/v4_0/models/task_agent_session.py new file mode 100644 index 00000000..64e9410c --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_session.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentSession(Model): + """TaskAgentSession. + + :param agent: Gets or sets the agent which is the target of the session. + :type agent: :class:`TaskAgentReference ` + :param encryption_key: Gets the key used to encrypt message traffic for this session. + :type encryption_key: :class:`TaskAgentSessionKey ` + :param owner_name: Gets or sets the owner name of this session. Generally this will be the machine of origination. + :type owner_name: str + :param session_id: Gets the unique identifier for this session. + :type session_id: str + :param system_capabilities: + :type system_capabilities: dict + """ + + _attribute_map = { + 'agent': {'key': 'agent', 'type': 'TaskAgentReference'}, + 'encryption_key': {'key': 'encryptionKey', 'type': 'TaskAgentSessionKey'}, + 'owner_name': {'key': 'ownerName', 'type': 'str'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'system_capabilities': {'key': 'systemCapabilities', 'type': '{str}'} + } + + def __init__(self, agent=None, encryption_key=None, owner_name=None, session_id=None, system_capabilities=None): + super(TaskAgentSession, self).__init__() + self.agent = agent + self.encryption_key = encryption_key + self.owner_name = owner_name + self.session_id = session_id + self.system_capabilities = system_capabilities diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_session_key.py b/vsts/vsts/task_agent/v4_0/models/task_agent_session_key.py new file mode 100644 index 00000000..6015a042 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_session_key.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentSessionKey(Model): + """TaskAgentSessionKey. + + :param encrypted: Gets or sets a value indicating whether or not the key value is encrypted. If this value is true, the Value property should be decrypted using the RSA key exchanged with the server during registration. + :type encrypted: bool + :param value: Gets or sets the symmetric key value. + :type value: list of number + """ + + _attribute_map = { + 'encrypted': {'key': 'encrypted', 'type': 'bool'}, + 'value': {'key': 'value', 'type': '[number]'} + } + + def __init__(self, encrypted=None, value=None): + super(TaskAgentSessionKey, self).__init__() + self.encrypted = encrypted + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_update.py b/vsts/vsts/task_agent/v4_0/models/task_agent_update.py new file mode 100644 index 00000000..45eb7da6 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_update.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentUpdate(Model): + """TaskAgentUpdate. + + :param current_state: The current state of this agent update + :type current_state: str + :param reason: The reason of this agent update + :type reason: :class:`TaskAgentUpdateReason ` + :param requested_by: The identity that request the agent update + :type requested_by: :class:`IdentityRef ` + :param request_time: Gets the date on which this agent update was requested. + :type request_time: datetime + :param source_version: Gets or sets the source agent version of the agent update + :type source_version: :class:`PackageVersion ` + :param target_version: Gets or sets the target agent version of the agent update + :type target_version: :class:`PackageVersion ` + """ + + _attribute_map = { + 'current_state': {'key': 'currentState', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'TaskAgentUpdateReason'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'request_time': {'key': 'requestTime', 'type': 'iso-8601'}, + 'source_version': {'key': 'sourceVersion', 'type': 'PackageVersion'}, + 'target_version': {'key': 'targetVersion', 'type': 'PackageVersion'} + } + + def __init__(self, current_state=None, reason=None, requested_by=None, request_time=None, source_version=None, target_version=None): + super(TaskAgentUpdate, self).__init__() + self.current_state = current_state + self.reason = reason + self.requested_by = requested_by + self.request_time = request_time + self.source_version = source_version + self.target_version = target_version diff --git a/vsts/vsts/task_agent/v4_0/models/task_agent_update_reason.py b/vsts/vsts/task_agent/v4_0/models/task_agent_update_reason.py new file mode 100644 index 00000000..7d04a89f --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_agent_update_reason.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentUpdateReason(Model): + """TaskAgentUpdateReason. + + :param code: + :type code: object + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'object'} + } + + def __init__(self, code=None): + super(TaskAgentUpdateReason, self).__init__() + self.code = code diff --git a/vsts/vsts/task_agent/v4_0/models/task_definition.py b/vsts/vsts/task_agent/v4_0/models/task_definition.py new file mode 100644 index 00000000..4a3294f8 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_definition.py @@ -0,0 +1,161 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskDefinition(Model): + """TaskDefinition. + + :param agent_execution: + :type agent_execution: :class:`TaskExecution ` + :param author: + :type author: str + :param category: + :type category: str + :param contents_uploaded: + :type contents_uploaded: bool + :param contribution_identifier: + :type contribution_identifier: str + :param contribution_version: + :type contribution_version: str + :param data_source_bindings: + :type data_source_bindings: list of :class:`DataSourceBinding ` + :param definition_type: + :type definition_type: str + :param demands: + :type demands: list of :class:`object ` + :param deprecated: + :type deprecated: bool + :param description: + :type description: str + :param disabled: + :type disabled: bool + :param execution: + :type execution: dict + :param friendly_name: + :type friendly_name: str + :param groups: + :type groups: list of :class:`TaskGroupDefinition ` + :param help_mark_down: + :type help_mark_down: str + :param host_type: + :type host_type: str + :param icon_url: + :type icon_url: str + :param id: + :type id: str + :param inputs: + :type inputs: list of :class:`TaskInputDefinition ` + :param instance_name_format: + :type instance_name_format: str + :param minimum_agent_version: + :type minimum_agent_version: str + :param name: + :type name: str + :param output_variables: + :type output_variables: list of :class:`TaskOutputVariable ` + :param package_location: + :type package_location: str + :param package_type: + :type package_type: str + :param preview: + :type preview: bool + :param release_notes: + :type release_notes: str + :param runs_on: + :type runs_on: list of str + :param satisfies: + :type satisfies: list of str + :param server_owned: + :type server_owned: bool + :param source_definitions: + :type source_definitions: list of :class:`TaskSourceDefinition ` + :param source_location: + :type source_location: str + :param version: + :type version: :class:`TaskVersion ` + :param visibility: + :type visibility: list of str + """ + + _attribute_map = { + 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'contents_uploaded': {'key': 'contentsUploaded', 'type': 'bool'}, + 'contribution_identifier': {'key': 'contributionIdentifier', 'type': 'str'}, + 'contribution_version': {'key': 'contributionVersion', 'type': 'str'}, + 'data_source_bindings': {'key': 'dataSourceBindings', 'type': '[DataSourceBinding]'}, + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deprecated': {'key': 'deprecated', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'execution': {'key': 'execution', 'type': '{object}'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'groups': {'key': 'groups', 'type': '[TaskGroupDefinition]'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'host_type': {'key': 'hostType', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinition]'}, + 'instance_name_format': {'key': 'instanceNameFormat', 'type': 'str'}, + 'minimum_agent_version': {'key': 'minimumAgentVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'output_variables': {'key': 'outputVariables', 'type': '[TaskOutputVariable]'}, + 'package_location': {'key': 'packageLocation', 'type': 'str'}, + 'package_type': {'key': 'packageType', 'type': 'str'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'release_notes': {'key': 'releaseNotes', 'type': 'str'}, + 'runs_on': {'key': 'runsOn', 'type': '[str]'}, + 'satisfies': {'key': 'satisfies', 'type': '[str]'}, + 'server_owned': {'key': 'serverOwned', 'type': 'bool'}, + 'source_definitions': {'key': 'sourceDefinitions', 'type': '[TaskSourceDefinition]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'TaskVersion'}, + 'visibility': {'key': 'visibility', 'type': '[str]'} + } + + def __init__(self, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, preview=None, release_notes=None, runs_on=None, satisfies=None, server_owned=None, source_definitions=None, source_location=None, version=None, visibility=None): + super(TaskDefinition, self).__init__() + self.agent_execution = agent_execution + self.author = author + self.category = category + self.contents_uploaded = contents_uploaded + self.contribution_identifier = contribution_identifier + self.contribution_version = contribution_version + self.data_source_bindings = data_source_bindings + self.definition_type = definition_type + self.demands = demands + self.deprecated = deprecated + self.description = description + self.disabled = disabled + self.execution = execution + self.friendly_name = friendly_name + self.groups = groups + self.help_mark_down = help_mark_down + self.host_type = host_type + self.icon_url = icon_url + self.id = id + self.inputs = inputs + self.instance_name_format = instance_name_format + self.minimum_agent_version = minimum_agent_version + self.name = name + self.output_variables = output_variables + self.package_location = package_location + self.package_type = package_type + self.preview = preview + self.release_notes = release_notes + self.runs_on = runs_on + self.satisfies = satisfies + self.server_owned = server_owned + self.source_definitions = source_definitions + self.source_location = source_location + self.version = version + self.visibility = visibility diff --git a/vsts/vsts/task_agent/v4_0/models/task_definition_endpoint.py b/vsts/vsts/task_agent/v4_0/models/task_definition_endpoint.py new file mode 100644 index 00000000..ee2aea05 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_definition_endpoint.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskDefinitionEndpoint(Model): + """TaskDefinitionEndpoint. + + :param connection_id: An ID that identifies a service connection to be used for authenticating endpoint requests. + :type connection_id: str + :param key_selector: An Json based keyselector to filter response returned by fetching the endpoint Url.A Json based keyselector must be prefixed with "jsonpath:". KeySelector can be used to specify the filter to get the keys for the values specified with Selector. The following keyselector defines an Json for extracting nodes named 'ServiceName'. endpoint.KeySelector = "jsonpath://ServiceName"; + :type key_selector: str + :param scope: The scope as understood by Connected Services. Essentialy, a project-id for now. + :type scope: str + :param selector: An XPath/Json based selector to filter response returned by fetching the endpoint Url. An XPath based selector must be prefixed with the string "xpath:". A Json based selector must be prefixed with "jsonpath:". The following selector defines an XPath for extracting nodes named 'ServiceName'. endpoint.Selector = "xpath://ServiceName"; + :type selector: str + :param task_id: TaskId that this endpoint belongs to. + :type task_id: str + :param url: URL to GET. + :type url: str + """ + + _attribute_map = { + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, connection_id=None, key_selector=None, scope=None, selector=None, task_id=None, url=None): + super(TaskDefinitionEndpoint, self).__init__() + self.connection_id = connection_id + self.key_selector = key_selector + self.scope = scope + self.selector = selector + self.task_id = task_id + self.url = url diff --git a/vsts/vsts/task_agent/v4_0/models/task_definition_reference.py b/vsts/vsts/task_agent/v4_0/models/task_definition_reference.py new file mode 100644 index 00000000..ffc8dc2d --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_definition_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskDefinitionReference(Model): + """TaskDefinitionReference. + + :param definition_type: Gets or sets the definition type. Values can be 'task' or 'metaTask'. + :type definition_type: str + :param id: Gets or sets the unique identifier of task. + :type id: str + :param version_spec: Gets or sets the version specification of task. + :type version_spec: str + """ + + _attribute_map = { + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'version_spec': {'key': 'versionSpec', 'type': 'str'} + } + + def __init__(self, definition_type=None, id=None, version_spec=None): + super(TaskDefinitionReference, self).__init__() + self.definition_type = definition_type + self.id = id + self.version_spec = version_spec diff --git a/vsts/vsts/task_agent/v4_0/models/task_execution.py b/vsts/vsts/task_agent/v4_0/models/task_execution.py new file mode 100644 index 00000000..16428d39 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_execution.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskExecution(Model): + """TaskExecution. + + :param exec_task: The utility task to run. Specifying this means that this task definition is simply a meta task to call another task. This is useful for tasks that call utility tasks like powershell and commandline + :type exec_task: :class:`TaskReference ` + :param platform_instructions: If a task is going to run code, then this provides the type/script etc... information by platform. For example, it might look like. net45: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } net20: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } java: { jar: "powershelltask.tasks.automation.teamfoundation.microsoft.com", } node: { script: "powershellhost.js", } + :type platform_instructions: dict + """ + + _attribute_map = { + 'exec_task': {'key': 'execTask', 'type': 'TaskReference'}, + 'platform_instructions': {'key': 'platformInstructions', 'type': '{{str}}'} + } + + def __init__(self, exec_task=None, platform_instructions=None): + super(TaskExecution, self).__init__() + self.exec_task = exec_task + self.platform_instructions = platform_instructions diff --git a/vsts/vsts/task_agent/v4_0/models/task_group.py b/vsts/vsts/task_agent/v4_0/models/task_group.py new file mode 100644 index 00000000..6bb5cc70 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_group.py @@ -0,0 +1,166 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_definition import TaskDefinition + + +class TaskGroup(TaskDefinition): + """TaskGroup. + + :param agent_execution: + :type agent_execution: :class:`TaskExecution ` + :param author: + :type author: str + :param category: + :type category: str + :param contents_uploaded: + :type contents_uploaded: bool + :param contribution_identifier: + :type contribution_identifier: str + :param contribution_version: + :type contribution_version: str + :param data_source_bindings: + :type data_source_bindings: list of :class:`DataSourceBinding ` + :param definition_type: + :type definition_type: str + :param demands: + :type demands: list of :class:`object ` + :param deprecated: + :type deprecated: bool + :param description: + :type description: str + :param disabled: + :type disabled: bool + :param execution: + :type execution: dict + :param friendly_name: + :type friendly_name: str + :param groups: + :type groups: list of :class:`TaskGroupDefinition ` + :param help_mark_down: + :type help_mark_down: str + :param host_type: + :type host_type: str + :param icon_url: + :type icon_url: str + :param id: + :type id: str + :param inputs: + :type inputs: list of :class:`TaskInputDefinition ` + :param instance_name_format: + :type instance_name_format: str + :param minimum_agent_version: + :type minimum_agent_version: str + :param name: + :type name: str + :param output_variables: + :type output_variables: list of :class:`TaskOutputVariable ` + :param package_location: + :type package_location: str + :param package_type: + :type package_type: str + :param preview: + :type preview: bool + :param release_notes: + :type release_notes: str + :param runs_on: + :type runs_on: list of str + :param satisfies: + :type satisfies: list of str + :param server_owned: + :type server_owned: bool + :param source_definitions: + :type source_definitions: list of :class:`TaskSourceDefinition ` + :param source_location: + :type source_location: str + :param version: + :type version: :class:`TaskVersion ` + :param visibility: + :type visibility: list of str + :param comment: Gets or sets comment. + :type comment: str + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets or sets date on which it got created. + :type created_on: datetime + :param deleted: Gets or sets as 'true' to indicate as deleted, 'false' otherwise. + :type deleted: bool + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets or sets date on which it got modified. + :type modified_on: datetime + :param owner: Gets or sets the owner. + :type owner: str + :param parent_definition_id: Gets or sets parent task group Id. This is used while creating a draft task group. + :type parent_definition_id: str + :param revision: Gets or sets revision. + :type revision: int + :param tasks: + :type tasks: list of :class:`TaskGroupStep ` + """ + + _attribute_map = { + 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'contents_uploaded': {'key': 'contentsUploaded', 'type': 'bool'}, + 'contribution_identifier': {'key': 'contributionIdentifier', 'type': 'str'}, + 'contribution_version': {'key': 'contributionVersion', 'type': 'str'}, + 'data_source_bindings': {'key': 'dataSourceBindings', 'type': '[DataSourceBinding]'}, + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deprecated': {'key': 'deprecated', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'execution': {'key': 'execution', 'type': '{object}'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'groups': {'key': 'groups', 'type': '[TaskGroupDefinition]'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'host_type': {'key': 'hostType', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinition]'}, + 'instance_name_format': {'key': 'instanceNameFormat', 'type': 'str'}, + 'minimum_agent_version': {'key': 'minimumAgentVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'output_variables': {'key': 'outputVariables', 'type': '[TaskOutputVariable]'}, + 'package_location': {'key': 'packageLocation', 'type': 'str'}, + 'package_type': {'key': 'packageType', 'type': 'str'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'release_notes': {'key': 'releaseNotes', 'type': 'str'}, + 'runs_on': {'key': 'runsOn', 'type': '[str]'}, + 'satisfies': {'key': 'satisfies', 'type': '[str]'}, + 'server_owned': {'key': 'serverOwned', 'type': 'bool'}, + 'source_definitions': {'key': 'sourceDefinitions', 'type': '[TaskSourceDefinition]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'TaskVersion'}, + 'visibility': {'key': 'visibility', 'type': '[str]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'deleted': {'key': 'deleted', 'type': 'bool'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'parent_definition_id': {'key': 'parentDefinitionId', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'tasks': {'key': 'tasks', 'type': '[TaskGroupStep]'} + } + + def __init__(self, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, preview=None, release_notes=None, runs_on=None, satisfies=None, server_owned=None, source_definitions=None, source_location=None, version=None, visibility=None, comment=None, created_by=None, created_on=None, deleted=None, modified_by=None, modified_on=None, owner=None, parent_definition_id=None, revision=None, tasks=None): + super(TaskGroup, self).__init__(agent_execution=agent_execution, author=author, category=category, contents_uploaded=contents_uploaded, contribution_identifier=contribution_identifier, contribution_version=contribution_version, data_source_bindings=data_source_bindings, definition_type=definition_type, demands=demands, deprecated=deprecated, description=description, disabled=disabled, execution=execution, friendly_name=friendly_name, groups=groups, help_mark_down=help_mark_down, host_type=host_type, icon_url=icon_url, id=id, inputs=inputs, instance_name_format=instance_name_format, minimum_agent_version=minimum_agent_version, name=name, output_variables=output_variables, package_location=package_location, package_type=package_type, preview=preview, release_notes=release_notes, runs_on=runs_on, satisfies=satisfies, server_owned=server_owned, source_definitions=source_definitions, source_location=source_location, version=version, visibility=visibility) + self.comment = comment + self.created_by = created_by + self.created_on = created_on + self.deleted = deleted + self.modified_by = modified_by + self.modified_on = modified_on + self.owner = owner + self.parent_definition_id = parent_definition_id + self.revision = revision + self.tasks = tasks diff --git a/vsts/vsts/task_agent/v4_0/models/task_group_definition.py b/vsts/vsts/task_agent/v4_0/models/task_group_definition.py new file mode 100644 index 00000000..603bf5d7 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_group_definition.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupDefinition(Model): + """TaskGroupDefinition. + + :param display_name: + :type display_name: str + :param is_expanded: + :type is_expanded: bool + :param name: + :type name: str + :param tags: + :type tags: list of str + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_expanded': {'key': 'isExpanded', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'} + } + + def __init__(self, display_name=None, is_expanded=None, name=None, tags=None, visible_rule=None): + super(TaskGroupDefinition, self).__init__() + self.display_name = display_name + self.is_expanded = is_expanded + self.name = name + self.tags = tags + self.visible_rule = visible_rule diff --git a/vsts/vsts/task_agent/v4_0/models/task_group_revision.py b/vsts/vsts/task_agent/v4_0/models/task_group_revision.py new file mode 100644 index 00000000..b732c9de --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_group_revision.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupRevision(Model): + """TaskGroupRevision. + + :param changed_by: + :type changed_by: :class:`IdentityRef ` + :param changed_date: + :type changed_date: datetime + :param change_type: + :type change_type: object + :param comment: + :type comment: str + :param file_id: + :type file_id: int + :param revision: + :type revision: int + :param task_group_id: + :type task_group_id: str + """ + + _attribute_map = { + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'task_group_id': {'key': 'taskGroupId', 'type': 'str'} + } + + def __init__(self, changed_by=None, changed_date=None, change_type=None, comment=None, file_id=None, revision=None, task_group_id=None): + super(TaskGroupRevision, self).__init__() + self.changed_by = changed_by + self.changed_date = changed_date + self.change_type = change_type + self.comment = comment + self.file_id = file_id + self.revision = revision + self.task_group_id = task_group_id diff --git a/vsts/vsts/task_agent/v4_0/models/task_group_step.py b/vsts/vsts/task_agent/v4_0/models/task_group_step.py new file mode 100644 index 00000000..bbb6d51e --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_group_step.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupStep(Model): + """TaskGroupStep. + + :param always_run: Gets or sets as 'true' to run the task always, 'false' otherwise. + :type always_run: bool + :param condition: + :type condition: str + :param continue_on_error: Gets or sets as 'true' to continue on error, 'false' otherwise. + :type continue_on_error: bool + :param display_name: Gets or sets the display name. + :type display_name: str + :param enabled: Gets or sets as task is enabled or not. + :type enabled: bool + :param inputs: Gets or sets dictionary of inputs. + :type inputs: dict + :param task: Gets or sets the reference of the task. + :type task: :class:`TaskDefinitionReference ` + :param timeout_in_minutes: Gets or sets the maximum time, in minutes, that a task is allowed to execute on agent before being cancelled by server. A zero value indicates an infinite timeout. + :type timeout_in_minutes: int + """ + + _attribute_map = { + 'always_run': {'key': 'alwaysRun', 'type': 'bool'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'continue_on_error': {'key': 'continueOnError', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'task': {'key': 'task', 'type': 'TaskDefinitionReference'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'} + } + + def __init__(self, always_run=None, condition=None, continue_on_error=None, display_name=None, enabled=None, inputs=None, task=None, timeout_in_minutes=None): + super(TaskGroupStep, self).__init__() + self.always_run = always_run + self.condition = condition + self.continue_on_error = continue_on_error + self.display_name = display_name + self.enabled = enabled + self.inputs = inputs + self.task = task + self.timeout_in_minutes = timeout_in_minutes diff --git a/vsts/vsts/task_agent/v4_0/models/task_hub_license_details.py b/vsts/vsts/task_agent/v4_0/models/task_hub_license_details.py new file mode 100644 index 00000000..7632a7ec --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_hub_license_details.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskHubLicenseDetails(Model): + """TaskHubLicenseDetails. + + :param enterprise_users_count: + :type enterprise_users_count: int + :param free_hosted_license_count: + :type free_hosted_license_count: int + :param free_license_count: + :type free_license_count: int + :param has_license_count_ever_updated: + :type has_license_count_ever_updated: bool + :param hosted_agent_minutes_free_count: + :type hosted_agent_minutes_free_count: int + :param hosted_agent_minutes_used_count: + :type hosted_agent_minutes_used_count: int + :param msdn_users_count: + :type msdn_users_count: int + :param purchased_hosted_license_count: + :type purchased_hosted_license_count: int + :param purchased_license_count: + :type purchased_license_count: int + :param total_license_count: + :type total_license_count: int + """ + + _attribute_map = { + 'enterprise_users_count': {'key': 'enterpriseUsersCount', 'type': 'int'}, + 'free_hosted_license_count': {'key': 'freeHostedLicenseCount', 'type': 'int'}, + 'free_license_count': {'key': 'freeLicenseCount', 'type': 'int'}, + 'has_license_count_ever_updated': {'key': 'hasLicenseCountEverUpdated', 'type': 'bool'}, + 'hosted_agent_minutes_free_count': {'key': 'hostedAgentMinutesFreeCount', 'type': 'int'}, + 'hosted_agent_minutes_used_count': {'key': 'hostedAgentMinutesUsedCount', 'type': 'int'}, + 'msdn_users_count': {'key': 'msdnUsersCount', 'type': 'int'}, + 'purchased_hosted_license_count': {'key': 'purchasedHostedLicenseCount', 'type': 'int'}, + 'purchased_license_count': {'key': 'purchasedLicenseCount', 'type': 'int'}, + 'total_license_count': {'key': 'totalLicenseCount', 'type': 'int'} + } + + def __init__(self, enterprise_users_count=None, free_hosted_license_count=None, free_license_count=None, has_license_count_ever_updated=None, hosted_agent_minutes_free_count=None, hosted_agent_minutes_used_count=None, msdn_users_count=None, purchased_hosted_license_count=None, purchased_license_count=None, total_license_count=None): + super(TaskHubLicenseDetails, self).__init__() + self.enterprise_users_count = enterprise_users_count + self.free_hosted_license_count = free_hosted_license_count + self.free_license_count = free_license_count + self.has_license_count_ever_updated = has_license_count_ever_updated + self.hosted_agent_minutes_free_count = hosted_agent_minutes_free_count + self.hosted_agent_minutes_used_count = hosted_agent_minutes_used_count + self.msdn_users_count = msdn_users_count + self.purchased_hosted_license_count = purchased_hosted_license_count + self.purchased_license_count = purchased_license_count + self.total_license_count = total_license_count diff --git a/vsts/vsts/task_agent/v4_0/models/task_input_definition.py b/vsts/vsts/task_agent/v4_0/models/task_input_definition.py new file mode 100644 index 00000000..f3c31fb8 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_input_definition.py @@ -0,0 +1,54 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_input_definition_base import TaskInputDefinitionBase + + +class TaskInputDefinition(TaskInputDefinitionBase): + """TaskInputDefinition. + + :param default_value: + :type default_value: str + :param group_name: + :type group_name: str + :param help_mark_down: + :type help_mark_down: str + :param label: + :type label: str + :param name: + :type name: str + :param options: + :type options: dict + :param properties: + :type properties: dict + :param required: + :type required: bool + :param type: + :type type: str + :param validation: + :type validation: :class:`TaskInputValidation ` + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation': {'key': 'validation', 'type': 'TaskInputValidation'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'}, + } + + def __init__(self, default_value=None, group_name=None, help_mark_down=None, label=None, name=None, options=None, properties=None, required=None, type=None, validation=None, visible_rule=None): + super(TaskInputDefinition, self).__init__(default_value=default_value, group_name=group_name, help_mark_down=help_mark_down, label=label, name=name, options=options, properties=properties, required=required, type=type, validation=validation, visible_rule=visible_rule) diff --git a/vsts/vsts/task_agent/v4_0/models/task_input_definition_base.py b/vsts/vsts/task_agent/v4_0/models/task_input_definition_base.py new file mode 100644 index 00000000..1f33183e --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_input_definition_base.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskInputDefinitionBase(Model): + """TaskInputDefinitionBase. + + :param default_value: + :type default_value: str + :param group_name: + :type group_name: str + :param help_mark_down: + :type help_mark_down: str + :param label: + :type label: str + :param name: + :type name: str + :param options: + :type options: dict + :param properties: + :type properties: dict + :param required: + :type required: bool + :param type: + :type type: str + :param validation: + :type validation: :class:`TaskInputValidation ` + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation': {'key': 'validation', 'type': 'TaskInputValidation'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'} + } + + def __init__(self, default_value=None, group_name=None, help_mark_down=None, label=None, name=None, options=None, properties=None, required=None, type=None, validation=None, visible_rule=None): + super(TaskInputDefinitionBase, self).__init__() + self.default_value = default_value + self.group_name = group_name + self.help_mark_down = help_mark_down + self.label = label + self.name = name + self.options = options + self.properties = properties + self.required = required + self.type = type + self.validation = validation + self.visible_rule = visible_rule diff --git a/vsts/vsts/task_agent/v4_0/models/task_input_validation.py b/vsts/vsts/task_agent/v4_0/models/task_input_validation.py new file mode 100644 index 00000000..42524013 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_input_validation.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskInputValidation(Model): + """TaskInputValidation. + + :param expression: Conditional expression + :type expression: str + :param message: Message explaining how user can correct if validation fails + :type message: str + """ + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, expression=None, message=None): + super(TaskInputValidation, self).__init__() + self.expression = expression + self.message = message diff --git a/vsts/vsts/task_agent/v4_0/models/task_orchestration_owner.py b/vsts/vsts/task_agent/v4_0/models/task_orchestration_owner.py new file mode 100644 index 00000000..8f16499e --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_orchestration_owner.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationOwner(Model): + """TaskOrchestrationOwner. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param id: + :type id: int + :param name: + :type name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None): + super(TaskOrchestrationOwner, self).__init__() + self._links = _links + self.id = id + self.name = name diff --git a/vsts/vsts/task_agent/v4_0/models/task_output_variable.py b/vsts/vsts/task_agent/v4_0/models/task_output_variable.py new file mode 100644 index 00000000..6bd50c8d --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_output_variable.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOutputVariable(Model): + """TaskOutputVariable. + + :param description: + :type description: str + :param name: + :type name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, description=None, name=None): + super(TaskOutputVariable, self).__init__() + self.description = description + self.name = name diff --git a/vsts/vsts/task_agent/v4_0/models/task_package_metadata.py b/vsts/vsts/task_agent/v4_0/models/task_package_metadata.py new file mode 100644 index 00000000..635fda1b --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_package_metadata.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskPackageMetadata(Model): + """TaskPackageMetadata. + + :param type: Gets the name of the package. + :type type: str + :param url: Gets the url of the package. + :type url: str + :param version: Gets the version of the package. + :type version: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, type=None, url=None, version=None): + super(TaskPackageMetadata, self).__init__() + self.type = type + self.url = url + self.version = version diff --git a/vsts/vsts/task_agent/v4_0/models/task_reference.py b/vsts/vsts/task_agent/v4_0/models/task_reference.py new file mode 100644 index 00000000..3ff1dd7b --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskReference(Model): + """TaskReference. + + :param id: + :type id: str + :param inputs: + :type inputs: dict + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, inputs=None, name=None, version=None): + super(TaskReference, self).__init__() + self.id = id + self.inputs = inputs + self.name = name + self.version = version diff --git a/vsts/vsts/task_agent/v4_0/models/task_source_definition.py b/vsts/vsts/task_agent/v4_0/models/task_source_definition.py new file mode 100644 index 00000000..96f5576b --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_source_definition.py @@ -0,0 +1,36 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_source_definition_base import TaskSourceDefinitionBase + + +class TaskSourceDefinition(TaskSourceDefinitionBase): + """TaskSourceDefinition. + + :param auth_key: + :type auth_key: str + :param endpoint: + :type endpoint: str + :param key_selector: + :type key_selector: str + :param selector: + :type selector: str + :param target: + :type target: str + """ + + _attribute_map = { + 'auth_key': {'key': 'authKey', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=None, target=None): + super(TaskSourceDefinition, self).__init__(auth_key=auth_key, endpoint=endpoint, key_selector=key_selector, selector=selector, target=target) diff --git a/vsts/vsts/task_agent/v4_0/models/task_source_definition_base.py b/vsts/vsts/task_agent/v4_0/models/task_source_definition_base.py new file mode 100644 index 00000000..c8a6b6d6 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_source_definition_base.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskSourceDefinitionBase(Model): + """TaskSourceDefinitionBase. + + :param auth_key: + :type auth_key: str + :param endpoint: + :type endpoint: str + :param key_selector: + :type key_selector: str + :param selector: + :type selector: str + :param target: + :type target: str + """ + + _attribute_map = { + 'auth_key': {'key': 'authKey', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=None, target=None): + super(TaskSourceDefinitionBase, self).__init__() + self.auth_key = auth_key + self.endpoint = endpoint + self.key_selector = key_selector + self.selector = selector + self.target = target diff --git a/vsts/vsts/task_agent/v4_0/models/task_version.py b/vsts/vsts/task_agent/v4_0/models/task_version.py new file mode 100644 index 00000000..3d4c89ee --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/task_version.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskVersion(Model): + """TaskVersion. + + :param is_test: + :type is_test: bool + :param major: + :type major: int + :param minor: + :type minor: int + :param patch: + :type patch: int + """ + + _attribute_map = { + 'is_test': {'key': 'isTest', 'type': 'bool'}, + 'major': {'key': 'major', 'type': 'int'}, + 'minor': {'key': 'minor', 'type': 'int'}, + 'patch': {'key': 'patch', 'type': 'int'} + } + + def __init__(self, is_test=None, major=None, minor=None, patch=None): + super(TaskVersion, self).__init__() + self.is_test = is_test + self.major = major + self.minor = minor + self.patch = patch diff --git a/vsts/vsts/task_agent/v4_0/models/validation_item.py b/vsts/vsts/task_agent/v4_0/models/validation_item.py new file mode 100644 index 00000000..c7ba5083 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/validation_item.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ValidationItem(Model): + """ValidationItem. + + :param is_valid: Tells whether the current input is valid or not + :type is_valid: bool + :param reason: Reason for input validation failure + :type reason: str + :param type: Type of validation item + :type type: str + :param value: Value to validate. The conditional expression to validate for the input for "expression" type Eg:eq(variables['Build.SourceBranch'], 'refs/heads/master');eq(value, 'refs/heads/master') + :type value: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_valid=None, reason=None, type=None, value=None): + super(ValidationItem, self).__init__() + self.is_valid = is_valid + self.reason = reason + self.type = type + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/models/variable_group.py b/vsts/vsts/task_agent/v4_0/models/variable_group.py new file mode 100644 index 00000000..ddda80d7 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/variable_group.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableGroup(Model): + """VariableGroup. + + :param created_by: + :type created_by: :class:`IdentityRef ` + :param created_on: + :type created_on: datetime + :param description: + :type description: str + :param id: + :type id: int + :param modified_by: + :type modified_by: :class:`IdentityRef ` + :param modified_on: + :type modified_on: datetime + :param name: + :type name: str + :param provider_data: + :type provider_data: :class:`VariableGroupProviderData ` + :param type: + :type type: str + :param variables: + :type variables: dict + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provider_data': {'key': 'providerData', 'type': 'VariableGroupProviderData'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{VariableValue}'} + } + + def __init__(self, created_by=None, created_on=None, description=None, id=None, modified_by=None, modified_on=None, name=None, provider_data=None, type=None, variables=None): + super(VariableGroup, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.description = description + self.id = id + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.provider_data = provider_data + self.type = type + self.variables = variables diff --git a/vsts/vsts/task_agent/v4_0/models/variable_group_provider_data.py b/vsts/vsts/task_agent/v4_0/models/variable_group_provider_data.py new file mode 100644 index 00000000..b86942f1 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/variable_group_provider_data.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VariableGroupProviderData(Model): + """VariableGroupProviderData. + + """ + + _attribute_map = { + } + + def __init__(self): + super(VariableGroupProviderData, self).__init__() diff --git a/vsts/vsts/task_agent/v4_0/models/variable_value.py b/vsts/vsts/task_agent/v4_0/models/variable_value.py new file mode 100644 index 00000000..035049c0 --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/models/variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableValue(Model): + """VariableValue. + + :param is_secret: + :type is_secret: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(VariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/task_agent/v4_0/task_agent_client.py b/vsts/vsts/task_agent/v4_0/task_agent_client.py new file mode 100644 index 00000000..530d461c --- /dev/null +++ b/vsts/vsts/task_agent/v4_0/task_agent_client.py @@ -0,0 +1,2480 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TaskAgentClient(VssClient): + """TaskAgent + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TaskAgentClient, 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 = 'a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd' + + def add_agent(self, agent, pool_id): + """AddAgent. + :param :class:` ` agent: + :param int pool_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(agent, 'TaskAgent') + response = self._send(http_method='POST', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskAgent', response) + + def delete_agent(self, pool_id, agent_id): + """DeleteAgent. + :param int pool_id: + :param int agent_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + self._send(http_method='DELETE', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='4.0', + route_values=route_values) + + def get_agent(self, pool_id, agent_id, include_capabilities=None, include_assigned_request=None, property_filters=None): + """GetAgent. + :param int pool_id: + :param int agent_id: + :param bool include_capabilities: + :param bool include_assigned_request: + :param [str] property_filters: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + query_parameters = {} + if include_capabilities is not None: + query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') + if include_assigned_request is not None: + query_parameters['includeAssignedRequest'] = self._serialize.query('include_assigned_request', include_assigned_request, 'bool') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + response = self._send(http_method='GET', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskAgent', response) + + def get_agents(self, pool_id, agent_name=None, include_capabilities=None, include_assigned_request=None, property_filters=None, demands=None): + """GetAgents. + :param int pool_id: + :param str agent_name: + :param bool include_capabilities: + :param bool include_assigned_request: + :param [str] property_filters: + :param [str] demands: + :rtype: [TaskAgent] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if agent_name is not None: + query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') + if include_capabilities is not None: + query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') + if include_assigned_request is not None: + query_parameters['includeAssignedRequest'] = self._serialize.query('include_assigned_request', include_assigned_request, 'bool') + if property_filters is not None: + property_filters = ",".join(property_filters) + query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') + if demands is not None: + demands = ",".join(demands) + query_parameters['demands'] = self._serialize.query('demands', demands, 'str') + response = self._send(http_method='GET', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgent]', response) + + def replace_agent(self, agent, pool_id, agent_id): + """ReplaceAgent. + :param :class:` ` agent: + :param int pool_id: + :param int agent_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + content = self._serialize.body(agent, 'TaskAgent') + response = self._send(http_method='PUT', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskAgent', response) + + def update_agent(self, agent, pool_id, agent_id): + """UpdateAgent. + :param :class:` ` agent: + :param int pool_id: + :param int agent_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + content = self._serialize.body(agent, 'TaskAgent') + response = self._send(http_method='PATCH', + location_id='e298ef32-5878-4cab-993c-043836571f42', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskAgent', response) + + def get_azure_subscriptions(self): + """GetAzureSubscriptions. + [Preview API] Returns list of azure subscriptions + :rtype: :class:` ` + """ + response = self._send(http_method='GET', + location_id='bcd6189c-0303-471f-a8e1-acb22b74d700', + version='4.0-preview.1') + return self._deserialize('AzureSubscriptionQueryResult', response) + + def generate_deployment_group_access_token(self, project, deployment_group_id): + """GenerateDeploymentGroupAccessToken. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + :rtype: str + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + response = self._send(http_method='POST', + location_id='3d197ba2-c3e9-4253-882f-0ee2440f8174', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('str', response) + + def add_deployment_group(self, deployment_group, project): + """AddDeploymentGroup. + [Preview API] + :param :class:` ` deployment_group: + :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(deployment_group, 'DeploymentGroup') + response = self._send(http_method='POST', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentGroup', response) + + def delete_deployment_group(self, project, deployment_group_id): + """DeleteDeploymentGroup. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + self._send(http_method='DELETE', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.0-preview.1', + route_values=route_values) + + def get_deployment_group(self, project, deployment_group_id, action_filter=None, expand=None): + """GetDeploymentGroup. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + :param str action_filter: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + query_parameters = {} + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeploymentGroup', response) + + def get_deployment_groups(self, project, name=None, action_filter=None, expand=None, continuation_token=None, top=None, ids=None): + """GetDeploymentGroups. + [Preview API] + :param str project: Project ID or project name + :param str name: + :param str action_filter: + :param str expand: + :param str continuation_token: + :param int top: + :param [int] ids: + :rtype: [DeploymentGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + 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 top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if ids is not None: + ids = ",".join(map(str, ids)) + query_parameters['ids'] = self._serialize.query('ids', ids, 'str') + response = self._send(http_method='GET', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DeploymentGroup]', response) + + def update_deployment_group(self, deployment_group, project, deployment_group_id): + """UpdateDeploymentGroup. + [Preview API] + :param :class:` ` deployment_group: + :param str project: Project ID or project name + :param int deployment_group_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + content = self._serialize.body(deployment_group, 'DeploymentGroup') + response = self._send(http_method='PATCH', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentGroup', response) + + def get_deployment_groups_metrics(self, project, deployment_group_name=None, continuation_token=None, top=None): + """GetDeploymentGroupsMetrics. + [Preview API] + :param str project: Project ID or project name + :param str deployment_group_name: + :param str continuation_token: + :param int top: + :rtype: [DeploymentGroupMetrics] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if deployment_group_name is not None: + query_parameters['deploymentGroupName'] = self._serialize.query('deployment_group_name', deployment_group_name, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='281c6308-427a-49e1-b83a-dac0f4862189', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DeploymentGroupMetrics]', response) + + def get_agent_requests_for_deployment_machine(self, project, deployment_group_id, machine_id, completed_request_count=None): + """GetAgentRequestsForDeploymentMachine. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + :param int machine_id: + :param int completed_request_count: + :rtype: [TaskAgentJobRequest] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + query_parameters = {} + if machine_id is not None: + query_parameters['machineId'] = self._serialize.query('machine_id', machine_id, 'int') + if completed_request_count is not None: + query_parameters['completedRequestCount'] = self._serialize.query('completed_request_count', completed_request_count, 'int') + response = self._send(http_method='GET', + location_id='a3540e5b-f0dc-4668-963b-b752459be545', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentJobRequest]', response) + + def get_agent_requests_for_deployment_machines(self, project, deployment_group_id, machine_ids=None, completed_request_count=None): + """GetAgentRequestsForDeploymentMachines. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + :param [int] machine_ids: + :param int completed_request_count: + :rtype: [TaskAgentJobRequest] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + query_parameters = {} + if machine_ids is not None: + machine_ids = ",".join(map(str, machine_ids)) + query_parameters['machineIds'] = self._serialize.query('machine_ids', machine_ids, 'str') + if completed_request_count is not None: + query_parameters['completedRequestCount'] = self._serialize.query('completed_request_count', completed_request_count, 'int') + response = self._send(http_method='GET', + location_id='a3540e5b-f0dc-4668-963b-b752459be545', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentJobRequest]', response) + + def refresh_deployment_machines(self, project, deployment_group_id): + """RefreshDeploymentMachines. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + self._send(http_method='POST', + location_id='91006ac4-0f68-4d82-a2bc-540676bd73ce', + version='4.0-preview.1', + route_values=route_values) + + def query_endpoint(self, endpoint): + """QueryEndpoint. + Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. + :param :class:` ` endpoint: Describes the URL to fetch. + :rtype: [str] + """ + content = self._serialize.body(endpoint, 'TaskDefinitionEndpoint') + response = self._send(http_method='POST', + location_id='f223b809-8c33-4b7d-b53f-07232569b5d6', + version='4.0', + content=content, + returns_collection=True) + return self._deserialize('[str]', response) + + def get_service_endpoint_execution_records(self, project, endpoint_id, top=None): + """GetServiceEndpointExecutionRecords. + [Preview API] + :param str project: Project ID or project name + :param str endpoint_id: + :param int top: + :rtype: [ServiceEndpointExecutionRecord] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if endpoint_id is not None: + route_values['endpointId'] = self._serialize.url('endpoint_id', endpoint_id, 'str') + query_parameters = {} + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='3ad71e20-7586-45f9-a6c8-0342e00835ac', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ServiceEndpointExecutionRecord]', response) + + def add_service_endpoint_execution_records(self, input, project): + """AddServiceEndpointExecutionRecords. + [Preview API] + :param :class:` ` input: + :param str project: Project ID or project name + :rtype: [ServiceEndpointExecutionRecord] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(input, 'ServiceEndpointExecutionRecordsInput') + response = self._send(http_method='POST', + location_id='11a45c69-2cce-4ade-a361-c9f5a37239ee', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[ServiceEndpointExecutionRecord]', response) + + def get_task_hub_license_details(self, hub_name, include_enterprise_users_count=None, include_hosted_agent_minutes_count=None): + """GetTaskHubLicenseDetails. + [Preview API] + :param str hub_name: + :param bool include_enterprise_users_count: + :param bool include_hosted_agent_minutes_count: + :rtype: :class:` ` + """ + route_values = {} + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + query_parameters = {} + if include_enterprise_users_count is not None: + query_parameters['includeEnterpriseUsersCount'] = self._serialize.query('include_enterprise_users_count', include_enterprise_users_count, 'bool') + if include_hosted_agent_minutes_count is not None: + query_parameters['includeHostedAgentMinutesCount'] = self._serialize.query('include_hosted_agent_minutes_count', include_hosted_agent_minutes_count, 'bool') + response = self._send(http_method='GET', + location_id='f9f0f436-b8a1-4475-9041-1ccdbf8f0128', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskHubLicenseDetails', response) + + def update_task_hub_license_details(self, task_hub_license_details, hub_name): + """UpdateTaskHubLicenseDetails. + [Preview API] + :param :class:` ` task_hub_license_details: + :param str hub_name: + :rtype: :class:` ` + """ + route_values = {} + if hub_name is not None: + route_values['hubName'] = self._serialize.url('hub_name', hub_name, 'str') + content = self._serialize.body(task_hub_license_details, 'TaskHubLicenseDetails') + response = self._send(http_method='PUT', + location_id='f9f0f436-b8a1-4475-9041-1ccdbf8f0128', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskHubLicenseDetails', response) + + def validate_inputs(self, input_validation_request): + """ValidateInputs. + [Preview API] + :param :class:` ` input_validation_request: + :rtype: :class:` ` + """ + content = self._serialize.body(input_validation_request, 'InputValidationRequest') + response = self._send(http_method='POST', + location_id='58475b1e-adaf-4155-9bc1-e04bf1fff4c2', + version='4.0-preview.1', + content=content) + return self._deserialize('InputValidationRequest', response) + + def delete_agent_request(self, pool_id, request_id, lock_token, result=None): + """DeleteAgentRequest. + :param int pool_id: + :param long request_id: + :param str lock_token: + :param str result: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if request_id is not None: + route_values['requestId'] = self._serialize.url('request_id', request_id, 'long') + query_parameters = {} + if lock_token is not None: + query_parameters['lockToken'] = self._serialize.query('lock_token', lock_token, 'str') + if result is not None: + query_parameters['result'] = self._serialize.query('result', result, 'str') + self._send(http_method='DELETE', + location_id='fc825784-c92a-4299-9221-998a02d1b54f', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + + def get_agent_request(self, pool_id, request_id): + """GetAgentRequest. + :param int pool_id: + :param long request_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if request_id is not None: + route_values['requestId'] = self._serialize.url('request_id', request_id, 'long') + response = self._send(http_method='GET', + location_id='fc825784-c92a-4299-9221-998a02d1b54f', + version='4.0', + route_values=route_values) + return self._deserialize('TaskAgentJobRequest', response) + + def get_agent_requests_for_agent(self, pool_id, agent_id, completed_request_count=None): + """GetAgentRequestsForAgent. + :param int pool_id: + :param int agent_id: + :param int completed_request_count: + :rtype: [TaskAgentJobRequest] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if agent_id is not None: + query_parameters['agentId'] = self._serialize.query('agent_id', agent_id, 'int') + if completed_request_count is not None: + query_parameters['completedRequestCount'] = self._serialize.query('completed_request_count', completed_request_count, 'int') + response = self._send(http_method='GET', + location_id='fc825784-c92a-4299-9221-998a02d1b54f', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentJobRequest]', response) + + def get_agent_requests_for_agents(self, pool_id, agent_ids=None, completed_request_count=None): + """GetAgentRequestsForAgents. + :param int pool_id: + :param [int] agent_ids: + :param int completed_request_count: + :rtype: [TaskAgentJobRequest] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if agent_ids is not None: + agent_ids = ",".join(map(str, agent_ids)) + query_parameters['agentIds'] = self._serialize.query('agent_ids', agent_ids, 'str') + if completed_request_count is not None: + query_parameters['completedRequestCount'] = self._serialize.query('completed_request_count', completed_request_count, 'int') + response = self._send(http_method='GET', + location_id='fc825784-c92a-4299-9221-998a02d1b54f', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentJobRequest]', response) + + def get_agent_requests_for_plan(self, pool_id, plan_id, job_id=None): + """GetAgentRequestsForPlan. + :param int pool_id: + :param str plan_id: + :param str job_id: + :rtype: [TaskAgentJobRequest] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if plan_id is not None: + query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'str') + if job_id is not None: + query_parameters['jobId'] = self._serialize.query('job_id', job_id, 'str') + response = self._send(http_method='GET', + location_id='fc825784-c92a-4299-9221-998a02d1b54f', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentJobRequest]', response) + + def queue_agent_request(self, request, pool_id): + """QueueAgentRequest. + :param :class:` ` request: + :param int pool_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(request, 'TaskAgentJobRequest') + response = self._send(http_method='POST', + location_id='fc825784-c92a-4299-9221-998a02d1b54f', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentJobRequest', response) + + def update_agent_request(self, request, pool_id, request_id, lock_token): + """UpdateAgentRequest. + :param :class:` ` request: + :param int pool_id: + :param long request_id: + :param str lock_token: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if request_id is not None: + route_values['requestId'] = self._serialize.url('request_id', request_id, 'long') + query_parameters = {} + if lock_token is not None: + query_parameters['lockToken'] = self._serialize.query('lock_token', lock_token, 'str') + content = self._serialize.body(request, 'TaskAgentJobRequest') + response = self._send(http_method='PATCH', + location_id='fc825784-c92a-4299-9221-998a02d1b54f', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TaskAgentJobRequest', response) + + def generate_deployment_machine_group_access_token(self, project, machine_group_id): + """GenerateDeploymentMachineGroupAccessToken. + [Preview API] + :param str project: Project ID or project name + :param int machine_group_id: + :rtype: str + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if machine_group_id is not None: + route_values['machineGroupId'] = self._serialize.url('machine_group_id', machine_group_id, 'int') + response = self._send(http_method='POST', + location_id='f8c7c0de-ac0d-469b-9cb1-c21f72d67693', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('str', response) + + def add_deployment_machine_group(self, machine_group, project): + """AddDeploymentMachineGroup. + [Preview API] + :param :class:` ` machine_group: + :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(machine_group, 'DeploymentMachineGroup') + response = self._send(http_method='POST', + location_id='d4adf50f-80c6-4ac8-9ca1-6e4e544286e9', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentMachineGroup', response) + + def delete_deployment_machine_group(self, project, machine_group_id): + """DeleteDeploymentMachineGroup. + [Preview API] + :param str project: Project ID or project name + :param int machine_group_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if machine_group_id is not None: + route_values['machineGroupId'] = self._serialize.url('machine_group_id', machine_group_id, 'int') + self._send(http_method='DELETE', + location_id='d4adf50f-80c6-4ac8-9ca1-6e4e544286e9', + version='4.0-preview.1', + route_values=route_values) + + def get_deployment_machine_group(self, project, machine_group_id, action_filter=None): + """GetDeploymentMachineGroup. + [Preview API] + :param str project: Project ID or project name + :param int machine_group_id: + :param str action_filter: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if machine_group_id is not None: + route_values['machineGroupId'] = self._serialize.url('machine_group_id', machine_group_id, 'int') + query_parameters = {} + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='d4adf50f-80c6-4ac8-9ca1-6e4e544286e9', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeploymentMachineGroup', response) + + def get_deployment_machine_groups(self, project, machine_group_name=None, action_filter=None): + """GetDeploymentMachineGroups. + [Preview API] + :param str project: Project ID or project name + :param str machine_group_name: + :param str action_filter: + :rtype: [DeploymentMachineGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if machine_group_name is not None: + query_parameters['machineGroupName'] = self._serialize.query('machine_group_name', machine_group_name, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='d4adf50f-80c6-4ac8-9ca1-6e4e544286e9', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DeploymentMachineGroup]', response) + + def update_deployment_machine_group(self, machine_group, project, machine_group_id): + """UpdateDeploymentMachineGroup. + [Preview API] + :param :class:` ` machine_group: + :param str project: Project ID or project name + :param int machine_group_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if machine_group_id is not None: + route_values['machineGroupId'] = self._serialize.url('machine_group_id', machine_group_id, 'int') + content = self._serialize.body(machine_group, 'DeploymentMachineGroup') + response = self._send(http_method='PATCH', + location_id='d4adf50f-80c6-4ac8-9ca1-6e4e544286e9', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentMachineGroup', response) + + def get_deployment_machine_group_machines(self, project, machine_group_id, tag_filters=None): + """GetDeploymentMachineGroupMachines. + [Preview API] + :param str project: Project ID or project name + :param int machine_group_id: + :param [str] tag_filters: + :rtype: [DeploymentMachine] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if machine_group_id is not None: + route_values['machineGroupId'] = self._serialize.url('machine_group_id', machine_group_id, 'int') + query_parameters = {} + if tag_filters is not None: + tag_filters = ",".join(tag_filters) + query_parameters['tagFilters'] = self._serialize.query('tag_filters', tag_filters, 'str') + response = self._send(http_method='GET', + location_id='966c3874-c347-4b18-a90c-d509116717fd', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DeploymentMachine]', response) + + def update_deployment_machine_group_machines(self, deployment_machines, project, machine_group_id): + """UpdateDeploymentMachineGroupMachines. + [Preview API] + :param [DeploymentMachine] deployment_machines: + :param str project: Project ID or project name + :param int machine_group_id: + :rtype: [DeploymentMachine] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if machine_group_id is not None: + route_values['machineGroupId'] = self._serialize.url('machine_group_id', machine_group_id, 'int') + content = self._serialize.body(deployment_machines, '[DeploymentMachine]') + response = self._send(http_method='PATCH', + location_id='966c3874-c347-4b18-a90c-d509116717fd', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[DeploymentMachine]', response) + + def add_deployment_machine(self, machine, project, deployment_group_id): + """AddDeploymentMachine. + [Preview API] + :param :class:` ` machine: + :param str project: Project ID or project name + :param int deployment_group_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + content = self._serialize.body(machine, 'DeploymentMachine') + response = self._send(http_method='POST', + location_id='6f6d406f-cfe6-409c-9327-7009928077e7', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentMachine', response) + + def delete_deployment_machine(self, project, deployment_group_id, machine_id): + """DeleteDeploymentMachine. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + :param int machine_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + if machine_id is not None: + route_values['machineId'] = self._serialize.url('machine_id', machine_id, 'int') + self._send(http_method='DELETE', + location_id='6f6d406f-cfe6-409c-9327-7009928077e7', + version='4.0-preview.1', + route_values=route_values) + + def get_deployment_machine(self, project, deployment_group_id, machine_id, expand=None): + """GetDeploymentMachine. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + :param int machine_id: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + if machine_id is not None: + route_values['machineId'] = self._serialize.url('machine_id', machine_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='6f6d406f-cfe6-409c-9327-7009928077e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeploymentMachine', response) + + def get_deployment_machines(self, project, deployment_group_id, tags=None, name=None, expand=None): + """GetDeploymentMachines. + [Preview API] + :param str project: Project ID or project name + :param int deployment_group_id: + :param [str] tags: + :param str name: + :param str expand: + :rtype: [DeploymentMachine] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + query_parameters = {} + if tags is not None: + tags = ",".join(tags) + query_parameters['tags'] = self._serialize.query('tags', tags, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='6f6d406f-cfe6-409c-9327-7009928077e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DeploymentMachine]', response) + + def replace_deployment_machine(self, machine, project, deployment_group_id, machine_id): + """ReplaceDeploymentMachine. + [Preview API] + :param :class:` ` machine: + :param str project: Project ID or project name + :param int deployment_group_id: + :param int machine_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + if machine_id is not None: + route_values['machineId'] = self._serialize.url('machine_id', machine_id, 'int') + content = self._serialize.body(machine, 'DeploymentMachine') + response = self._send(http_method='PUT', + location_id='6f6d406f-cfe6-409c-9327-7009928077e7', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentMachine', response) + + def update_deployment_machine(self, machine, project, deployment_group_id, machine_id): + """UpdateDeploymentMachine. + [Preview API] + :param :class:` ` machine: + :param str project: Project ID or project name + :param int deployment_group_id: + :param int machine_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + if machine_id is not None: + route_values['machineId'] = self._serialize.url('machine_id', machine_id, 'int') + content = self._serialize.body(machine, 'DeploymentMachine') + response = self._send(http_method='PATCH', + location_id='6f6d406f-cfe6-409c-9327-7009928077e7', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentMachine', response) + + def update_deployment_machines(self, machines, project, deployment_group_id): + """UpdateDeploymentMachines. + [Preview API] + :param [DeploymentMachine] machines: + :param str project: Project ID or project name + :param int deployment_group_id: + :rtype: [DeploymentMachine] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + content = self._serialize.body(machines, '[DeploymentMachine]') + response = self._send(http_method='PATCH', + location_id='6f6d406f-cfe6-409c-9327-7009928077e7', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[DeploymentMachine]', response) + + def create_agent_pool_maintenance_definition(self, definition, pool_id): + """CreateAgentPoolMaintenanceDefinition. + [Preview API] + :param :class:` ` definition: + :param int pool_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(definition, 'TaskAgentPoolMaintenanceDefinition') + response = self._send(http_method='POST', + location_id='80572e16-58f0-4419-ac07-d19fde32195c', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentPoolMaintenanceDefinition', response) + + def delete_agent_pool_maintenance_definition(self, pool_id, definition_id): + """DeleteAgentPoolMaintenanceDefinition. + [Preview API] + :param int pool_id: + :param int definition_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + self._send(http_method='DELETE', + location_id='80572e16-58f0-4419-ac07-d19fde32195c', + version='4.0-preview.1', + route_values=route_values) + + def get_agent_pool_maintenance_definition(self, pool_id, definition_id): + """GetAgentPoolMaintenanceDefinition. + [Preview API] + :param int pool_id: + :param int definition_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + response = self._send(http_method='GET', + location_id='80572e16-58f0-4419-ac07-d19fde32195c', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('TaskAgentPoolMaintenanceDefinition', response) + + def get_agent_pool_maintenance_definitions(self, pool_id): + """GetAgentPoolMaintenanceDefinitions. + [Preview API] + :param int pool_id: + :rtype: [TaskAgentPoolMaintenanceDefinition] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + response = self._send(http_method='GET', + location_id='80572e16-58f0-4419-ac07-d19fde32195c', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskAgentPoolMaintenanceDefinition]', response) + + def update_agent_pool_maintenance_definition(self, definition, pool_id, definition_id): + """UpdateAgentPoolMaintenanceDefinition. + [Preview API] + :param :class:` ` definition: + :param int pool_id: + :param int definition_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + content = self._serialize.body(definition, 'TaskAgentPoolMaintenanceDefinition') + response = self._send(http_method='PUT', + location_id='80572e16-58f0-4419-ac07-d19fde32195c', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentPoolMaintenanceDefinition', response) + + def delete_agent_pool_maintenance_job(self, pool_id, job_id): + """DeleteAgentPoolMaintenanceJob. + [Preview API] + :param int pool_id: + :param int job_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if job_id is not None: + route_values['jobId'] = self._serialize.url('job_id', job_id, 'int') + self._send(http_method='DELETE', + location_id='15e7ab6e-abce-4601-a6d8-e111fe148f46', + version='4.0-preview.1', + route_values=route_values) + + def get_agent_pool_maintenance_job(self, pool_id, job_id): + """GetAgentPoolMaintenanceJob. + [Preview API] + :param int pool_id: + :param int job_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if job_id is not None: + route_values['jobId'] = self._serialize.url('job_id', job_id, 'int') + response = self._send(http_method='GET', + location_id='15e7ab6e-abce-4601-a6d8-e111fe148f46', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('TaskAgentPoolMaintenanceJob', response) + + def get_agent_pool_maintenance_job_logs(self, pool_id, job_id): + """GetAgentPoolMaintenanceJobLogs. + [Preview API] + :param int pool_id: + :param int job_id: + :rtype: object + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if job_id is not None: + route_values['jobId'] = self._serialize.url('job_id', job_id, 'int') + response = self._send(http_method='GET', + location_id='15e7ab6e-abce-4601-a6d8-e111fe148f46', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_agent_pool_maintenance_jobs(self, pool_id, definition_id=None): + """GetAgentPoolMaintenanceJobs. + [Preview API] + :param int pool_id: + :param int definition_id: + :rtype: [TaskAgentPoolMaintenanceJob] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if definition_id is not None: + query_parameters['definitionId'] = self._serialize.query('definition_id', definition_id, 'int') + response = self._send(http_method='GET', + location_id='15e7ab6e-abce-4601-a6d8-e111fe148f46', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentPoolMaintenanceJob]', response) + + def queue_agent_pool_maintenance_job(self, job, pool_id): + """QueueAgentPoolMaintenanceJob. + [Preview API] + :param :class:` ` job: + :param int pool_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(job, 'TaskAgentPoolMaintenanceJob') + response = self._send(http_method='POST', + location_id='15e7ab6e-abce-4601-a6d8-e111fe148f46', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentPoolMaintenanceJob', response) + + def update_agent_pool_maintenance_job(self, job, pool_id, job_id): + """UpdateAgentPoolMaintenanceJob. + [Preview API] + :param :class:` ` job: + :param int pool_id: + :param int job_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if job_id is not None: + route_values['jobId'] = self._serialize.url('job_id', job_id, 'int') + content = self._serialize.body(job, 'TaskAgentPoolMaintenanceJob') + response = self._send(http_method='PATCH', + location_id='15e7ab6e-abce-4601-a6d8-e111fe148f46', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentPoolMaintenanceJob', response) + + def delete_message(self, pool_id, message_id, session_id): + """DeleteMessage. + :param int pool_id: + :param long message_id: + :param str session_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if message_id is not None: + route_values['messageId'] = self._serialize.url('message_id', message_id, 'long') + query_parameters = {} + if session_id is not None: + query_parameters['sessionId'] = self._serialize.query('session_id', session_id, 'str') + self._send(http_method='DELETE', + location_id='c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + + def get_message(self, pool_id, session_id, last_message_id=None): + """GetMessage. + :param int pool_id: + :param str session_id: + :param long last_message_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if session_id is not None: + query_parameters['sessionId'] = self._serialize.query('session_id', session_id, 'str') + if last_message_id is not None: + query_parameters['lastMessageId'] = self._serialize.query('last_message_id', last_message_id, 'long') + response = self._send(http_method='GET', + location_id='c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskAgentMessage', response) + + def refresh_agent(self, pool_id, agent_id): + """RefreshAgent. + :param int pool_id: + :param int agent_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if agent_id is not None: + query_parameters['agentId'] = self._serialize.query('agent_id', agent_id, 'int') + self._send(http_method='POST', + location_id='c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + + def refresh_agents(self, pool_id): + """RefreshAgents. + :param int pool_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + self._send(http_method='POST', + location_id='c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7', + version='4.0', + route_values=route_values) + + def send_message(self, message, pool_id, request_id): + """SendMessage. + :param :class:` ` message: + :param int pool_id: + :param long request_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if request_id is not None: + query_parameters['requestId'] = self._serialize.query('request_id', request_id, 'long') + content = self._serialize.body(message, 'TaskAgentMessage') + self._send(http_method='POST', + location_id='c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + content=content) + + def get_package(self, package_type, platform, version): + """GetPackage. + :param str package_type: + :param str platform: + :param str version: + :rtype: :class:` ` + """ + route_values = {} + if package_type is not None: + route_values['packageType'] = self._serialize.url('package_type', package_type, 'str') + if platform is not None: + route_values['platform'] = self._serialize.url('platform', platform, 'str') + if version is not None: + route_values['version'] = self._serialize.url('version', version, 'str') + response = self._send(http_method='GET', + location_id='8ffcd551-079c-493a-9c02-54346299d144', + version='4.0', + route_values=route_values) + return self._deserialize('PackageMetadata', response) + + def get_packages(self, package_type=None, platform=None, top=None): + """GetPackages. + :param str package_type: + :param str platform: + :param int top: + :rtype: [PackageMetadata] + """ + route_values = {} + if package_type is not None: + route_values['packageType'] = self._serialize.url('package_type', package_type, 'str') + if platform is not None: + route_values['platform'] = self._serialize.url('platform', platform, 'str') + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='8ffcd551-079c-493a-9c02-54346299d144', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[PackageMetadata]', response) + + def get_agent_pool_roles(self, pool_id=None): + """GetAgentPoolRoles. + [Preview API] + :param int pool_id: + :rtype: [IdentityRef] + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + response = self._send(http_method='GET', + location_id='381dd2bb-35cf-4103-ae8c-3c815b25763c', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[IdentityRef]', response) + + def add_agent_pool(self, pool): + """AddAgentPool. + :param :class:` ` pool: + :rtype: :class:` ` + """ + content = self._serialize.body(pool, 'TaskAgentPool') + response = self._send(http_method='POST', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='4.0', + content=content) + return self._deserialize('TaskAgentPool', response) + + def delete_agent_pool(self, pool_id): + """DeleteAgentPool. + :param int pool_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + self._send(http_method='DELETE', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='4.0', + route_values=route_values) + + def get_agent_pool(self, pool_id, properties=None, action_filter=None): + """GetAgentPool. + :param int pool_id: + :param [str] properties: + :param str action_filter: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + query_parameters = {} + if properties is not None: + properties = ",".join(properties) + query_parameters['properties'] = self._serialize.query('properties', properties, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskAgentPool', response) + + def get_agent_pools(self, pool_name=None, properties=None, pool_type=None, action_filter=None): + """GetAgentPools. + :param str pool_name: + :param [str] properties: + :param str pool_type: + :param str action_filter: + :rtype: [TaskAgentPool] + """ + query_parameters = {} + if pool_name is not None: + query_parameters['poolName'] = self._serialize.query('pool_name', pool_name, 'str') + if properties is not None: + properties = ",".join(properties) + query_parameters['properties'] = self._serialize.query('properties', properties, 'str') + if pool_type is not None: + query_parameters['poolType'] = self._serialize.query('pool_type', pool_type, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentPool]', response) + + def update_agent_pool(self, pool, pool_id): + """UpdateAgentPool. + :param :class:` ` pool: + :param int pool_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(pool, 'TaskAgentPool') + response = self._send(http_method='PATCH', + location_id='a8c47e17-4d56-4a56-92bb-de7ea7dc65be', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentPool', response) + + def get_agent_queue_roles(self, queue_id=None): + """GetAgentQueueRoles. + [Preview API] + :param int queue_id: + :rtype: [IdentityRef] + """ + route_values = {} + if queue_id is not None: + route_values['queueId'] = self._serialize.url('queue_id', queue_id, 'int') + response = self._send(http_method='GET', + location_id='b0c6d64d-c9fa-4946-b8de-77de623ee585', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[IdentityRef]', response) + + def add_agent_queue(self, queue, project=None): + """AddAgentQueue. + [Preview API] + :param :class:` ` queue: + :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(queue, 'TaskAgentQueue') + response = self._send(http_method='POST', + location_id='900fa995-c559-4923-aae7-f8424fe4fbea', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentQueue', response) + + def create_team_project(self, project=None): + """CreateTeamProject. + [Preview API] + :param str project: Project ID or project name + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + self._send(http_method='PUT', + location_id='900fa995-c559-4923-aae7-f8424fe4fbea', + version='4.0-preview.1', + route_values=route_values) + + def delete_agent_queue(self, queue_id, project=None): + """DeleteAgentQueue. + [Preview API] + :param int queue_id: + :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 queue_id is not None: + route_values['queueId'] = self._serialize.url('queue_id', queue_id, 'int') + self._send(http_method='DELETE', + location_id='900fa995-c559-4923-aae7-f8424fe4fbea', + version='4.0-preview.1', + route_values=route_values) + + def get_agent_queue(self, queue_id, project=None, action_filter=None): + """GetAgentQueue. + [Preview API] + :param int queue_id: + :param str project: Project ID or project name + :param str action_filter: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if queue_id is not None: + route_values['queueId'] = self._serialize.url('queue_id', queue_id, 'int') + query_parameters = {} + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='900fa995-c559-4923-aae7-f8424fe4fbea', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskAgentQueue', response) + + def get_agent_queues(self, project=None, queue_name=None, action_filter=None): + """GetAgentQueues. + [Preview API] + :param str project: Project ID or project name + :param str queue_name: + :param str action_filter: + :rtype: [TaskAgentQueue] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if queue_name is not None: + query_parameters['queueName'] = self._serialize.query('queue_name', queue_name, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='900fa995-c559-4923-aae7-f8424fe4fbea', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskAgentQueue]', response) + + def get_task_group_history(self, project, task_group_id): + """GetTaskGroupHistory. + [Preview API] + :param str project: Project ID or project name + :param str task_group_id: + :rtype: [TaskGroupRevision] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + response = self._send(http_method='GET', + location_id='100cc92a-b255-47fa-9ab3-e44a2985a3ac', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TaskGroupRevision]', response) + + def delete_secure_file(self, project, secure_file_id): + """DeleteSecureFile. + [Preview API] Delete a secure file + :param str project: Project ID or project name + :param str secure_file_id: The unique secure file Id + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if secure_file_id is not None: + route_values['secureFileId'] = self._serialize.url('secure_file_id', secure_file_id, 'str') + self._send(http_method='DELETE', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values) + + def download_secure_file(self, project, secure_file_id, ticket, download=None): + """DownloadSecureFile. + [Preview API] Download a secure file by Id + :param str project: Project ID or project name + :param str secure_file_id: The unique secure file Id + :param str ticket: A valid download ticket + :param bool download: If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if secure_file_id is not None: + route_values['secureFileId'] = self._serialize.url('secure_file_id', secure_file_id, 'str') + query_parameters = {} + if ticket is not None: + query_parameters['ticket'] = self._serialize.query('ticket', ticket, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + response = self._send(http_method='GET', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_secure_file(self, project, secure_file_id, include_download_ticket=None): + """GetSecureFile. + [Preview API] Get a secure file + :param str project: Project ID or project name + :param str secure_file_id: The unique secure file Id + :param bool include_download_ticket: If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if secure_file_id is not None: + route_values['secureFileId'] = self._serialize.url('secure_file_id', secure_file_id, 'str') + query_parameters = {} + if include_download_ticket is not None: + query_parameters['includeDownloadTicket'] = self._serialize.query('include_download_ticket', include_download_ticket, 'bool') + response = self._send(http_method='GET', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('SecureFile', response) + + def get_secure_files(self, project, name_pattern=None, include_download_tickets=None, action_filter=None): + """GetSecureFiles. + [Preview API] Get secure files + :param str project: Project ID or project name + :param str name_pattern: Name of the secure file to match. Can include wildcards to match multiple files. + :param bool include_download_tickets: If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + :param str action_filter: Filter by secure file permissions for View, Manage or Use action. Defaults to View. + :rtype: [SecureFile] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if name_pattern is not None: + query_parameters['namePattern'] = self._serialize.query('name_pattern', name_pattern, 'str') + if include_download_tickets is not None: + query_parameters['includeDownloadTickets'] = self._serialize.query('include_download_tickets', include_download_tickets, 'bool') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[SecureFile]', response) + + def get_secure_files_by_ids(self, project, secure_file_ids, include_download_tickets=None): + """GetSecureFilesByIds. + [Preview API] Get secure files + :param str project: Project ID or project name + :param [str] secure_file_ids: A list of secure file Ids + :param bool include_download_tickets: If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + :rtype: [SecureFile] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if secure_file_ids is not None: + secure_file_ids = ",".join(secure_file_ids) + query_parameters['secureFileIds'] = self._serialize.query('secure_file_ids', secure_file_ids, 'str') + if include_download_tickets is not None: + query_parameters['includeDownloadTickets'] = self._serialize.query('include_download_tickets', include_download_tickets, 'bool') + response = self._send(http_method='GET', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[SecureFile]', response) + + def query_secure_files_by_properties(self, condition, project, name_pattern=None): + """QuerySecureFilesByProperties. + [Preview API] Query secure files using a name pattern and a condition on file properties. + :param str condition: The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. ``` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) ``` + :param str project: Project ID or project name + :param str name_pattern: Name of the secure file to match. Can include wildcards to match multiple files. + :rtype: [SecureFile] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if name_pattern is not None: + query_parameters['namePattern'] = self._serialize.query('name_pattern', name_pattern, 'str') + content = self._serialize.body(condition, 'str') + response = self._send(http_method='POST', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[SecureFile]', response) + + def update_secure_file(self, secure_file, project, secure_file_id): + """UpdateSecureFile. + [Preview API] Update the name or properties of an existing secure file + :param :class:` ` secure_file: The secure file with updated name and/or properties + :param str project: Project ID or project name + :param str secure_file_id: The unique secure file Id + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if secure_file_id is not None: + route_values['secureFileId'] = self._serialize.url('secure_file_id', secure_file_id, 'str') + content = self._serialize.body(secure_file, 'SecureFile') + response = self._send(http_method='PATCH', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('SecureFile', response) + + def update_secure_files(self, secure_files, project): + """UpdateSecureFiles. + [Preview API] Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge. + :param [SecureFile] secure_files: A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored. + :param str project: Project ID or project name + :rtype: [SecureFile] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(secure_files, '[SecureFile]') + response = self._send(http_method='PATCH', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[SecureFile]', response) + + def upload_secure_file(self, upload_stream, project, name): + """UploadSecureFile. + [Preview API] Upload a secure file, include the file stream in the request body + :param object upload_stream: Stream to upload + :param str project: Project ID or project name + :param str name: Name of the file to upload + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='adcfd8bc-b184-43ba-bd84-7c8c6a2ff421', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + media_type='application/octet-stream') + return self._deserialize('SecureFile', response) + + def execute_service_endpoint_request(self, service_endpoint_request, project, endpoint_id): + """ExecuteServiceEndpointRequest. + [Preview API] + :param :class:` ` service_endpoint_request: + :param str project: Project ID or project name + :param str endpoint_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if endpoint_id is not None: + query_parameters['endpointId'] = self._serialize.query('endpoint_id', endpoint_id, 'str') + content = self._serialize.body(service_endpoint_request, 'ServiceEndpointRequest') + response = self._send(http_method='POST', + location_id='f956a7de-d766-43af-81b1-e9e349245634', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('ServiceEndpointRequestResult', response) + + def create_service_endpoint(self, endpoint, project): + """CreateServiceEndpoint. + [Preview API] + :param :class:` ` endpoint: + :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(endpoint, 'ServiceEndpoint') + response = self._send(http_method='POST', + location_id='dca61d2f-3444-410a-b5ec-db2fc4efb4c5', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('ServiceEndpoint', response) + + def delete_service_endpoint(self, project, endpoint_id): + """DeleteServiceEndpoint. + [Preview API] + :param str project: Project ID or project name + :param str endpoint_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if endpoint_id is not None: + route_values['endpointId'] = self._serialize.url('endpoint_id', endpoint_id, 'str') + self._send(http_method='DELETE', + location_id='dca61d2f-3444-410a-b5ec-db2fc4efb4c5', + version='4.0-preview.2', + route_values=route_values) + + def get_service_endpoint_details(self, project, endpoint_id): + """GetServiceEndpointDetails. + [Preview API] + :param str project: Project ID or project name + :param str endpoint_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if endpoint_id is not None: + route_values['endpointId'] = self._serialize.url('endpoint_id', endpoint_id, 'str') + response = self._send(http_method='GET', + location_id='dca61d2f-3444-410a-b5ec-db2fc4efb4c5', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('ServiceEndpoint', response) + + def get_service_endpoints(self, project, type=None, auth_schemes=None, endpoint_ids=None, include_failed=None): + """GetServiceEndpoints. + [Preview API] + :param str project: Project ID or project name + :param str type: + :param [str] auth_schemes: + :param [str] endpoint_ids: + :param bool include_failed: + :rtype: [ServiceEndpoint] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if auth_schemes is not None: + auth_schemes = ",".join(auth_schemes) + query_parameters['authSchemes'] = self._serialize.query('auth_schemes', auth_schemes, 'str') + if endpoint_ids is not None: + endpoint_ids = ",".join(endpoint_ids) + query_parameters['endpointIds'] = self._serialize.query('endpoint_ids', endpoint_ids, 'str') + if include_failed is not None: + query_parameters['includeFailed'] = self._serialize.query('include_failed', include_failed, 'bool') + response = self._send(http_method='GET', + location_id='dca61d2f-3444-410a-b5ec-db2fc4efb4c5', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ServiceEndpoint]', response) + + def update_service_endpoint(self, endpoint, project, endpoint_id, operation=None): + """UpdateServiceEndpoint. + [Preview API] + :param :class:` ` endpoint: + :param str project: Project ID or project name + :param str endpoint_id: + :param str operation: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if endpoint_id is not None: + route_values['endpointId'] = self._serialize.url('endpoint_id', endpoint_id, 'str') + query_parameters = {} + if operation is not None: + query_parameters['operation'] = self._serialize.query('operation', operation, 'str') + content = self._serialize.body(endpoint, 'ServiceEndpoint') + response = self._send(http_method='PUT', + location_id='dca61d2f-3444-410a-b5ec-db2fc4efb4c5', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('ServiceEndpoint', response) + + def update_service_endpoints(self, endpoints, project): + """UpdateServiceEndpoints. + [Preview API] + :param [ServiceEndpoint] endpoints: + :param str project: Project ID or project name + :rtype: [ServiceEndpoint] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(endpoints, '[ServiceEndpoint]') + response = self._send(http_method='PUT', + location_id='dca61d2f-3444-410a-b5ec-db2fc4efb4c5', + version='4.0-preview.2', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[ServiceEndpoint]', response) + + def get_service_endpoint_types(self, type=None, scheme=None): + """GetServiceEndpointTypes. + [Preview API] + :param str type: + :param str scheme: + :rtype: [ServiceEndpointType] + """ + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if scheme is not None: + query_parameters['scheme'] = self._serialize.query('scheme', scheme, 'str') + response = self._send(http_method='GET', + location_id='7c74af83-8605-45c1-a30b-7a05d5d7f8c1', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ServiceEndpointType]', response) + + def create_agent_session(self, session, pool_id): + """CreateAgentSession. + :param :class:` ` session: + :param int pool_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + content = self._serialize.body(session, 'TaskAgentSession') + response = self._send(http_method='POST', + location_id='134e239e-2df3-4794-a6f6-24f1f19ec8dc', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskAgentSession', response) + + def delete_agent_session(self, pool_id, session_id): + """DeleteAgentSession. + :param int pool_id: + :param str session_id: + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if session_id is not None: + route_values['sessionId'] = self._serialize.url('session_id', session_id, 'str') + self._send(http_method='DELETE', + location_id='134e239e-2df3-4794-a6f6-24f1f19ec8dc', + version='4.0', + route_values=route_values) + + def add_task_group(self, task_group, project): + """AddTaskGroup. + [Preview API] Create a task group. + :param :class:` ` task_group: Task group object to create. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(task_group, 'TaskGroup') + response = self._send(http_method='POST', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskGroup', response) + + def delete_task_group(self, project, task_group_id, comment=None): + """DeleteTaskGroup. + [Preview API] Delete a task group. + :param str project: Project ID or project name + :param str task_group_id: Id of the task group to be deleted. + :param str comment: Comments to delete. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + query_parameters = {} + if comment is not None: + query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + self._send(http_method='DELETE', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_task_group(self, project, task_group_id, version_spec, expanded=None): + """GetTaskGroup. + [Preview API] + :param str project: Project ID or project name + :param str task_group_id: + :param str version_spec: + :param bool expanded: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + query_parameters = {} + if version_spec is not None: + query_parameters['versionSpec'] = self._serialize.query('version_spec', version_spec, 'str') + if expanded is not None: + query_parameters['expanded'] = self._serialize.query('expanded', expanded, 'bool') + response = self._send(http_method='GET', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskGroup', response) + + def get_task_group_revision(self, project, task_group_id, revision): + """GetTaskGroupRevision. + [Preview API] + :param str project: Project ID or project name + :param str task_group_id: + :param int revision: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + query_parameters = {} + if revision is not None: + query_parameters['revision'] = self._serialize.query('revision', revision, 'int') + response = self._send(http_method='GET', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_task_groups(self, project, task_group_id=None, expanded=None, task_id_filter=None, deleted=None): + """GetTaskGroups. + [Preview API] Get a list of task groups. + :param str project: Project ID or project name + :param str task_group_id: Id of the task group. + :param bool expanded: 'true' to recursively expand task groups. Default is 'false'. + :param str task_id_filter: Guid of the taskId to filter. + :param bool deleted: 'true'to include deleted task groups. Default is 'false'. + :rtype: [TaskGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + query_parameters = {} + if expanded is not None: + query_parameters['expanded'] = self._serialize.query('expanded', expanded, 'bool') + if task_id_filter is not None: + query_parameters['taskIdFilter'] = self._serialize.query('task_id_filter', task_id_filter, 'str') + if deleted is not None: + query_parameters['deleted'] = self._serialize.query('deleted', deleted, 'bool') + response = self._send(http_method='GET', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskGroup]', response) + + def publish_preview_task_group(self, task_group, project, task_group_id, disable_prior_versions=None): + """PublishPreviewTaskGroup. + [Preview API] + :param :class:` ` task_group: + :param str project: Project ID or project name + :param str task_group_id: + :param bool disable_prior_versions: + :rtype: [TaskGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + query_parameters = {} + if disable_prior_versions is not None: + query_parameters['disablePriorVersions'] = self._serialize.query('disable_prior_versions', disable_prior_versions, 'bool') + content = self._serialize.body(task_group, 'TaskGroup') + response = self._send(http_method='PATCH', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[TaskGroup]', response) + + def publish_task_group(self, task_group_metadata, project, parent_task_group_id): + """PublishTaskGroup. + [Preview API] + :param :class:` ` task_group_metadata: + :param str project: Project ID or project name + :param str parent_task_group_id: + :rtype: [TaskGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if parent_task_group_id is not None: + query_parameters['parentTaskGroupId'] = self._serialize.query('parent_task_group_id', parent_task_group_id, 'str') + content = self._serialize.body(task_group_metadata, 'PublishTaskGroupMetadata') + response = self._send(http_method='PUT', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[TaskGroup]', response) + + def undelete_task_group(self, task_group, project): + """UndeleteTaskGroup. + [Preview API] + :param :class:` ` task_group: + :param str project: Project ID or project name + :rtype: [TaskGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(task_group, 'TaskGroup') + response = self._send(http_method='PATCH', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TaskGroup]', response) + + def update_task_group(self, task_group, project): + """UpdateTaskGroup. + [Preview API] Update a task group. + :param :class:` ` task_group: Task group to update. + :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(task_group, 'TaskGroup') + response = self._send(http_method='PUT', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskGroup', response) + + def delete_task_definition(self, task_id): + """DeleteTaskDefinition. + :param str task_id: + """ + route_values = {} + if task_id is not None: + route_values['taskId'] = self._serialize.url('task_id', task_id, 'str') + self._send(http_method='DELETE', + location_id='60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd', + version='4.0', + route_values=route_values) + + def get_task_content_zip(self, task_id, version_string, visibility=None, scope_local=None): + """GetTaskContentZip. + :param str task_id: + :param str version_string: + :param [str] visibility: + :param bool scope_local: + :rtype: object + """ + route_values = {} + if task_id is not None: + route_values['taskId'] = self._serialize.url('task_id', task_id, 'str') + if version_string is not None: + route_values['versionString'] = self._serialize.url('version_string', version_string, 'str') + query_parameters = {} + if visibility is not None: + query_parameters['visibility'] = self._serialize.query('visibility', visibility, '[str]') + if scope_local is not None: + query_parameters['scopeLocal'] = self._serialize.query('scope_local', scope_local, 'bool') + response = self._send(http_method='GET', + location_id='60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_task_definition(self, task_id, version_string, visibility=None, scope_local=None): + """GetTaskDefinition. + :param str task_id: + :param str version_string: + :param [str] visibility: + :param bool scope_local: + :rtype: :class:` ` + """ + route_values = {} + if task_id is not None: + route_values['taskId'] = self._serialize.url('task_id', task_id, 'str') + if version_string is not None: + route_values['versionString'] = self._serialize.url('version_string', version_string, 'str') + query_parameters = {} + if visibility is not None: + query_parameters['visibility'] = self._serialize.query('visibility', visibility, '[str]') + if scope_local is not None: + query_parameters['scopeLocal'] = self._serialize.query('scope_local', scope_local, 'bool') + response = self._send(http_method='GET', + location_id='60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskDefinition', response) + + def get_task_definitions(self, task_id=None, visibility=None, scope_local=None): + """GetTaskDefinitions. + :param str task_id: + :param [str] visibility: + :param bool scope_local: + :rtype: [TaskDefinition] + """ + route_values = {} + if task_id is not None: + route_values['taskId'] = self._serialize.url('task_id', task_id, 'str') + query_parameters = {} + if visibility is not None: + query_parameters['visibility'] = self._serialize.query('visibility', visibility, '[str]') + if scope_local is not None: + query_parameters['scopeLocal'] = self._serialize.query('scope_local', scope_local, 'bool') + response = self._send(http_method='GET', + location_id='60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskDefinition]', response) + + def update_agent_update_state(self, pool_id, agent_id, current_state): + """UpdateAgentUpdateState. + [Preview API] + :param int pool_id: + :param int agent_id: + :param str current_state: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + query_parameters = {} + if current_state is not None: + query_parameters['currentState'] = self._serialize.query('current_state', current_state, 'str') + response = self._send(http_method='PUT', + location_id='8cc1b02b-ae49-4516-b5ad-4f9b29967c30', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TaskAgent', response) + + def update_agent_user_capabilities(self, user_capabilities, pool_id, agent_id): + """UpdateAgentUserCapabilities. + :param {str} user_capabilities: + :param int pool_id: + :param int agent_id: + :rtype: :class:` ` + """ + route_values = {} + if pool_id is not None: + route_values['poolId'] = self._serialize.url('pool_id', pool_id, 'int') + if agent_id is not None: + route_values['agentId'] = self._serialize.url('agent_id', agent_id, 'int') + content = self._serialize.body(user_capabilities, '{str}') + response = self._send(http_method='PUT', + location_id='30ba3ada-fedf-4da8-bbb5-dacf2f82e176', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TaskAgent', response) + + def add_variable_group(self, group, project): + """AddVariableGroup. + [Preview API] + :param :class:` ` group: + :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(group, 'VariableGroup') + response = self._send(http_method='POST', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('VariableGroup', response) + + def delete_variable_group(self, project, group_id): + """DeleteVariableGroup. + [Preview API] + :param str project: Project ID or project name + :param int group_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'int') + self._send(http_method='DELETE', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.0-preview.1', + route_values=route_values) + + def get_variable_group(self, project, group_id): + """GetVariableGroup. + [Preview API] + :param str project: Project ID or project name + :param int group_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'int') + response = self._send(http_method='GET', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('VariableGroup', response) + + def get_variable_groups(self, project, group_name=None, action_filter=None): + """GetVariableGroups. + [Preview API] + :param str project: Project ID or project name + :param str group_name: + :param str action_filter: + :rtype: [VariableGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if group_name is not None: + query_parameters['groupName'] = self._serialize.query('group_name', group_name, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + response = self._send(http_method='GET', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[VariableGroup]', response) + + def get_variable_groups_by_id(self, project, group_ids): + """GetVariableGroupsById. + [Preview API] + :param str project: Project ID or project name + :param [int] group_ids: + :rtype: [VariableGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if group_ids is not None: + group_ids = ",".join(map(str, group_ids)) + query_parameters['groupIds'] = self._serialize.query('group_ids', group_ids, 'str') + response = self._send(http_method='GET', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[VariableGroup]', response) + + def update_variable_group(self, group, project, group_id): + """UpdateVariableGroup. + [Preview API] + :param :class:` ` group: + :param str project: Project ID or project name + :param int group_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'int') + content = self._serialize.body(group, 'VariableGroup') + response = self._send(http_method='PUT', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('VariableGroup', response) + + def acquire_access_token(self, authentication_request): + """AcquireAccessToken. + [Preview API] + :param :class:` ` authentication_request: + :rtype: :class:` ` + """ + content = self._serialize.body(authentication_request, 'AadOauthTokenRequest') + response = self._send(http_method='POST', + location_id='9c63205e-3a0f-42a0-ad88-095200f13607', + version='4.0-preview.1', + content=content) + return self._deserialize('AadOauthTokenResult', response) + + def create_aad_oAuth_request(self, tenant_id, redirect_uri, prompt_option=None, complete_callback_payload=None): + """CreateAadOAuthRequest. + [Preview API] + :param str tenant_id: + :param str redirect_uri: + :param str prompt_option: + :param str complete_callback_payload: + :rtype: str + """ + query_parameters = {} + if tenant_id is not None: + query_parameters['tenantId'] = self._serialize.query('tenant_id', tenant_id, 'str') + if redirect_uri is not None: + query_parameters['redirectUri'] = self._serialize.query('redirect_uri', redirect_uri, 'str') + if prompt_option is not None: + query_parameters['promptOption'] = self._serialize.query('prompt_option', prompt_option, 'str') + if complete_callback_payload is not None: + query_parameters['completeCallbackPayload'] = self._serialize.query('complete_callback_payload', complete_callback_payload, 'str') + response = self._send(http_method='POST', + location_id='9c63205e-3a0f-42a0-ad88-095200f13607', + version='4.0-preview.1', + query_parameters=query_parameters) + return self._deserialize('str', response) + + def get_vsts_aad_tenant_id(self): + """GetVstsAadTenantId. + [Preview API] + :rtype: str + """ + response = self._send(http_method='GET', + location_id='9c63205e-3a0f-42a0-ad88-095200f13607', + version='4.0-preview.1') + return self._deserialize('str', response) + diff --git a/vsts/vsts/task_agent/v4_1/__init__.py b/vsts/vsts/task_agent/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/task_agent/v4_1/models/__init__.py b/vsts/vsts/task_agent/v4_1/models/__init__.py new file mode 100644 index 00000000..93b24edf --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/__init__.py @@ -0,0 +1,221 @@ +# -------------------------------------------------------------------------------------------- +# 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 .aad_oauth_token_request import AadOauthTokenRequest +from .aad_oauth_token_result import AadOauthTokenResult +from .authentication_scheme_reference import AuthenticationSchemeReference +from .authorization_header import AuthorizationHeader +from .azure_subscription import AzureSubscription +from .azure_subscription_query_result import AzureSubscriptionQueryResult +from .client_certificate import ClientCertificate +from .data_source import DataSource +from .data_source_binding import DataSourceBinding +from .data_source_binding_base import DataSourceBindingBase +from .data_source_details import DataSourceDetails +from .dependency_binding import DependencyBinding +from .dependency_data import DependencyData +from .depends_on import DependsOn +from .deployment_group import DeploymentGroup +from .deployment_group_create_parameter import DeploymentGroupCreateParameter +from .deployment_group_create_parameter_pool_property import DeploymentGroupCreateParameterPoolProperty +from .deployment_group_metrics import DeploymentGroupMetrics +from .deployment_group_reference import DeploymentGroupReference +from .deployment_group_update_parameter import DeploymentGroupUpdateParameter +from .deployment_machine import DeploymentMachine +from .deployment_machine_group import DeploymentMachineGroup +from .deployment_machine_group_reference import DeploymentMachineGroupReference +from .deployment_pool_summary import DeploymentPoolSummary +from .deployment_target_update_parameter import DeploymentTargetUpdateParameter +from .endpoint_authorization import EndpointAuthorization +from .endpoint_url import EndpointUrl +from .graph_subject_base import GraphSubjectBase +from .help_link import HelpLink +from .identity_ref import IdentityRef +from .input_descriptor import InputDescriptor +from .input_validation import InputValidation +from .input_validation_request import InputValidationRequest +from .input_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .metrics_column_meta_data import MetricsColumnMetaData +from .metrics_columns_header import MetricsColumnsHeader +from .metrics_row import MetricsRow +from .oAuth_configuration import OAuthConfiguration +from .oAuth_configuration_params import OAuthConfigurationParams +from .package_metadata import PackageMetadata +from .package_version import PackageVersion +from .project_reference import ProjectReference +from .publish_task_group_metadata import PublishTaskGroupMetadata +from .reference_links import ReferenceLinks +from .resource_usage import ResourceUsage +from .result_transformation_details import ResultTransformationDetails +from .secure_file import SecureFile +from .service_endpoint import ServiceEndpoint +from .service_endpoint_authentication_scheme import ServiceEndpointAuthenticationScheme +from .service_endpoint_details import ServiceEndpointDetails +from .service_endpoint_execution_data import ServiceEndpointExecutionData +from .service_endpoint_execution_record import ServiceEndpointExecutionRecord +from .service_endpoint_execution_records_input import ServiceEndpointExecutionRecordsInput +from .service_endpoint_request import ServiceEndpointRequest +from .service_endpoint_request_result import ServiceEndpointRequestResult +from .service_endpoint_type import ServiceEndpointType +from .task_agent import TaskAgent +from .task_agent_authorization import TaskAgentAuthorization +from .task_agent_delay_source import TaskAgentDelaySource +from .task_agent_job_request import TaskAgentJobRequest +from .task_agent_message import TaskAgentMessage +from .task_agent_pool import TaskAgentPool +from .task_agent_pool_maintenance_definition import TaskAgentPoolMaintenanceDefinition +from .task_agent_pool_maintenance_job import TaskAgentPoolMaintenanceJob +from .task_agent_pool_maintenance_job_target_agent import TaskAgentPoolMaintenanceJobTargetAgent +from .task_agent_pool_maintenance_options import TaskAgentPoolMaintenanceOptions +from .task_agent_pool_maintenance_retention_policy import TaskAgentPoolMaintenanceRetentionPolicy +from .task_agent_pool_maintenance_schedule import TaskAgentPoolMaintenanceSchedule +from .task_agent_pool_reference import TaskAgentPoolReference +from .task_agent_public_key import TaskAgentPublicKey +from .task_agent_queue import TaskAgentQueue +from .task_agent_reference import TaskAgentReference +from .task_agent_session import TaskAgentSession +from .task_agent_session_key import TaskAgentSessionKey +from .task_agent_update import TaskAgentUpdate +from .task_agent_update_reason import TaskAgentUpdateReason +from .task_definition import TaskDefinition +from .task_definition_endpoint import TaskDefinitionEndpoint +from .task_definition_reference import TaskDefinitionReference +from .task_execution import TaskExecution +from .task_group import TaskGroup +from .task_group_create_parameter import TaskGroupCreateParameter +from .task_group_definition import TaskGroupDefinition +from .task_group_revision import TaskGroupRevision +from .task_group_step import TaskGroupStep +from .task_group_update_parameter import TaskGroupUpdateParameter +from .task_hub_license_details import TaskHubLicenseDetails +from .task_input_definition import TaskInputDefinition +from .task_input_definition_base import TaskInputDefinitionBase +from .task_input_validation import TaskInputValidation +from .task_orchestration_owner import TaskOrchestrationOwner +from .task_orchestration_plan_group import TaskOrchestrationPlanGroup +from .task_output_variable import TaskOutputVariable +from .task_package_metadata import TaskPackageMetadata +from .task_reference import TaskReference +from .task_source_definition import TaskSourceDefinition +from .task_source_definition_base import TaskSourceDefinitionBase +from .task_version import TaskVersion +from .validation_item import ValidationItem +from .variable_group import VariableGroup +from .variable_group_parameters import VariableGroupParameters +from .variable_group_provider_data import VariableGroupProviderData +from .variable_value import VariableValue + +__all__ = [ + 'AadOauthTokenRequest', + 'AadOauthTokenResult', + 'AuthenticationSchemeReference', + 'AuthorizationHeader', + 'AzureSubscription', + 'AzureSubscriptionQueryResult', + 'ClientCertificate', + 'DataSource', + 'DataSourceBinding', + 'DataSourceBindingBase', + 'DataSourceDetails', + 'DependencyBinding', + 'DependencyData', + 'DependsOn', + 'DeploymentGroup', + 'DeploymentGroupCreateParameter', + 'DeploymentGroupCreateParameterPoolProperty', + 'DeploymentGroupMetrics', + 'DeploymentGroupReference', + 'DeploymentGroupUpdateParameter', + 'DeploymentMachine', + 'DeploymentMachineGroup', + 'DeploymentMachineGroupReference', + 'DeploymentPoolSummary', + 'DeploymentTargetUpdateParameter', + 'EndpointAuthorization', + 'EndpointUrl', + 'GraphSubjectBase', + 'HelpLink', + 'IdentityRef', + 'InputDescriptor', + 'InputValidation', + 'InputValidationRequest', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'MetricsColumnMetaData', + 'MetricsColumnsHeader', + 'MetricsRow', + 'OAuthConfiguration', + 'OAuthConfigurationParams', + 'PackageMetadata', + 'PackageVersion', + 'ProjectReference', + 'PublishTaskGroupMetadata', + 'ReferenceLinks', + 'ResourceUsage', + 'ResultTransformationDetails', + 'SecureFile', + 'ServiceEndpoint', + 'ServiceEndpointAuthenticationScheme', + 'ServiceEndpointDetails', + 'ServiceEndpointExecutionData', + 'ServiceEndpointExecutionRecord', + 'ServiceEndpointExecutionRecordsInput', + 'ServiceEndpointRequest', + 'ServiceEndpointRequestResult', + 'ServiceEndpointType', + 'TaskAgent', + 'TaskAgentAuthorization', + 'TaskAgentDelaySource', + 'TaskAgentJobRequest', + 'TaskAgentMessage', + 'TaskAgentPool', + 'TaskAgentPoolMaintenanceDefinition', + 'TaskAgentPoolMaintenanceJob', + 'TaskAgentPoolMaintenanceJobTargetAgent', + 'TaskAgentPoolMaintenanceOptions', + 'TaskAgentPoolMaintenanceRetentionPolicy', + 'TaskAgentPoolMaintenanceSchedule', + 'TaskAgentPoolReference', + 'TaskAgentPublicKey', + 'TaskAgentQueue', + 'TaskAgentReference', + 'TaskAgentSession', + 'TaskAgentSessionKey', + 'TaskAgentUpdate', + 'TaskAgentUpdateReason', + 'TaskDefinition', + 'TaskDefinitionEndpoint', + 'TaskDefinitionReference', + 'TaskExecution', + 'TaskGroup', + 'TaskGroupCreateParameter', + 'TaskGroupDefinition', + 'TaskGroupRevision', + 'TaskGroupStep', + 'TaskGroupUpdateParameter', + 'TaskHubLicenseDetails', + 'TaskInputDefinition', + 'TaskInputDefinitionBase', + 'TaskInputValidation', + 'TaskOrchestrationOwner', + 'TaskOrchestrationPlanGroup', + 'TaskOutputVariable', + 'TaskPackageMetadata', + 'TaskReference', + 'TaskSourceDefinition', + 'TaskSourceDefinitionBase', + 'TaskVersion', + 'ValidationItem', + 'VariableGroup', + 'VariableGroupParameters', + 'VariableGroupProviderData', + 'VariableValue', +] diff --git a/vsts/vsts/task_agent/v4_1/models/aad_oauth_token_request.py b/vsts/vsts/task_agent/v4_1/models/aad_oauth_token_request.py new file mode 100644 index 00000000..e5ad3183 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/aad_oauth_token_request.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AadOauthTokenRequest(Model): + """AadOauthTokenRequest. + + :param refresh: + :type refresh: bool + :param resource: + :type resource: str + :param tenant_id: + :type tenant_id: str + :param token: + :type token: str + """ + + _attribute_map = { + 'refresh': {'key': 'refresh', 'type': 'bool'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'} + } + + def __init__(self, refresh=None, resource=None, tenant_id=None, token=None): + super(AadOauthTokenRequest, self).__init__() + self.refresh = refresh + self.resource = resource + self.tenant_id = tenant_id + self.token = token diff --git a/vsts/vsts/task_agent/v4_1/models/aad_oauth_token_result.py b/vsts/vsts/task_agent/v4_1/models/aad_oauth_token_result.py new file mode 100644 index 00000000..b3cd8c2e --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/aad_oauth_token_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AadOauthTokenResult(Model): + """AadOauthTokenResult. + + :param access_token: + :type access_token: str + :param refresh_token_cache: + :type refresh_token_cache: str + """ + + _attribute_map = { + 'access_token': {'key': 'accessToken', 'type': 'str'}, + 'refresh_token_cache': {'key': 'refreshTokenCache', 'type': 'str'} + } + + def __init__(self, access_token=None, refresh_token_cache=None): + super(AadOauthTokenResult, self).__init__() + self.access_token = access_token + self.refresh_token_cache = refresh_token_cache diff --git a/vsts/vsts/task_agent/v4_1/models/authentication_scheme_reference.py b/vsts/vsts/task_agent/v4_1/models/authentication_scheme_reference.py new file mode 100644 index 00000000..8dbe5a63 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/authentication_scheme_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AuthenticationSchemeReference(Model): + """AuthenticationSchemeReference. + + :param inputs: + :type inputs: dict + :param type: + :type type: str + """ + + _attribute_map = { + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, inputs=None, type=None): + super(AuthenticationSchemeReference, self).__init__() + self.inputs = inputs + self.type = type diff --git a/vsts/vsts/task_agent/v4_1/models/authorization_header.py b/vsts/vsts/task_agent/v4_1/models/authorization_header.py new file mode 100644 index 00000000..3657c7a3 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/authorization_header.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AuthorizationHeader(Model): + """AuthorizationHeader. + + :param name: Gets or sets the name of authorization header. + :type name: str + :param value: Gets or sets the value of authorization header. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(AuthorizationHeader, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/models/azure_subscription.py b/vsts/vsts/task_agent/v4_1/models/azure_subscription.py new file mode 100644 index 00000000..ffd4994d --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/azure_subscription.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzureSubscription(Model): + """AzureSubscription. + + :param display_name: + :type display_name: str + :param subscription_id: + :type subscription_id: str + :param subscription_tenant_id: + :type subscription_tenant_id: str + :param subscription_tenant_name: + :type subscription_tenant_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'subscription_tenant_id': {'key': 'subscriptionTenantId', 'type': 'str'}, + 'subscription_tenant_name': {'key': 'subscriptionTenantName', 'type': 'str'} + } + + def __init__(self, display_name=None, subscription_id=None, subscription_tenant_id=None, subscription_tenant_name=None): + super(AzureSubscription, self).__init__() + self.display_name = display_name + self.subscription_id = subscription_id + self.subscription_tenant_id = subscription_tenant_id + self.subscription_tenant_name = subscription_tenant_name diff --git a/vsts/vsts/task_agent/v4_1/models/azure_subscription_query_result.py b/vsts/vsts/task_agent/v4_1/models/azure_subscription_query_result.py new file mode 100644 index 00000000..9af8f64a --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/azure_subscription_query_result.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 AzureSubscriptionQueryResult(Model): + """AzureSubscriptionQueryResult. + + :param error_message: + :type error_message: str + :param value: + :type value: list of :class:`AzureSubscription ` + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureSubscription]'} + } + + def __init__(self, error_message=None, value=None): + super(AzureSubscriptionQueryResult, self).__init__() + self.error_message = error_message + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/models/data_source.py b/vsts/vsts/task_agent/v4_1/models/data_source.py new file mode 100644 index 00000000..c4a22dda --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/data_source.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataSource(Model): + """DataSource. + + :param authentication_scheme: + :type authentication_scheme: :class:`AuthenticationSchemeReference ` + :param endpoint_url: + :type endpoint_url: str + :param headers: + :type headers: list of :class:`AuthorizationHeader ` + :param name: + :type name: str + :param resource_url: + :type resource_url: str + :param result_selector: + :type result_selector: str + """ + + _attribute_map = { + 'authentication_scheme': {'key': 'authenticationScheme', 'type': 'AuthenticationSchemeReference'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[AuthorizationHeader]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'} + } + + def __init__(self, authentication_scheme=None, endpoint_url=None, headers=None, name=None, resource_url=None, result_selector=None): + super(DataSource, self).__init__() + self.authentication_scheme = authentication_scheme + self.endpoint_url = endpoint_url + self.headers = headers + self.name = name + self.resource_url = resource_url + self.result_selector = result_selector diff --git a/vsts/vsts/task_agent/v4_1/models/data_source_binding.py b/vsts/vsts/task_agent/v4_1/models/data_source_binding.py new file mode 100644 index 00000000..c4867160 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/data_source_binding.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 .data_source_binding_base import DataSourceBindingBase + + +class DataSourceBinding(DataSourceBindingBase): + """DataSourceBinding. + + :param data_source_name: Gets or sets the name of the data source. + :type data_source_name: str + :param endpoint_id: Gets or sets the endpoint Id. + :type endpoint_id: str + :param endpoint_url: Gets or sets the url of the service endpoint. + :type endpoint_url: str + :param headers: Gets or sets the authorization headers. + :type headers: list of :class:`AuthorizationHeader ` + :param parameters: Gets or sets the parameters for the data source. + :type parameters: dict + :param result_selector: Gets or sets the result selector. + :type result_selector: str + :param result_template: Gets or sets the result template. + :type result_template: str + :param target: Gets or sets the target of the data source. + :type target: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[AuthorizationHeader]'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, data_source_name=None, endpoint_id=None, endpoint_url=None, headers=None, parameters=None, result_selector=None, result_template=None, target=None): + super(DataSourceBinding, self).__init__(data_source_name=data_source_name, endpoint_id=endpoint_id, endpoint_url=endpoint_url, headers=headers, parameters=parameters, result_selector=result_selector, result_template=result_template, target=target) diff --git a/vsts/vsts/task_agent/v4_1/models/data_source_binding_base.py b/vsts/vsts/task_agent/v4_1/models/data_source_binding_base.py new file mode 100644 index 00000000..8d11fcdf --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/data_source_binding_base.py @@ -0,0 +1,52 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class DataSourceBindingBase(BaseSecuredObject): + """DataSourceBindingBase. + + :param data_source_name: Gets or sets the name of the data source. + :type data_source_name: str + :param endpoint_id: Gets or sets the endpoint Id. + :type endpoint_id: str + :param endpoint_url: Gets or sets the url of the service endpoint. + :type endpoint_url: str + :param headers: Gets or sets the authorization headers. + :type headers: list of :class:`AuthorizationHeader ` + :param parameters: Gets or sets the parameters for the data source. + :type parameters: dict + :param result_selector: Gets or sets the result selector. + :type result_selector: str + :param result_template: Gets or sets the result template. + :type result_template: str + :param target: Gets or sets the target of the data source. + :type target: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[AuthorizationHeader]'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'}, + 'result_template': {'key': 'resultTemplate', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, data_source_name=None, endpoint_id=None, endpoint_url=None, headers=None, parameters=None, result_selector=None, result_template=None, target=None): + super(DataSourceBindingBase, self).__init__() + self.data_source_name = data_source_name + self.endpoint_id = endpoint_id + self.endpoint_url = endpoint_url + self.headers = headers + self.parameters = parameters + self.result_selector = result_selector + self.result_template = result_template + self.target = target diff --git a/vsts/vsts/task_agent/v4_1/models/data_source_details.py b/vsts/vsts/task_agent/v4_1/models/data_source_details.py new file mode 100644 index 00000000..268e2a09 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/data_source_details.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 DataSourceDetails(Model): + """DataSourceDetails. + + :param data_source_name: + :type data_source_name: str + :param data_source_url: + :type data_source_url: str + :param headers: + :type headers: list of :class:`AuthorizationHeader ` + :param parameters: + :type parameters: dict + :param resource_url: + :type resource_url: str + :param result_selector: + :type result_selector: str + """ + + _attribute_map = { + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'data_source_url': {'key': 'dataSourceUrl', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[AuthorizationHeader]'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'resource_url': {'key': 'resourceUrl', 'type': 'str'}, + 'result_selector': {'key': 'resultSelector', 'type': 'str'} + } + + def __init__(self, data_source_name=None, data_source_url=None, headers=None, parameters=None, resource_url=None, result_selector=None): + super(DataSourceDetails, self).__init__() + self.data_source_name = data_source_name + self.data_source_url = data_source_url + self.headers = headers + self.parameters = parameters + self.resource_url = resource_url + self.result_selector = result_selector diff --git a/vsts/vsts/task_agent/v4_1/models/dependency_binding.py b/vsts/vsts/task_agent/v4_1/models/dependency_binding.py new file mode 100644 index 00000000..e8eb3ac1 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/dependency_binding.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DependencyBinding(Model): + """DependencyBinding. + + :param key: + :type key: str + :param value: + :type value: str + """ + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, key=None, value=None): + super(DependencyBinding, self).__init__() + self.key = key + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/models/dependency_data.py b/vsts/vsts/task_agent/v4_1/models/dependency_data.py new file mode 100644 index 00000000..3faa1790 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/dependency_data.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DependencyData(Model): + """DependencyData. + + :param input: + :type input: str + :param map: + :type map: list of { key: str; value: [{ key: str; value: str }] } + """ + + _attribute_map = { + 'input': {'key': 'input', 'type': 'str'}, + 'map': {'key': 'map', 'type': '[{ key: str; value: [{ key: str; value: str }] }]'} + } + + def __init__(self, input=None, map=None): + super(DependencyData, self).__init__() + self.input = input + self.map = map diff --git a/vsts/vsts/task_agent/v4_1/models/depends_on.py b/vsts/vsts/task_agent/v4_1/models/depends_on.py new file mode 100644 index 00000000..6528c212 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/depends_on.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DependsOn(Model): + """DependsOn. + + :param input: + :type input: str + :param map: + :type map: list of :class:`DependencyBinding ` + """ + + _attribute_map = { + 'input': {'key': 'input', 'type': 'str'}, + 'map': {'key': 'map', 'type': '[DependencyBinding]'} + } + + def __init__(self, input=None, map=None): + super(DependsOn, self).__init__() + self.input = input + self.map = map diff --git a/vsts/vsts/task_agent/v4_1/models/deployment_group.py b/vsts/vsts/task_agent/v4_1/models/deployment_group.py new file mode 100644 index 00000000..54f7c88b --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/deployment_group.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 .deployment_group_reference import DeploymentGroupReference + + +class DeploymentGroup(DeploymentGroupReference): + """DeploymentGroup. + + :param id: Deployment group identifier. + :type id: int + :param name: Name of the deployment group. + :type name: str + :param pool: Deployment pool in which deployment agents are registered. + :type pool: :class:`TaskAgentPoolReference ` + :param project: Project to which the deployment group belongs. + :type project: :class:`ProjectReference ` + :param description: Description of the deployment group. + :type description: str + :param machine_count: Number of deployment targets in the deployment group. + :type machine_count: int + :param machines: List of deployment targets in the deployment group. + :type machines: list of :class:`DeploymentMachine ` + :param machine_tags: List of unique tags across all deployment targets in the deployment group. + :type machine_tags: list of str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'machine_count': {'key': 'machineCount', 'type': 'int'}, + 'machines': {'key': 'machines', 'type': '[DeploymentMachine]'}, + 'machine_tags': {'key': 'machineTags', 'type': '[str]'} + } + + def __init__(self, id=None, name=None, pool=None, project=None, description=None, machine_count=None, machines=None, machine_tags=None): + super(DeploymentGroup, self).__init__(id=id, name=name, pool=pool, project=project) + self.description = description + self.machine_count = machine_count + self.machines = machines + self.machine_tags = machine_tags diff --git a/vsts/vsts/task_agent/v4_1/models/deployment_group_metrics.py b/vsts/vsts/task_agent/v4_1/models/deployment_group_metrics.py new file mode 100644 index 00000000..d6edc350 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/deployment_group_metrics.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentGroupMetrics(Model): + """DeploymentGroupMetrics. + + :param columns_header: List of deployment group properties. And types of metrics provided for those properties. + :type columns_header: :class:`MetricsColumnsHeader ` + :param deployment_group: Deployment group. + :type deployment_group: :class:`DeploymentGroupReference ` + :param rows: Values of properties and the metrics. E.g. 1: total count of deployment targets for which 'TargetState' is 'offline'. E.g. 2: Average time of deployment to the deployment targets for which 'LastJobStatus' is 'passed' and 'TargetState' is 'online'. + :type rows: list of :class:`MetricsRow ` + """ + + _attribute_map = { + 'columns_header': {'key': 'columnsHeader', 'type': 'MetricsColumnsHeader'}, + 'deployment_group': {'key': 'deploymentGroup', 'type': 'DeploymentGroupReference'}, + 'rows': {'key': 'rows', 'type': '[MetricsRow]'} + } + + def __init__(self, columns_header=None, deployment_group=None, rows=None): + super(DeploymentGroupMetrics, self).__init__() + self.columns_header = columns_header + self.deployment_group = deployment_group + self.rows = rows diff --git a/vsts/vsts/task_agent/v4_1/models/deployment_group_reference.py b/vsts/vsts/task_agent/v4_1/models/deployment_group_reference.py new file mode 100644 index 00000000..2e9bc655 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/deployment_group_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentGroupReference(Model): + """DeploymentGroupReference. + + :param id: Deployment group identifier. + :type id: int + :param name: Name of the deployment group. + :type name: str + :param pool: Deployment pool in which deployment agents are registered. + :type pool: :class:`TaskAgentPoolReference ` + :param project: Project to which the deployment group belongs. + :type project: :class:`ProjectReference ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'} + } + + def __init__(self, id=None, name=None, pool=None, project=None): + super(DeploymentGroupReference, self).__init__() + self.id = id + self.name = name + self.pool = pool + self.project = project diff --git a/vsts/vsts/task_agent/v4_1/models/deployment_machine.py b/vsts/vsts/task_agent/v4_1/models/deployment_machine.py new file mode 100644 index 00000000..b13fcafa --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/deployment_machine.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentMachine(Model): + """DeploymentMachine. + + :param agent: Deployment agent. + :type agent: :class:`TaskAgent ` + :param id: Deployment target Identifier. + :type id: int + :param tags: Tags of the deployment target. + :type tags: list of str + """ + + _attribute_map = { + 'agent': {'key': 'agent', 'type': 'TaskAgent'}, + 'id': {'key': 'id', 'type': 'int'}, + 'tags': {'key': 'tags', 'type': '[str]'} + } + + def __init__(self, agent=None, id=None, tags=None): + super(DeploymentMachine, self).__init__() + self.agent = agent + self.id = id + self.tags = tags diff --git a/vsts/vsts/task_agent/v4_1/models/deployment_machine_group.py b/vsts/vsts/task_agent/v4_1/models/deployment_machine_group.py new file mode 100644 index 00000000..56c2c9aa --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/deployment_machine_group.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 .deployment_machine_group_reference import DeploymentMachineGroupReference + + +class DeploymentMachineGroup(DeploymentMachineGroupReference): + """DeploymentMachineGroup. + + :param id: + :type id: int + :param name: + :type name: str + :param pool: + :type pool: :class:`TaskAgentPoolReference ` + :param project: + :type project: :class:`ProjectReference ` + :param machines: + :type machines: list of :class:`DeploymentMachine ` + :param size: + :type size: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'machines': {'key': 'machines', 'type': '[DeploymentMachine]'}, + 'size': {'key': 'size', 'type': 'int'} + } + + def __init__(self, id=None, name=None, pool=None, project=None, machines=None, size=None): + super(DeploymentMachineGroup, self).__init__(id=id, name=name, pool=pool, project=project) + self.machines = machines + self.size = size diff --git a/vsts/vsts/task_agent/v4_1/models/deployment_machine_group_reference.py b/vsts/vsts/task_agent/v4_1/models/deployment_machine_group_reference.py new file mode 100644 index 00000000..9af86b4f --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/deployment_machine_group_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentMachineGroupReference(Model): + """DeploymentMachineGroupReference. + + :param id: + :type id: int + :param name: + :type name: str + :param pool: + :type pool: :class:`TaskAgentPoolReference ` + :param project: + :type project: :class:`ProjectReference ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project': {'key': 'project', 'type': 'ProjectReference'} + } + + def __init__(self, id=None, name=None, pool=None, project=None): + super(DeploymentMachineGroupReference, self).__init__() + self.id = id + self.name = name + self.pool = pool + self.project = project diff --git a/vsts/vsts/task_agent/v4_1/models/deployment_pool_summary.py b/vsts/vsts/task_agent/v4_1/models/deployment_pool_summary.py new file mode 100644 index 00000000..50a96b60 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/deployment_pool_summary.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 DeploymentPoolSummary(Model): + """DeploymentPoolSummary. + + :param deployment_groups: List of deployment groups referring to the deployment pool. + :type deployment_groups: list of :class:`DeploymentGroupReference ` + :param offline_agents_count: Number of deployment agents that are offline. + :type offline_agents_count: int + :param online_agents_count: Number of deployment agents that are online. + :type online_agents_count: int + :param pool: Deployment pool. + :type pool: :class:`TaskAgentPoolReference ` + """ + + _attribute_map = { + 'deployment_groups': {'key': 'deploymentGroups', 'type': '[DeploymentGroupReference]'}, + 'offline_agents_count': {'key': 'offlineAgentsCount', 'type': 'int'}, + 'online_agents_count': {'key': 'onlineAgentsCount', 'type': 'int'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'} + } + + def __init__(self, deployment_groups=None, offline_agents_count=None, online_agents_count=None, pool=None): + super(DeploymentPoolSummary, self).__init__() + self.deployment_groups = deployment_groups + self.offline_agents_count = offline_agents_count + self.online_agents_count = online_agents_count + self.pool = pool diff --git a/vsts/vsts/task_agent/v4_1/models/endpoint_authorization.py b/vsts/vsts/task_agent/v4_1/models/endpoint_authorization.py new file mode 100644 index 00000000..6fc33ab8 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/endpoint_authorization.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 EndpointAuthorization(Model): + """EndpointAuthorization. + + :param parameters: Gets or sets the parameters for the selected authorization scheme. + :type parameters: dict + :param scheme: Gets or sets the scheme used for service endpoint authentication. + :type scheme: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'scheme': {'key': 'scheme', 'type': 'str'} + } + + def __init__(self, parameters=None, scheme=None): + super(EndpointAuthorization, self).__init__() + self.parameters = parameters + self.scheme = scheme diff --git a/vsts/vsts/task_agent/v4_1/models/endpoint_url.py b/vsts/vsts/task_agent/v4_1/models/endpoint_url.py new file mode 100644 index 00000000..c1bc7ceb --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/endpoint_url.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 EndpointUrl(Model): + """EndpointUrl. + + :param depends_on: Gets or sets the dependency bindings. + :type depends_on: :class:`DependsOn ` + :param display_name: Gets or sets the display name of service endpoint url. + :type display_name: str + :param help_text: Gets or sets the help text of service endpoint url. + :type help_text: str + :param is_visible: Gets or sets the visibility of service endpoint url. + :type is_visible: str + :param value: Gets or sets the value of service endpoint url. + :type value: str + """ + + _attribute_map = { + 'depends_on': {'key': 'dependsOn', 'type': 'DependsOn'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'help_text': {'key': 'helpText', 'type': 'str'}, + 'is_visible': {'key': 'isVisible', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, depends_on=None, display_name=None, help_text=None, is_visible=None, value=None): + super(EndpointUrl, self).__init__() + self.depends_on = depends_on + self.display_name = display_name + self.help_text = help_text + self.is_visible = is_visible + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/models/help_link.py b/vsts/vsts/task_agent/v4_1/models/help_link.py new file mode 100644 index 00000000..b48e4910 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/help_link.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 HelpLink(Model): + """HelpLink. + + :param text: + :type text: str + :param url: + :type url: str + """ + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, text=None, url=None): + super(HelpLink, self).__init__() + self.text = text + self.url = url diff --git a/vsts/vsts/task_agent/v4_1/models/identity_ref.py b/vsts/vsts/task_agent/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/task_agent/v4_1/models/input_descriptor.py b/vsts/vsts/task_agent/v4_1/models/input_descriptor.py new file mode 100644 index 00000000..da334836 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/input_descriptor.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputDescriptor(Model): + """InputDescriptor. + + :param dependency_input_ids: The ids of all inputs that the value of this input is dependent on. + :type dependency_input_ids: list of str + :param description: Description of what this input is used for + :type description: str + :param group_name: The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + :type group_name: str + :param has_dynamic_value_information: If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + :type has_dynamic_value_information: bool + :param id: Identifier for the subscription input + :type id: str + :param input_mode: Mode in which the value of this input should be entered + :type input_mode: object + :param is_confidential: Gets whether this input is confidential, such as for a password or application key + :type is_confidential: bool + :param name: Localized name which can be shown as a label for the subscription input + :type name: str + :param properties: Custom properties for the input which can be used by the service provider + :type properties: dict + :param type: Underlying data type for the input value. When this value is specified, InputMode, Validation and Values are optional. + :type type: str + :param use_in_default_description: Gets whether this input is included in the default generated action description. + :type use_in_default_description: bool + :param validation: Information to use to validate this input's value + :type validation: :class:`InputValidation ` + :param value_hint: A hint for input value. It can be used in the UI as the input placeholder. + :type value_hint: str + :param values: Information about possible values for this input + :type values: :class:`InputValues ` + """ + + _attribute_map = { + 'dependency_input_ids': {'key': 'dependencyInputIds', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'has_dynamic_value_information': {'key': 'hasDynamicValueInformation', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'input_mode': {'key': 'inputMode', 'type': 'object'}, + 'is_confidential': {'key': 'isConfidential', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'use_in_default_description': {'key': 'useInDefaultDescription', 'type': 'bool'}, + 'validation': {'key': 'validation', 'type': 'InputValidation'}, + 'value_hint': {'key': 'valueHint', 'type': 'str'}, + 'values': {'key': 'values', 'type': 'InputValues'} + } + + def __init__(self, dependency_input_ids=None, description=None, group_name=None, has_dynamic_value_information=None, id=None, input_mode=None, is_confidential=None, name=None, properties=None, type=None, use_in_default_description=None, validation=None, value_hint=None, values=None): + super(InputDescriptor, self).__init__() + self.dependency_input_ids = dependency_input_ids + self.description = description + self.group_name = group_name + self.has_dynamic_value_information = has_dynamic_value_information + self.id = id + self.input_mode = input_mode + self.is_confidential = is_confidential + self.name = name + self.properties = properties + self.type = type + self.use_in_default_description = use_in_default_description + self.validation = validation + self.value_hint = value_hint + self.values = values diff --git a/vsts/vsts/task_agent/v4_1/models/input_validation.py b/vsts/vsts/task_agent/v4_1/models/input_validation.py new file mode 100644 index 00000000..f2f1a434 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/input_validation.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidation(Model): + """InputValidation. + + :param data_type: + :type data_type: object + :param is_required: + :type is_required: bool + :param max_length: + :type max_length: int + :param max_value: + :type max_value: decimal + :param min_length: + :type min_length: int + :param min_value: + :type min_value: decimal + :param pattern: + :type pattern: str + :param pattern_mismatch_error_message: + :type pattern_mismatch_error_message: str + """ + + _attribute_map = { + 'data_type': {'key': 'dataType', 'type': 'object'}, + 'is_required': {'key': 'isRequired', 'type': 'bool'}, + 'max_length': {'key': 'maxLength', 'type': 'int'}, + 'max_value': {'key': 'maxValue', 'type': 'decimal'}, + 'min_length': {'key': 'minLength', 'type': 'int'}, + 'min_value': {'key': 'minValue', 'type': 'decimal'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'pattern_mismatch_error_message': {'key': 'patternMismatchErrorMessage', 'type': 'str'} + } + + def __init__(self, data_type=None, is_required=None, max_length=None, max_value=None, min_length=None, min_value=None, pattern=None, pattern_mismatch_error_message=None): + super(InputValidation, self).__init__() + self.data_type = data_type + self.is_required = is_required + self.max_length = max_length + self.max_value = max_value + self.min_length = min_length + self.min_value = min_value + self.pattern = pattern + self.pattern_mismatch_error_message = pattern_mismatch_error_message diff --git a/vsts/vsts/task_agent/v4_1/models/input_validation_request.py b/vsts/vsts/task_agent/v4_1/models/input_validation_request.py new file mode 100644 index 00000000..74fb2e1f --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/input_validation_request.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValidationRequest(Model): + """InputValidationRequest. + + :param inputs: + :type inputs: dict + """ + + _attribute_map = { + 'inputs': {'key': 'inputs', 'type': '{ValidationItem}'} + } + + def __init__(self, inputs=None): + super(InputValidationRequest, self).__init__() + self.inputs = inputs diff --git a/vsts/vsts/task_agent/v4_1/models/input_value.py b/vsts/vsts/task_agent/v4_1/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/input_value.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValue(Model): + """InputValue. + + :param data: Any other data about this input + :type data: dict + :param display_value: The text to show for the display of this value + :type display_value: str + :param value: The value to store for this input + :type value: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': '{object}'}, + 'display_value': {'key': 'displayValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, data=None, display_value=None, value=None): + super(InputValue, self).__init__() + self.data = data + self.display_value = display_value + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/models/input_values.py b/vsts/vsts/task_agent/v4_1/models/input_values.py new file mode 100644 index 00000000..69472f8d --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/input_values.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValues(Model): + """InputValues. + + :param default_value: The default value to use for this input + :type default_value: str + :param error: Errors encountered while computing dynamic values. + :type error: :class:`InputValuesError ` + :param input_id: The id of the input + :type input_id: str + :param is_disabled: Should this input be disabled + :type is_disabled: bool + :param is_limited_to_possible_values: Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + :type is_limited_to_possible_values: bool + :param is_read_only: Should this input be made read-only + :type is_read_only: bool + :param possible_values: Possible values that this input can take + :type possible_values: list of :class:`InputValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'InputValuesError'}, + 'input_id': {'key': 'inputId', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_limited_to_possible_values': {'key': 'isLimitedToPossibleValues', 'type': 'bool'}, + 'is_read_only': {'key': 'isReadOnly', 'type': 'bool'}, + 'possible_values': {'key': 'possibleValues', 'type': '[InputValue]'} + } + + def __init__(self, default_value=None, error=None, input_id=None, is_disabled=None, is_limited_to_possible_values=None, is_read_only=None, possible_values=None): + super(InputValues, self).__init__() + self.default_value = default_value + self.error = error + self.input_id = input_id + self.is_disabled = is_disabled + self.is_limited_to_possible_values = is_limited_to_possible_values + self.is_read_only = is_read_only + self.possible_values = possible_values diff --git a/vsts/vsts/task_agent/v4_1/models/input_values_error.py b/vsts/vsts/task_agent/v4_1/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/input_values_error.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 InputValuesError(Model): + """InputValuesError. + + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, message=None): + super(InputValuesError, self).__init__() + self.message = message diff --git a/vsts/vsts/task_agent/v4_1/models/metrics_column_meta_data.py b/vsts/vsts/task_agent/v4_1/models/metrics_column_meta_data.py new file mode 100644 index 00000000..242e669c --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/metrics_column_meta_data.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetricsColumnMetaData(Model): + """MetricsColumnMetaData. + + :param column_name: Name. + :type column_name: str + :param column_value_type: Data type. + :type column_value_type: str + """ + + _attribute_map = { + 'column_name': {'key': 'columnName', 'type': 'str'}, + 'column_value_type': {'key': 'columnValueType', 'type': 'str'} + } + + def __init__(self, column_name=None, column_value_type=None): + super(MetricsColumnMetaData, self).__init__() + self.column_name = column_name + self.column_value_type = column_value_type diff --git a/vsts/vsts/task_agent/v4_1/models/metrics_columns_header.py b/vsts/vsts/task_agent/v4_1/models/metrics_columns_header.py new file mode 100644 index 00000000..70cda63d --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/metrics_columns_header.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetricsColumnsHeader(Model): + """MetricsColumnsHeader. + + :param dimensions: Properties of deployment group for which metrics are provided. E.g. 1: LastJobStatus E.g. 2: TargetState + :type dimensions: list of :class:`MetricsColumnMetaData ` + :param metrics: The types of metrics. E.g. 1: total count of deployment targets. E.g. 2: Average time of deployment to the deployment targets. + :type metrics: list of :class:`MetricsColumnMetaData ` + """ + + _attribute_map = { + 'dimensions': {'key': 'dimensions', 'type': '[MetricsColumnMetaData]'}, + 'metrics': {'key': 'metrics', 'type': '[MetricsColumnMetaData]'} + } + + def __init__(self, dimensions=None, metrics=None): + super(MetricsColumnsHeader, self).__init__() + self.dimensions = dimensions + self.metrics = metrics diff --git a/vsts/vsts/task_agent/v4_1/models/metrics_row.py b/vsts/vsts/task_agent/v4_1/models/metrics_row.py new file mode 100644 index 00000000..4aabc669 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/metrics_row.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 MetricsRow(Model): + """MetricsRow. + + :param dimensions: The values of the properties mentioned as 'Dimensions' in column header. E.g. 1: For a property 'LastJobStatus' - metrics will be provided for 'passed', 'failed', etc. E.g. 2: For a property 'TargetState' - metrics will be provided for 'online', 'offline' targets. + :type dimensions: list of str + :param metrics: Metrics in serialized format. Should be deserialized based on the data type provided in header. + :type metrics: list of str + """ + + _attribute_map = { + 'dimensions': {'key': 'dimensions', 'type': '[str]'}, + 'metrics': {'key': 'metrics', 'type': '[str]'} + } + + def __init__(self, dimensions=None, metrics=None): + super(MetricsRow, self).__init__() + self.dimensions = dimensions + self.metrics = metrics diff --git a/vsts/vsts/task_agent/v4_1/models/package_metadata.py b/vsts/vsts/task_agent/v4_1/models/package_metadata.py new file mode 100644 index 00000000..b0053f54 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/package_metadata.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 PackageMetadata(Model): + """PackageMetadata. + + :param created_on: The date the package was created + :type created_on: datetime + :param download_url: A direct link to download the package. + :type download_url: str + :param filename: The UI uses this to display instructions, i.e. "unzip MyAgent.zip" + :type filename: str + :param hash_value: MD5 hash as a base64 string + :type hash_value: str + :param info_url: A link to documentation + :type info_url: str + :param platform: The platform (win7, linux, etc.) + :type platform: str + :param type: The type of package (e.g. "agent") + :type type: str + :param version: The package version. + :type version: :class:`PackageVersion ` + """ + + _attribute_map = { + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'download_url': {'key': 'downloadUrl', 'type': 'str'}, + 'filename': {'key': 'filename', 'type': 'str'}, + 'hash_value': {'key': 'hashValue', 'type': 'str'}, + 'info_url': {'key': 'infoUrl', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'PackageVersion'} + } + + def __init__(self, created_on=None, download_url=None, filename=None, hash_value=None, info_url=None, platform=None, type=None, version=None): + super(PackageMetadata, self).__init__() + self.created_on = created_on + self.download_url = download_url + self.filename = filename + self.hash_value = hash_value + self.info_url = info_url + self.platform = platform + self.type = type + self.version = version diff --git a/vsts/vsts/task_agent/v4_1/models/package_version.py b/vsts/vsts/task_agent/v4_1/models/package_version.py new file mode 100644 index 00000000..3742cdc0 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/package_version.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PackageVersion(Model): + """PackageVersion. + + :param major: + :type major: int + :param minor: + :type minor: int + :param patch: + :type patch: int + """ + + _attribute_map = { + 'major': {'key': 'major', 'type': 'int'}, + 'minor': {'key': 'minor', 'type': 'int'}, + 'patch': {'key': 'patch', 'type': 'int'} + } + + def __init__(self, major=None, minor=None, patch=None): + super(PackageVersion, self).__init__() + self.major = major + self.minor = minor + self.patch = patch diff --git a/vsts/vsts/task_agent/v4_1/models/project_reference.py b/vsts/vsts/task_agent/v4_1/models/project_reference.py new file mode 100644 index 00000000..8fd6ad8e --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/project_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProjectReference(Model): + """ProjectReference. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(ProjectReference, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/task_agent/v4_1/models/publish_task_group_metadata.py b/vsts/vsts/task_agent/v4_1/models/publish_task_group_metadata.py new file mode 100644 index 00000000..527821b5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/publish_task_group_metadata.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 PublishTaskGroupMetadata(Model): + """PublishTaskGroupMetadata. + + :param comment: + :type comment: str + :param parent_definition_revision: + :type parent_definition_revision: int + :param preview: + :type preview: bool + :param task_group_id: + :type task_group_id: str + :param task_group_revision: + :type task_group_revision: int + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'parent_definition_revision': {'key': 'parentDefinitionRevision', 'type': 'int'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'task_group_id': {'key': 'taskGroupId', 'type': 'str'}, + 'task_group_revision': {'key': 'taskGroupRevision', 'type': 'int'} + } + + def __init__(self, comment=None, parent_definition_revision=None, preview=None, task_group_id=None, task_group_revision=None): + super(PublishTaskGroupMetadata, self).__init__() + self.comment = comment + self.parent_definition_revision = parent_definition_revision + self.preview = preview + self.task_group_id = task_group_id + self.task_group_revision = task_group_revision diff --git a/vsts/vsts/task_agent/v4_1/models/reference_links.py b/vsts/vsts/task_agent/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/task_agent/v4_1/models/resource_usage.py b/vsts/vsts/task_agent/v4_1/models/resource_usage.py new file mode 100644 index 00000000..3f00cf3a --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/resource_usage.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResourceUsage(Model): + """ResourceUsage. + + :param running_plan_groups: + :type running_plan_groups: list of :class:`TaskOrchestrationPlanGroup ` + :param total_count: + :type total_count: int + :param used_count: + :type used_count: int + """ + + _attribute_map = { + 'running_plan_groups': {'key': 'runningPlanGroups', 'type': '[TaskOrchestrationPlanGroup]'}, + 'total_count': {'key': 'totalCount', 'type': 'int'}, + 'used_count': {'key': 'usedCount', 'type': 'int'} + } + + def __init__(self, running_plan_groups=None, total_count=None, used_count=None): + super(ResourceUsage, self).__init__() + self.running_plan_groups = running_plan_groups + self.total_count = total_count + self.used_count = used_count diff --git a/vsts/vsts/task_agent/v4_1/models/result_transformation_details.py b/vsts/vsts/task_agent/v4_1/models/result_transformation_details.py new file mode 100644 index 00000000..eff9b132 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/result_transformation_details.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResultTransformationDetails(Model): + """ResultTransformationDetails. + + :param result_template: + :type result_template: str + """ + + _attribute_map = { + 'result_template': {'key': 'resultTemplate', 'type': 'str'} + } + + def __init__(self, result_template=None): + super(ResultTransformationDetails, self).__init__() + self.result_template = result_template diff --git a/vsts/vsts/task_agent/v4_1/models/secure_file.py b/vsts/vsts/task_agent/v4_1/models/secure_file.py new file mode 100644 index 00000000..a1826cf8 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/secure_file.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 SecureFile(Model): + """SecureFile. + + :param created_by: + :type created_by: :class:`IdentityRef ` + :param created_on: + :type created_on: datetime + :param id: + :type id: str + :param modified_by: + :type modified_by: :class:`IdentityRef ` + :param modified_on: + :type modified_on: datetime + :param name: + :type name: str + :param properties: + :type properties: dict + :param ticket: + :type ticket: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'ticket': {'key': 'ticket', 'type': 'str'} + } + + def __init__(self, created_by=None, created_on=None, id=None, modified_by=None, modified_on=None, name=None, properties=None, ticket=None): + super(SecureFile, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.id = id + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.properties = properties + self.ticket = ticket diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint.py new file mode 100644 index 00000000..67b32233 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpoint(Model): + """ServiceEndpoint. + + :param administrators_group: Gets or sets the identity reference for the administrators group of the service endpoint. + :type administrators_group: :class:`IdentityRef ` + :param authorization: Gets or sets the authorization data for talking to the endpoint. + :type authorization: :class:`EndpointAuthorization ` + :param created_by: Gets or sets the identity reference for the user who created the Service endpoint. + :type created_by: :class:`IdentityRef ` + :param data: + :type data: dict + :param description: Gets or sets the description of endpoint. + :type description: str + :param group_scope_id: + :type group_scope_id: str + :param id: Gets or sets the identifier of this endpoint. + :type id: str + :param is_ready: EndPoint state indictor + :type is_ready: bool + :param name: Gets or sets the friendly name of the endpoint. + :type name: str + :param operation_status: Error message during creation/deletion of endpoint + :type operation_status: :class:`object ` + :param readers_group: Gets or sets the identity reference for the readers group of the service endpoint. + :type readers_group: :class:`IdentityRef ` + :param type: Gets or sets the type of the endpoint. + :type type: str + :param url: Gets or sets the url of the endpoint. + :type url: str + """ + + _attribute_map = { + 'administrators_group': {'key': 'administratorsGroup', 'type': 'IdentityRef'}, + 'authorization': {'key': 'authorization', 'type': 'EndpointAuthorization'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'description': {'key': 'description', 'type': 'str'}, + 'group_scope_id': {'key': 'groupScopeId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_ready': {'key': 'isReady', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation_status': {'key': 'operationStatus', 'type': 'object'}, + 'readers_group': {'key': 'readersGroup', 'type': 'IdentityRef'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, administrators_group=None, authorization=None, created_by=None, data=None, description=None, group_scope_id=None, id=None, is_ready=None, name=None, operation_status=None, readers_group=None, type=None, url=None): + super(ServiceEndpoint, self).__init__() + self.administrators_group = administrators_group + self.authorization = authorization + self.created_by = created_by + self.data = data + self.description = description + self.group_scope_id = group_scope_id + self.id = id + self.is_ready = is_ready + self.name = name + self.operation_status = operation_status + self.readers_group = readers_group + self.type = type + self.url = url diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_authentication_scheme.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_authentication_scheme.py new file mode 100644 index 00000000..580b49bc --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_authentication_scheme.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointAuthenticationScheme(Model): + """ServiceEndpointAuthenticationScheme. + + :param authorization_headers: Gets or sets the authorization headers of service endpoint authentication scheme. + :type authorization_headers: list of :class:`AuthorizationHeader ` + :param client_certificates: Gets or sets the certificates of service endpoint authentication scheme. + :type client_certificates: list of :class:`ClientCertificate ` + :param display_name: Gets or sets the display name for the service endpoint authentication scheme. + :type display_name: str + :param input_descriptors: Gets or sets the input descriptors for the service endpoint authentication scheme. + :type input_descriptors: list of :class:`InputDescriptor ` + :param scheme: Gets or sets the scheme for service endpoint authentication. + :type scheme: str + """ + + _attribute_map = { + 'authorization_headers': {'key': 'authorizationHeaders', 'type': '[AuthorizationHeader]'}, + 'client_certificates': {'key': 'clientCertificates', 'type': '[ClientCertificate]'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'scheme': {'key': 'scheme', 'type': 'str'} + } + + def __init__(self, authorization_headers=None, client_certificates=None, display_name=None, input_descriptors=None, scheme=None): + super(ServiceEndpointAuthenticationScheme, self).__init__() + self.authorization_headers = authorization_headers + self.client_certificates = client_certificates + self.display_name = display_name + self.input_descriptors = input_descriptors + self.scheme = scheme diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_details.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_details.py new file mode 100644 index 00000000..ea14503a --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_details.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointDetails(Model): + """ServiceEndpointDetails. + + :param authorization: + :type authorization: :class:`EndpointAuthorization ` + :param data: + :type data: dict + :param type: + :type type: str + :param url: + :type url: str + """ + + _attribute_map = { + 'authorization': {'key': 'authorization', 'type': 'EndpointAuthorization'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, authorization=None, data=None, type=None, url=None): + super(ServiceEndpointDetails, self).__init__() + self.authorization = authorization + self.data = data + self.type = type + self.url = url diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_data.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_data.py new file mode 100644 index 00000000..0d4063ff --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_data.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointExecutionData(Model): + """ServiceEndpointExecutionData. + + :param definition: Gets the definition of service endpoint execution owner. + :type definition: :class:`TaskOrchestrationOwner ` + :param finish_time: Gets the finish time of service endpoint execution. + :type finish_time: datetime + :param id: Gets the Id of service endpoint execution data. + :type id: long + :param owner: Gets the owner of service endpoint execution data. + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_type: Gets the plan type of service endpoint execution data. + :type plan_type: str + :param result: Gets the result of service endpoint execution. + :type result: object + :param start_time: Gets the start time of service endpoint execution. + :type start_time: datetime + """ + + _attribute_map = { + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'} + } + + def __init__(self, definition=None, finish_time=None, id=None, owner=None, plan_type=None, result=None, start_time=None): + super(ServiceEndpointExecutionData, self).__init__() + self.definition = definition + self.finish_time = finish_time + self.id = id + self.owner = owner + self.plan_type = plan_type + self.result = result + self.start_time = start_time diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_record.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_record.py new file mode 100644 index 00000000..8bd39125 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_record.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointExecutionRecord(Model): + """ServiceEndpointExecutionRecord. + + :param data: Gets the execution data of service endpoint execution. + :type data: :class:`ServiceEndpointExecutionData ` + :param endpoint_id: Gets the Id of service endpoint. + :type endpoint_id: str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'ServiceEndpointExecutionData'}, + 'endpoint_id': {'key': 'endpointId', 'type': 'str'} + } + + def __init__(self, data=None, endpoint_id=None): + super(ServiceEndpointExecutionRecord, self).__init__() + self.data = data + self.endpoint_id = endpoint_id diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_records_input.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_records_input.py new file mode 100644 index 00000000..50ddbf4a --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_execution_records_input.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointExecutionRecordsInput(Model): + """ServiceEndpointExecutionRecordsInput. + + :param data: + :type data: :class:`ServiceEndpointExecutionData ` + :param endpoint_ids: + :type endpoint_ids: list of str + """ + + _attribute_map = { + 'data': {'key': 'data', 'type': 'ServiceEndpointExecutionData'}, + 'endpoint_ids': {'key': 'endpointIds', 'type': '[str]'} + } + + def __init__(self, data=None, endpoint_ids=None): + super(ServiceEndpointExecutionRecordsInput, self).__init__() + self.data = data + self.endpoint_ids = endpoint_ids diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_request.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_request.py new file mode 100644 index 00000000..e1ff2b36 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_request.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointRequest(Model): + """ServiceEndpointRequest. + + :param data_source_details: + :type data_source_details: :class:`DataSourceDetails ` + :param result_transformation_details: + :type result_transformation_details: :class:`ResultTransformationDetails ` + :param service_endpoint_details: + :type service_endpoint_details: :class:`ServiceEndpointDetails ` + """ + + _attribute_map = { + 'data_source_details': {'key': 'dataSourceDetails', 'type': 'DataSourceDetails'}, + 'result_transformation_details': {'key': 'resultTransformationDetails', 'type': 'ResultTransformationDetails'}, + 'service_endpoint_details': {'key': 'serviceEndpointDetails', 'type': 'ServiceEndpointDetails'} + } + + def __init__(self, data_source_details=None, result_transformation_details=None, service_endpoint_details=None): + super(ServiceEndpointRequest, self).__init__() + self.data_source_details = data_source_details + self.result_transformation_details = result_transformation_details + self.service_endpoint_details = service_endpoint_details diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_request_result.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_request_result.py new file mode 100644 index 00000000..b8b3b2a5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_request_result.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointRequestResult(Model): + """ServiceEndpointRequestResult. + + :param error_message: + :type error_message: str + :param result: + :type result: :class:`object ` + :param status_code: + :type status_code: object + """ + + _attribute_map = { + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'result': {'key': 'result', 'type': 'object'}, + 'status_code': {'key': 'statusCode', 'type': 'object'} + } + + def __init__(self, error_message=None, result=None, status_code=None): + super(ServiceEndpointRequestResult, self).__init__() + self.error_message = error_message + self.result = result + self.status_code = status_code diff --git a/vsts/vsts/task_agent/v4_1/models/service_endpoint_type.py b/vsts/vsts/task_agent/v4_1/models/service_endpoint_type.py new file mode 100644 index 00000000..8b0f011c --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/service_endpoint_type.py @@ -0,0 +1,73 @@ +# -------------------------------------------------------------------------------------------- +# 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 ServiceEndpointType(Model): + """ServiceEndpointType. + + :param authentication_schemes: Authentication scheme of service endpoint type. + :type authentication_schemes: list of :class:`ServiceEndpointAuthenticationScheme ` + :param data_sources: Data sources of service endpoint type. + :type data_sources: list of :class:`DataSource ` + :param dependency_data: Dependency data of service endpoint type. + :type dependency_data: list of :class:`DependencyData ` + :param description: Gets or sets the description of service endpoint type. + :type description: str + :param display_name: Gets or sets the display name of service endpoint type. + :type display_name: str + :param endpoint_url: Gets or sets the endpoint url of service endpoint type. + :type endpoint_url: :class:`EndpointUrl ` + :param help_link: Gets or sets the help link of service endpoint type. + :type help_link: :class:`HelpLink ` + :param help_mark_down: + :type help_mark_down: str + :param icon_url: Gets or sets the icon url of service endpoint type. + :type icon_url: str + :param input_descriptors: Input descriptor of service endpoint type. + :type input_descriptors: list of :class:`InputDescriptor ` + :param name: Gets or sets the name of service endpoint type. + :type name: str + :param trusted_hosts: Trusted hosts of a service endpoint type. + :type trusted_hosts: list of str + :param ui_contribution_id: Gets or sets the ui contribution id of service endpoint type. + :type ui_contribution_id: str + """ + + _attribute_map = { + 'authentication_schemes': {'key': 'authenticationSchemes', 'type': '[ServiceEndpointAuthenticationScheme]'}, + 'data_sources': {'key': 'dataSources', 'type': '[DataSource]'}, + 'dependency_data': {'key': 'dependencyData', 'type': '[DependencyData]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'EndpointUrl'}, + 'help_link': {'key': 'helpLink', 'type': 'HelpLink'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'input_descriptors': {'key': 'inputDescriptors', 'type': '[InputDescriptor]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'trusted_hosts': {'key': 'trustedHosts', 'type': '[str]'}, + 'ui_contribution_id': {'key': 'uiContributionId', 'type': 'str'} + } + + def __init__(self, authentication_schemes=None, data_sources=None, dependency_data=None, description=None, display_name=None, endpoint_url=None, help_link=None, help_mark_down=None, icon_url=None, input_descriptors=None, name=None, trusted_hosts=None, ui_contribution_id=None): + super(ServiceEndpointType, self).__init__() + self.authentication_schemes = authentication_schemes + self.data_sources = data_sources + self.dependency_data = dependency_data + self.description = description + self.display_name = display_name + self.endpoint_url = endpoint_url + self.help_link = help_link + self.help_mark_down = help_mark_down + self.icon_url = icon_url + self.input_descriptors = input_descriptors + self.name = name + self.trusted_hosts = trusted_hosts + self.ui_contribution_id = ui_contribution_id diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent.py b/vsts/vsts/task_agent/v4_1/models/task_agent.py new file mode 100644 index 00000000..8596aaba --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent.py @@ -0,0 +1,82 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_agent_reference import TaskAgentReference + + +class TaskAgent(TaskAgentReference): + """TaskAgent. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param enabled: Gets or sets a value indicating whether or not this agent should be enabled for job execution. + :type enabled: bool + :param id: Gets the identifier of the agent. + :type id: int + :param name: Gets the name of the agent. + :type name: str + :param oSDescription: Gets the OS of the agent. + :type oSDescription: str + :param status: Gets the current connectivity status of the agent. + :type status: object + :param version: Gets the version of the agent. + :type version: str + :param assigned_request: Gets the request which is currently assigned to this agent. + :type assigned_request: :class:`TaskAgentJobRequest ` + :param authorization: Gets or sets the authorization information for this agent. + :type authorization: :class:`TaskAgentAuthorization ` + :param created_on: Gets the date on which this agent was created. + :type created_on: datetime + :param last_completed_request: Gets the last request which was completed by this agent. + :type last_completed_request: :class:`TaskAgentJobRequest ` + :param max_parallelism: Gets or sets the maximum job parallelism allowed on this host. + :type max_parallelism: int + :param pending_update: Gets the pending update for this agent. + :type pending_update: :class:`TaskAgentUpdate ` + :param properties: + :type properties: :class:`object ` + :param status_changed_on: Gets the date on which the last connectivity status change occurred. + :type status_changed_on: datetime + :param system_capabilities: + :type system_capabilities: dict + :param user_capabilities: + :type user_capabilities: dict + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'oSDescription': {'key': 'oSDescription', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'str'}, + 'assigned_request': {'key': 'assignedRequest', 'type': 'TaskAgentJobRequest'}, + 'authorization': {'key': 'authorization', 'type': 'TaskAgentAuthorization'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'last_completed_request': {'key': 'lastCompletedRequest', 'type': 'TaskAgentJobRequest'}, + 'max_parallelism': {'key': 'maxParallelism', 'type': 'int'}, + 'pending_update': {'key': 'pendingUpdate', 'type': 'TaskAgentUpdate'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'status_changed_on': {'key': 'statusChangedOn', 'type': 'iso-8601'}, + 'system_capabilities': {'key': 'systemCapabilities', 'type': '{str}'}, + 'user_capabilities': {'key': 'userCapabilities', 'type': '{str}'} + } + + def __init__(self, _links=None, enabled=None, id=None, name=None, oSDescription=None, status=None, version=None, assigned_request=None, authorization=None, created_on=None, last_completed_request=None, max_parallelism=None, pending_update=None, properties=None, status_changed_on=None, system_capabilities=None, user_capabilities=None): + super(TaskAgent, self).__init__(_links=_links, enabled=enabled, id=id, name=name, oSDescription=oSDescription, status=status, version=version) + self.assigned_request = assigned_request + self.authorization = authorization + self.created_on = created_on + self.last_completed_request = last_completed_request + self.max_parallelism = max_parallelism + self.pending_update = pending_update + self.properties = properties + self.status_changed_on = status_changed_on + self.system_capabilities = system_capabilities + self.user_capabilities = user_capabilities diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_authorization.py b/vsts/vsts/task_agent/v4_1/models/task_agent_authorization.py new file mode 100644 index 00000000..5c2f5418 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_authorization.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentAuthorization(Model): + """TaskAgentAuthorization. + + :param authorization_url: Gets or sets the endpoint used to obtain access tokens from the configured token service. + :type authorization_url: str + :param client_id: Gets or sets the client identifier for this agent. + :type client_id: str + :param public_key: Gets or sets the public key used to verify the identity of this agent. + :type public_key: :class:`TaskAgentPublicKey ` + """ + + _attribute_map = { + 'authorization_url': {'key': 'authorizationUrl', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'public_key': {'key': 'publicKey', 'type': 'TaskAgentPublicKey'} + } + + def __init__(self, authorization_url=None, client_id=None, public_key=None): + super(TaskAgentAuthorization, self).__init__() + self.authorization_url = authorization_url + self.client_id = client_id + self.public_key = public_key diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_delay_source.py b/vsts/vsts/task_agent/v4_1/models/task_agent_delay_source.py new file mode 100644 index 00000000..44b09997 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_delay_source.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentDelaySource(Model): + """TaskAgentDelaySource. + + :param delays: + :type delays: list of object + :param task_agent: + :type task_agent: :class:`TaskAgentReference ` + """ + + _attribute_map = { + 'delays': {'key': 'delays', 'type': '[object]'}, + 'task_agent': {'key': 'taskAgent', 'type': 'TaskAgentReference'} + } + + def __init__(self, delays=None, task_agent=None): + super(TaskAgentDelaySource, self).__init__() + self.delays = delays + self.task_agent = task_agent diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_job_request.py b/vsts/vsts/task_agent/v4_1/models/task_agent_job_request.py new file mode 100644 index 00000000..69cf1e71 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_job_request.py @@ -0,0 +1,121 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentJobRequest(Model): + """TaskAgentJobRequest. + + :param agent_delays: + :type agent_delays: list of :class:`TaskAgentDelaySource ` + :param assign_time: + :type assign_time: datetime + :param data: + :type data: dict + :param definition: + :type definition: :class:`TaskOrchestrationOwner ` + :param demands: + :type demands: list of :class:`object ` + :param expected_duration: + :type expected_duration: object + :param finish_time: + :type finish_time: datetime + :param host_id: + :type host_id: str + :param job_id: + :type job_id: str + :param job_name: + :type job_name: str + :param locked_until: + :type locked_until: datetime + :param matched_agents: + :type matched_agents: list of :class:`TaskAgentReference ` + :param owner: + :type owner: :class:`TaskOrchestrationOwner ` + :param plan_group: + :type plan_group: str + :param plan_id: + :type plan_id: str + :param plan_type: + :type plan_type: str + :param pool_id: + :type pool_id: int + :param queue_id: + :type queue_id: int + :param queue_time: + :type queue_time: datetime + :param receive_time: + :type receive_time: datetime + :param request_id: + :type request_id: long + :param reserved_agent: + :type reserved_agent: :class:`TaskAgentReference ` + :param result: + :type result: object + :param scope_id: + :type scope_id: str + :param service_owner: + :type service_owner: str + """ + + _attribute_map = { + 'agent_delays': {'key': 'agentDelays', 'type': '[TaskAgentDelaySource]'}, + 'assign_time': {'key': 'assignTime', 'type': 'iso-8601'}, + 'data': {'key': 'data', 'type': '{str}'}, + 'definition': {'key': 'definition', 'type': 'TaskOrchestrationOwner'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'expected_duration': {'key': 'expectedDuration', 'type': 'object'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'host_id': {'key': 'hostId', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'job_name': {'key': 'jobName', 'type': 'str'}, + 'locked_until': {'key': 'lockedUntil', 'type': 'iso-8601'}, + 'matched_agents': {'key': 'matchedAgents', 'type': '[TaskAgentReference]'}, + 'owner': {'key': 'owner', 'type': 'TaskOrchestrationOwner'}, + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'pool_id': {'key': 'poolId', 'type': 'int'}, + 'queue_id': {'key': 'queueId', 'type': 'int'}, + 'queue_time': {'key': 'queueTime', 'type': 'iso-8601'}, + 'receive_time': {'key': 'receiveTime', 'type': 'iso-8601'}, + 'request_id': {'key': 'requestId', 'type': 'long'}, + 'reserved_agent': {'key': 'reservedAgent', 'type': 'TaskAgentReference'}, + 'result': {'key': 'result', 'type': 'object'}, + 'scope_id': {'key': 'scopeId', 'type': 'str'}, + 'service_owner': {'key': 'serviceOwner', 'type': 'str'} + } + + def __init__(self, agent_delays=None, assign_time=None, data=None, definition=None, demands=None, expected_duration=None, finish_time=None, host_id=None, job_id=None, job_name=None, locked_until=None, matched_agents=None, owner=None, plan_group=None, plan_id=None, plan_type=None, pool_id=None, queue_id=None, queue_time=None, receive_time=None, request_id=None, reserved_agent=None, result=None, scope_id=None, service_owner=None): + super(TaskAgentJobRequest, self).__init__() + self.agent_delays = agent_delays + self.assign_time = assign_time + self.data = data + self.definition = definition + self.demands = demands + self.expected_duration = expected_duration + self.finish_time = finish_time + self.host_id = host_id + self.job_id = job_id + self.job_name = job_name + self.locked_until = locked_until + self.matched_agents = matched_agents + self.owner = owner + self.plan_group = plan_group + self.plan_id = plan_id + self.plan_type = plan_type + self.pool_id = pool_id + self.queue_id = queue_id + self.queue_time = queue_time + self.receive_time = receive_time + self.request_id = request_id + self.reserved_agent = reserved_agent + self.result = result + self.scope_id = scope_id + self.service_owner = service_owner diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_message.py b/vsts/vsts/task_agent/v4_1/models/task_agent_message.py new file mode 100644 index 00000000..5b4e7a78 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_message.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentMessage(Model): + """TaskAgentMessage. + + :param body: Gets or sets the body of the message. If the IV property is provided the body will need to be decrypted using the TaskAgentSession.EncryptionKey value in addition to the IV. + :type body: str + :param iV: Gets or sets the intialization vector used to encrypt this message. + :type iV: list of number + :param message_id: Gets or sets the message identifier. + :type message_id: long + :param message_type: Gets or sets the message type, describing the data contract found in TaskAgentMessage.Body. + :type message_type: str + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'iV': {'key': 'iV', 'type': '[number]'}, + 'message_id': {'key': 'messageId', 'type': 'long'}, + 'message_type': {'key': 'messageType', 'type': 'str'} + } + + def __init__(self, body=None, iV=None, message_id=None, message_type=None): + super(TaskAgentMessage, self).__init__() + self.body = body + self.iV = iV + self.message_id = message_id + self.message_type = message_type diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool.py new file mode 100644 index 00000000..137808dc --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool.py @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_agent_pool_reference import TaskAgentPoolReference + + +class TaskAgentPool(TaskAgentPoolReference): + """TaskAgentPool. + + :param id: + :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 name: + :type name: str + :param pool_type: Gets or sets the type of the pool + :type pool_type: object + :param scope: + :type scope: str + :param size: Gets the current size of the pool. + :type size: int + :param auto_provision: Gets or sets a value indicating whether or not a queue should be automatically provisioned for each project collection or not. + :type auto_provision: bool + :param created_by: Gets the identity who created this pool. The creator of the pool is automatically added into the administrators group for the pool on creation. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets the date/time of the pool creation. + :type created_on: datetime + :param owner: Gets the identity who owns or administrates this pool. + :type owner: :class:`IdentityRef ` + :param properties: + :type properties: :class:`object ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool_type': {'key': 'poolType', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'int'}, + 'auto_provision': {'key': 'autoProvision', 'type': 'bool'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'properties': {'key': 'properties', 'type': 'object'} + } + + def __init__(self, id=None, is_hosted=None, name=None, pool_type=None, scope=None, size=None, auto_provision=None, created_by=None, created_on=None, owner=None, properties=None): + super(TaskAgentPool, self).__init__(id=id, is_hosted=is_hosted, name=name, pool_type=pool_type, scope=scope, size=size) + self.auto_provision = auto_provision + self.created_by = created_by + self.created_on = created_on + self.owner = owner + self.properties = properties diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_definition.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_definition.py new file mode 100644 index 00000000..39aef023 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_definition.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceDefinition(Model): + """TaskAgentPoolMaintenanceDefinition. + + :param enabled: Enable maintenance + :type enabled: bool + :param id: Id + :type id: int + :param job_timeout_in_minutes: Maintenance job timeout per agent + :type job_timeout_in_minutes: int + :param max_concurrent_agents_percentage: Max percentage of agents within a pool running maintenance job at given time + :type max_concurrent_agents_percentage: int + :param options: + :type options: :class:`TaskAgentPoolMaintenanceOptions ` + :param pool: Pool reference for the maintenance definition + :type pool: :class:`TaskAgentPoolReference ` + :param retention_policy: + :type retention_policy: :class:`TaskAgentPoolMaintenanceRetentionPolicy ` + :param schedule_setting: + :type schedule_setting: :class:`TaskAgentPoolMaintenanceSchedule ` + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'job_timeout_in_minutes': {'key': 'jobTimeoutInMinutes', 'type': 'int'}, + 'max_concurrent_agents_percentage': {'key': 'maxConcurrentAgentsPercentage', 'type': 'int'}, + 'options': {'key': 'options', 'type': 'TaskAgentPoolMaintenanceOptions'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'TaskAgentPoolMaintenanceRetentionPolicy'}, + 'schedule_setting': {'key': 'scheduleSetting', 'type': 'TaskAgentPoolMaintenanceSchedule'} + } + + def __init__(self, enabled=None, id=None, job_timeout_in_minutes=None, max_concurrent_agents_percentage=None, options=None, pool=None, retention_policy=None, schedule_setting=None): + super(TaskAgentPoolMaintenanceDefinition, self).__init__() + self.enabled = enabled + self.id = id + self.job_timeout_in_minutes = job_timeout_in_minutes + self.max_concurrent_agents_percentage = max_concurrent_agents_percentage + self.options = options + self.pool = pool + self.retention_policy = retention_policy + self.schedule_setting = schedule_setting diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_job.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_job.py new file mode 100644 index 00000000..b7545248 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_job.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceJob(Model): + """TaskAgentPoolMaintenanceJob. + + :param definition_id: The maintenance definition for the maintenance job + :type definition_id: int + :param error_count: The total error counts during the maintenance job + :type error_count: int + :param finish_time: Time that the maintenance job was completed + :type finish_time: datetime + :param job_id: Id of the maintenance job + :type job_id: int + :param logs_download_url: The log download url for the maintenance job + :type logs_download_url: str + :param orchestration_id: Orchestration/Plan Id for the maintenance job + :type orchestration_id: str + :param pool: Pool reference for the maintenance job + :type pool: :class:`TaskAgentPoolReference ` + :param queue_time: Time that the maintenance job was queued + :type queue_time: datetime + :param requested_by: The identity that queued the maintenance job + :type requested_by: :class:`IdentityRef ` + :param result: The maintenance job result + :type result: object + :param start_time: Time that the maintenance job was started + :type start_time: datetime + :param status: Status of the maintenance job + :type status: object + :param target_agents: + :type target_agents: list of :class:`TaskAgentPoolMaintenanceJobTargetAgent ` + :param warning_count: The total warning counts during the maintenance job + :type warning_count: int + """ + + _attribute_map = { + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'error_count': {'key': 'errorCount', 'type': 'int'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'int'}, + 'logs_download_url': {'key': 'logsDownloadUrl', 'type': 'str'}, + 'orchestration_id': {'key': 'orchestrationId', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'queue_time': {'key': 'queueTime', 'type': 'iso-8601'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'result': {'key': 'result', 'type': 'object'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'object'}, + 'target_agents': {'key': 'targetAgents', 'type': '[TaskAgentPoolMaintenanceJobTargetAgent]'}, + 'warning_count': {'key': 'warningCount', 'type': 'int'} + } + + def __init__(self, definition_id=None, error_count=None, finish_time=None, job_id=None, logs_download_url=None, orchestration_id=None, pool=None, queue_time=None, requested_by=None, result=None, start_time=None, status=None, target_agents=None, warning_count=None): + super(TaskAgentPoolMaintenanceJob, self).__init__() + self.definition_id = definition_id + self.error_count = error_count + self.finish_time = finish_time + self.job_id = job_id + self.logs_download_url = logs_download_url + self.orchestration_id = orchestration_id + self.pool = pool + self.queue_time = queue_time + self.requested_by = requested_by + self.result = result + self.start_time = start_time + self.status = status + self.target_agents = target_agents + self.warning_count = warning_count diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_job_target_agent.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_job_target_agent.py new file mode 100644 index 00000000..eb8f80e5 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_job_target_agent.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceJobTargetAgent(Model): + """TaskAgentPoolMaintenanceJobTargetAgent. + + :param agent: + :type agent: :class:`TaskAgentReference ` + :param job_id: + :type job_id: int + :param result: + :type result: object + :param status: + :type status: object + """ + + _attribute_map = { + 'agent': {'key': 'agent', 'type': 'TaskAgentReference'}, + 'job_id': {'key': 'jobId', 'type': 'int'}, + 'result': {'key': 'result', 'type': 'object'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, agent=None, job_id=None, result=None, status=None): + super(TaskAgentPoolMaintenanceJobTargetAgent, self).__init__() + self.agent = agent + self.job_id = job_id + self.result = result + self.status = status diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_options.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_options.py new file mode 100644 index 00000000..7c6690dd --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_options.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceOptions(Model): + """TaskAgentPoolMaintenanceOptions. + + :param working_directory_expiration_in_days: time to consider a System.DefaultWorkingDirectory is stale + :type working_directory_expiration_in_days: int + """ + + _attribute_map = { + 'working_directory_expiration_in_days': {'key': 'workingDirectoryExpirationInDays', 'type': 'int'} + } + + def __init__(self, working_directory_expiration_in_days=None): + super(TaskAgentPoolMaintenanceOptions, self).__init__() + self.working_directory_expiration_in_days = working_directory_expiration_in_days diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_retention_policy.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_retention_policy.py new file mode 100644 index 00000000..4f9c1434 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_retention_policy.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceRetentionPolicy(Model): + """TaskAgentPoolMaintenanceRetentionPolicy. + + :param number_of_history_records_to_keep: Number of records to keep for maintenance job executed with this definition. + :type number_of_history_records_to_keep: int + """ + + _attribute_map = { + 'number_of_history_records_to_keep': {'key': 'numberOfHistoryRecordsToKeep', 'type': 'int'} + } + + def __init__(self, number_of_history_records_to_keep=None): + super(TaskAgentPoolMaintenanceRetentionPolicy, self).__init__() + self.number_of_history_records_to_keep = number_of_history_records_to_keep diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_schedule.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_schedule.py new file mode 100644 index 00000000..4395a005 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_maintenance_schedule.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolMaintenanceSchedule(Model): + """TaskAgentPoolMaintenanceSchedule. + + :param days_to_build: Days for a build (flags enum for days of the week) + :type days_to_build: object + :param schedule_job_id: The Job Id of the Scheduled job that will queue the pool maintenance job. + :type schedule_job_id: str + :param start_hours: Local timezone hour to start + :type start_hours: int + :param start_minutes: Local timezone minute to start + :type start_minutes: int + :param time_zone_id: Time zone of the build schedule (string representation of the time zone id) + :type time_zone_id: str + """ + + _attribute_map = { + 'days_to_build': {'key': 'daysToBuild', 'type': 'object'}, + 'schedule_job_id': {'key': 'scheduleJobId', 'type': 'str'}, + 'start_hours': {'key': 'startHours', 'type': 'int'}, + 'start_minutes': {'key': 'startMinutes', 'type': 'int'}, + 'time_zone_id': {'key': 'timeZoneId', 'type': 'str'} + } + + def __init__(self, days_to_build=None, schedule_job_id=None, start_hours=None, start_minutes=None, time_zone_id=None): + super(TaskAgentPoolMaintenanceSchedule, self).__init__() + self.days_to_build = days_to_build + self.schedule_job_id = schedule_job_id + self.start_hours = start_hours + self.start_minutes = start_minutes + self.time_zone_id = time_zone_id diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_pool_reference.py b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_reference.py new file mode 100644 index 00000000..4857a3f1 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_pool_reference.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPoolReference(Model): + """TaskAgentPoolReference. + + :param id: + :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 name: + :type name: str + :param pool_type: Gets or sets the type of the pool + :type pool_type: object + :param scope: + :type scope: str + :param size: Gets the current size of the pool. + :type size: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'is_hosted': {'key': 'isHosted', '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): + super(TaskAgentPoolReference, self).__init__() + self.id = id + self.is_hosted = is_hosted + self.name = name + self.pool_type = pool_type + self.scope = scope + self.size = size diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_public_key.py b/vsts/vsts/task_agent/v4_1/models/task_agent_public_key.py new file mode 100644 index 00000000..32ad5940 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_public_key.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentPublicKey(Model): + """TaskAgentPublicKey. + + :param exponent: Gets or sets the exponent for the public key. + :type exponent: list of number + :param modulus: Gets or sets the modulus for the public key. + :type modulus: list of number + """ + + _attribute_map = { + 'exponent': {'key': 'exponent', 'type': '[number]'}, + 'modulus': {'key': 'modulus', 'type': '[number]'} + } + + def __init__(self, exponent=None, modulus=None): + super(TaskAgentPublicKey, self).__init__() + self.exponent = exponent + self.modulus = modulus diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_queue.py b/vsts/vsts/task_agent/v4_1/models/task_agent_queue.py new file mode 100644 index 00000000..9e0e0891 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_queue.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentQueue(Model): + """TaskAgentQueue. + + :param id: Id of the queue + :type id: int + :param name: Name of the queue + :type name: str + :param pool: Pool reference for this queue + :type pool: :class:`TaskAgentPoolReference ` + :param project_id: Project Id + :type project_id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pool': {'key': 'pool', 'type': 'TaskAgentPoolReference'}, + 'project_id': {'key': 'projectId', 'type': 'str'} + } + + def __init__(self, id=None, name=None, pool=None, project_id=None): + super(TaskAgentQueue, self).__init__() + self.id = id + self.name = name + self.pool = pool + self.project_id = project_id diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_reference.py b/vsts/vsts/task_agent/v4_1/models/task_agent_reference.py new file mode 100644 index 00000000..a58ba2b1 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_reference.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentReference(Model): + """TaskAgentReference. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param enabled: Gets or sets a value indicating whether or not this agent should be enabled for job execution. + :type enabled: bool + :param id: Gets the identifier of the agent. + :type id: int + :param name: Gets the name of the agent. + :type name: str + :param oSDescription: Gets the OS of the agent. + :type oSDescription: str + :param status: Gets the current connectivity status of the agent. + :type status: object + :param version: Gets the version of the agent. + :type version: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'oSDescription': {'key': 'oSDescription', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, _links=None, enabled=None, id=None, name=None, oSDescription=None, status=None, version=None): + super(TaskAgentReference, self).__init__() + self._links = _links + self.enabled = enabled + self.id = id + self.name = name + self.oSDescription = oSDescription + self.status = status + self.version = version diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_session.py b/vsts/vsts/task_agent/v4_1/models/task_agent_session.py new file mode 100644 index 00000000..6baeb102 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_session.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentSession(Model): + """TaskAgentSession. + + :param agent: Gets or sets the agent which is the target of the session. + :type agent: :class:`TaskAgentReference ` + :param encryption_key: Gets the key used to encrypt message traffic for this session. + :type encryption_key: :class:`TaskAgentSessionKey ` + :param owner_name: Gets or sets the owner name of this session. Generally this will be the machine of origination. + :type owner_name: str + :param session_id: Gets the unique identifier for this session. + :type session_id: str + :param system_capabilities: + :type system_capabilities: dict + """ + + _attribute_map = { + 'agent': {'key': 'agent', 'type': 'TaskAgentReference'}, + 'encryption_key': {'key': 'encryptionKey', 'type': 'TaskAgentSessionKey'}, + 'owner_name': {'key': 'ownerName', 'type': 'str'}, + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'system_capabilities': {'key': 'systemCapabilities', 'type': '{str}'} + } + + def __init__(self, agent=None, encryption_key=None, owner_name=None, session_id=None, system_capabilities=None): + super(TaskAgentSession, self).__init__() + self.agent = agent + self.encryption_key = encryption_key + self.owner_name = owner_name + self.session_id = session_id + self.system_capabilities = system_capabilities diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_session_key.py b/vsts/vsts/task_agent/v4_1/models/task_agent_session_key.py new file mode 100644 index 00000000..6015a042 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_session_key.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentSessionKey(Model): + """TaskAgentSessionKey. + + :param encrypted: Gets or sets a value indicating whether or not the key value is encrypted. If this value is true, the Value property should be decrypted using the RSA key exchanged with the server during registration. + :type encrypted: bool + :param value: Gets or sets the symmetric key value. + :type value: list of number + """ + + _attribute_map = { + 'encrypted': {'key': 'encrypted', 'type': 'bool'}, + 'value': {'key': 'value', 'type': '[number]'} + } + + def __init__(self, encrypted=None, value=None): + super(TaskAgentSessionKey, self).__init__() + self.encrypted = encrypted + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_update.py b/vsts/vsts/task_agent/v4_1/models/task_agent_update.py new file mode 100644 index 00000000..ac377f67 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_update.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentUpdate(Model): + """TaskAgentUpdate. + + :param current_state: The current state of this agent update + :type current_state: str + :param reason: The reason of this agent update + :type reason: :class:`TaskAgentUpdateReason ` + :param requested_by: The identity that request the agent update + :type requested_by: :class:`IdentityRef ` + :param request_time: Gets the date on which this agent update was requested. + :type request_time: datetime + :param source_version: Gets or sets the source agent version of the agent update + :type source_version: :class:`PackageVersion ` + :param target_version: Gets or sets the target agent version of the agent update + :type target_version: :class:`PackageVersion ` + """ + + _attribute_map = { + 'current_state': {'key': 'currentState', 'type': 'str'}, + 'reason': {'key': 'reason', 'type': 'TaskAgentUpdateReason'}, + 'requested_by': {'key': 'requestedBy', 'type': 'IdentityRef'}, + 'request_time': {'key': 'requestTime', 'type': 'iso-8601'}, + 'source_version': {'key': 'sourceVersion', 'type': 'PackageVersion'}, + 'target_version': {'key': 'targetVersion', 'type': 'PackageVersion'} + } + + def __init__(self, current_state=None, reason=None, requested_by=None, request_time=None, source_version=None, target_version=None): + super(TaskAgentUpdate, self).__init__() + self.current_state = current_state + self.reason = reason + self.requested_by = requested_by + self.request_time = request_time + self.source_version = source_version + self.target_version = target_version diff --git a/vsts/vsts/task_agent/v4_1/models/task_agent_update_reason.py b/vsts/vsts/task_agent/v4_1/models/task_agent_update_reason.py new file mode 100644 index 00000000..7d04a89f --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_agent_update_reason.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskAgentUpdateReason(Model): + """TaskAgentUpdateReason. + + :param code: + :type code: object + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'object'} + } + + def __init__(self, code=None): + super(TaskAgentUpdateReason, self).__init__() + self.code = code diff --git a/vsts/vsts/task_agent/v4_1/models/task_definition.py b/vsts/vsts/task_agent/v4_1/models/task_definition.py new file mode 100644 index 00000000..43791c03 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_definition.py @@ -0,0 +1,161 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskDefinition(Model): + """TaskDefinition. + + :param agent_execution: + :type agent_execution: :class:`TaskExecution ` + :param author: + :type author: str + :param category: + :type category: str + :param contents_uploaded: + :type contents_uploaded: bool + :param contribution_identifier: + :type contribution_identifier: str + :param contribution_version: + :type contribution_version: str + :param data_source_bindings: + :type data_source_bindings: list of :class:`DataSourceBinding ` + :param definition_type: + :type definition_type: str + :param demands: + :type demands: list of :class:`object ` + :param deprecated: + :type deprecated: bool + :param description: + :type description: str + :param disabled: + :type disabled: bool + :param execution: + :type execution: dict + :param friendly_name: + :type friendly_name: str + :param groups: + :type groups: list of :class:`TaskGroupDefinition ` + :param help_mark_down: + :type help_mark_down: str + :param host_type: + :type host_type: str + :param icon_url: + :type icon_url: str + :param id: + :type id: str + :param inputs: + :type inputs: list of :class:`TaskInputDefinition ` + :param instance_name_format: + :type instance_name_format: str + :param minimum_agent_version: + :type minimum_agent_version: str + :param name: + :type name: str + :param output_variables: + :type output_variables: list of :class:`TaskOutputVariable ` + :param package_location: + :type package_location: str + :param package_type: + :type package_type: str + :param preview: + :type preview: bool + :param release_notes: + :type release_notes: str + :param runs_on: + :type runs_on: list of str + :param satisfies: + :type satisfies: list of str + :param server_owned: + :type server_owned: bool + :param source_definitions: + :type source_definitions: list of :class:`TaskSourceDefinition ` + :param source_location: + :type source_location: str + :param version: + :type version: :class:`TaskVersion ` + :param visibility: + :type visibility: list of str + """ + + _attribute_map = { + 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'contents_uploaded': {'key': 'contentsUploaded', 'type': 'bool'}, + 'contribution_identifier': {'key': 'contributionIdentifier', 'type': 'str'}, + 'contribution_version': {'key': 'contributionVersion', 'type': 'str'}, + 'data_source_bindings': {'key': 'dataSourceBindings', 'type': '[DataSourceBinding]'}, + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deprecated': {'key': 'deprecated', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'execution': {'key': 'execution', 'type': '{object}'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'groups': {'key': 'groups', 'type': '[TaskGroupDefinition]'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'host_type': {'key': 'hostType', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinition]'}, + 'instance_name_format': {'key': 'instanceNameFormat', 'type': 'str'}, + 'minimum_agent_version': {'key': 'minimumAgentVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'output_variables': {'key': 'outputVariables', 'type': '[TaskOutputVariable]'}, + 'package_location': {'key': 'packageLocation', 'type': 'str'}, + 'package_type': {'key': 'packageType', 'type': 'str'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'release_notes': {'key': 'releaseNotes', 'type': 'str'}, + 'runs_on': {'key': 'runsOn', 'type': '[str]'}, + 'satisfies': {'key': 'satisfies', 'type': '[str]'}, + 'server_owned': {'key': 'serverOwned', 'type': 'bool'}, + 'source_definitions': {'key': 'sourceDefinitions', 'type': '[TaskSourceDefinition]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'TaskVersion'}, + 'visibility': {'key': 'visibility', 'type': '[str]'} + } + + def __init__(self, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, preview=None, release_notes=None, runs_on=None, satisfies=None, server_owned=None, source_definitions=None, source_location=None, version=None, visibility=None): + super(TaskDefinition, self).__init__() + self.agent_execution = agent_execution + self.author = author + self.category = category + self.contents_uploaded = contents_uploaded + self.contribution_identifier = contribution_identifier + self.contribution_version = contribution_version + self.data_source_bindings = data_source_bindings + self.definition_type = definition_type + self.demands = demands + self.deprecated = deprecated + self.description = description + self.disabled = disabled + self.execution = execution + self.friendly_name = friendly_name + self.groups = groups + self.help_mark_down = help_mark_down + self.host_type = host_type + self.icon_url = icon_url + self.id = id + self.inputs = inputs + self.instance_name_format = instance_name_format + self.minimum_agent_version = minimum_agent_version + self.name = name + self.output_variables = output_variables + self.package_location = package_location + self.package_type = package_type + self.preview = preview + self.release_notes = release_notes + self.runs_on = runs_on + self.satisfies = satisfies + self.server_owned = server_owned + self.source_definitions = source_definitions + self.source_location = source_location + self.version = version + self.visibility = visibility diff --git a/vsts/vsts/task_agent/v4_1/models/task_definition_endpoint.py b/vsts/vsts/task_agent/v4_1/models/task_definition_endpoint.py new file mode 100644 index 00000000..ee2aea05 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_definition_endpoint.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskDefinitionEndpoint(Model): + """TaskDefinitionEndpoint. + + :param connection_id: An ID that identifies a service connection to be used for authenticating endpoint requests. + :type connection_id: str + :param key_selector: An Json based keyselector to filter response returned by fetching the endpoint Url.A Json based keyselector must be prefixed with "jsonpath:". KeySelector can be used to specify the filter to get the keys for the values specified with Selector. The following keyselector defines an Json for extracting nodes named 'ServiceName'. endpoint.KeySelector = "jsonpath://ServiceName"; + :type key_selector: str + :param scope: The scope as understood by Connected Services. Essentialy, a project-id for now. + :type scope: str + :param selector: An XPath/Json based selector to filter response returned by fetching the endpoint Url. An XPath based selector must be prefixed with the string "xpath:". A Json based selector must be prefixed with "jsonpath:". The following selector defines an XPath for extracting nodes named 'ServiceName'. endpoint.Selector = "xpath://ServiceName"; + :type selector: str + :param task_id: TaskId that this endpoint belongs to. + :type task_id: str + :param url: URL to GET. + :type url: str + """ + + _attribute_map = { + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'scope': {'key': 'scope', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'task_id': {'key': 'taskId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, connection_id=None, key_selector=None, scope=None, selector=None, task_id=None, url=None): + super(TaskDefinitionEndpoint, self).__init__() + self.connection_id = connection_id + self.key_selector = key_selector + self.scope = scope + self.selector = selector + self.task_id = task_id + self.url = url diff --git a/vsts/vsts/task_agent/v4_1/models/task_definition_reference.py b/vsts/vsts/task_agent/v4_1/models/task_definition_reference.py new file mode 100644 index 00000000..ffc8dc2d --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_definition_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskDefinitionReference(Model): + """TaskDefinitionReference. + + :param definition_type: Gets or sets the definition type. Values can be 'task' or 'metaTask'. + :type definition_type: str + :param id: Gets or sets the unique identifier of task. + :type id: str + :param version_spec: Gets or sets the version specification of task. + :type version_spec: str + """ + + _attribute_map = { + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'version_spec': {'key': 'versionSpec', 'type': 'str'} + } + + def __init__(self, definition_type=None, id=None, version_spec=None): + super(TaskDefinitionReference, self).__init__() + self.definition_type = definition_type + self.id = id + self.version_spec = version_spec diff --git a/vsts/vsts/task_agent/v4_1/models/task_execution.py b/vsts/vsts/task_agent/v4_1/models/task_execution.py new file mode 100644 index 00000000..d23d780d --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_execution.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskExecution(Model): + """TaskExecution. + + :param exec_task: The utility task to run. Specifying this means that this task definition is simply a meta task to call another task. This is useful for tasks that call utility tasks like powershell and commandline + :type exec_task: :class:`TaskReference ` + :param platform_instructions: If a task is going to run code, then this provides the type/script etc... information by platform. For example, it might look like. net45: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } net20: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } java: { jar: "powershelltask.tasks.automation.teamfoundation.microsoft.com", } node: { script: "powershellhost.js", } + :type platform_instructions: dict + """ + + _attribute_map = { + 'exec_task': {'key': 'execTask', 'type': 'TaskReference'}, + 'platform_instructions': {'key': 'platformInstructions', 'type': '{{str}}'} + } + + def __init__(self, exec_task=None, platform_instructions=None): + super(TaskExecution, self).__init__() + self.exec_task = exec_task + self.platform_instructions = platform_instructions diff --git a/vsts/vsts/task_agent/v4_1/models/task_group.py b/vsts/vsts/task_agent/v4_1/models/task_group.py new file mode 100644 index 00000000..0a71354c --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_group.py @@ -0,0 +1,166 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_definition import TaskDefinition + + +class TaskGroup(TaskDefinition): + """TaskGroup. + + :param agent_execution: + :type agent_execution: :class:`TaskExecution ` + :param author: + :type author: str + :param category: + :type category: str + :param contents_uploaded: + :type contents_uploaded: bool + :param contribution_identifier: + :type contribution_identifier: str + :param contribution_version: + :type contribution_version: str + :param data_source_bindings: + :type data_source_bindings: list of :class:`DataSourceBinding ` + :param definition_type: + :type definition_type: str + :param demands: + :type demands: list of :class:`object ` + :param deprecated: + :type deprecated: bool + :param description: + :type description: str + :param disabled: + :type disabled: bool + :param execution: + :type execution: dict + :param friendly_name: + :type friendly_name: str + :param groups: + :type groups: list of :class:`TaskGroupDefinition ` + :param help_mark_down: + :type help_mark_down: str + :param host_type: + :type host_type: str + :param icon_url: + :type icon_url: str + :param id: + :type id: str + :param inputs: + :type inputs: list of :class:`TaskInputDefinition ` + :param instance_name_format: + :type instance_name_format: str + :param minimum_agent_version: + :type minimum_agent_version: str + :param name: + :type name: str + :param output_variables: + :type output_variables: list of :class:`TaskOutputVariable ` + :param package_location: + :type package_location: str + :param package_type: + :type package_type: str + :param preview: + :type preview: bool + :param release_notes: + :type release_notes: str + :param runs_on: + :type runs_on: list of str + :param satisfies: + :type satisfies: list of str + :param server_owned: + :type server_owned: bool + :param source_definitions: + :type source_definitions: list of :class:`TaskSourceDefinition ` + :param source_location: + :type source_location: str + :param version: + :type version: :class:`TaskVersion ` + :param visibility: + :type visibility: list of str + :param comment: Gets or sets comment. + :type comment: str + :param created_by: Gets or sets the identity who created. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets or sets date on which it got created. + :type created_on: datetime + :param deleted: Gets or sets as 'true' to indicate as deleted, 'false' otherwise. + :type deleted: bool + :param modified_by: Gets or sets the identity who modified. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets or sets date on which it got modified. + :type modified_on: datetime + :param owner: Gets or sets the owner. + :type owner: str + :param parent_definition_id: Gets or sets parent task group Id. This is used while creating a draft task group. + :type parent_definition_id: str + :param revision: Gets or sets revision. + :type revision: int + :param tasks: Gets or sets the tasks. + :type tasks: list of :class:`TaskGroupStep ` + """ + + _attribute_map = { + 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'contents_uploaded': {'key': 'contentsUploaded', 'type': 'bool'}, + 'contribution_identifier': {'key': 'contributionIdentifier', 'type': 'str'}, + 'contribution_version': {'key': 'contributionVersion', 'type': 'str'}, + 'data_source_bindings': {'key': 'dataSourceBindings', 'type': '[DataSourceBinding]'}, + 'definition_type': {'key': 'definitionType', 'type': 'str'}, + 'demands': {'key': 'demands', 'type': '[object]'}, + 'deprecated': {'key': 'deprecated', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'disabled': {'key': 'disabled', 'type': 'bool'}, + 'execution': {'key': 'execution', 'type': '{object}'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'groups': {'key': 'groups', 'type': '[TaskGroupDefinition]'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'host_type': {'key': 'hostType', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinition]'}, + 'instance_name_format': {'key': 'instanceNameFormat', 'type': 'str'}, + 'minimum_agent_version': {'key': 'minimumAgentVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'output_variables': {'key': 'outputVariables', 'type': '[TaskOutputVariable]'}, + 'package_location': {'key': 'packageLocation', 'type': 'str'}, + 'package_type': {'key': 'packageType', 'type': 'str'}, + 'preview': {'key': 'preview', 'type': 'bool'}, + 'release_notes': {'key': 'releaseNotes', 'type': 'str'}, + 'runs_on': {'key': 'runsOn', 'type': '[str]'}, + 'satisfies': {'key': 'satisfies', 'type': '[str]'}, + 'server_owned': {'key': 'serverOwned', 'type': 'bool'}, + 'source_definitions': {'key': 'sourceDefinitions', 'type': '[TaskSourceDefinition]'}, + 'source_location': {'key': 'sourceLocation', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'TaskVersion'}, + 'visibility': {'key': 'visibility', 'type': '[str]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'deleted': {'key': 'deleted', 'type': 'bool'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'str'}, + 'parent_definition_id': {'key': 'parentDefinitionId', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'tasks': {'key': 'tasks', 'type': '[TaskGroupStep]'} + } + + def __init__(self, agent_execution=None, author=None, category=None, contents_uploaded=None, contribution_identifier=None, contribution_version=None, data_source_bindings=None, definition_type=None, demands=None, deprecated=None, description=None, disabled=None, execution=None, friendly_name=None, groups=None, help_mark_down=None, host_type=None, icon_url=None, id=None, inputs=None, instance_name_format=None, minimum_agent_version=None, name=None, output_variables=None, package_location=None, package_type=None, preview=None, release_notes=None, runs_on=None, satisfies=None, server_owned=None, source_definitions=None, source_location=None, version=None, visibility=None, comment=None, created_by=None, created_on=None, deleted=None, modified_by=None, modified_on=None, owner=None, parent_definition_id=None, revision=None, tasks=None): + super(TaskGroup, self).__init__(agent_execution=agent_execution, author=author, category=category, contents_uploaded=contents_uploaded, contribution_identifier=contribution_identifier, contribution_version=contribution_version, data_source_bindings=data_source_bindings, definition_type=definition_type, demands=demands, deprecated=deprecated, description=description, disabled=disabled, execution=execution, friendly_name=friendly_name, groups=groups, help_mark_down=help_mark_down, host_type=host_type, icon_url=icon_url, id=id, inputs=inputs, instance_name_format=instance_name_format, minimum_agent_version=minimum_agent_version, name=name, output_variables=output_variables, package_location=package_location, package_type=package_type, preview=preview, release_notes=release_notes, runs_on=runs_on, satisfies=satisfies, server_owned=server_owned, source_definitions=source_definitions, source_location=source_location, version=version, visibility=visibility) + self.comment = comment + self.created_by = created_by + self.created_on = created_on + self.deleted = deleted + self.modified_by = modified_by + self.modified_on = modified_on + self.owner = owner + self.parent_definition_id = parent_definition_id + self.revision = revision + self.tasks = tasks diff --git a/vsts/vsts/task_agent/v4_1/models/task_group_create_parameter.py b/vsts/vsts/task_agent/v4_1/models/task_group_create_parameter.py new file mode 100644 index 00000000..ecc20c8a --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_group_create_parameter.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupCreateParameter(Model): + """TaskGroupCreateParameter. + + :param author: Sets author name of the task group. + :type author: str + :param category: Sets category of the task group. + :type category: str + :param description: Sets description of the task group. + :type description: str + :param friendly_name: Sets friendly name of the task group. + :type friendly_name: str + :param icon_url: Sets url icon of the task group. + :type icon_url: str + :param inputs: Sets input for the task group. + :type inputs: list of :class:`TaskInputDefinition ` + :param instance_name_format: Sets display name of the task group. + :type instance_name_format: str + :param name: Sets name of the task group. + :type name: str + :param parent_definition_id: Sets parent task group Id. This is used while creating a draft task group. + :type parent_definition_id: str + :param runs_on: Sets RunsOn of the task group. Value can be 'Agent', 'Server' or 'DeploymentGroup'. + :type runs_on: list of str + :param tasks: Sets tasks for the task group. + :type tasks: list of :class:`TaskGroupStep ` + :param version: Sets version of the task group. + :type version: :class:`TaskVersion ` + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinition]'}, + 'instance_name_format': {'key': 'instanceNameFormat', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_definition_id': {'key': 'parentDefinitionId', 'type': 'str'}, + 'runs_on': {'key': 'runsOn', 'type': '[str]'}, + 'tasks': {'key': 'tasks', 'type': '[TaskGroupStep]'}, + 'version': {'key': 'version', 'type': 'TaskVersion'} + } + + def __init__(self, author=None, category=None, description=None, friendly_name=None, icon_url=None, inputs=None, instance_name_format=None, name=None, parent_definition_id=None, runs_on=None, tasks=None, version=None): + super(TaskGroupCreateParameter, self).__init__() + self.author = author + self.category = category + self.description = description + self.friendly_name = friendly_name + self.icon_url = icon_url + self.inputs = inputs + self.instance_name_format = instance_name_format + self.name = name + self.parent_definition_id = parent_definition_id + self.runs_on = runs_on + self.tasks = tasks + self.version = version diff --git a/vsts/vsts/task_agent/v4_1/models/task_group_definition.py b/vsts/vsts/task_agent/v4_1/models/task_group_definition.py new file mode 100644 index 00000000..603bf5d7 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_group_definition.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupDefinition(Model): + """TaskGroupDefinition. + + :param display_name: + :type display_name: str + :param is_expanded: + :type is_expanded: bool + :param name: + :type name: str + :param tags: + :type tags: list of str + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_expanded': {'key': 'isExpanded', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '[str]'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'} + } + + def __init__(self, display_name=None, is_expanded=None, name=None, tags=None, visible_rule=None): + super(TaskGroupDefinition, self).__init__() + self.display_name = display_name + self.is_expanded = is_expanded + self.name = name + self.tags = tags + self.visible_rule = visible_rule diff --git a/vsts/vsts/task_agent/v4_1/models/task_group_revision.py b/vsts/vsts/task_agent/v4_1/models/task_group_revision.py new file mode 100644 index 00000000..fff39c34 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_group_revision.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupRevision(Model): + """TaskGroupRevision. + + :param changed_by: + :type changed_by: :class:`IdentityRef ` + :param changed_date: + :type changed_date: datetime + :param change_type: + :type change_type: object + :param comment: + :type comment: str + :param file_id: + :type file_id: int + :param revision: + :type revision: int + :param task_group_id: + :type task_group_id: str + """ + + _attribute_map = { + 'changed_by': {'key': 'changedBy', 'type': 'IdentityRef'}, + 'changed_date': {'key': 'changedDate', 'type': 'iso-8601'}, + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'file_id': {'key': 'fileId', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'task_group_id': {'key': 'taskGroupId', 'type': 'str'} + } + + def __init__(self, changed_by=None, changed_date=None, change_type=None, comment=None, file_id=None, revision=None, task_group_id=None): + super(TaskGroupRevision, self).__init__() + self.changed_by = changed_by + self.changed_date = changed_date + self.change_type = change_type + self.comment = comment + self.file_id = file_id + self.revision = revision + self.task_group_id = task_group_id diff --git a/vsts/vsts/task_agent/v4_1/models/task_group_step.py b/vsts/vsts/task_agent/v4_1/models/task_group_step.py new file mode 100644 index 00000000..78d907ff --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_group_step.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupStep(Model): + """TaskGroupStep. + + :param always_run: Gets or sets as 'true' to run the task always, 'false' otherwise. + :type always_run: bool + :param condition: Gets or sets condition for the task. + :type condition: str + :param continue_on_error: Gets or sets as 'true' to continue on error, 'false' otherwise. + :type continue_on_error: bool + :param display_name: Gets or sets the display name. + :type display_name: str + :param enabled: Gets or sets as task is enabled or not. + :type enabled: bool + :param inputs: Gets or sets dictionary of inputs. + :type inputs: dict + :param task: Gets or sets the reference of the task. + :type task: :class:`TaskDefinitionReference ` + :param timeout_in_minutes: Gets or sets the maximum time, in minutes, that a task is allowed to execute on agent before being cancelled by server. A zero value indicates an infinite timeout. + :type timeout_in_minutes: int + """ + + _attribute_map = { + 'always_run': {'key': 'alwaysRun', 'type': 'bool'}, + 'condition': {'key': 'condition', 'type': 'str'}, + 'continue_on_error': {'key': 'continueOnError', 'type': 'bool'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'task': {'key': 'task', 'type': 'TaskDefinitionReference'}, + 'timeout_in_minutes': {'key': 'timeoutInMinutes', 'type': 'int'} + } + + def __init__(self, always_run=None, condition=None, continue_on_error=None, display_name=None, enabled=None, inputs=None, task=None, timeout_in_minutes=None): + super(TaskGroupStep, self).__init__() + self.always_run = always_run + self.condition = condition + self.continue_on_error = continue_on_error + self.display_name = display_name + self.enabled = enabled + self.inputs = inputs + self.task = task + self.timeout_in_minutes = timeout_in_minutes diff --git a/vsts/vsts/task_agent/v4_1/models/task_group_update_parameter.py b/vsts/vsts/task_agent/v4_1/models/task_group_update_parameter.py new file mode 100644 index 00000000..140f25d9 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_group_update_parameter.py @@ -0,0 +1,81 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskGroupUpdateParameter(Model): + """TaskGroupUpdateParameter. + + :param author: Sets author name of the task group. + :type author: str + :param category: Sets category of the task group. + :type category: str + :param comment: Sets comment of the task group. + :type comment: str + :param description: Sets description of the task group. + :type description: str + :param friendly_name: Sets friendly name of the task group. + :type friendly_name: str + :param icon_url: Sets url icon of the task group. + :type icon_url: str + :param id: Sets the unique identifier of this field. + :type id: str + :param inputs: Sets input for the task group. + :type inputs: list of :class:`TaskInputDefinition ` + :param instance_name_format: Sets display name of the task group. + :type instance_name_format: str + :param name: Sets name of the task group. + :type name: str + :param parent_definition_id: Gets or sets parent task group Id. This is used while creating a draft task group. + :type parent_definition_id: str + :param revision: Sets revision of the task group. + :type revision: int + :param runs_on: Sets RunsOn of the task group. Value can be 'Agent', 'Server' or 'DeploymentGroup'. + :type runs_on: list of str + :param tasks: Sets tasks for the task group. + :type tasks: list of :class:`TaskGroupStep ` + :param version: Sets version of the task group. + :type version: :class:`TaskVersion ` + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'icon_url': {'key': 'iconUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[TaskInputDefinition]'}, + 'instance_name_format': {'key': 'instanceNameFormat', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_definition_id': {'key': 'parentDefinitionId', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'runs_on': {'key': 'runsOn', 'type': '[str]'}, + 'tasks': {'key': 'tasks', 'type': '[TaskGroupStep]'}, + 'version': {'key': 'version', 'type': 'TaskVersion'} + } + + def __init__(self, author=None, category=None, comment=None, description=None, friendly_name=None, icon_url=None, id=None, inputs=None, instance_name_format=None, name=None, parent_definition_id=None, revision=None, runs_on=None, tasks=None, version=None): + super(TaskGroupUpdateParameter, self).__init__() + self.author = author + self.category = category + self.comment = comment + self.description = description + self.friendly_name = friendly_name + self.icon_url = icon_url + self.id = id + self.inputs = inputs + self.instance_name_format = instance_name_format + self.name = name + self.parent_definition_id = parent_definition_id + self.revision = revision + self.runs_on = runs_on + self.tasks = tasks + self.version = version diff --git a/vsts/vsts/task_agent/v4_1/models/task_hub_license_details.py b/vsts/vsts/task_agent/v4_1/models/task_hub_license_details.py new file mode 100644 index 00000000..7632a7ec --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_hub_license_details.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskHubLicenseDetails(Model): + """TaskHubLicenseDetails. + + :param enterprise_users_count: + :type enterprise_users_count: int + :param free_hosted_license_count: + :type free_hosted_license_count: int + :param free_license_count: + :type free_license_count: int + :param has_license_count_ever_updated: + :type has_license_count_ever_updated: bool + :param hosted_agent_minutes_free_count: + :type hosted_agent_minutes_free_count: int + :param hosted_agent_minutes_used_count: + :type hosted_agent_minutes_used_count: int + :param msdn_users_count: + :type msdn_users_count: int + :param purchased_hosted_license_count: + :type purchased_hosted_license_count: int + :param purchased_license_count: + :type purchased_license_count: int + :param total_license_count: + :type total_license_count: int + """ + + _attribute_map = { + 'enterprise_users_count': {'key': 'enterpriseUsersCount', 'type': 'int'}, + 'free_hosted_license_count': {'key': 'freeHostedLicenseCount', 'type': 'int'}, + 'free_license_count': {'key': 'freeLicenseCount', 'type': 'int'}, + 'has_license_count_ever_updated': {'key': 'hasLicenseCountEverUpdated', 'type': 'bool'}, + 'hosted_agent_minutes_free_count': {'key': 'hostedAgentMinutesFreeCount', 'type': 'int'}, + 'hosted_agent_minutes_used_count': {'key': 'hostedAgentMinutesUsedCount', 'type': 'int'}, + 'msdn_users_count': {'key': 'msdnUsersCount', 'type': 'int'}, + 'purchased_hosted_license_count': {'key': 'purchasedHostedLicenseCount', 'type': 'int'}, + 'purchased_license_count': {'key': 'purchasedLicenseCount', 'type': 'int'}, + 'total_license_count': {'key': 'totalLicenseCount', 'type': 'int'} + } + + def __init__(self, enterprise_users_count=None, free_hosted_license_count=None, free_license_count=None, has_license_count_ever_updated=None, hosted_agent_minutes_free_count=None, hosted_agent_minutes_used_count=None, msdn_users_count=None, purchased_hosted_license_count=None, purchased_license_count=None, total_license_count=None): + super(TaskHubLicenseDetails, self).__init__() + self.enterprise_users_count = enterprise_users_count + self.free_hosted_license_count = free_hosted_license_count + self.free_license_count = free_license_count + self.has_license_count_ever_updated = has_license_count_ever_updated + self.hosted_agent_minutes_free_count = hosted_agent_minutes_free_count + self.hosted_agent_minutes_used_count = hosted_agent_minutes_used_count + self.msdn_users_count = msdn_users_count + self.purchased_hosted_license_count = purchased_hosted_license_count + self.purchased_license_count = purchased_license_count + self.total_license_count = total_license_count diff --git a/vsts/vsts/task_agent/v4_1/models/task_input_definition.py b/vsts/vsts/task_agent/v4_1/models/task_input_definition.py new file mode 100644 index 00000000..3bc463ce --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_input_definition.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_input_definition_base import TaskInputDefinitionBase + + +class TaskInputDefinition(TaskInputDefinitionBase): + """TaskInputDefinition. + + :param aliases: + :type aliases: list of str + :param default_value: + :type default_value: str + :param group_name: + :type group_name: str + :param help_mark_down: + :type help_mark_down: str + :param label: + :type label: str + :param name: + :type name: str + :param options: + :type options: dict + :param properties: + :type properties: dict + :param required: + :type required: bool + :param type: + :type type: str + :param validation: + :type validation: :class:`TaskInputValidation ` + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'aliases': {'key': 'aliases', 'type': '[str]'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation': {'key': 'validation', 'type': 'TaskInputValidation'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'}, + } + + def __init__(self, aliases=None, default_value=None, group_name=None, help_mark_down=None, label=None, name=None, options=None, properties=None, required=None, type=None, validation=None, visible_rule=None): + super(TaskInputDefinition, self).__init__(aliases=aliases, default_value=default_value, group_name=group_name, help_mark_down=help_mark_down, label=label, name=name, options=options, properties=properties, required=required, type=type, validation=validation, visible_rule=visible_rule) diff --git a/vsts/vsts/task_agent/v4_1/models/task_input_definition_base.py b/vsts/vsts/task_agent/v4_1/models/task_input_definition_base.py new file mode 100644 index 00000000..0d84190d --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_input_definition_base.py @@ -0,0 +1,68 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class TaskInputDefinitionBase(BaseSecuredObject): + """TaskInputDefinitionBase. + + :param aliases: + :type aliases: list of str + :param default_value: + :type default_value: str + :param group_name: + :type group_name: str + :param help_mark_down: + :type help_mark_down: str + :param label: + :type label: str + :param name: + :type name: str + :param options: + :type options: dict + :param properties: + :type properties: dict + :param required: + :type required: bool + :param type: + :type type: str + :param validation: + :type validation: :class:`TaskInputValidation ` + :param visible_rule: + :type visible_rule: str + """ + + _attribute_map = { + 'aliases': {'key': 'aliases', 'type': '[str]'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'help_mark_down': {'key': 'helpMarkDown', 'type': 'str'}, + 'label': {'key': 'label', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'options': {'key': 'options', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'validation': {'key': 'validation', 'type': 'TaskInputValidation'}, + 'visible_rule': {'key': 'visibleRule', 'type': 'str'} + } + + def __init__(self, aliases=None, default_value=None, group_name=None, help_mark_down=None, label=None, name=None, options=None, properties=None, required=None, type=None, validation=None, visible_rule=None): + super(TaskInputDefinitionBase, self).__init__() + self.aliases = aliases + self.default_value = default_value + self.group_name = group_name + self.help_mark_down = help_mark_down + self.label = label + self.name = name + self.options = options + self.properties = properties + self.required = required + self.type = type + self.validation = validation + self.visible_rule = visible_rule diff --git a/vsts/vsts/task_agent/v4_1/models/task_input_validation.py b/vsts/vsts/task_agent/v4_1/models/task_input_validation.py new file mode 100644 index 00000000..cc51abdd --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_input_validation.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class TaskInputValidation(BaseSecuredObject): + """TaskInputValidation. + + :param expression: Conditional expression + :type expression: str + :param message: Message explaining how user can correct if validation fails + :type message: str + """ + + _attribute_map = { + 'expression': {'key': 'expression', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, expression=None, message=None): + super(TaskInputValidation, self).__init__() + self.expression = expression + self.message = message diff --git a/vsts/vsts/task_agent/v4_1/models/task_orchestration_owner.py b/vsts/vsts/task_agent/v4_1/models/task_orchestration_owner.py new file mode 100644 index 00000000..ffba19a6 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_orchestration_owner.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationOwner(Model): + """TaskOrchestrationOwner. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param id: + :type id: int + :param name: + :type name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, _links=None, id=None, name=None): + super(TaskOrchestrationOwner, self).__init__() + self._links = _links + self.id = id + self.name = name diff --git a/vsts/vsts/task_agent/v4_1/models/task_orchestration_plan_group.py b/vsts/vsts/task_agent/v4_1/models/task_orchestration_plan_group.py new file mode 100644 index 00000000..2109cc96 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_orchestration_plan_group.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOrchestrationPlanGroup(Model): + """TaskOrchestrationPlanGroup. + + :param plan_group: + :type plan_group: str + :param project: + :type project: :class:`ProjectReference ` + :param running_requests: + :type running_requests: list of :class:`TaskAgentJobRequest ` + """ + + _attribute_map = { + 'plan_group': {'key': 'planGroup', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ProjectReference'}, + 'running_requests': {'key': 'runningRequests', 'type': '[TaskAgentJobRequest]'} + } + + def __init__(self, plan_group=None, project=None, running_requests=None): + super(TaskOrchestrationPlanGroup, self).__init__() + self.plan_group = plan_group + self.project = project + self.running_requests = running_requests diff --git a/vsts/vsts/task_agent/v4_1/models/task_output_variable.py b/vsts/vsts/task_agent/v4_1/models/task_output_variable.py new file mode 100644 index 00000000..6bd50c8d --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_output_variable.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskOutputVariable(Model): + """TaskOutputVariable. + + :param description: + :type description: str + :param name: + :type name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, description=None, name=None): + super(TaskOutputVariable, self).__init__() + self.description = description + self.name = name diff --git a/vsts/vsts/task_agent/v4_1/models/task_package_metadata.py b/vsts/vsts/task_agent/v4_1/models/task_package_metadata.py new file mode 100644 index 00000000..635fda1b --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_package_metadata.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskPackageMetadata(Model): + """TaskPackageMetadata. + + :param type: Gets the name of the package. + :type type: str + :param url: Gets the url of the package. + :type url: str + :param version: Gets the version of the package. + :type version: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, type=None, url=None, version=None): + super(TaskPackageMetadata, self).__init__() + self.type = type + self.url = url + self.version = version diff --git a/vsts/vsts/task_agent/v4_1/models/task_reference.py b/vsts/vsts/task_agent/v4_1/models/task_reference.py new file mode 100644 index 00000000..3ff1dd7b --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_reference.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskReference(Model): + """TaskReference. + + :param id: + :type id: str + :param inputs: + :type inputs: dict + :param name: + :type name: str + :param version: + :type version: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '{str}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, id=None, inputs=None, name=None, version=None): + super(TaskReference, self).__init__() + self.id = id + self.inputs = inputs + self.name = name + self.version = version diff --git a/vsts/vsts/task_agent/v4_1/models/task_source_definition.py b/vsts/vsts/task_agent/v4_1/models/task_source_definition.py new file mode 100644 index 00000000..96f5576b --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_source_definition.py @@ -0,0 +1,36 @@ +# -------------------------------------------------------------------------------------------- +# 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 .task_source_definition_base import TaskSourceDefinitionBase + + +class TaskSourceDefinition(TaskSourceDefinitionBase): + """TaskSourceDefinition. + + :param auth_key: + :type auth_key: str + :param endpoint: + :type endpoint: str + :param key_selector: + :type key_selector: str + :param selector: + :type selector: str + :param target: + :type target: str + """ + + _attribute_map = { + 'auth_key': {'key': 'authKey', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=None, target=None): + super(TaskSourceDefinition, self).__init__(auth_key=auth_key, endpoint=endpoint, key_selector=key_selector, selector=selector, target=target) diff --git a/vsts/vsts/task_agent/v4_1/models/task_source_definition_base.py b/vsts/vsts/task_agent/v4_1/models/task_source_definition_base.py new file mode 100644 index 00000000..79ba6579 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_source_definition_base.py @@ -0,0 +1,40 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class TaskSourceDefinitionBase(BaseSecuredObject): + """TaskSourceDefinitionBase. + + :param auth_key: + :type auth_key: str + :param endpoint: + :type endpoint: str + :param key_selector: + :type key_selector: str + :param selector: + :type selector: str + :param target: + :type target: str + """ + + _attribute_map = { + 'auth_key': {'key': 'authKey', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + 'key_selector': {'key': 'keySelector', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'} + } + + def __init__(self, auth_key=None, endpoint=None, key_selector=None, selector=None, target=None): + super(TaskSourceDefinitionBase, self).__init__() + self.auth_key = auth_key + self.endpoint = endpoint + self.key_selector = key_selector + self.selector = selector + self.target = target diff --git a/vsts/vsts/task_agent/v4_1/models/task_version.py b/vsts/vsts/task_agent/v4_1/models/task_version.py new file mode 100644 index 00000000..3d4c89ee --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/task_version.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TaskVersion(Model): + """TaskVersion. + + :param is_test: + :type is_test: bool + :param major: + :type major: int + :param minor: + :type minor: int + :param patch: + :type patch: int + """ + + _attribute_map = { + 'is_test': {'key': 'isTest', 'type': 'bool'}, + 'major': {'key': 'major', 'type': 'int'}, + 'minor': {'key': 'minor', 'type': 'int'}, + 'patch': {'key': 'patch', 'type': 'int'} + } + + def __init__(self, is_test=None, major=None, minor=None, patch=None): + super(TaskVersion, self).__init__() + self.is_test = is_test + self.major = major + self.minor = minor + self.patch = patch diff --git a/vsts/vsts/task_agent/v4_1/models/validation_item.py b/vsts/vsts/task_agent/v4_1/models/validation_item.py new file mode 100644 index 00000000..c7ba5083 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/validation_item.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ValidationItem(Model): + """ValidationItem. + + :param is_valid: Tells whether the current input is valid or not + :type is_valid: bool + :param reason: Reason for input validation failure + :type reason: str + :param type: Type of validation item + :type type: str + :param value: Value to validate. The conditional expression to validate for the input for "expression" type Eg:eq(variables['Build.SourceBranch'], 'refs/heads/master');eq(value, 'refs/heads/master') + :type value: str + """ + + _attribute_map = { + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_valid=None, reason=None, type=None, value=None): + super(ValidationItem, self).__init__() + self.is_valid = is_valid + self.reason = reason + self.type = type + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/models/variable_group.py b/vsts/vsts/task_agent/v4_1/models/variable_group.py new file mode 100644 index 00000000..fa38154c --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/variable_group.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableGroup(Model): + """VariableGroup. + + :param created_by: Gets or sets the identity who created the variable group. + :type created_by: :class:`IdentityRef ` + :param created_on: Gets or sets the time when variable group was created. + :type created_on: datetime + :param description: Gets or sets description of the variable group. + :type description: str + :param id: Gets or sets id of the variable group. + :type id: int + :param modified_by: Gets or sets the identity who modified the variable group. + :type modified_by: :class:`IdentityRef ` + :param modified_on: Gets or sets the time when variable group was modified + :type modified_on: datetime + :param name: Gets or sets name of the variable group. + :type name: str + :param provider_data: Gets or sets provider data. + :type provider_data: :class:`VariableGroupProviderData ` + :param type: Gets or sets type of the variable group. + :type type: str + :param variables: Gets or sets variables contained in the variable group. + :type variables: dict + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_on': {'key': 'createdOn', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'modified_by': {'key': 'modifiedBy', 'type': 'IdentityRef'}, + 'modified_on': {'key': 'modifiedOn', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provider_data': {'key': 'providerData', 'type': 'VariableGroupProviderData'}, + 'type': {'key': 'type', 'type': 'str'}, + 'variables': {'key': 'variables', 'type': '{VariableValue}'} + } + + def __init__(self, created_by=None, created_on=None, description=None, id=None, modified_by=None, modified_on=None, name=None, provider_data=None, type=None, variables=None): + super(VariableGroup, self).__init__() + self.created_by = created_by + self.created_on = created_on + self.description = description + self.id = id + self.modified_by = modified_by + self.modified_on = modified_on + self.name = name + self.provider_data = provider_data + self.type = type + self.variables = variables diff --git a/vsts/vsts/task_agent/v4_1/models/variable_group_provider_data.py b/vsts/vsts/task_agent/v4_1/models/variable_group_provider_data.py new file mode 100644 index 00000000..b86942f1 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/variable_group_provider_data.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VariableGroupProviderData(Model): + """VariableGroupProviderData. + + """ + + _attribute_map = { + } + + def __init__(self): + super(VariableGroupProviderData, self).__init__() diff --git a/vsts/vsts/task_agent/v4_1/models/variable_value.py b/vsts/vsts/task_agent/v4_1/models/variable_value.py new file mode 100644 index 00000000..035049c0 --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/models/variable_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 VariableValue(Model): + """VariableValue. + + :param is_secret: + :type is_secret: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'is_secret': {'key': 'isSecret', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_secret=None, value=None): + super(VariableValue, self).__init__() + self.is_secret = is_secret + self.value = value diff --git a/vsts/vsts/task_agent/v4_1/task_agent_client.py b/vsts/vsts/task_agent/v4_1/task_agent_client.py new file mode 100644 index 00000000..f58d1bbf --- /dev/null +++ b/vsts/vsts/task_agent/v4_1/task_agent_client.py @@ -0,0 +1,485 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TaskAgentClient(VssClient): + """TaskAgent + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TaskAgentClient, 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 = 'a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd' + + def add_deployment_group(self, deployment_group, project): + """AddDeploymentGroup. + [Preview API] Create a deployment group. + :param :class:` ` deployment_group: Deployment group to create. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(deployment_group, 'DeploymentGroupCreateParameter') + response = self._send(http_method='POST', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentGroup', response) + + def delete_deployment_group(self, project, deployment_group_id): + """DeleteDeploymentGroup. + [Preview API] Delete a deployment group. + :param str project: Project ID or project name + :param int deployment_group_id: ID of the deployment group to be deleted. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + self._send(http_method='DELETE', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.1-preview.1', + route_values=route_values) + + def get_deployment_group(self, project, deployment_group_id, action_filter=None, expand=None): + """GetDeploymentGroup. + [Preview API] Get a deployment group by its ID. + :param str project: Project ID or project name + :param int deployment_group_id: ID of the deployment group. + :param str action_filter: Get the deployment group only if this action can be performed on it. + :param str expand: Include these additional details in the returned object. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + query_parameters = {} + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeploymentGroup', response) + + def get_deployment_groups(self, project, name=None, action_filter=None, expand=None, continuation_token=None, top=None, ids=None): + """GetDeploymentGroups. + [Preview API] Get a list of deployment groups by name or IDs. + :param str project: Project ID or project name + :param str name: Name of the deployment group. + :param str action_filter: Get only deployment groups on which this action can be performed. + :param str expand: Include these additional details in the returned objects. + :param str continuation_token: Get deployment groups with names greater than this continuationToken lexicographically. + :param int top: Maximum number of deployment groups to return. Default is **1000**. + :param [int] ids: Comma separated list of IDs of the deployment groups. + :rtype: [DeploymentGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + 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 top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if ids is not None: + ids = ",".join(map(str, ids)) + query_parameters['ids'] = self._serialize.query('ids', ids, 'str') + response = self._send(http_method='GET', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DeploymentGroup]', response) + + def update_deployment_group(self, deployment_group, project, deployment_group_id): + """UpdateDeploymentGroup. + [Preview API] Update a deployment group. + :param :class:` ` deployment_group: Deployment group to update. + :param str project: Project ID or project name + :param int deployment_group_id: ID of the deployment group. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + content = self._serialize.body(deployment_group, 'DeploymentGroupUpdateParameter') + response = self._send(http_method='PATCH', + location_id='083c4d89-ab35-45af-aa11-7cf66895c53e', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('DeploymentGroup', response) + + def delete_deployment_target(self, project, deployment_group_id, target_id): + """DeleteDeploymentTarget. + [Preview API] Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. + :param str project: Project ID or project name + :param int deployment_group_id: ID of the deployment group in which deployment target is deleted. + :param int target_id: ID of the deployment target to delete. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + if target_id is not None: + route_values['targetId'] = self._serialize.url('target_id', target_id, 'int') + self._send(http_method='DELETE', + location_id='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', + version='4.1-preview.1', + route_values=route_values) + + def get_deployment_target(self, project, deployment_group_id, target_id, expand=None): + """GetDeploymentTarget. + [Preview API] Get a deployment target by its ID in a deployment group + :param str project: Project ID or project name + :param int deployment_group_id: ID of the deployment group to which deployment target belongs. + :param int target_id: ID of the deployment target to return. + :param str expand: Include these additional details in the returned objects. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + if target_id is not None: + route_values['targetId'] = self._serialize.url('target_id', target_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='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeploymentMachine', response) + + def get_deployment_targets(self, project, deployment_group_id, tags=None, name=None, partial_name_match=None, expand=None, agent_status=None, agent_job_result=None, continuation_token=None, top=None): + """GetDeploymentTargets. + [Preview API] Get a list of deployment targets in a deployment group. + :param str project: Project ID or project name + :param int deployment_group_id: ID of the deployment group. + :param [str] tags: Get only the deployment targets that contain all these comma separted list of tags. + :param str name: Name pattern of the deployment targets to return. + :param bool partial_name_match: When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**. + :param str expand: Include these additional details in the returned objects. + :param str agent_status: Get only deployment targets that have this status. + :param str agent_job_result: Get only deployment targets that have this last job result. + :param str continuation_token: Get deployment targets with names greater than this continuationToken lexicographically. + :param int top: Maximum number of deployment targets to return. Default is **1000**. + :rtype: [DeploymentMachine] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + query_parameters = {} + if tags is not None: + tags = ",".join(tags) + query_parameters['tags'] = self._serialize.query('tags', tags, 'str') + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + if partial_name_match is not None: + query_parameters['partialNameMatch'] = self._serialize.query('partial_name_match', partial_name_match, 'bool') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + if agent_status is not None: + query_parameters['agentStatus'] = self._serialize.query('agent_status', agent_status, 'str') + if agent_job_result is not None: + query_parameters['agentJobResult'] = self._serialize.query('agent_job_result', agent_job_result, 'str') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[DeploymentMachine]', response) + + def update_deployment_targets(self, machines, project, deployment_group_id): + """UpdateDeploymentTargets. + [Preview API] Update tags of a list of deployment targets in a deployment group. + :param [DeploymentTargetUpdateParameter] machines: Deployment targets with tags to udpdate. + :param str project: Project ID or project name + :param int deployment_group_id: ID of the deployment group in which deployment targets are updated. + :rtype: [DeploymentMachine] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if deployment_group_id is not None: + route_values['deploymentGroupId'] = self._serialize.url('deployment_group_id', deployment_group_id, 'int') + content = self._serialize.body(machines, '[DeploymentTargetUpdateParameter]') + response = self._send(http_method='PATCH', + location_id='2f0aa599-c121-4256-a5fd-ba370e0ae7b6', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[DeploymentMachine]', response) + + def add_task_group(self, task_group, project): + """AddTaskGroup. + [Preview API] Create a task group. + :param :class:` ` task_group: Task group object to create. + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(task_group, 'TaskGroupCreateParameter') + response = self._send(http_method='POST', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskGroup', response) + + def delete_task_group(self, project, task_group_id, comment=None): + """DeleteTaskGroup. + [Preview API] Delete a task group. + :param str project: Project ID or project name + :param str task_group_id: Id of the task group to be deleted. + :param str comment: Comments to delete. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + query_parameters = {} + if comment is not None: + query_parameters['comment'] = self._serialize.query('comment', comment, 'str') + self._send(http_method='DELETE', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def get_task_groups(self, project, task_group_id=None, expanded=None, task_id_filter=None, deleted=None, top=None, continuation_token=None, query_order=None): + """GetTaskGroups. + [Preview API] List task groups. + :param str project: Project ID or project name + :param str task_group_id: Id of the task group. + :param bool expanded: 'true' to recursively expand task groups. Default is 'false'. + :param str task_id_filter: Guid of the taskId to filter. + :param bool deleted: 'true'to include deleted task groups. Default is 'false'. + :param int top: Number of task groups to get. + :param datetime continuation_token: Gets the task groups after the continuation token provided. + :param str query_order: Gets the results in the defined order. Default is 'CreatedOnDescending'. + :rtype: [TaskGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + query_parameters = {} + if expanded is not None: + query_parameters['expanded'] = self._serialize.query('expanded', expanded, 'bool') + if task_id_filter is not None: + query_parameters['taskIdFilter'] = self._serialize.query('task_id_filter', task_id_filter, 'str') + if deleted is not None: + query_parameters['deleted'] = self._serialize.query('deleted', deleted, 'bool') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'iso-8601') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + response = self._send(http_method='GET', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TaskGroup]', response) + + def update_task_group(self, task_group, project, task_group_id=None): + """UpdateTaskGroup. + [Preview API] Update a task group. + :param :class:` ` task_group: Task group to update. + :param str project: Project ID or project name + :param str task_group_id: Id of the task group to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if task_group_id is not None: + route_values['taskGroupId'] = self._serialize.url('task_group_id', task_group_id, 'str') + content = self._serialize.body(task_group, 'TaskGroupUpdateParameter') + response = self._send(http_method='PUT', + location_id='6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TaskGroup', response) + + def add_variable_group(self, group, project): + """AddVariableGroup. + [Preview API] Add a variable group. + :param :class:` ` group: Variable group to add. + :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(group, 'VariableGroupParameters') + response = self._send(http_method='POST', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('VariableGroup', response) + + def delete_variable_group(self, project, group_id): + """DeleteVariableGroup. + [Preview API] Delete a variable group + :param str project: Project ID or project name + :param int group_id: Id of the variable group. + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'int') + self._send(http_method='DELETE', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.1-preview.1', + route_values=route_values) + + def get_variable_group(self, project, group_id): + """GetVariableGroup. + [Preview API] Get a variable group. + :param str project: Project ID or project name + :param int group_id: Id of the variable group. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'int') + response = self._send(http_method='GET', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('VariableGroup', response) + + def get_variable_groups(self, project, group_name=None, action_filter=None, top=None, continuation_token=None, query_order=None): + """GetVariableGroups. + [Preview API] Get variable groups. + :param str project: Project ID or project name + :param str group_name: Name of variable group. + :param str action_filter: Action filter for the variable group. It specifies the action which can be performed on the variable groups. + :param int top: Number of variable groups to get. + :param int continuation_token: Gets the variable groups after the continuation token provided. + :param str query_order: Gets the results in the defined order. Default is 'IdDescending'. + :rtype: [VariableGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if group_name is not None: + query_parameters['groupName'] = self._serialize.query('group_name', group_name, 'str') + if action_filter is not None: + query_parameters['actionFilter'] = self._serialize.query('action_filter', action_filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'int') + if query_order is not None: + query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'str') + response = self._send(http_method='GET', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[VariableGroup]', response) + + def get_variable_groups_by_id(self, project, group_ids): + """GetVariableGroupsById. + [Preview API] Get variable groups by ids. + :param str project: Project ID or project name + :param [int] group_ids: Comma separated list of Ids of variable groups. + :rtype: [VariableGroup] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if group_ids is not None: + group_ids = ",".join(map(str, group_ids)) + query_parameters['groupIds'] = self._serialize.query('group_ids', group_ids, 'str') + response = self._send(http_method='GET', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[VariableGroup]', response) + + def update_variable_group(self, group, project, group_id): + """UpdateVariableGroup. + [Preview API] Update a variable group. + :param :class:` ` group: Variable group to update. + :param str project: Project ID or project name + :param int group_id: Id of the variable group to update. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'int') + content = self._serialize.body(group, 'VariableGroupParameters') + response = self._send(http_method='PUT', + location_id='f5b09dd5-9d54-45a1-8b5a-1c8287d634cc', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('VariableGroup', response) + diff --git a/vsts/vsts/test/__init__.py b/vsts/vsts/test/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/test/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/test/v4_0/__init__.py b/vsts/vsts/test/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/test/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/test/v4_0/models/__init__.py b/vsts/vsts/test/v4_0/models/__init__.py new file mode 100644 index 00000000..2dacf2e7 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/__init__.py @@ -0,0 +1,197 @@ +# -------------------------------------------------------------------------------------------- +# 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 .aggregated_data_for_result_trend import AggregatedDataForResultTrend +from .aggregated_results_analysis import AggregatedResultsAnalysis +from .aggregated_results_by_outcome import AggregatedResultsByOutcome +from .aggregated_results_difference import AggregatedResultsDifference +from .build_configuration import BuildConfiguration +from .build_coverage import BuildCoverage +from .build_reference import BuildReference +from .clone_operation_information import CloneOperationInformation +from .clone_options import CloneOptions +from .clone_statistics import CloneStatistics +from .code_coverage_data import CodeCoverageData +from .code_coverage_statistics import CodeCoverageStatistics +from .code_coverage_summary import CodeCoverageSummary +from .coverage_statistics import CoverageStatistics +from .custom_test_field import CustomTestField +from .custom_test_field_definition import CustomTestFieldDefinition +from .dtl_environment_details import DtlEnvironmentDetails +from .failing_since import FailingSince +from .function_coverage import FunctionCoverage +from .identity_ref import IdentityRef +from .last_result_details import LastResultDetails +from .linked_work_items_query import LinkedWorkItemsQuery +from .linked_work_items_query_result import LinkedWorkItemsQueryResult +from .module_coverage import ModuleCoverage +from .name_value_pair import NameValuePair +from .plan_update_model import PlanUpdateModel +from .point_assignment import PointAssignment +from .points_filter import PointsFilter +from .point_update_model import PointUpdateModel +from .property_bag import PropertyBag +from .query_model import QueryModel +from .release_environment_definition_reference import ReleaseEnvironmentDefinitionReference +from .release_reference import ReleaseReference +from .result_retention_settings import ResultRetentionSettings +from .results_filter import ResultsFilter +from .run_create_model import RunCreateModel +from .run_filter import RunFilter +from .run_statistic import RunStatistic +from .run_update_model import RunUpdateModel +from .shallow_reference import ShallowReference +from .shared_step_model import SharedStepModel +from .suite_create_model import SuiteCreateModel +from .suite_entry import SuiteEntry +from .suite_entry_update_model import SuiteEntryUpdateModel +from .suite_test_case import SuiteTestCase +from .team_context import TeamContext +from .team_project_reference import TeamProjectReference +from .test_action_result_model import TestActionResultModel +from .test_attachment import TestAttachment +from .test_attachment_reference import TestAttachmentReference +from .test_attachment_request_model import TestAttachmentRequestModel +from .test_case_result import TestCaseResult +from .test_case_result_attachment_model import TestCaseResultAttachmentModel +from .test_case_result_identifier import TestCaseResultIdentifier +from .test_case_result_update_model import TestCaseResultUpdateModel +from .test_configuration import TestConfiguration +from .test_environment import TestEnvironment +from .test_failure_details import TestFailureDetails +from .test_failures_analysis import TestFailuresAnalysis +from .test_iteration_details_model import TestIterationDetailsModel +from .test_message_log_details import TestMessageLogDetails +from .test_method import TestMethod +from .test_operation_reference import TestOperationReference +from .test_plan import TestPlan +from .test_plan_clone_request import TestPlanCloneRequest +from .test_point import TestPoint +from .test_points_query import TestPointsQuery +from .test_resolution_state import TestResolutionState +from .test_result_create_model import TestResultCreateModel +from .test_result_document import TestResultDocument +from .test_result_history import TestResultHistory +from .test_result_history_details_for_group import TestResultHistoryDetailsForGroup +from .test_result_model_base import TestResultModelBase +from .test_result_parameter_model import TestResultParameterModel +from .test_result_payload import TestResultPayload +from .test_results_context import TestResultsContext +from .test_results_details import TestResultsDetails +from .test_results_details_for_group import TestResultsDetailsForGroup +from .test_results_query import TestResultsQuery +from .test_result_summary import TestResultSummary +from .test_result_trend_filter import TestResultTrendFilter +from .test_run import TestRun +from .test_run_coverage import TestRunCoverage +from .test_run_statistic import TestRunStatistic +from .test_session import TestSession +from .test_settings import TestSettings +from .test_suite import TestSuite +from .test_suite_clone_request import TestSuiteCloneRequest +from .test_summary_for_work_item import TestSummaryForWorkItem +from .test_to_work_item_links import TestToWorkItemLinks +from .test_variable import TestVariable +from .work_item_reference import WorkItemReference +from .work_item_to_test_links import WorkItemToTestLinks + +__all__ = [ + 'AggregatedDataForResultTrend', + 'AggregatedResultsAnalysis', + 'AggregatedResultsByOutcome', + 'AggregatedResultsDifference', + 'BuildConfiguration', + 'BuildCoverage', + 'BuildReference', + 'CloneOperationInformation', + 'CloneOptions', + 'CloneStatistics', + 'CodeCoverageData', + 'CodeCoverageStatistics', + 'CodeCoverageSummary', + 'CoverageStatistics', + 'CustomTestField', + 'CustomTestFieldDefinition', + 'DtlEnvironmentDetails', + 'FailingSince', + 'FunctionCoverage', + 'IdentityRef', + 'LastResultDetails', + 'LinkedWorkItemsQuery', + 'LinkedWorkItemsQueryResult', + 'ModuleCoverage', + 'NameValuePair', + 'PlanUpdateModel', + 'PointAssignment', + 'PointsFilter', + 'PointUpdateModel', + 'PropertyBag', + 'QueryModel', + 'ReleaseEnvironmentDefinitionReference', + 'ReleaseReference', + 'ResultRetentionSettings', + 'ResultsFilter', + 'RunCreateModel', + 'RunFilter', + 'RunStatistic', + 'RunUpdateModel', + 'ShallowReference', + 'SharedStepModel', + 'SuiteCreateModel', + 'SuiteEntry', + 'SuiteEntryUpdateModel', + 'SuiteTestCase', + 'TeamContext', + 'TeamProjectReference', + 'TestActionResultModel', + 'TestAttachment', + 'TestAttachmentReference', + 'TestAttachmentRequestModel', + 'TestCaseResult', + 'TestCaseResultAttachmentModel', + 'TestCaseResultIdentifier', + 'TestCaseResultUpdateModel', + 'TestConfiguration', + 'TestEnvironment', + 'TestFailureDetails', + 'TestFailuresAnalysis', + 'TestIterationDetailsModel', + 'TestMessageLogDetails', + 'TestMethod', + 'TestOperationReference', + 'TestPlan', + 'TestPlanCloneRequest', + 'TestPoint', + 'TestPointsQuery', + 'TestResolutionState', + 'TestResultCreateModel', + 'TestResultDocument', + 'TestResultHistory', + 'TestResultHistoryDetailsForGroup', + 'TestResultModelBase', + 'TestResultParameterModel', + 'TestResultPayload', + 'TestResultsContext', + 'TestResultsDetails', + 'TestResultsDetailsForGroup', + 'TestResultsQuery', + 'TestResultSummary', + 'TestResultTrendFilter', + 'TestRun', + 'TestRunCoverage', + 'TestRunStatistic', + 'TestSession', + 'TestSettings', + 'TestSuite', + 'TestSuiteCloneRequest', + 'TestSummaryForWorkItem', + 'TestToWorkItemLinks', + 'TestVariable', + 'WorkItemReference', + 'WorkItemToTestLinks', +] diff --git a/vsts/vsts/test/v4_0/models/aggregated_data_for_result_trend.py b/vsts/vsts/test/v4_0/models/aggregated_data_for_result_trend.py new file mode 100644 index 00000000..00c3e706 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/aggregated_data_for_result_trend.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedDataForResultTrend(Model): + """AggregatedDataForResultTrend. + + :param duration: This is tests execution duration. + :type duration: object + :param results_by_outcome: + :type results_by_outcome: dict + :param test_results_context: + :type test_results_context: :class:`TestResultsContext ` + :param total_tests: + :type total_tests: int + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'object'}, + 'results_by_outcome': {'key': 'resultsByOutcome', 'type': '{AggregatedResultsByOutcome}'}, + 'test_results_context': {'key': 'testResultsContext', 'type': 'TestResultsContext'}, + 'total_tests': {'key': 'totalTests', 'type': 'int'} + } + + def __init__(self, duration=None, results_by_outcome=None, test_results_context=None, total_tests=None): + super(AggregatedDataForResultTrend, self).__init__() + self.duration = duration + self.results_by_outcome = results_by_outcome + self.test_results_context = test_results_context + self.total_tests = total_tests diff --git a/vsts/vsts/test/v4_0/models/aggregated_results_analysis.py b/vsts/vsts/test/v4_0/models/aggregated_results_analysis.py new file mode 100644 index 00000000..c1dfdb1c --- /dev/null +++ b/vsts/vsts/test/v4_0/models/aggregated_results_analysis.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedResultsAnalysis(Model): + """AggregatedResultsAnalysis. + + :param duration: + :type duration: object + :param not_reported_results_by_outcome: + :type not_reported_results_by_outcome: dict + :param previous_context: + :type previous_context: :class:`TestResultsContext ` + :param results_by_outcome: + :type results_by_outcome: dict + :param results_difference: + :type results_difference: :class:`AggregatedResultsDifference ` + :param total_tests: + :type total_tests: int + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'object'}, + 'not_reported_results_by_outcome': {'key': 'notReportedResultsByOutcome', 'type': '{AggregatedResultsByOutcome}'}, + 'previous_context': {'key': 'previousContext', 'type': 'TestResultsContext'}, + 'results_by_outcome': {'key': 'resultsByOutcome', 'type': '{AggregatedResultsByOutcome}'}, + 'results_difference': {'key': 'resultsDifference', 'type': 'AggregatedResultsDifference'}, + 'total_tests': {'key': 'totalTests', 'type': 'int'} + } + + def __init__(self, duration=None, not_reported_results_by_outcome=None, previous_context=None, results_by_outcome=None, results_difference=None, total_tests=None): + super(AggregatedResultsAnalysis, self).__init__() + self.duration = duration + self.not_reported_results_by_outcome = not_reported_results_by_outcome + self.previous_context = previous_context + self.results_by_outcome = results_by_outcome + self.results_difference = results_difference + self.total_tests = total_tests diff --git a/vsts/vsts/test/v4_0/models/aggregated_results_by_outcome.py b/vsts/vsts/test/v4_0/models/aggregated_results_by_outcome.py new file mode 100644 index 00000000..609f8dc2 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/aggregated_results_by_outcome.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedResultsByOutcome(Model): + """AggregatedResultsByOutcome. + + :param count: + :type count: int + :param duration: + :type duration: object + :param group_by_field: + :type group_by_field: str + :param group_by_value: + :type group_by_value: object + :param outcome: + :type outcome: object + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'duration': {'key': 'duration', 'type': 'object'}, + 'group_by_field': {'key': 'groupByField', 'type': 'str'}, + 'group_by_value': {'key': 'groupByValue', 'type': 'object'}, + 'outcome': {'key': 'outcome', 'type': 'object'} + } + + def __init__(self, count=None, duration=None, group_by_field=None, group_by_value=None, outcome=None): + super(AggregatedResultsByOutcome, self).__init__() + self.count = count + self.duration = duration + self.group_by_field = group_by_field + self.group_by_value = group_by_value + self.outcome = outcome diff --git a/vsts/vsts/test/v4_0/models/aggregated_results_difference.py b/vsts/vsts/test/v4_0/models/aggregated_results_difference.py new file mode 100644 index 00000000..5bc4af42 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/aggregated_results_difference.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedResultsDifference(Model): + """AggregatedResultsDifference. + + :param increase_in_duration: + :type increase_in_duration: object + :param increase_in_failures: + :type increase_in_failures: int + :param increase_in_other_tests: + :type increase_in_other_tests: int + :param increase_in_passed_tests: + :type increase_in_passed_tests: int + :param increase_in_total_tests: + :type increase_in_total_tests: int + """ + + _attribute_map = { + 'increase_in_duration': {'key': 'increaseInDuration', 'type': 'object'}, + 'increase_in_failures': {'key': 'increaseInFailures', 'type': 'int'}, + 'increase_in_other_tests': {'key': 'increaseInOtherTests', 'type': 'int'}, + 'increase_in_passed_tests': {'key': 'increaseInPassedTests', 'type': 'int'}, + 'increase_in_total_tests': {'key': 'increaseInTotalTests', 'type': 'int'} + } + + def __init__(self, increase_in_duration=None, increase_in_failures=None, increase_in_other_tests=None, increase_in_passed_tests=None, increase_in_total_tests=None): + super(AggregatedResultsDifference, self).__init__() + self.increase_in_duration = increase_in_duration + self.increase_in_failures = increase_in_failures + self.increase_in_other_tests = increase_in_other_tests + self.increase_in_passed_tests = increase_in_passed_tests + self.increase_in_total_tests = increase_in_total_tests diff --git a/vsts/vsts/test/v4_0/models/build_configuration.py b/vsts/vsts/test/v4_0/models/build_configuration.py new file mode 100644 index 00000000..59498af4 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/build_configuration.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildConfiguration(Model): + """BuildConfiguration. + + :param branch_name: + :type branch_name: str + :param build_definition_id: + :type build_definition_id: int + :param flavor: + :type flavor: str + :param id: + :type id: int + :param number: + :type number: str + :param platform: + :type platform: str + :param project: + :type project: :class:`ShallowReference ` + :param repository_id: + :type repository_id: int + :param source_version: + :type source_version: str + :param uri: + :type uri: str + """ + + _attribute_map = { + 'branch_name': {'key': 'branchName', 'type': 'str'}, + 'build_definition_id': {'key': 'buildDefinitionId', 'type': 'int'}, + 'flavor': {'key': 'flavor', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'number': {'key': 'number', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'repository_id': {'key': 'repositoryId', 'type': 'int'}, + 'source_version': {'key': 'sourceVersion', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, branch_name=None, build_definition_id=None, flavor=None, id=None, number=None, platform=None, project=None, repository_id=None, source_version=None, uri=None): + super(BuildConfiguration, self).__init__() + self.branch_name = branch_name + self.build_definition_id = build_definition_id + self.flavor = flavor + self.id = id + self.number = number + self.platform = platform + self.project = project + self.repository_id = repository_id + self.source_version = source_version + self.uri = uri diff --git a/vsts/vsts/test/v4_0/models/build_coverage.py b/vsts/vsts/test/v4_0/models/build_coverage.py new file mode 100644 index 00000000..350643c8 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/build_coverage.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildCoverage(Model): + """BuildCoverage. + + :param code_coverage_file_url: + :type code_coverage_file_url: str + :param configuration: + :type configuration: :class:`BuildConfiguration ` + :param last_error: + :type last_error: str + :param modules: + :type modules: list of :class:`ModuleCoverage ` + :param state: + :type state: str + """ + + _attribute_map = { + 'code_coverage_file_url': {'key': 'codeCoverageFileUrl', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'BuildConfiguration'}, + 'last_error': {'key': 'lastError', 'type': 'str'}, + 'modules': {'key': 'modules', 'type': '[ModuleCoverage]'}, + 'state': {'key': 'state', 'type': 'str'} + } + + def __init__(self, code_coverage_file_url=None, configuration=None, last_error=None, modules=None, state=None): + super(BuildCoverage, self).__init__() + self.code_coverage_file_url = code_coverage_file_url + self.configuration = configuration + self.last_error = last_error + self.modules = modules + self.state = state diff --git a/vsts/vsts/test/v4_0/models/build_reference.py b/vsts/vsts/test/v4_0/models/build_reference.py new file mode 100644 index 00000000..0abda1e9 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/build_reference.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildReference(Model): + """BuildReference. + + :param branch_name: + :type branch_name: str + :param build_system: + :type build_system: str + :param definition_id: + :type definition_id: int + :param id: + :type id: int + :param number: + :type number: str + :param repository_id: + :type repository_id: str + :param uri: + :type uri: str + """ + + _attribute_map = { + 'branch_name': {'key': 'branchName', 'type': 'str'}, + 'build_system': {'key': 'buildSystem', 'type': 'str'}, + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'int'}, + 'number': {'key': 'number', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, branch_name=None, build_system=None, definition_id=None, id=None, number=None, repository_id=None, uri=None): + super(BuildReference, self).__init__() + self.branch_name = branch_name + self.build_system = build_system + self.definition_id = definition_id + self.id = id + self.number = number + self.repository_id = repository_id + self.uri = uri diff --git a/vsts/vsts/test/v4_0/models/clone_operation_information.py b/vsts/vsts/test/v4_0/models/clone_operation_information.py new file mode 100644 index 00000000..5852d43f --- /dev/null +++ b/vsts/vsts/test/v4_0/models/clone_operation_information.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 CloneOperationInformation(Model): + """CloneOperationInformation. + + :param clone_statistics: + :type clone_statistics: :class:`CloneStatistics ` + :param completion_date: If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue + :type completion_date: datetime + :param creation_date: DateTime when the operation was started + :type creation_date: datetime + :param destination_object: Shallow reference of the destination + :type destination_object: :class:`ShallowReference ` + :param destination_plan: Shallow reference of the destination + :type destination_plan: :class:`ShallowReference ` + :param destination_project: Shallow reference of the destination + :type destination_project: :class:`ShallowReference ` + :param message: If the operation has Failed, Message contains the reason for failure. Null otherwise. + :type message: str + :param op_id: The ID of the operation + :type op_id: int + :param result_object_type: The type of the object generated as a result of the Clone operation + :type result_object_type: object + :param source_object: Shallow reference of the source + :type source_object: :class:`ShallowReference ` + :param source_plan: Shallow reference of the source + :type source_plan: :class:`ShallowReference ` + :param source_project: Shallow reference of the source + :type source_project: :class:`ShallowReference ` + :param state: Current state of the operation. When State reaches Suceeded or Failed, the operation is complete + :type state: object + :param url: Url for geting the clone information + :type url: str + """ + + _attribute_map = { + 'clone_statistics': {'key': 'cloneStatistics', 'type': 'CloneStatistics'}, + 'completion_date': {'key': 'completionDate', 'type': 'iso-8601'}, + 'creation_date': {'key': 'creationDate', 'type': 'iso-8601'}, + 'destination_object': {'key': 'destinationObject', 'type': 'ShallowReference'}, + 'destination_plan': {'key': 'destinationPlan', 'type': 'ShallowReference'}, + 'destination_project': {'key': 'destinationProject', 'type': 'ShallowReference'}, + 'message': {'key': 'message', 'type': 'str'}, + 'op_id': {'key': 'opId', 'type': 'int'}, + 'result_object_type': {'key': 'resultObjectType', 'type': 'object'}, + 'source_object': {'key': 'sourceObject', 'type': 'ShallowReference'}, + 'source_plan': {'key': 'sourcePlan', 'type': 'ShallowReference'}, + 'source_project': {'key': 'sourceProject', 'type': 'ShallowReference'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, clone_statistics=None, completion_date=None, creation_date=None, destination_object=None, destination_plan=None, destination_project=None, message=None, op_id=None, result_object_type=None, source_object=None, source_plan=None, source_project=None, state=None, url=None): + super(CloneOperationInformation, self).__init__() + self.clone_statistics = clone_statistics + self.completion_date = completion_date + self.creation_date = creation_date + self.destination_object = destination_object + self.destination_plan = destination_plan + self.destination_project = destination_project + self.message = message + self.op_id = op_id + self.result_object_type = result_object_type + self.source_object = source_object + self.source_plan = source_plan + self.source_project = source_project + self.state = state + self.url = url diff --git a/vsts/vsts/test/v4_0/models/clone_options.py b/vsts/vsts/test/v4_0/models/clone_options.py new file mode 100644 index 00000000..f048c1c9 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/clone_options.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_0/models/clone_statistics.py b/vsts/vsts/test/v4_0/models/clone_statistics.py new file mode 100644 index 00000000..f3ba75a3 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/clone_statistics.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_0/models/code_coverage_data.py b/vsts/vsts/test/v4_0/models/code_coverage_data.py new file mode 100644 index 00000000..9bd2578b --- /dev/null +++ b/vsts/vsts/test/v4_0/models/code_coverage_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeCoverageData(Model): + """CodeCoverageData. + + :param build_flavor: Flavor of build for which data is retrieved/published + :type build_flavor: str + :param build_platform: Platform of build for which data is retrieved/published + :type build_platform: str + :param coverage_stats: List of coverage data for the build + :type coverage_stats: list of :class:`CodeCoverageStatistics ` + """ + + _attribute_map = { + 'build_flavor': {'key': 'buildFlavor', 'type': 'str'}, + 'build_platform': {'key': 'buildPlatform', 'type': 'str'}, + 'coverage_stats': {'key': 'coverageStats', 'type': '[CodeCoverageStatistics]'} + } + + def __init__(self, build_flavor=None, build_platform=None, coverage_stats=None): + super(CodeCoverageData, self).__init__() + self.build_flavor = build_flavor + self.build_platform = build_platform + self.coverage_stats = coverage_stats diff --git a/vsts/vsts/test/v4_0/models/code_coverage_statistics.py b/vsts/vsts/test/v4_0/models/code_coverage_statistics.py new file mode 100644 index 00000000..aebd12a1 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/code_coverage_statistics.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeCoverageStatistics(Model): + """CodeCoverageStatistics. + + :param covered: Covered units + :type covered: int + :param delta: Delta of coverage + :type delta: number + :param is_delta_available: Is delta valid + :type is_delta_available: bool + :param label: Label of coverage data ("Blocks", "Statements", "Modules", etc.) + :type label: str + :param position: Position of label + :type position: int + :param total: Total units + :type total: int + """ + + _attribute_map = { + 'covered': {'key': 'covered', 'type': 'int'}, + 'delta': {'key': 'delta', 'type': 'number'}, + 'is_delta_available': {'key': 'isDeltaAvailable', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'total': {'key': 'total', 'type': 'int'} + } + + def __init__(self, covered=None, delta=None, is_delta_available=None, label=None, position=None, total=None): + super(CodeCoverageStatistics, self).__init__() + self.covered = covered + self.delta = delta + self.is_delta_available = is_delta_available + self.label = label + self.position = position + self.total = total diff --git a/vsts/vsts/test/v4_0/models/code_coverage_summary.py b/vsts/vsts/test/v4_0/models/code_coverage_summary.py new file mode 100644 index 00000000..4e4a1cf4 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/code_coverage_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeCoverageSummary(Model): + """CodeCoverageSummary. + + :param build: Uri of build for which data is retrieved/published + :type build: :class:`ShallowReference ` + :param coverage_data: List of coverage data and details for the build + :type coverage_data: list of :class:`CodeCoverageData ` + :param delta_build: Uri of build against which difference in coverage is computed + :type delta_build: :class:`ShallowReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'coverage_data': {'key': 'coverageData', 'type': '[CodeCoverageData]'}, + 'delta_build': {'key': 'deltaBuild', 'type': 'ShallowReference'} + } + + def __init__(self, build=None, coverage_data=None, delta_build=None): + super(CodeCoverageSummary, self).__init__() + self.build = build + self.coverage_data = coverage_data + self.delta_build = delta_build diff --git a/vsts/vsts/test/v4_0/models/coverage_statistics.py b/vsts/vsts/test/v4_0/models/coverage_statistics.py new file mode 100644 index 00000000..7b7704db --- /dev/null +++ b/vsts/vsts/test/v4_0/models/coverage_statistics.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 CoverageStatistics(Model): + """CoverageStatistics. + + :param blocks_covered: + :type blocks_covered: int + :param blocks_not_covered: + :type blocks_not_covered: int + :param lines_covered: + :type lines_covered: int + :param lines_not_covered: + :type lines_not_covered: int + :param lines_partially_covered: + :type lines_partially_covered: int + """ + + _attribute_map = { + 'blocks_covered': {'key': 'blocksCovered', 'type': 'int'}, + 'blocks_not_covered': {'key': 'blocksNotCovered', 'type': 'int'}, + 'lines_covered': {'key': 'linesCovered', 'type': 'int'}, + 'lines_not_covered': {'key': 'linesNotCovered', 'type': 'int'}, + 'lines_partially_covered': {'key': 'linesPartiallyCovered', 'type': 'int'} + } + + def __init__(self, blocks_covered=None, blocks_not_covered=None, lines_covered=None, lines_not_covered=None, lines_partially_covered=None): + super(CoverageStatistics, self).__init__() + self.blocks_covered = blocks_covered + self.blocks_not_covered = blocks_not_covered + self.lines_covered = lines_covered + self.lines_not_covered = lines_not_covered + self.lines_partially_covered = lines_partially_covered diff --git a/vsts/vsts/test/v4_0/models/custom_test_field.py b/vsts/vsts/test/v4_0/models/custom_test_field.py new file mode 100644 index 00000000..80ba7cf1 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/custom_test_field.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CustomTestField(Model): + """CustomTestField. + + :param field_name: + :type field_name: str + :param value: + :type value: object + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'} + } + + def __init__(self, field_name=None, value=None): + super(CustomTestField, self).__init__() + self.field_name = field_name + self.value = value diff --git a/vsts/vsts/test/v4_0/models/custom_test_field_definition.py b/vsts/vsts/test/v4_0/models/custom_test_field_definition.py new file mode 100644 index 00000000..bbb7e2a4 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/custom_test_field_definition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 CustomTestFieldDefinition(Model): + """CustomTestFieldDefinition. + + :param field_id: + :type field_id: int + :param field_name: + :type field_name: str + :param field_type: + :type field_type: object + :param scope: + :type scope: object + """ + + _attribute_map = { + 'field_id': {'key': 'fieldId', 'type': 'int'}, + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'field_type': {'key': 'fieldType', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'object'} + } + + def __init__(self, field_id=None, field_name=None, field_type=None, scope=None): + super(CustomTestFieldDefinition, self).__init__() + self.field_id = field_id + self.field_name = field_name + self.field_type = field_type + self.scope = scope diff --git a/vsts/vsts/test/v4_0/models/dtl_environment_details.py b/vsts/vsts/test/v4_0/models/dtl_environment_details.py new file mode 100644 index 00000000..25bebb48 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/dtl_environment_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DtlEnvironmentDetails(Model): + """DtlEnvironmentDetails. + + :param csm_content: + :type csm_content: str + :param csm_parameters: + :type csm_parameters: str + :param subscription_name: + :type subscription_name: str + """ + + _attribute_map = { + 'csm_content': {'key': 'csmContent', 'type': 'str'}, + 'csm_parameters': {'key': 'csmParameters', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'} + } + + def __init__(self, csm_content=None, csm_parameters=None, subscription_name=None): + super(DtlEnvironmentDetails, self).__init__() + self.csm_content = csm_content + self.csm_parameters = csm_parameters + self.subscription_name = subscription_name diff --git a/vsts/vsts/test/v4_0/models/failing_since.py b/vsts/vsts/test/v4_0/models/failing_since.py new file mode 100644 index 00000000..5c5a348f --- /dev/null +++ b/vsts/vsts/test/v4_0/models/failing_since.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 FailingSince(Model): + """FailingSince. + + :param build: + :type build: :class:`BuildReference ` + :param date: + :type date: datetime + :param release: + :type release: :class:`ReleaseReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'BuildReference'}, + 'date': {'key': 'date', 'type': 'iso-8601'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'} + } + + def __init__(self, build=None, date=None, release=None): + super(FailingSince, self).__init__() + self.build = build + self.date = date + self.release = release diff --git a/vsts/vsts/test/v4_0/models/function_coverage.py b/vsts/vsts/test/v4_0/models/function_coverage.py new file mode 100644 index 00000000..6fcc8d0a --- /dev/null +++ b/vsts/vsts/test/v4_0/models/function_coverage.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 FunctionCoverage(Model): + """FunctionCoverage. + + :param class_: + :type class_: str + :param name: + :type name: str + :param namespace: + :type namespace: str + :param source_file: + :type source_file: str + :param statistics: + :type statistics: :class:`CoverageStatistics ` + """ + + _attribute_map = { + 'class_': {'key': 'class', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'source_file': {'key': 'sourceFile', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': 'CoverageStatistics'} + } + + def __init__(self, class_=None, name=None, namespace=None, source_file=None, statistics=None): + super(FunctionCoverage, self).__init__() + self.class_ = class_ + self.name = name + self.namespace = namespace + self.source_file = source_file + self.statistics = statistics diff --git a/vsts/vsts/test/v4_0/models/identity_ref.py b/vsts/vsts/test/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/test/v4_0/models/last_result_details.py b/vsts/vsts/test/v4_0/models/last_result_details.py new file mode 100644 index 00000000..688561f1 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/last_result_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_0/models/linked_work_items_query.py b/vsts/vsts/test/v4_0/models/linked_work_items_query.py new file mode 100644 index 00000000..a9d0c50e --- /dev/null +++ b/vsts/vsts/test/v4_0/models/linked_work_items_query.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 LinkedWorkItemsQuery(Model): + """LinkedWorkItemsQuery. + + :param automated_test_names: + :type automated_test_names: list of str + :param plan_id: + :type plan_id: int + :param point_ids: + :type point_ids: list of int + :param suite_ids: + :type suite_ids: list of int + :param test_case_ids: + :type test_case_ids: list of int + :param work_item_category: + :type work_item_category: str + """ + + _attribute_map = { + 'automated_test_names': {'key': 'automatedTestNames', 'type': '[str]'}, + 'plan_id': {'key': 'planId', 'type': 'int'}, + 'point_ids': {'key': 'pointIds', 'type': '[int]'}, + 'suite_ids': {'key': 'suiteIds', 'type': '[int]'}, + 'test_case_ids': {'key': 'testCaseIds', 'type': '[int]'}, + 'work_item_category': {'key': 'workItemCategory', 'type': 'str'} + } + + def __init__(self, automated_test_names=None, plan_id=None, point_ids=None, suite_ids=None, test_case_ids=None, work_item_category=None): + super(LinkedWorkItemsQuery, self).__init__() + self.automated_test_names = automated_test_names + self.plan_id = plan_id + self.point_ids = point_ids + self.suite_ids = suite_ids + self.test_case_ids = test_case_ids + self.work_item_category = work_item_category diff --git a/vsts/vsts/test/v4_0/models/linked_work_items_query_result.py b/vsts/vsts/test/v4_0/models/linked_work_items_query_result.py new file mode 100644 index 00000000..77e64896 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/linked_work_items_query_result.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 LinkedWorkItemsQueryResult(Model): + """LinkedWorkItemsQueryResult. + + :param automated_test_name: + :type automated_test_name: str + :param plan_id: + :type plan_id: int + :param point_id: + :type point_id: int + :param suite_id: + :type suite_id: int + :param test_case_id: + :type test_case_id: int + :param work_items: + :type work_items: list of :class:`WorkItemReference ` + """ + + _attribute_map = { + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'int'}, + 'point_id': {'key': 'pointId', 'type': 'int'}, + 'suite_id': {'key': 'suiteId', 'type': 'int'}, + 'test_case_id': {'key': 'testCaseId', 'type': 'int'}, + 'work_items': {'key': 'workItems', 'type': '[WorkItemReference]'} + } + + def __init__(self, automated_test_name=None, plan_id=None, point_id=None, suite_id=None, test_case_id=None, work_items=None): + super(LinkedWorkItemsQueryResult, self).__init__() + self.automated_test_name = automated_test_name + self.plan_id = plan_id + self.point_id = point_id + self.suite_id = suite_id + self.test_case_id = test_case_id + self.work_items = work_items diff --git a/vsts/vsts/test/v4_0/models/module_coverage.py b/vsts/vsts/test/v4_0/models/module_coverage.py new file mode 100644 index 00000000..7ec9ed21 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/module_coverage.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ModuleCoverage(Model): + """ModuleCoverage. + + :param block_count: + :type block_count: int + :param block_data: + :type block_data: list of number + :param functions: + :type functions: list of :class:`FunctionCoverage ` + :param name: + :type name: str + :param signature: + :type signature: str + :param signature_age: + :type signature_age: int + :param statistics: + :type statistics: :class:`CoverageStatistics ` + """ + + _attribute_map = { + 'block_count': {'key': 'blockCount', 'type': 'int'}, + 'block_data': {'key': 'blockData', 'type': '[number]'}, + 'functions': {'key': 'functions', 'type': '[FunctionCoverage]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'signature': {'key': 'signature', 'type': 'str'}, + 'signature_age': {'key': 'signatureAge', 'type': 'int'}, + 'statistics': {'key': 'statistics', 'type': 'CoverageStatistics'} + } + + def __init__(self, block_count=None, block_data=None, functions=None, name=None, signature=None, signature_age=None, statistics=None): + super(ModuleCoverage, self).__init__() + self.block_count = block_count + self.block_data = block_data + self.functions = functions + self.name = name + self.signature = signature + self.signature_age = signature_age + self.statistics = statistics diff --git a/vsts/vsts/test/v4_0/models/name_value_pair.py b/vsts/vsts/test/v4_0/models/name_value_pair.py new file mode 100644 index 00000000..0c71209a --- /dev/null +++ b/vsts/vsts/test/v4_0/models/name_value_pair.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NameValuePair(Model): + """NameValuePair. + + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(NameValuePair, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/test/v4_0/models/plan_update_model.py b/vsts/vsts/test/v4_0/models/plan_update_model.py new file mode 100644 index 00000000..ce3f6232 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/plan_update_model.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 PlanUpdateModel(Model): + """PlanUpdateModel. + + :param area: + :type area: :class:`ShallowReference ` + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build: + :type build: :class:`ShallowReference ` + :param build_definition: + :type build_definition: :class:`ShallowReference ` + :param configuration_ids: + :type configuration_ids: list of int + :param description: + :type description: str + :param end_date: + :type end_date: str + :param iteration: + :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: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param release_environment_definition: + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param start_date: + :type start_date: str + :param state: + :type state: str + :param status: + :type status: str + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'ShallowReference'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[int]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + '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': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'} + } + + def __init__(self, area=None, automated_test_environment=None, automated_test_settings=None, build=None, build_definition=None, configuration_ids=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, status=None): + super(PlanUpdateModel, self).__init__() + self.area = area + self.automated_test_environment = automated_test_environment + self.automated_test_settings = automated_test_settings + self.build = build + self.build_definition = build_definition + self.configuration_ids = configuration_ids + 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.status = status diff --git a/vsts/vsts/test/v4_0/models/point_assignment.py b/vsts/vsts/test/v4_0/models/point_assignment.py new file mode 100644 index 00000000..ca5da1bd --- /dev/null +++ b/vsts/vsts/test/v4_0/models/point_assignment.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PointAssignment(Model): + """PointAssignment. + + :param configuration: + :type configuration: :class:`ShallowReference ` + :param tester: + :type tester: :class:`IdentityRef ` + """ + + _attribute_map = { + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'tester': {'key': 'tester', 'type': 'IdentityRef'} + } + + def __init__(self, configuration=None, tester=None): + super(PointAssignment, self).__init__() + self.configuration = configuration + self.tester = tester diff --git a/vsts/vsts/test/v4_0/models/point_update_model.py b/vsts/vsts/test/v4_0/models/point_update_model.py new file mode 100644 index 00000000..d2960aaf --- /dev/null +++ b/vsts/vsts/test/v4_0/models/point_update_model.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PointUpdateModel(Model): + """PointUpdateModel. + + :param outcome: + :type outcome: str + :param reset_to_active: + :type reset_to_active: bool + :param tester: + :type tester: :class:`IdentityRef ` + """ + + _attribute_map = { + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'reset_to_active': {'key': 'resetToActive', 'type': 'bool'}, + 'tester': {'key': 'tester', 'type': 'IdentityRef'} + } + + def __init__(self, outcome=None, reset_to_active=None, tester=None): + super(PointUpdateModel, self).__init__() + self.outcome = outcome + self.reset_to_active = reset_to_active + self.tester = tester diff --git a/vsts/vsts/test/v4_0/models/points_filter.py b/vsts/vsts/test/v4_0/models/points_filter.py new file mode 100644 index 00000000..5e6d156e --- /dev/null +++ b/vsts/vsts/test/v4_0/models/points_filter.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PointsFilter(Model): + """PointsFilter. + + :param configuration_names: + :type configuration_names: list of str + :param testcase_ids: + :type testcase_ids: list of int + :param testers: + :type testers: list of :class:`IdentityRef ` + """ + + _attribute_map = { + 'configuration_names': {'key': 'configurationNames', 'type': '[str]'}, + 'testcase_ids': {'key': 'testcaseIds', 'type': '[int]'}, + 'testers': {'key': 'testers', 'type': '[IdentityRef]'} + } + + def __init__(self, configuration_names=None, testcase_ids=None, testers=None): + super(PointsFilter, self).__init__() + self.configuration_names = configuration_names + self.testcase_ids = testcase_ids + self.testers = testers diff --git a/vsts/vsts/test/v4_0/models/property_bag.py b/vsts/vsts/test/v4_0/models/property_bag.py new file mode 100644 index 00000000..40505531 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/property_bag.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 PropertyBag(Model): + """PropertyBag. + + :param bag: Generic store for test session data + :type bag: dict + """ + + _attribute_map = { + 'bag': {'key': 'bag', 'type': '{str}'} + } + + def __init__(self, bag=None): + super(PropertyBag, self).__init__() + self.bag = bag diff --git a/vsts/vsts/test/v4_0/models/query_model.py b/vsts/vsts/test/v4_0/models/query_model.py new file mode 100644 index 00000000..31f521ca --- /dev/null +++ b/vsts/vsts/test/v4_0/models/query_model.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 QueryModel(Model): + """QueryModel. + + :param query: + :type query: str + """ + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'} + } + + def __init__(self, query=None): + super(QueryModel, self).__init__() + self.query = query diff --git a/vsts/vsts/test/v4_0/models/release_environment_definition_reference.py b/vsts/vsts/test/v4_0/models/release_environment_definition_reference.py new file mode 100644 index 00000000..8cc15033 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/release_environment_definition_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironmentDefinitionReference(Model): + """ReleaseEnvironmentDefinitionReference. + + :param definition_id: + :type definition_id: int + :param environment_definition_id: + :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 diff --git a/vsts/vsts/test/v4_0/models/release_reference.py b/vsts/vsts/test/v4_0/models/release_reference.py new file mode 100644 index 00000000..370c7131 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/release_reference.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseReference(Model): + """ReleaseReference. + + :param definition_id: + :type definition_id: int + :param environment_definition_id: + :type environment_definition_id: int + :param environment_definition_name: + :type environment_definition_name: str + :param environment_id: + :type environment_id: int + :param environment_name: + :type environment_name: str + :param id: + :type id: int + :param name: + :type name: str + """ + + _attribute_map = { + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'environment_definition_id': {'key': 'environmentDefinitionId', 'type': 'int'}, + 'environment_definition_name': {'key': 'environmentDefinitionName', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'int'}, + 'environment_name': {'key': 'environmentName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, definition_id=None, environment_definition_id=None, environment_definition_name=None, environment_id=None, environment_name=None, id=None, name=None): + super(ReleaseReference, self).__init__() + self.definition_id = definition_id + self.environment_definition_id = environment_definition_id + self.environment_definition_name = environment_definition_name + self.environment_id = environment_id + self.environment_name = environment_name + self.id = id + self.name = name diff --git a/vsts/vsts/test/v4_0/models/result_retention_settings.py b/vsts/vsts/test/v4_0/models/result_retention_settings.py new file mode 100644 index 00000000..3ab844d0 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/result_retention_settings.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResultRetentionSettings(Model): + """ResultRetentionSettings. + + :param automated_results_retention_duration: + :type automated_results_retention_duration: int + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param manual_results_retention_duration: + :type manual_results_retention_duration: int + """ + + _attribute_map = { + 'automated_results_retention_duration': {'key': 'automatedResultsRetentionDuration', 'type': 'int'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'manual_results_retention_duration': {'key': 'manualResultsRetentionDuration', 'type': 'int'} + } + + def __init__(self, automated_results_retention_duration=None, last_updated_by=None, last_updated_date=None, manual_results_retention_duration=None): + super(ResultRetentionSettings, self).__init__() + self.automated_results_retention_duration = automated_results_retention_duration + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.manual_results_retention_duration = manual_results_retention_duration diff --git a/vsts/vsts/test/v4_0/models/results_filter.py b/vsts/vsts/test/v4_0/models/results_filter.py new file mode 100644 index 00000000..66d0fccc --- /dev/null +++ b/vsts/vsts/test/v4_0/models/results_filter.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResultsFilter(Model): + """ResultsFilter. + + :param automated_test_name: + :type automated_test_name: str + :param branch: + :type branch: str + :param group_by: + :type group_by: str + :param max_complete_date: + :type max_complete_date: datetime + :param results_count: + :type results_count: int + :param test_results_context: + :type test_results_context: :class:`TestResultsContext ` + :param trend_days: + :type trend_days: int + """ + + _attribute_map = { + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'branch': {'key': 'branch', 'type': 'str'}, + 'group_by': {'key': 'groupBy', 'type': 'str'}, + 'max_complete_date': {'key': 'maxCompleteDate', 'type': 'iso-8601'}, + 'results_count': {'key': 'resultsCount', 'type': 'int'}, + 'test_results_context': {'key': 'testResultsContext', 'type': 'TestResultsContext'}, + 'trend_days': {'key': 'trendDays', 'type': 'int'} + } + + def __init__(self, automated_test_name=None, branch=None, group_by=None, max_complete_date=None, results_count=None, test_results_context=None, trend_days=None): + super(ResultsFilter, self).__init__() + self.automated_test_name = automated_test_name + self.branch = branch + self.group_by = group_by + self.max_complete_date = max_complete_date + self.results_count = results_count + self.test_results_context = test_results_context + self.trend_days = trend_days diff --git a/vsts/vsts/test/v4_0/models/run_create_model.py b/vsts/vsts/test/v4_0/models/run_create_model.py new file mode 100644 index 00000000..75621ba7 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/run_create_model.py @@ -0,0 +1,145 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunCreateModel(Model): + """RunCreateModel. + + :param automated: + :type automated: bool + :param build: + :type build: :class:`ShallowReference ` + :param build_drop_location: + :type build_drop_location: str + :param build_flavor: + :type build_flavor: str + :param build_platform: + :type build_platform: str + :param comment: + :type comment: str + :param complete_date: + :type complete_date: str + :param configuration_ids: + :type configuration_ids: list of int + :param controller: + :type controller: str + :param custom_test_fields: + :type custom_test_fields: list of :class:`CustomTestField ` + :param dtl_aut_environment: + :type dtl_aut_environment: :class:`ShallowReference ` + :param dtl_test_environment: + :type dtl_test_environment: :class:`ShallowReference ` + :param due_date: + :type due_date: str + :param environment_details: + :type environment_details: :class:`DtlEnvironmentDetails ` + :param error_message: + :type error_message: str + :param filter: + :type filter: :class:`RunFilter ` + :param iteration: + :type iteration: str + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param plan: + :type plan: :class:`ShallowReference ` + :param point_ids: + :type point_ids: list of int + :param release_environment_uri: + :type release_environment_uri: str + :param release_uri: + :type release_uri: str + :param run_timeout: + :type run_timeout: object + :param source_workflow: + :type source_workflow: str + :param start_date: + :type start_date: str + :param state: + :type state: str + :param test_configurations_mapping: + :type test_configurations_mapping: str + :param test_environment_id: + :type test_environment_id: str + :param test_settings: + :type test_settings: :class:`ShallowReference ` + :param type: + :type type: str + """ + + _attribute_map = { + 'automated': {'key': 'automated', 'type': 'bool'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_drop_location': {'key': 'buildDropLocation', 'type': 'str'}, + 'build_flavor': {'key': 'buildFlavor', 'type': 'str'}, + 'build_platform': {'key': 'buildPlatform', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'complete_date': {'key': 'completeDate', 'type': 'str'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[int]'}, + 'controller': {'key': 'controller', 'type': 'str'}, + 'custom_test_fields': {'key': 'customTestFields', 'type': '[CustomTestField]'}, + 'dtl_aut_environment': {'key': 'dtlAutEnvironment', 'type': 'ShallowReference'}, + 'dtl_test_environment': {'key': 'dtlTestEnvironment', 'type': 'ShallowReference'}, + 'due_date': {'key': 'dueDate', 'type': 'str'}, + 'environment_details': {'key': 'environmentDetails', 'type': 'DtlEnvironmentDetails'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'RunFilter'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'plan': {'key': 'plan', 'type': 'ShallowReference'}, + 'point_ids': {'key': 'pointIds', 'type': '[int]'}, + 'release_environment_uri': {'key': 'releaseEnvironmentUri', 'type': 'str'}, + 'release_uri': {'key': 'releaseUri', 'type': 'str'}, + 'run_timeout': {'key': 'runTimeout', 'type': 'object'}, + 'source_workflow': {'key': 'sourceWorkflow', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_configurations_mapping': {'key': 'testConfigurationsMapping', 'type': 'str'}, + 'test_environment_id': {'key': 'testEnvironmentId', 'type': 'str'}, + 'test_settings': {'key': 'testSettings', 'type': 'ShallowReference'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, automated=None, build=None, build_drop_location=None, build_flavor=None, build_platform=None, comment=None, complete_date=None, configuration_ids=None, controller=None, custom_test_fields=None, dtl_aut_environment=None, dtl_test_environment=None, due_date=None, environment_details=None, error_message=None, filter=None, iteration=None, name=None, owner=None, plan=None, point_ids=None, release_environment_uri=None, release_uri=None, run_timeout=None, source_workflow=None, start_date=None, state=None, test_configurations_mapping=None, test_environment_id=None, test_settings=None, type=None): + super(RunCreateModel, self).__init__() + self.automated = automated + self.build = build + self.build_drop_location = build_drop_location + self.build_flavor = build_flavor + self.build_platform = build_platform + self.comment = comment + self.complete_date = complete_date + self.configuration_ids = configuration_ids + self.controller = controller + self.custom_test_fields = custom_test_fields + self.dtl_aut_environment = dtl_aut_environment + self.dtl_test_environment = dtl_test_environment + self.due_date = due_date + self.environment_details = environment_details + self.error_message = error_message + self.filter = filter + self.iteration = iteration + self.name = name + self.owner = owner + self.plan = plan + self.point_ids = point_ids + self.release_environment_uri = release_environment_uri + self.release_uri = release_uri + self.run_timeout = run_timeout + self.source_workflow = source_workflow + self.start_date = start_date + self.state = state + self.test_configurations_mapping = test_configurations_mapping + self.test_environment_id = test_environment_id + self.test_settings = test_settings + self.type = type diff --git a/vsts/vsts/test/v4_0/models/run_filter.py b/vsts/vsts/test/v4_0/models/run_filter.py new file mode 100644 index 00000000..55ba8921 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/run_filter.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunFilter(Model): + """RunFilter. + + :param source_filter: filter for the test case sources (test containers) + :type source_filter: str + :param test_case_filter: filter for the test cases + :type test_case_filter: str + """ + + _attribute_map = { + 'source_filter': {'key': 'sourceFilter', 'type': 'str'}, + 'test_case_filter': {'key': 'testCaseFilter', 'type': 'str'} + } + + def __init__(self, source_filter=None, test_case_filter=None): + super(RunFilter, self).__init__() + self.source_filter = source_filter + self.test_case_filter = test_case_filter diff --git a/vsts/vsts/test/v4_0/models/run_statistic.py b/vsts/vsts/test/v4_0/models/run_statistic.py new file mode 100644 index 00000000..358d5699 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/run_statistic.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunStatistic(Model): + """RunStatistic. + + :param count: + :type count: int + :param outcome: + :type outcome: str + :param resolution_state: + :type resolution_state: :class:`TestResolutionState ` + :param state: + :type state: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'TestResolutionState'}, + 'state': {'key': 'state', 'type': 'str'} + } + + def __init__(self, count=None, outcome=None, resolution_state=None, state=None): + super(RunStatistic, self).__init__() + self.count = count + self.outcome = outcome + self.resolution_state = resolution_state + self.state = state diff --git a/vsts/vsts/test/v4_0/models/run_update_model.py b/vsts/vsts/test/v4_0/models/run_update_model.py new file mode 100644 index 00000000..655d1966 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/run_update_model.py @@ -0,0 +1,117 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunUpdateModel(Model): + """RunUpdateModel. + + :param build: + :type build: :class:`ShallowReference ` + :param build_drop_location: + :type build_drop_location: str + :param build_flavor: + :type build_flavor: str + :param build_platform: + :type build_platform: str + :param comment: + :type comment: str + :param completed_date: + :type completed_date: str + :param controller: + :type controller: str + :param delete_in_progress_results: + :type delete_in_progress_results: bool + :param dtl_aut_environment: + :type dtl_aut_environment: :class:`ShallowReference ` + :param dtl_environment: + :type dtl_environment: :class:`ShallowReference ` + :param dtl_environment_details: + :type dtl_environment_details: :class:`DtlEnvironmentDetails ` + :param due_date: + :type due_date: str + :param error_message: + :type error_message: str + :param iteration: + :type iteration: str + :param log_entries: + :type log_entries: list of :class:`TestMessageLogDetails ` + :param name: + :type name: str + :param release_environment_uri: + :type release_environment_uri: str + :param release_uri: + :type release_uri: str + :param source_workflow: + :type source_workflow: str + :param started_date: + :type started_date: str + :param state: + :type state: str + :param substate: + :type substate: object + :param test_environment_id: + :type test_environment_id: str + :param test_settings: + :type test_settings: :class:`ShallowReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_drop_location': {'key': 'buildDropLocation', 'type': 'str'}, + 'build_flavor': {'key': 'buildFlavor', 'type': 'str'}, + 'build_platform': {'key': 'buildPlatform', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'str'}, + 'controller': {'key': 'controller', 'type': 'str'}, + 'delete_in_progress_results': {'key': 'deleteInProgressResults', 'type': 'bool'}, + 'dtl_aut_environment': {'key': 'dtlAutEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment': {'key': 'dtlEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment_details': {'key': 'dtlEnvironmentDetails', 'type': 'DtlEnvironmentDetails'}, + 'due_date': {'key': 'dueDate', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'log_entries': {'key': 'logEntries', 'type': '[TestMessageLogDetails]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'release_environment_uri': {'key': 'releaseEnvironmentUri', 'type': 'str'}, + 'release_uri': {'key': 'releaseUri', 'type': 'str'}, + 'source_workflow': {'key': 'sourceWorkflow', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'substate': {'key': 'substate', 'type': 'object'}, + 'test_environment_id': {'key': 'testEnvironmentId', 'type': 'str'}, + 'test_settings': {'key': 'testSettings', 'type': 'ShallowReference'} + } + + def __init__(self, build=None, build_drop_location=None, build_flavor=None, build_platform=None, comment=None, completed_date=None, controller=None, delete_in_progress_results=None, dtl_aut_environment=None, dtl_environment=None, dtl_environment_details=None, due_date=None, error_message=None, iteration=None, log_entries=None, name=None, release_environment_uri=None, release_uri=None, source_workflow=None, started_date=None, state=None, substate=None, test_environment_id=None, test_settings=None): + super(RunUpdateModel, self).__init__() + self.build = build + self.build_drop_location = build_drop_location + self.build_flavor = build_flavor + self.build_platform = build_platform + self.comment = comment + self.completed_date = completed_date + self.controller = controller + self.delete_in_progress_results = delete_in_progress_results + self.dtl_aut_environment = dtl_aut_environment + self.dtl_environment = dtl_environment + self.dtl_environment_details = dtl_environment_details + self.due_date = due_date + self.error_message = error_message + self.iteration = iteration + self.log_entries = log_entries + self.name = name + self.release_environment_uri = release_environment_uri + self.release_uri = release_uri + self.source_workflow = source_workflow + self.started_date = started_date + self.state = state + self.substate = substate + self.test_environment_id = test_environment_id + self.test_settings = test_settings diff --git a/vsts/vsts/test/v4_0/models/shallow_reference.py b/vsts/vsts/test/v4_0/models/shallow_reference.py new file mode 100644 index 00000000..d4cffc81 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/shallow_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ShallowReference(Model): + """ShallowReference. + + :param id: Id of the resource + :type id: str + :param name: Name of the linked resource (definition name, controller name, etc.) + :type name: str + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, name=None, url=None): + super(ShallowReference, self).__init__() + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/test/v4_0/models/shared_step_model.py b/vsts/vsts/test/v4_0/models/shared_step_model.py new file mode 100644 index 00000000..07333033 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/shared_step_model.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SharedStepModel(Model): + """SharedStepModel. + + :param id: + :type id: int + :param revision: + :type revision: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, id=None, revision=None): + super(SharedStepModel, self).__init__() + self.id = id + self.revision = revision diff --git a/vsts/vsts/test/v4_0/models/suite_create_model.py b/vsts/vsts/test/v4_0/models/suite_create_model.py new file mode 100644 index 00000000..cbcd78dd --- /dev/null +++ b/vsts/vsts/test/v4_0/models/suite_create_model.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteCreateModel(Model): + """SuiteCreateModel. + + :param name: + :type name: str + :param query_string: + :type query_string: str + :param requirement_ids: + :type requirement_ids: list of int + :param suite_type: + :type suite_type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'query_string': {'key': 'queryString', 'type': 'str'}, + 'requirement_ids': {'key': 'requirementIds', 'type': '[int]'}, + 'suite_type': {'key': 'suiteType', 'type': 'str'} + } + + def __init__(self, name=None, query_string=None, requirement_ids=None, suite_type=None): + super(SuiteCreateModel, self).__init__() + self.name = name + self.query_string = query_string + self.requirement_ids = requirement_ids + self.suite_type = suite_type diff --git a/vsts/vsts/test/v4_0/models/suite_entry.py b/vsts/vsts/test/v4_0/models/suite_entry.py new file mode 100644 index 00000000..2f6dade3 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/suite_entry.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteEntry(Model): + """SuiteEntry. + + :param child_suite_id: Id of child suite in a suite + :type child_suite_id: int + :param sequence_number: Sequence number for the test case or child suite in the suite + :type sequence_number: int + :param suite_id: Id for the suite + :type suite_id: int + :param test_case_id: Id of a test case in a suite + :type test_case_id: int + """ + + _attribute_map = { + 'child_suite_id': {'key': 'childSuiteId', 'type': 'int'}, + 'sequence_number': {'key': 'sequenceNumber', 'type': 'int'}, + 'suite_id': {'key': 'suiteId', 'type': 'int'}, + 'test_case_id': {'key': 'testCaseId', 'type': 'int'} + } + + def __init__(self, child_suite_id=None, sequence_number=None, suite_id=None, test_case_id=None): + super(SuiteEntry, self).__init__() + self.child_suite_id = child_suite_id + self.sequence_number = sequence_number + self.suite_id = suite_id + self.test_case_id = test_case_id diff --git a/vsts/vsts/test/v4_0/models/suite_entry_update_model.py b/vsts/vsts/test/v4_0/models/suite_entry_update_model.py new file mode 100644 index 00000000..afcb6f04 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/suite_entry_update_model.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteEntryUpdateModel(Model): + """SuiteEntryUpdateModel. + + :param child_suite_id: Id of child suite in a suite + :type child_suite_id: int + :param sequence_number: Updated sequence number for the test case or child suite in the suite + :type sequence_number: int + :param test_case_id: Id of a test case in a suite + :type test_case_id: int + """ + + _attribute_map = { + 'child_suite_id': {'key': 'childSuiteId', 'type': 'int'}, + 'sequence_number': {'key': 'sequenceNumber', 'type': 'int'}, + 'test_case_id': {'key': 'testCaseId', 'type': 'int'} + } + + def __init__(self, child_suite_id=None, sequence_number=None, test_case_id=None): + super(SuiteEntryUpdateModel, self).__init__() + self.child_suite_id = child_suite_id + self.sequence_number = sequence_number + self.test_case_id = test_case_id diff --git a/vsts/vsts/test/v4_0/models/suite_test_case.py b/vsts/vsts/test/v4_0/models/suite_test_case.py new file mode 100644 index 00000000..a4cf3f09 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/suite_test_case.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteTestCase(Model): + """SuiteTestCase. + + :param point_assignments: + :type point_assignments: list of :class:`PointAssignment ` + :param test_case: + :type test_case: :class:`WorkItemReference ` + """ + + _attribute_map = { + 'point_assignments': {'key': 'pointAssignments', 'type': '[PointAssignment]'}, + 'test_case': {'key': 'testCase', 'type': 'WorkItemReference'} + } + + def __init__(self, point_assignments=None, test_case=None): + super(SuiteTestCase, self).__init__() + self.point_assignments = point_assignments + self.test_case = test_case diff --git a/vsts/vsts/test/v4_0/models/team_context.py b/vsts/vsts/test/v4_0/models/team_context.py new file mode 100644 index 00000000..18418ce7 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/team_context.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamContext(Model): + """TeamContext. + + :param project: The team project Id or name. Ignored if ProjectId is set. + :type project: str + :param project_id: The Team Project ID. Required if Project is not set. + :type project_id: str + :param team: The Team Id or name. Ignored if TeamId is set. + :type team: str + :param team_id: The Team Id + :type team_id: str + """ + + _attribute_map = { + 'project': {'key': 'project', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'team': {'key': 'team', 'type': 'str'}, + 'team_id': {'key': 'teamId', 'type': 'str'} + } + + def __init__(self, project=None, project_id=None, team=None, team_id=None): + super(TeamContext, self).__init__() + self.project = project + self.project_id = project_id + self.team = team + self.team_id = team_id diff --git a/vsts/vsts/test/v4_0/models/team_project_reference.py b/vsts/vsts/test/v4_0/models/team_project_reference.py new file mode 100644 index 00000000..fa79d465 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/team_project_reference.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamProjectReference(Model): + """TeamProjectReference. + + :param abbreviation: Project abbreviation. + :type abbreviation: str + :param description: The project's description (if any). + :type description: str + :param id: Project identifier. + :type id: str + :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'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + '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, description=None, id=None, name=None, revision=None, state=None, url=None, visibility=None): + super(TeamProjectReference, self).__init__() + self.abbreviation = abbreviation + self.description = description + self.id = id + self.name = name + self.revision = revision + self.state = state + self.url = url + self.visibility = visibility diff --git a/vsts/vsts/test/v4_0/models/test_action_result_model.py b/vsts/vsts/test/v4_0/models/test_action_result_model.py new file mode 100644 index 00000000..edb7f5e3 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_action_result_model.py @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------------------------- +# 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 .test_result_model_base import TestResultModelBase + + +class TestActionResultModel(TestResultModelBase): + """TestActionResultModel. + + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param outcome: + :type outcome: str + :param started_date: + :type started_date: datetime + :param action_path: + :type action_path: str + :param iteration_id: + :type iteration_id: int + :param shared_step_model: + :type shared_step_model: :class:`SharedStepModel ` + :param step_identifier: This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + :type step_identifier: str + :param url: + :type url: str + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'action_path': {'key': 'actionPath', 'type': 'str'}, + 'iteration_id': {'key': 'iterationId', 'type': 'int'}, + 'shared_step_model': {'key': 'sharedStepModel', 'type': 'SharedStepModel'}, + 'step_identifier': {'key': 'stepIdentifier', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error_message=None, outcome=None, started_date=None, action_path=None, iteration_id=None, shared_step_model=None, step_identifier=None, url=None): + super(TestActionResultModel, self).__init__(comment=comment, completed_date=completed_date, duration_in_ms=duration_in_ms, error_message=error_message, outcome=outcome, started_date=started_date) + self.action_path = action_path + self.iteration_id = iteration_id + self.shared_step_model = shared_step_model + self.step_identifier = step_identifier + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_attachment.py b/vsts/vsts/test/v4_0/models/test_attachment.py new file mode 100644 index 00000000..fa2cc043 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_attachment.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestAttachment(Model): + """TestAttachment. + + :param attachment_type: + :type attachment_type: object + :param comment: + :type comment: str + :param created_date: + :type created_date: datetime + :param file_name: + :type file_name: str + :param id: + :type id: int + :param url: + :type url: str + """ + + _attribute_map = { + 'attachment_type': {'key': 'attachmentType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, attachment_type=None, comment=None, created_date=None, file_name=None, id=None, url=None): + super(TestAttachment, self).__init__() + self.attachment_type = attachment_type + self.comment = comment + self.created_date = created_date + self.file_name = file_name + self.id = id + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_attachment_reference.py b/vsts/vsts/test/v4_0/models/test_attachment_reference.py new file mode 100644 index 00000000..c5fbe1c7 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_attachment_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestAttachmentReference(Model): + """TestAttachmentReference. + + :param id: + :type id: int + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, url=None): + super(TestAttachmentReference, self).__init__() + self.id = id + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_attachment_request_model.py b/vsts/vsts/test/v4_0/models/test_attachment_request_model.py new file mode 100644 index 00000000..bfe9d645 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_attachment_request_model.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestAttachmentRequestModel(Model): + """TestAttachmentRequestModel. + + :param attachment_type: + :type attachment_type: str + :param comment: + :type comment: str + :param file_name: + :type file_name: str + :param stream: + :type stream: str + """ + + _attribute_map = { + 'attachment_type': {'key': 'attachmentType', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'stream': {'key': 'stream', 'type': 'str'} + } + + def __init__(self, attachment_type=None, comment=None, file_name=None, stream=None): + super(TestAttachmentRequestModel, self).__init__() + self.attachment_type = attachment_type + self.comment = comment + self.file_name = file_name + self.stream = stream diff --git a/vsts/vsts/test/v4_0/models/test_case_result.py b/vsts/vsts/test/v4_0/models/test_case_result.py new file mode 100644 index 00000000..0917b90a --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_case_result.py @@ -0,0 +1,205 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResult(Model): + """TestCaseResult. + + :param afn_strip_id: + :type afn_strip_id: int + :param area: + :type area: :class:`ShallowReference ` + :param associated_bugs: + :type associated_bugs: list of :class:`ShallowReference ` + :param automated_test_id: + :type automated_test_id: str + :param automated_test_name: + :type automated_test_name: str + :param automated_test_storage: + :type automated_test_storage: str + :param automated_test_type: + :type automated_test_type: str + :param automated_test_type_id: + :type automated_test_type_id: str + :param build: + :type build: :class:`ShallowReference ` + :param build_reference: + :type build_reference: :class:`BuildReference ` + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param computer_name: + :type computer_name: str + :param configuration: + :type configuration: :class:`ShallowReference ` + :param created_date: + :type created_date: datetime + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param failing_since: + :type failing_since: :class:`FailingSince ` + :param failure_type: + :type failure_type: str + :param id: + :type id: int + :param iteration_details: + :type iteration_details: list of :class:`TestIterationDetailsModel ` + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param outcome: + :type outcome: str + :param owner: + :type owner: :class:`IdentityRef ` + :param priority: + :type priority: int + :param project: + :type project: :class:`ShallowReference ` + :param release: + :type release: :class:`ShallowReference ` + :param release_reference: + :type release_reference: :class:`ReleaseReference ` + :param reset_count: + :type reset_count: int + :param resolution_state: + :type resolution_state: str + :param resolution_state_id: + :type resolution_state_id: int + :param revision: + :type revision: int + :param run_by: + :type run_by: :class:`IdentityRef ` + :param stack_trace: + :type stack_trace: str + :param started_date: + :type started_date: datetime + :param state: + :type state: str + :param test_case: + :type test_case: :class:`ShallowReference ` + :param test_case_reference_id: + :type test_case_reference_id: int + :param test_case_title: + :type test_case_title: str + :param test_plan: + :type test_plan: :class:`ShallowReference ` + :param test_point: + :type test_point: :class:`ShallowReference ` + :param test_run: + :type test_run: :class:`ShallowReference ` + :param test_suite: + :type test_suite: :class:`ShallowReference ` + :param url: + :type url: str + """ + + _attribute_map = { + 'afn_strip_id': {'key': 'afnStripId', 'type': 'int'}, + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'associated_bugs': {'key': 'associatedBugs', 'type': '[ShallowReference]'}, + 'automated_test_id': {'key': 'automatedTestId', 'type': 'str'}, + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'automated_test_storage': {'key': 'automatedTestStorage', 'type': 'str'}, + 'automated_test_type': {'key': 'automatedTestType', 'type': 'str'}, + 'automated_test_type_id': {'key': 'automatedTestTypeId', 'type': 'str'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_reference': {'key': 'buildReference', 'type': 'BuildReference'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'failing_since': {'key': 'failingSince', 'type': 'FailingSince'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'iteration_details': {'key': 'iterationDetails', 'type': '[TestIterationDetailsModel]'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'release': {'key': 'release', 'type': 'ShallowReference'}, + 'release_reference': {'key': 'releaseReference', 'type': 'ReleaseReference'}, + 'reset_count': {'key': 'resetCount', 'type': 'int'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'str'}, + 'resolution_state_id': {'key': 'resolutionStateId', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'run_by': {'key': 'runBy', 'type': 'IdentityRef'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_case': {'key': 'testCase', 'type': 'ShallowReference'}, + 'test_case_reference_id': {'key': 'testCaseReferenceId', 'type': 'int'}, + 'test_case_title': {'key': 'testCaseTitle', 'type': 'str'}, + 'test_plan': {'key': 'testPlan', 'type': 'ShallowReference'}, + 'test_point': {'key': 'testPoint', 'type': 'ShallowReference'}, + 'test_run': {'key': 'testRun', 'type': 'ShallowReference'}, + 'test_suite': {'key': 'testSuite', 'type': 'ShallowReference'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, afn_strip_id=None, area=None, associated_bugs=None, automated_test_id=None, automated_test_name=None, automated_test_storage=None, automated_test_type=None, automated_test_type_id=None, build=None, build_reference=None, comment=None, completed_date=None, computer_name=None, configuration=None, created_date=None, custom_fields=None, duration_in_ms=None, error_message=None, failing_since=None, failure_type=None, id=None, iteration_details=None, last_updated_by=None, last_updated_date=None, outcome=None, owner=None, priority=None, project=None, release=None, release_reference=None, reset_count=None, resolution_state=None, resolution_state_id=None, revision=None, run_by=None, stack_trace=None, started_date=None, state=None, test_case=None, test_case_reference_id=None, test_case_title=None, test_plan=None, test_point=None, test_run=None, test_suite=None, url=None): + super(TestCaseResult, self).__init__() + self.afn_strip_id = afn_strip_id + self.area = area + self.associated_bugs = associated_bugs + self.automated_test_id = automated_test_id + self.automated_test_name = automated_test_name + self.automated_test_storage = automated_test_storage + self.automated_test_type = automated_test_type + self.automated_test_type_id = automated_test_type_id + self.build = build + self.build_reference = build_reference + self.comment = comment + self.completed_date = completed_date + self.computer_name = computer_name + self.configuration = configuration + self.created_date = created_date + self.custom_fields = custom_fields + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.failing_since = failing_since + self.failure_type = failure_type + self.id = id + self.iteration_details = iteration_details + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.outcome = outcome + self.owner = owner + self.priority = priority + self.project = project + self.release = release + self.release_reference = release_reference + self.reset_count = reset_count + self.resolution_state = resolution_state + self.resolution_state_id = resolution_state_id + self.revision = revision + self.run_by = run_by + self.stack_trace = stack_trace + self.started_date = started_date + self.state = state + self.test_case = test_case + self.test_case_reference_id = test_case_reference_id + self.test_case_title = test_case_title + self.test_plan = test_plan + self.test_point = test_point + self.test_run = test_run + self.test_suite = test_suite + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_case_result_attachment_model.py b/vsts/vsts/test/v4_0/models/test_case_result_attachment_model.py new file mode 100644 index 00000000..7a7412e9 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_case_result_attachment_model.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResultAttachmentModel(Model): + """TestCaseResultAttachmentModel. + + :param id: + :type id: int + :param iteration_id: + :type iteration_id: int + :param name: + :type name: str + :param size: + :type size: long + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'iteration_id': {'key': 'iterationId', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, iteration_id=None, name=None, size=None, url=None): + super(TestCaseResultAttachmentModel, self).__init__() + self.id = id + self.iteration_id = iteration_id + self.name = name + self.size = size + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_case_result_identifier.py b/vsts/vsts/test/v4_0/models/test_case_result_identifier.py new file mode 100644 index 00000000..b88a489d --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_case_result_identifier.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResultIdentifier(Model): + """TestCaseResultIdentifier. + + :param test_result_id: + :type test_result_id: int + :param test_run_id: + :type test_run_id: int + """ + + _attribute_map = { + 'test_result_id': {'key': 'testResultId', 'type': 'int'}, + 'test_run_id': {'key': 'testRunId', 'type': 'int'} + } + + def __init__(self, test_result_id=None, test_run_id=None): + super(TestCaseResultIdentifier, self).__init__() + self.test_result_id = test_result_id + self.test_run_id = test_run_id diff --git a/vsts/vsts/test/v4_0/models/test_case_result_update_model.py b/vsts/vsts/test/v4_0/models/test_case_result_update_model.py new file mode 100644 index 00000000..df2fc186 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_case_result_update_model.py @@ -0,0 +1,93 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResultUpdateModel(Model): + """TestCaseResultUpdateModel. + + :param associated_work_items: + :type associated_work_items: list of int + :param automated_test_type_id: + :type automated_test_type_id: str + :param comment: + :type comment: str + :param completed_date: + :type completed_date: str + :param computer_name: + :type computer_name: str + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param duration_in_ms: + :type duration_in_ms: str + :param error_message: + :type error_message: str + :param failure_type: + :type failure_type: str + :param outcome: + :type outcome: str + :param owner: + :type owner: :class:`IdentityRef ` + :param resolution_state: + :type resolution_state: str + :param run_by: + :type run_by: :class:`IdentityRef ` + :param stack_trace: + :type stack_trace: str + :param started_date: + :type started_date: str + :param state: + :type state: str + :param test_case_priority: + :type test_case_priority: str + :param test_result: + :type test_result: :class:`ShallowReference ` + """ + + _attribute_map = { + 'associated_work_items': {'key': 'associatedWorkItems', 'type': '[int]'}, + 'automated_test_type_id': {'key': 'automatedTestTypeId', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'str'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'str'}, + 'run_by': {'key': 'runBy', 'type': 'IdentityRef'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_case_priority': {'key': 'testCasePriority', 'type': 'str'}, + 'test_result': {'key': 'testResult', 'type': 'ShallowReference'} + } + + def __init__(self, associated_work_items=None, automated_test_type_id=None, comment=None, completed_date=None, computer_name=None, custom_fields=None, duration_in_ms=None, error_message=None, failure_type=None, outcome=None, owner=None, resolution_state=None, run_by=None, stack_trace=None, started_date=None, state=None, test_case_priority=None, test_result=None): + super(TestCaseResultUpdateModel, self).__init__() + self.associated_work_items = associated_work_items + self.automated_test_type_id = automated_test_type_id + self.comment = comment + self.completed_date = completed_date + self.computer_name = computer_name + self.custom_fields = custom_fields + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.failure_type = failure_type + self.outcome = outcome + self.owner = owner + self.resolution_state = resolution_state + self.run_by = run_by + self.stack_trace = stack_trace + self.started_date = started_date + self.state = state + self.test_case_priority = test_case_priority + self.test_result = test_result diff --git a/vsts/vsts/test/v4_0/models/test_configuration.py b/vsts/vsts/test/v4_0/models/test_configuration.py new file mode 100644 index 00000000..b2b5aba6 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_configuration.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestConfiguration(Model): + """TestConfiguration. + + :param area: Area of the configuration + :type area: :class:`ShallowReference ` + :param description: Description of the configuration + :type description: str + :param id: Id of the configuration + :type id: int + :param is_default: Is the configuration a default for the test plans + :type is_default: bool + :param last_updated_by: Last Updated By Reference + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: Last Updated Data + :type last_updated_date: datetime + :param name: Name of the configuration + :type name: str + :param project: Project to which the configuration belongs + :type project: :class:`ShallowReference ` + :param revision: Revision of the the configuration + :type revision: int + :param state: State of the configuration + :type state: object + :param url: Url of Configuration Resource + :type url: str + :param values: Dictionary of Test Variable, Selected Value + :type values: list of :class:`NameValuePair ` + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[NameValuePair]'} + } + + def __init__(self, area=None, description=None, id=None, is_default=None, last_updated_by=None, last_updated_date=None, name=None, project=None, revision=None, state=None, url=None, values=None): + super(TestConfiguration, self).__init__() + self.area = area + self.description = description + self.id = id + self.is_default = is_default + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.name = name + self.project = project + self.revision = revision + self.state = state + self.url = url + self.values = values diff --git a/vsts/vsts/test/v4_0/models/test_environment.py b/vsts/vsts/test/v4_0/models/test_environment.py new file mode 100644 index 00000000..f8876fd0 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_environment.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_0/models/test_failure_details.py b/vsts/vsts/test/v4_0/models/test_failure_details.py new file mode 100644 index 00000000..1f2fef0f --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_failure_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestFailureDetails(Model): + """TestFailureDetails. + + :param count: + :type count: int + :param test_results: + :type test_results: list of :class:`TestCaseResultIdentifier ` + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'test_results': {'key': 'testResults', 'type': '[TestCaseResultIdentifier]'} + } + + def __init__(self, count=None, test_results=None): + super(TestFailureDetails, self).__init__() + self.count = count + self.test_results = test_results diff --git a/vsts/vsts/test/v4_0/models/test_failures_analysis.py b/vsts/vsts/test/v4_0/models/test_failures_analysis.py new file mode 100644 index 00000000..7ac08ac6 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_failures_analysis.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestFailuresAnalysis(Model): + """TestFailuresAnalysis. + + :param existing_failures: + :type existing_failures: :class:`TestFailureDetails ` + :param fixed_tests: + :type fixed_tests: :class:`TestFailureDetails ` + :param new_failures: + :type new_failures: :class:`TestFailureDetails ` + :param previous_context: + :type previous_context: :class:`TestResultsContext ` + """ + + _attribute_map = { + 'existing_failures': {'key': 'existingFailures', 'type': 'TestFailureDetails'}, + 'fixed_tests': {'key': 'fixedTests', 'type': 'TestFailureDetails'}, + 'new_failures': {'key': 'newFailures', 'type': 'TestFailureDetails'}, + 'previous_context': {'key': 'previousContext', 'type': 'TestResultsContext'} + } + + def __init__(self, existing_failures=None, fixed_tests=None, new_failures=None, previous_context=None): + super(TestFailuresAnalysis, self).__init__() + self.existing_failures = existing_failures + self.fixed_tests = fixed_tests + self.new_failures = new_failures + self.previous_context = previous_context diff --git a/vsts/vsts/test/v4_0/models/test_iteration_details_model.py b/vsts/vsts/test/v4_0/models/test_iteration_details_model.py new file mode 100644 index 00000000..53d84591 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_iteration_details_model.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestIterationDetailsModel(Model): + """TestIterationDetailsModel. + + :param action_results: + :type action_results: list of :class:`TestActionResultModel ` + :param attachments: + :type attachments: list of :class:`TestCaseResultAttachmentModel ` + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param id: + :type id: int + :param outcome: + :type outcome: str + :param parameters: + :type parameters: list of :class:`TestResultParameterModel ` + :param started_date: + :type started_date: datetime + :param url: + :type url: str + """ + + _attribute_map = { + 'action_results': {'key': 'actionResults', 'type': '[TestActionResultModel]'}, + 'attachments': {'key': 'attachments', 'type': '[TestCaseResultAttachmentModel]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[TestResultParameterModel]'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, action_results=None, attachments=None, comment=None, completed_date=None, duration_in_ms=None, error_message=None, id=None, outcome=None, parameters=None, started_date=None, url=None): + super(TestIterationDetailsModel, self).__init__() + self.action_results = action_results + self.attachments = attachments + self.comment = comment + self.completed_date = completed_date + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.id = id + self.outcome = outcome + self.parameters = parameters + self.started_date = started_date + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_message_log_details.py b/vsts/vsts/test/v4_0/models/test_message_log_details.py new file mode 100644 index 00000000..75553733 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_message_log_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestMessageLogDetails(Model): + """TestMessageLogDetails. + + :param date_created: Date when the resource is created + :type date_created: datetime + :param entry_id: Id of the resource + :type entry_id: int + :param message: Message of the resource + :type message: str + """ + + _attribute_map = { + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'entry_id': {'key': 'entryId', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, date_created=None, entry_id=None, message=None): + super(TestMessageLogDetails, self).__init__() + self.date_created = date_created + self.entry_id = entry_id + self.message = message diff --git a/vsts/vsts/test/v4_0/models/test_method.py b/vsts/vsts/test/v4_0/models/test_method.py new file mode 100644 index 00000000..ee92559b --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_method.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestMethod(Model): + """TestMethod. + + :param container: + :type container: str + :param name: + :type name: str + """ + + _attribute_map = { + 'container': {'key': 'container', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, container=None, name=None): + super(TestMethod, self).__init__() + self.container = container + self.name = name diff --git a/vsts/vsts/test/v4_0/models/test_operation_reference.py b/vsts/vsts/test/v4_0/models/test_operation_reference.py new file mode 100644 index 00000000..47e57808 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_operation_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestOperationReference(Model): + """TestOperationReference. + + :param id: + :type id: str + :param status: + :type status: str + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, status=None, url=None): + super(TestOperationReference, self).__init__() + self.id = id + self.status = status + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_plan.py b/vsts/vsts/test/v4_0/models/test_plan.py new file mode 100644 index 00000000..718f0e44 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_plan.py @@ -0,0 +1,117 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPlan(Model): + """TestPlan. + + :param area: + :type area: :class:`ShallowReference ` + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build: + :type build: :class:`ShallowReference ` + :param build_definition: + :type build_definition: :class:`ShallowReference ` + :param client_url: + :type client_url: str + :param description: + :type description: str + :param end_date: + :type end_date: datetime + :param id: + :type id: int + :param iteration: + :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: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param previous_build: + :type previous_build: :class:`ShallowReference ` + :param project: + :type project: :class:`ShallowReference ` + :param release_environment_definition: + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param revision: + :type revision: int + :param root_suite: + :type root_suite: :class:`ShallowReference ` + :param start_date: + :type start_date: datetime + :param state: + :type state: str + :param updated_by: + :type updated_by: :class:`IdentityRef ` + :param updated_date: + :type updated_date: datetime + :param url: + :type url: str + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'ShallowReference'}, + 'client_url': {'key': 'clientUrl', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + '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'}, + 'previous_build': {'key': 'previousBuild', 'type': 'ShallowReference'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'release_environment_definition': {'key': 'releaseEnvironmentDefinition', 'type': 'ReleaseEnvironmentDefinitionReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'root_suite': {'key': 'rootSuite', 'type': 'ShallowReference'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'updated_by': {'key': 'updatedBy', 'type': 'IdentityRef'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, area=None, automated_test_environment=None, automated_test_settings=None, build=None, build_definition=None, client_url=None, description=None, end_date=None, id=None, iteration=None, manual_test_environment=None, manual_test_settings=None, name=None, owner=None, previous_build=None, project=None, release_environment_definition=None, revision=None, root_suite=None, start_date=None, state=None, updated_by=None, updated_date=None, url=None): + super(TestPlan, self).__init__() + self.area = area + self.automated_test_environment = automated_test_environment + self.automated_test_settings = automated_test_settings + self.build = build + self.build_definition = build_definition + self.client_url = client_url + self.description = description + self.end_date = end_date + self.id = id + self.iteration = iteration + self.manual_test_environment = manual_test_environment + self.manual_test_settings = manual_test_settings + self.name = name + self.owner = owner + self.previous_build = previous_build + self.project = project + self.release_environment_definition = release_environment_definition + self.revision = revision + self.root_suite = root_suite + self.start_date = start_date + self.state = state + self.updated_by = updated_by + self.updated_date = updated_date + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_plan_clone_request.py b/vsts/vsts/test/v4_0/models/test_plan_clone_request.py new file mode 100644 index 00000000..549c2b89 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_plan_clone_request.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPlanCloneRequest(Model): + """TestPlanCloneRequest. + + :param destination_test_plan: + :type destination_test_plan: :class:`TestPlan ` + :param options: + :type options: :class:`CloneOptions ` + :param suite_ids: + :type suite_ids: list of int + """ + + _attribute_map = { + 'destination_test_plan': {'key': 'destinationTestPlan', 'type': 'TestPlan'}, + 'options': {'key': 'options', 'type': 'CloneOptions'}, + 'suite_ids': {'key': 'suiteIds', 'type': '[int]'} + } + + def __init__(self, destination_test_plan=None, options=None, suite_ids=None): + super(TestPlanCloneRequest, self).__init__() + self.destination_test_plan = destination_test_plan + self.options = options + self.suite_ids = suite_ids diff --git a/vsts/vsts/test/v4_0/models/test_point.py b/vsts/vsts/test/v4_0/models/test_point.py new file mode 100644 index 00000000..efb3c5d9 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_point.py @@ -0,0 +1,109 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPoint(Model): + """TestPoint. + + :param assigned_to: + :type assigned_to: :class:`IdentityRef ` + :param automated: + :type automated: bool + :param comment: + :type comment: str + :param configuration: + :type configuration: :class:`ShallowReference ` + :param failure_type: + :type failure_type: str + :param id: + :type id: int + :param last_resolution_state_id: + :type last_resolution_state_id: int + :param last_result: + :type last_result: :class:`ShallowReference ` + :param last_result_details: + :type last_result_details: :class:`LastResultDetails ` + :param last_result_state: + :type last_result_state: str + :param last_run_build_number: + :type last_run_build_number: str + :param last_test_run: + :type last_test_run: :class:`ShallowReference ` + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param outcome: + :type outcome: str + :param revision: + :type revision: int + :param state: + :type state: str + :param suite: + :type suite: :class:`ShallowReference ` + :param test_case: + :type test_case: :class:`WorkItemReference ` + :param test_plan: + :type test_plan: :class:`ShallowReference ` + :param url: + :type url: str + :param work_item_properties: + :type work_item_properties: list of object + """ + + _attribute_map = { + 'assigned_to': {'key': 'assignedTo', 'type': 'IdentityRef'}, + 'automated': {'key': 'automated', 'type': 'bool'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_resolution_state_id': {'key': 'lastResolutionStateId', 'type': 'int'}, + 'last_result': {'key': 'lastResult', 'type': 'ShallowReference'}, + 'last_result_details': {'key': 'lastResultDetails', 'type': 'LastResultDetails'}, + 'last_result_state': {'key': 'lastResultState', 'type': 'str'}, + 'last_run_build_number': {'key': 'lastRunBuildNumber', 'type': 'str'}, + 'last_test_run': {'key': 'lastTestRun', 'type': 'ShallowReference'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'str'}, + 'suite': {'key': 'suite', 'type': 'ShallowReference'}, + 'test_case': {'key': 'testCase', 'type': 'WorkItemReference'}, + 'test_plan': {'key': 'testPlan', 'type': 'ShallowReference'}, + 'url': {'key': 'url', 'type': 'str'}, + 'work_item_properties': {'key': 'workItemProperties', 'type': '[object]'} + } + + def __init__(self, assigned_to=None, automated=None, comment=None, configuration=None, failure_type=None, id=None, last_resolution_state_id=None, last_result=None, last_result_details=None, last_result_state=None, last_run_build_number=None, last_test_run=None, last_updated_by=None, last_updated_date=None, outcome=None, revision=None, state=None, suite=None, test_case=None, test_plan=None, url=None, work_item_properties=None): + super(TestPoint, self).__init__() + self.assigned_to = assigned_to + self.automated = automated + self.comment = comment + self.configuration = configuration + self.failure_type = failure_type + self.id = id + self.last_resolution_state_id = last_resolution_state_id + self.last_result = last_result + self.last_result_details = last_result_details + self.last_result_state = last_result_state + self.last_run_build_number = last_run_build_number + self.last_test_run = last_test_run + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.outcome = outcome + self.revision = revision + self.state = state + self.suite = suite + self.test_case = test_case + self.test_plan = test_plan + self.url = url + self.work_item_properties = work_item_properties diff --git a/vsts/vsts/test/v4_0/models/test_points_query.py b/vsts/vsts/test/v4_0/models/test_points_query.py new file mode 100644 index 00000000..a4736aa3 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_points_query.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPointsQuery(Model): + """TestPointsQuery. + + :param order_by: + :type order_by: str + :param points: + :type points: list of :class:`TestPoint ` + :param points_filter: + :type points_filter: :class:`PointsFilter ` + :param wit_fields: + :type wit_fields: list of str + """ + + _attribute_map = { + 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'points': {'key': 'points', 'type': '[TestPoint]'}, + 'points_filter': {'key': 'pointsFilter', 'type': 'PointsFilter'}, + 'wit_fields': {'key': 'witFields', 'type': '[str]'} + } + + def __init__(self, order_by=None, points=None, points_filter=None, wit_fields=None): + super(TestPointsQuery, self).__init__() + self.order_by = order_by + self.points = points + self.points_filter = points_filter + self.wit_fields = wit_fields diff --git a/vsts/vsts/test/v4_0/models/test_resolution_state.py b/vsts/vsts/test/v4_0/models/test_resolution_state.py new file mode 100644 index 00000000..ad49929e --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_resolution_state.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResolutionState(Model): + """TestResolutionState. + + :param id: + :type id: int + :param name: + :type name: str + :param project: + :type project: :class:`ShallowReference ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'} + } + + def __init__(self, id=None, name=None, project=None): + super(TestResolutionState, self).__init__() + self.id = id + self.name = name + self.project = project diff --git a/vsts/vsts/test/v4_0/models/test_result_create_model.py b/vsts/vsts/test/v4_0/models/test_result_create_model.py new file mode 100644 index 00000000..f5d41d85 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_create_model.py @@ -0,0 +1,125 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultCreateModel(Model): + """TestResultCreateModel. + + :param area: + :type area: :class:`ShallowReference ` + :param associated_work_items: + :type associated_work_items: list of int + :param automated_test_id: + :type automated_test_id: str + :param automated_test_name: + :type automated_test_name: str + :param automated_test_storage: + :type automated_test_storage: str + :param automated_test_type: + :type automated_test_type: str + :param automated_test_type_id: + :type automated_test_type_id: str + :param comment: + :type comment: str + :param completed_date: + :type completed_date: str + :param computer_name: + :type computer_name: str + :param configuration: + :type configuration: :class:`ShallowReference ` + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param duration_in_ms: + :type duration_in_ms: str + :param error_message: + :type error_message: str + :param failure_type: + :type failure_type: str + :param outcome: + :type outcome: str + :param owner: + :type owner: :class:`IdentityRef ` + :param resolution_state: + :type resolution_state: str + :param run_by: + :type run_by: :class:`IdentityRef ` + :param stack_trace: + :type stack_trace: str + :param started_date: + :type started_date: str + :param state: + :type state: str + :param test_case: + :type test_case: :class:`ShallowReference ` + :param test_case_priority: + :type test_case_priority: str + :param test_case_title: + :type test_case_title: str + :param test_point: + :type test_point: :class:`ShallowReference ` + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'associated_work_items': {'key': 'associatedWorkItems', 'type': '[int]'}, + 'automated_test_id': {'key': 'automatedTestId', 'type': 'str'}, + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'automated_test_storage': {'key': 'automatedTestStorage', 'type': 'str'}, + 'automated_test_type': {'key': 'automatedTestType', 'type': 'str'}, + 'automated_test_type_id': {'key': 'automatedTestTypeId', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'str'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'str'}, + 'run_by': {'key': 'runBy', 'type': 'IdentityRef'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_case': {'key': 'testCase', 'type': 'ShallowReference'}, + 'test_case_priority': {'key': 'testCasePriority', 'type': 'str'}, + 'test_case_title': {'key': 'testCaseTitle', 'type': 'str'}, + 'test_point': {'key': 'testPoint', 'type': 'ShallowReference'} + } + + def __init__(self, area=None, associated_work_items=None, automated_test_id=None, automated_test_name=None, automated_test_storage=None, automated_test_type=None, automated_test_type_id=None, comment=None, completed_date=None, computer_name=None, configuration=None, custom_fields=None, duration_in_ms=None, error_message=None, failure_type=None, outcome=None, owner=None, resolution_state=None, run_by=None, stack_trace=None, started_date=None, state=None, test_case=None, test_case_priority=None, test_case_title=None, test_point=None): + super(TestResultCreateModel, self).__init__() + self.area = area + self.associated_work_items = associated_work_items + self.automated_test_id = automated_test_id + self.automated_test_name = automated_test_name + self.automated_test_storage = automated_test_storage + self.automated_test_type = automated_test_type + self.automated_test_type_id = automated_test_type_id + self.comment = comment + self.completed_date = completed_date + self.computer_name = computer_name + self.configuration = configuration + self.custom_fields = custom_fields + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.failure_type = failure_type + self.outcome = outcome + self.owner = owner + self.resolution_state = resolution_state + self.run_by = run_by + self.stack_trace = stack_trace + self.started_date = started_date + self.state = state + self.test_case = test_case + self.test_case_priority = test_case_priority + self.test_case_title = test_case_title + self.test_point = test_point diff --git a/vsts/vsts/test/v4_0/models/test_result_document.py b/vsts/vsts/test/v4_0/models/test_result_document.py new file mode 100644 index 00000000..c84140f2 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_document.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultDocument(Model): + """TestResultDocument. + + :param operation_reference: + :type operation_reference: :class:`TestOperationReference ` + :param payload: + :type payload: :class:`TestResultPayload ` + """ + + _attribute_map = { + 'operation_reference': {'key': 'operationReference', 'type': 'TestOperationReference'}, + 'payload': {'key': 'payload', 'type': 'TestResultPayload'} + } + + def __init__(self, operation_reference=None, payload=None): + super(TestResultDocument, self).__init__() + self.operation_reference = operation_reference + self.payload = payload diff --git a/vsts/vsts/test/v4_0/models/test_result_history.py b/vsts/vsts/test/v4_0/models/test_result_history.py new file mode 100644 index 00000000..a2352617 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_history.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultHistory(Model): + """TestResultHistory. + + :param group_by_field: + :type group_by_field: str + :param results_for_group: + :type results_for_group: list of :class:`TestResultHistoryDetailsForGroup ` + """ + + _attribute_map = { + 'group_by_field': {'key': 'groupByField', 'type': 'str'}, + 'results_for_group': {'key': 'resultsForGroup', 'type': '[TestResultHistoryDetailsForGroup]'} + } + + def __init__(self, group_by_field=None, results_for_group=None): + super(TestResultHistory, self).__init__() + self.group_by_field = group_by_field + self.results_for_group = results_for_group diff --git a/vsts/vsts/test/v4_0/models/test_result_history_details_for_group.py b/vsts/vsts/test/v4_0/models/test_result_history_details_for_group.py new file mode 100644 index 00000000..fa696fe9 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_history_details_for_group.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultHistoryDetailsForGroup(Model): + """TestResultHistoryDetailsForGroup. + + :param group_by_value: + :type group_by_value: object + :param latest_result: + :type latest_result: :class:`TestCaseResult ` + """ + + _attribute_map = { + 'group_by_value': {'key': 'groupByValue', 'type': 'object'}, + 'latest_result': {'key': 'latestResult', 'type': 'TestCaseResult'} + } + + def __init__(self, group_by_value=None, latest_result=None): + super(TestResultHistoryDetailsForGroup, self).__init__() + self.group_by_value = group_by_value + self.latest_result = latest_result diff --git a/vsts/vsts/test/v4_0/models/test_result_model_base.py b/vsts/vsts/test/v4_0/models/test_result_model_base.py new file mode 100644 index 00000000..ad003905 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_model_base.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultModelBase(Model): + """TestResultModelBase. + + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param outcome: + :type outcome: str + :param started_date: + :type started_date: datetime + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'} + } + + def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error_message=None, outcome=None, started_date=None): + super(TestResultModelBase, self).__init__() + self.comment = comment + self.completed_date = completed_date + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.outcome = outcome + self.started_date = started_date diff --git a/vsts/vsts/test/v4_0/models/test_result_parameter_model.py b/vsts/vsts/test/v4_0/models/test_result_parameter_model.py new file mode 100644 index 00000000..39efe2cd --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_parameter_model.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultParameterModel(Model): + """TestResultParameterModel. + + :param action_path: + :type action_path: str + :param iteration_id: + :type iteration_id: int + :param parameter_name: + :type parameter_name: str + :param step_identifier: This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + :type step_identifier: str + :param url: + :type url: str + :param value: + :type value: str + """ + + _attribute_map = { + 'action_path': {'key': 'actionPath', 'type': 'str'}, + 'iteration_id': {'key': 'iterationId', 'type': 'int'}, + 'parameter_name': {'key': 'parameterName', 'type': 'str'}, + 'step_identifier': {'key': 'stepIdentifier', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, action_path=None, iteration_id=None, parameter_name=None, step_identifier=None, url=None, value=None): + super(TestResultParameterModel, self).__init__() + self.action_path = action_path + self.iteration_id = iteration_id + self.parameter_name = parameter_name + self.step_identifier = step_identifier + self.url = url + self.value = value diff --git a/vsts/vsts/test/v4_0/models/test_result_payload.py b/vsts/vsts/test/v4_0/models/test_result_payload.py new file mode 100644 index 00000000..22f3d447 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_payload.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultPayload(Model): + """TestResultPayload. + + :param comment: + :type comment: str + :param name: + :type name: str + :param stream: + :type stream: str + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'stream': {'key': 'stream', 'type': 'str'} + } + + def __init__(self, comment=None, name=None, stream=None): + super(TestResultPayload, self).__init__() + self.comment = comment + self.name = name + self.stream = stream diff --git a/vsts/vsts/test/v4_0/models/test_result_summary.py b/vsts/vsts/test/v4_0/models/test_result_summary.py new file mode 100644 index 00000000..b9ae4391 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_summary.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultSummary(Model): + """TestResultSummary. + + :param aggregated_results_analysis: + :type aggregated_results_analysis: :class:`AggregatedResultsAnalysis ` + :param team_project: + :type team_project: :class:`TeamProjectReference ` + :param test_failures: + :type test_failures: :class:`TestFailuresAnalysis ` + :param test_results_context: + :type test_results_context: :class:`TestResultsContext ` + """ + + _attribute_map = { + 'aggregated_results_analysis': {'key': 'aggregatedResultsAnalysis', 'type': 'AggregatedResultsAnalysis'}, + 'team_project': {'key': 'teamProject', 'type': 'TeamProjectReference'}, + 'test_failures': {'key': 'testFailures', 'type': 'TestFailuresAnalysis'}, + 'test_results_context': {'key': 'testResultsContext', 'type': 'TestResultsContext'} + } + + def __init__(self, aggregated_results_analysis=None, team_project=None, test_failures=None, test_results_context=None): + super(TestResultSummary, self).__init__() + self.aggregated_results_analysis = aggregated_results_analysis + self.team_project = team_project + self.test_failures = test_failures + self.test_results_context = test_results_context diff --git a/vsts/vsts/test/v4_0/models/test_result_trend_filter.py b/vsts/vsts/test/v4_0/models/test_result_trend_filter.py new file mode 100644 index 00000000..8cb60290 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_result_trend_filter.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultTrendFilter(Model): + """TestResultTrendFilter. + + :param branch_names: + :type branch_names: list of str + :param build_count: + :type build_count: int + :param definition_ids: + :type definition_ids: list of int + :param env_definition_ids: + :type env_definition_ids: list of int + :param max_complete_date: + :type max_complete_date: datetime + :param publish_context: + :type publish_context: str + :param test_run_titles: + :type test_run_titles: list of str + :param trend_days: + :type trend_days: int + """ + + _attribute_map = { + 'branch_names': {'key': 'branchNames', 'type': '[str]'}, + 'build_count': {'key': 'buildCount', 'type': 'int'}, + 'definition_ids': {'key': 'definitionIds', 'type': '[int]'}, + 'env_definition_ids': {'key': 'envDefinitionIds', 'type': '[int]'}, + 'max_complete_date': {'key': 'maxCompleteDate', 'type': 'iso-8601'}, + 'publish_context': {'key': 'publishContext', 'type': 'str'}, + 'test_run_titles': {'key': 'testRunTitles', 'type': '[str]'}, + 'trend_days': {'key': 'trendDays', 'type': 'int'} + } + + def __init__(self, branch_names=None, build_count=None, definition_ids=None, env_definition_ids=None, max_complete_date=None, publish_context=None, test_run_titles=None, trend_days=None): + super(TestResultTrendFilter, self).__init__() + self.branch_names = branch_names + self.build_count = build_count + self.definition_ids = definition_ids + self.env_definition_ids = env_definition_ids + self.max_complete_date = max_complete_date + self.publish_context = publish_context + self.test_run_titles = test_run_titles + self.trend_days = trend_days diff --git a/vsts/vsts/test/v4_0/models/test_results_context.py b/vsts/vsts/test/v4_0/models/test_results_context.py new file mode 100644 index 00000000..2c5ed74f --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_results_context.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsContext(Model): + """TestResultsContext. + + :param build: + :type build: :class:`BuildReference ` + :param context_type: + :type context_type: object + :param release: + :type release: :class:`ReleaseReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'BuildReference'}, + 'context_type': {'key': 'contextType', 'type': 'object'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'} + } + + def __init__(self, build=None, context_type=None, release=None): + super(TestResultsContext, self).__init__() + self.build = build + self.context_type = context_type + self.release = release diff --git a/vsts/vsts/test/v4_0/models/test_results_details.py b/vsts/vsts/test/v4_0/models/test_results_details.py new file mode 100644 index 00000000..fe8f16aa --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_results_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsDetails(Model): + """TestResultsDetails. + + :param group_by_field: + :type group_by_field: str + :param results_for_group: + :type results_for_group: list of :class:`TestResultsDetailsForGroup ` + """ + + _attribute_map = { + 'group_by_field': {'key': 'groupByField', 'type': 'str'}, + 'results_for_group': {'key': 'resultsForGroup', 'type': '[TestResultsDetailsForGroup]'} + } + + def __init__(self, group_by_field=None, results_for_group=None): + super(TestResultsDetails, self).__init__() + self.group_by_field = group_by_field + self.results_for_group = results_for_group diff --git a/vsts/vsts/test/v4_0/models/test_results_details_for_group.py b/vsts/vsts/test/v4_0/models/test_results_details_for_group.py new file mode 100644 index 00000000..e5858e91 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_results_details_for_group.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsDetailsForGroup(Model): + """TestResultsDetailsForGroup. + + :param group_by_value: + :type group_by_value: object + :param results: + :type results: list of :class:`TestCaseResult ` + :param results_count_by_outcome: + :type results_count_by_outcome: dict + """ + + _attribute_map = { + 'group_by_value': {'key': 'groupByValue', 'type': 'object'}, + 'results': {'key': 'results', 'type': '[TestCaseResult]'}, + 'results_count_by_outcome': {'key': 'resultsCountByOutcome', 'type': '{AggregatedResultsByOutcome}'} + } + + def __init__(self, group_by_value=None, results=None, results_count_by_outcome=None): + super(TestResultsDetailsForGroup, self).__init__() + self.group_by_value = group_by_value + self.results = results + self.results_count_by_outcome = results_count_by_outcome diff --git a/vsts/vsts/test/v4_0/models/test_results_query.py b/vsts/vsts/test/v4_0/models/test_results_query.py new file mode 100644 index 00000000..c366a404 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_results_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsQuery(Model): + """TestResultsQuery. + + :param fields: + :type fields: list of str + :param results: + :type results: list of :class:`TestCaseResult ` + :param results_filter: + :type results_filter: :class:`ResultsFilter ` + """ + + _attribute_map = { + 'fields': {'key': 'fields', 'type': '[str]'}, + 'results': {'key': 'results', 'type': '[TestCaseResult]'}, + 'results_filter': {'key': 'resultsFilter', 'type': 'ResultsFilter'} + } + + def __init__(self, fields=None, results=None, results_filter=None): + super(TestResultsQuery, self).__init__() + self.fields = fields + self.results = results + self.results_filter = results_filter diff --git a/vsts/vsts/test/v4_0/models/test_run.py b/vsts/vsts/test/v4_0/models/test_run.py new file mode 100644 index 00000000..3a2a742f --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_run.py @@ -0,0 +1,193 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestRun(Model): + """TestRun. + + :param build: + :type build: :class:`ShallowReference ` + :param build_configuration: + :type build_configuration: :class:`BuildConfiguration ` + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param controller: + :type controller: str + :param created_date: + :type created_date: datetime + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param drop_location: + :type drop_location: str + :param dtl_aut_environment: + :type dtl_aut_environment: :class:`ShallowReference ` + :param dtl_environment: + :type dtl_environment: :class:`ShallowReference ` + :param dtl_environment_creation_details: + :type dtl_environment_creation_details: :class:`DtlEnvironmentDetails ` + :param due_date: + :type due_date: datetime + :param error_message: + :type error_message: str + :param filter: + :type filter: :class:`RunFilter ` + :param id: + :type id: int + :param incomplete_tests: + :type incomplete_tests: int + :param is_automated: + :type is_automated: bool + :param iteration: + :type iteration: str + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param name: + :type name: str + :param not_applicable_tests: + :type not_applicable_tests: int + :param owner: + :type owner: :class:`IdentityRef ` + :param passed_tests: + :type passed_tests: int + :param phase: + :type phase: str + :param plan: + :type plan: :class:`ShallowReference ` + :param post_process_state: + :type post_process_state: str + :param project: + :type project: :class:`ShallowReference ` + :param release: + :type release: :class:`ReleaseReference ` + :param release_environment_uri: + :type release_environment_uri: str + :param release_uri: + :type release_uri: str + :param revision: + :type revision: int + :param run_statistics: + :type run_statistics: list of :class:`RunStatistic ` + :param started_date: + :type started_date: datetime + :param state: + :type state: str + :param substate: + :type substate: object + :param test_environment: + :type test_environment: :class:`TestEnvironment ` + :param test_message_log_id: + :type test_message_log_id: int + :param test_settings: + :type test_settings: :class:`ShallowReference ` + :param total_tests: + :type total_tests: int + :param unanalyzed_tests: + :type unanalyzed_tests: int + :param url: + :type url: str + :param web_access_url: + :type web_access_url: str + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_configuration': {'key': 'buildConfiguration', 'type': 'BuildConfiguration'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'controller': {'key': 'controller', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'drop_location': {'key': 'dropLocation', 'type': 'str'}, + 'dtl_aut_environment': {'key': 'dtlAutEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment': {'key': 'dtlEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment_creation_details': {'key': 'dtlEnvironmentCreationDetails', 'type': 'DtlEnvironmentDetails'}, + 'due_date': {'key': 'dueDate', 'type': 'iso-8601'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'RunFilter'}, + 'id': {'key': 'id', 'type': 'int'}, + 'incomplete_tests': {'key': 'incompleteTests', 'type': 'int'}, + 'is_automated': {'key': 'isAutomated', 'type': 'bool'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'not_applicable_tests': {'key': 'notApplicableTests', 'type': 'int'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'passed_tests': {'key': 'passedTests', 'type': 'int'}, + 'phase': {'key': 'phase', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'ShallowReference'}, + 'post_process_state': {'key': 'postProcessState', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'}, + 'release_environment_uri': {'key': 'releaseEnvironmentUri', 'type': 'str'}, + 'release_uri': {'key': 'releaseUri', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'run_statistics': {'key': 'runStatistics', 'type': '[RunStatistic]'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'substate': {'key': 'substate', 'type': 'object'}, + 'test_environment': {'key': 'testEnvironment', 'type': 'TestEnvironment'}, + 'test_message_log_id': {'key': 'testMessageLogId', 'type': 'int'}, + 'test_settings': {'key': 'testSettings', 'type': 'ShallowReference'}, + 'total_tests': {'key': 'totalTests', 'type': 'int'}, + 'unanalyzed_tests': {'key': 'unanalyzedTests', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'web_access_url': {'key': 'webAccessUrl', 'type': 'str'} + } + + def __init__(self, build=None, build_configuration=None, comment=None, completed_date=None, controller=None, created_date=None, custom_fields=None, drop_location=None, dtl_aut_environment=None, dtl_environment=None, dtl_environment_creation_details=None, due_date=None, error_message=None, filter=None, id=None, incomplete_tests=None, is_automated=None, iteration=None, last_updated_by=None, last_updated_date=None, name=None, not_applicable_tests=None, owner=None, passed_tests=None, phase=None, plan=None, post_process_state=None, project=None, release=None, release_environment_uri=None, release_uri=None, revision=None, run_statistics=None, started_date=None, state=None, substate=None, test_environment=None, test_message_log_id=None, test_settings=None, total_tests=None, unanalyzed_tests=None, url=None, web_access_url=None): + super(TestRun, self).__init__() + self.build = build + self.build_configuration = build_configuration + self.comment = comment + self.completed_date = completed_date + self.controller = controller + self.created_date = created_date + self.custom_fields = custom_fields + self.drop_location = drop_location + self.dtl_aut_environment = dtl_aut_environment + self.dtl_environment = dtl_environment + self.dtl_environment_creation_details = dtl_environment_creation_details + self.due_date = due_date + self.error_message = error_message + self.filter = filter + self.id = id + self.incomplete_tests = incomplete_tests + self.is_automated = is_automated + self.iteration = iteration + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.name = name + self.not_applicable_tests = not_applicable_tests + self.owner = owner + self.passed_tests = passed_tests + self.phase = phase + self.plan = plan + self.post_process_state = post_process_state + self.project = project + self.release = release + self.release_environment_uri = release_environment_uri + self.release_uri = release_uri + self.revision = revision + self.run_statistics = run_statistics + self.started_date = started_date + self.state = state + self.substate = substate + self.test_environment = test_environment + self.test_message_log_id = test_message_log_id + self.test_settings = test_settings + self.total_tests = total_tests + self.unanalyzed_tests = unanalyzed_tests + self.url = url + self.web_access_url = web_access_url diff --git a/vsts/vsts/test/v4_0/models/test_run_coverage.py b/vsts/vsts/test/v4_0/models/test_run_coverage.py new file mode 100644 index 00000000..f4914e74 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_run_coverage.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestRunCoverage(Model): + """TestRunCoverage. + + :param last_error: + :type last_error: str + :param modules: + :type modules: list of :class:`ModuleCoverage ` + :param state: + :type state: str + :param test_run: + :type test_run: :class:`ShallowReference ` + """ + + _attribute_map = { + 'last_error': {'key': 'lastError', 'type': 'str'}, + 'modules': {'key': 'modules', 'type': '[ModuleCoverage]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_run': {'key': 'testRun', 'type': 'ShallowReference'} + } + + def __init__(self, last_error=None, modules=None, state=None, test_run=None): + super(TestRunCoverage, self).__init__() + self.last_error = last_error + self.modules = modules + self.state = state + self.test_run = test_run diff --git a/vsts/vsts/test/v4_0/models/test_run_statistic.py b/vsts/vsts/test/v4_0/models/test_run_statistic.py new file mode 100644 index 00000000..8684e151 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_run_statistic.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestRunStatistic(Model): + """TestRunStatistic. + + :param run: + :type run: :class:`ShallowReference ` + :param run_statistics: + :type run_statistics: list of :class:`RunStatistic ` + """ + + _attribute_map = { + 'run': {'key': 'run', 'type': 'ShallowReference'}, + 'run_statistics': {'key': 'runStatistics', 'type': '[RunStatistic]'} + } + + def __init__(self, run=None, run_statistics=None): + super(TestRunStatistic, self).__init__() + self.run = run + self.run_statistics = run_statistics diff --git a/vsts/vsts/test/v4_0/models/test_session.py b/vsts/vsts/test/v4_0/models/test_session.py new file mode 100644 index 00000000..45ffabea --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_session.py @@ -0,0 +1,81 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSession(Model): + """TestSession. + + :param area: Area path of the test session + :type area: :class:`ShallowReference ` + :param comment: Comments in the test session + :type comment: str + :param end_date: Duration of the session + :type end_date: datetime + :param id: Id of the test session + :type id: int + :param last_updated_by: Last Updated By Reference + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: Last updated date + :type last_updated_date: datetime + :param owner: Owner of the test session + :type owner: :class:`IdentityRef ` + :param project: Project to which the test session belongs + :type project: :class:`ShallowReference ` + :param property_bag: Generic store for test session data + :type property_bag: :class:`PropertyBag ` + :param revision: Revision of the test session + :type revision: int + :param source: Source of the test session + :type source: object + :param start_date: Start date + :type start_date: datetime + :param state: State of the test session + :type state: object + :param title: Title of the test session + :type title: str + :param url: Url of Test Session Resource + :type url: str + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'property_bag': {'key': 'propertyBag', 'type': 'PropertyBag'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'object'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'object'}, + 'title': {'key': 'title', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, area=None, comment=None, end_date=None, id=None, last_updated_by=None, last_updated_date=None, owner=None, project=None, property_bag=None, revision=None, source=None, start_date=None, state=None, title=None, url=None): + super(TestSession, self).__init__() + self.area = area + self.comment = comment + self.end_date = end_date + self.id = id + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.owner = owner + self.project = project + self.property_bag = property_bag + self.revision = revision + self.source = source + self.start_date = start_date + self.state = state + self.title = title + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_settings.py b/vsts/vsts/test/v4_0/models/test_settings.py new file mode 100644 index 00000000..4cf25582 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_settings.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_0/models/test_suite.py b/vsts/vsts/test/v4_0/models/test_suite.py new file mode 100644 index 00000000..2e10d73b --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_suite.py @@ -0,0 +1,113 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSuite(Model): + """TestSuite. + + :param area_uri: + :type area_uri: str + :param children: + :type children: list of :class:`TestSuite ` + :param default_configurations: + :type default_configurations: list of :class:`ShallowReference ` + :param id: + :type id: int + :param inherit_default_configurations: + :type inherit_default_configurations: bool + :param last_error: + :type last_error: str + :param last_populated_date: + :type last_populated_date: datetime + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param name: + :type name: str + :param parent: + :type parent: :class:`ShallowReference ` + :param plan: + :type plan: :class:`ShallowReference ` + :param project: + :type project: :class:`ShallowReference ` + :param query_string: + :type query_string: str + :param requirement_id: + :type requirement_id: int + :param revision: + :type revision: int + :param state: + :type state: str + :param suites: + :type suites: list of :class:`ShallowReference ` + :param suite_type: + :type suite_type: str + :param test_case_count: + :type test_case_count: int + :param test_cases_url: + :type test_cases_url: str + :param text: + :type text: str + :param url: + :type url: str + """ + + _attribute_map = { + 'area_uri': {'key': 'areaUri', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[TestSuite]'}, + 'default_configurations': {'key': 'defaultConfigurations', 'type': '[ShallowReference]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, + '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'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'ShallowReference'}, + 'plan': {'key': 'plan', 'type': 'ShallowReference'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'query_string': {'key': 'queryString', 'type': 'str'}, + 'requirement_id': {'key': 'requirementId', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'str'}, + 'suites': {'key': 'suites', 'type': '[ShallowReference]'}, + 'suite_type': {'key': 'suiteType', 'type': 'str'}, + 'test_case_count': {'key': 'testCaseCount', 'type': 'int'}, + 'test_cases_url': {'key': 'testCasesUrl', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, area_uri=None, children=None, default_configurations=None, id=None, inherit_default_configurations=None, last_error=None, last_populated_date=None, last_updated_by=None, last_updated_date=None, name=None, parent=None, plan=None, project=None, query_string=None, requirement_id=None, revision=None, state=None, suites=None, suite_type=None, test_case_count=None, test_cases_url=None, text=None, url=None): + super(TestSuite, self).__init__() + self.area_uri = area_uri + self.children = children + self.default_configurations = default_configurations + self.id = id + self.inherit_default_configurations = inherit_default_configurations + 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.name = name + self.parent = parent + self.plan = plan + self.project = project + self.query_string = query_string + self.requirement_id = requirement_id + self.revision = revision + self.state = state + self.suites = suites + self.suite_type = suite_type + self.test_case_count = test_case_count + self.test_cases_url = test_cases_url + self.text = text + self.url = url diff --git a/vsts/vsts/test/v4_0/models/test_suite_clone_request.py b/vsts/vsts/test/v4_0/models/test_suite_clone_request.py new file mode 100644 index 00000000..29d26111 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_suite_clone_request.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSuiteCloneRequest(Model): + """TestSuiteCloneRequest. + + :param clone_options: + :type clone_options: :class:`CloneOptions ` + :param destination_suite_id: + :type destination_suite_id: int + :param destination_suite_project_name: + :type destination_suite_project_name: str + """ + + _attribute_map = { + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneOptions'}, + 'destination_suite_id': {'key': 'destinationSuiteId', 'type': 'int'}, + 'destination_suite_project_name': {'key': 'destinationSuiteProjectName', 'type': 'str'} + } + + def __init__(self, clone_options=None, destination_suite_id=None, destination_suite_project_name=None): + super(TestSuiteCloneRequest, self).__init__() + self.clone_options = clone_options + self.destination_suite_id = destination_suite_id + self.destination_suite_project_name = destination_suite_project_name diff --git a/vsts/vsts/test/v4_0/models/test_summary_for_work_item.py b/vsts/vsts/test/v4_0/models/test_summary_for_work_item.py new file mode 100644 index 00000000..c2d4d664 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_summary_for_work_item.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSummaryForWorkItem(Model): + """TestSummaryForWorkItem. + + :param summary: + :type summary: :class:`AggregatedDataForResultTrend ` + :param work_item: + :type work_item: :class:`WorkItemReference ` + """ + + _attribute_map = { + 'summary': {'key': 'summary', 'type': 'AggregatedDataForResultTrend'}, + 'work_item': {'key': 'workItem', 'type': 'WorkItemReference'} + } + + def __init__(self, summary=None, work_item=None): + super(TestSummaryForWorkItem, self).__init__() + self.summary = summary + self.work_item = work_item diff --git a/vsts/vsts/test/v4_0/models/test_to_work_item_links.py b/vsts/vsts/test/v4_0/models/test_to_work_item_links.py new file mode 100644 index 00000000..80eb6f10 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_to_work_item_links.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestToWorkItemLinks(Model): + """TestToWorkItemLinks. + + :param test: + :type test: :class:`TestMethod ` + :param work_items: + :type work_items: list of :class:`WorkItemReference ` + """ + + _attribute_map = { + 'test': {'key': 'test', 'type': 'TestMethod'}, + 'work_items': {'key': 'workItems', 'type': '[WorkItemReference]'} + } + + def __init__(self, test=None, work_items=None): + super(TestToWorkItemLinks, self).__init__() + self.test = test + self.work_items = work_items diff --git a/vsts/vsts/test/v4_0/models/test_variable.py b/vsts/vsts/test/v4_0/models/test_variable.py new file mode 100644 index 00000000..c6fbcb04 --- /dev/null +++ b/vsts/vsts/test/v4_0/models/test_variable.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestVariable(Model): + """TestVariable. + + :param description: Description of the test variable + :type description: str + :param id: Id of the test variable + :type id: int + :param name: Name of the test variable + :type name: str + :param project: Project to which the test variable belongs + :type project: :class:`ShallowReference ` + :param revision: Revision + :type revision: int + :param url: Url of the test variable + :type url: str + :param values: List of allowed values + :type values: list of str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'} + } + + def __init__(self, description=None, id=None, name=None, project=None, revision=None, url=None, values=None): + super(TestVariable, self).__init__() + self.description = description + self.id = id + self.name = name + self.project = project + self.revision = revision + self.url = url + self.values = values diff --git a/vsts/vsts/test/v4_0/models/work_item_reference.py b/vsts/vsts/test/v4_0/models/work_item_reference.py new file mode 100644 index 00000000..1bff259b --- /dev/null +++ b/vsts/vsts/test/v4_0/models/work_item_reference.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemReference(Model): + """WorkItemReference. + + :param id: + :type id: str + :param name: + :type name: str + :param type: + :type type: str + :param url: + :type url: str + :param web_url: + :type web_url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'web_url': {'key': 'webUrl', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None, url=None, web_url=None): + super(WorkItemReference, self).__init__() + self.id = id + self.name = name + self.type = type + self.url = url + self.web_url = web_url diff --git a/vsts/vsts/test/v4_0/models/work_item_to_test_links.py b/vsts/vsts/test/v4_0/models/work_item_to_test_links.py new file mode 100644 index 00000000..aa4aedca --- /dev/null +++ b/vsts/vsts/test/v4_0/models/work_item_to_test_links.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemToTestLinks(Model): + """WorkItemToTestLinks. + + :param tests: + :type tests: list of :class:`TestMethod ` + :param work_item: + :type work_item: :class:`WorkItemReference ` + """ + + _attribute_map = { + 'tests': {'key': 'tests', 'type': '[TestMethod]'}, + 'work_item': {'key': 'workItem', 'type': 'WorkItemReference'} + } + + def __init__(self, tests=None, work_item=None): + super(WorkItemToTestLinks, self).__init__() + self.tests = tests + self.work_item = work_item diff --git a/vsts/vsts/test/v4_0/test_client.py b/vsts/vsts/test/v4_0/test_client.py new file mode 100644 index 00000000..bb1a27bf --- /dev/null +++ b/vsts/vsts/test/v4_0/test_client.py @@ -0,0 +1,2217 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TestClient(VssClient): + """Test + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TestClient, 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 = 'c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e' + + def get_action_results(self, project, run_id, test_case_result_id, iteration_id, action_path=None): + """GetActionResults. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param str action_path: + :rtype: [TestActionResultModel] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + if action_path is not None: + route_values['actionPath'] = self._serialize.url('action_path', action_path, 'str') + response = self._send(http_method='GET', + location_id='eaf40c31-ff84-4062-aafd-d5664be11a37', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestActionResultModel]', response) + + def create_test_iteration_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id, iteration_id, action_path=None): + """CreateTestIterationResultAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param str action_path: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query('iteration_id', iteration_id, 'int') + if action_path is not None: + query_parameters['actionPath'] = self._serialize.query('action_path', action_path, 'str') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def create_test_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id): + """CreateTestResultAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def get_test_result_attachment_content(self, project, run_id, test_case_result_id, attachment_id): + """GetTestResultAttachmentContent. + [Preview API] Returns a test result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_test_result_attachments(self, project, run_id, test_case_result_id): + """GetTestResultAttachments. + [Preview API] Returns attachment references for test result. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: [TestAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + response = self._send(http_method='GET', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestAttachment]', response) + + def get_test_result_attachment_zip(self, project, run_id, test_case_result_id, attachment_id): + """GetTestResultAttachmentZip. + [Preview API] Returns a test result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def create_test_run_attachment(self, attachment_request_model, project, run_id): + """CreateTestRunAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def get_test_run_attachment_content(self, project, run_id, attachment_id): + """GetTestRunAttachmentContent. + [Preview API] Returns a test run attachment + :param str project: Project ID or project name + :param int run_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_test_run_attachments(self, project, run_id): + """GetTestRunAttachments. + [Preview API] Returns attachment references for test run. + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestAttachment]', response) + + def get_test_run_attachment_zip(self, project, run_id, attachment_id): + """GetTestRunAttachmentZip. + [Preview API] Returns a test run attachment + :param str project: Project ID or project name + :param int run_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_bugs_linked_to_test_result(self, project, run_id, test_case_result_id): + """GetBugsLinkedToTestResult. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: [WorkItemReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + response = self._send(http_method='GET', + location_id='6de20ca2-67de-4faf-97fa-38c5d585eb00', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemReference]', response) + + def get_clone_information(self, project, clone_operation_id, include_details=None): + """GetCloneInformation. + [Preview API] + :param str project: Project ID or project name + :param int clone_operation_id: + :param bool include_details: + :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') + query_parameters = {} + if include_details is not None: + query_parameters['$includeDetails'] = self._serialize.query('include_details', include_details, 'bool') + response = self._send(http_method='GET', + location_id='5b9d6320-abed-47a5-a151-cd6dc3798be6', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CloneOperationInformation', response) + + def clone_test_plan(self, clone_request_body, project, plan_id): + """CloneTestPlan. + [Preview API] + :param :class:` ` clone_request_body: + :param str project: Project ID or project name + :param int plan_id: + :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(clone_request_body, 'TestPlanCloneRequest') + response = self._send(http_method='POST', + location_id='edc3ef4b-8460-4e86-86fa-8e4f5e9be831', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('CloneOperationInformation', response) + + def clone_test_suite(self, clone_request_body, project, plan_id, source_suite_id): + """CloneTestSuite. + [Preview API] + :param :class:` ` clone_request_body: + :param str project: Project ID or project name + :param int plan_id: + :param int source_suite_id: + :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 source_suite_id is not None: + route_values['sourceSuiteId'] = self._serialize.url('source_suite_id', source_suite_id, 'int') + content = self._serialize.body(clone_request_body, 'TestSuiteCloneRequest') + response = self._send(http_method='POST', + location_id='751e4ab5-5bf6-4fb5-9d5d-19ef347662dd', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('CloneOperationInformation', response) + + def get_build_code_coverage(self, project, build_id, flags): + """GetBuildCodeCoverage. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param int flags: + :rtype: [BuildCoverage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='77560e8a-4e8c-4d59-894e-a5f264c24444', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[BuildCoverage]', response) + + def get_code_coverage_summary(self, project, build_id, delta_build_id=None): + """GetCodeCoverageSummary. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param int delta_build_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if delta_build_id is not None: + query_parameters['deltaBuildId'] = self._serialize.query('delta_build_id', delta_build_id, 'int') + response = self._send(http_method='GET', + location_id='77560e8a-4e8c-4d59-894e-a5f264c24444', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CodeCoverageSummary', response) + + def update_code_coverage_summary(self, coverage_data, project, build_id): + """UpdateCodeCoverageSummary. + [Preview API] http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + :param :class:` ` coverage_data: + :param str project: Project ID or project name + :param int build_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + content = self._serialize.body(coverage_data, 'CodeCoverageData') + self._send(http_method='POST', + location_id='77560e8a-4e8c-4d59-894e-a5f264c24444', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + + def get_test_run_code_coverage(self, project, run_id, flags): + """GetTestRunCodeCoverage. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int flags: + :rtype: [TestRunCoverage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='9629116f-3b89-4ed8-b358-d4694efda160', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestRunCoverage]', response) + + def create_test_configuration(self, test_configuration, project): + """CreateTestConfiguration. + [Preview API] + :param :class:` ` test_configuration: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_configuration, 'TestConfiguration') + response = self._send(http_method='POST', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestConfiguration', response) + + def delete_test_configuration(self, project, test_configuration_id): + """DeleteTestConfiguration. + [Preview API] + :param str project: Project ID or project name + :param int test_configuration_id: + """ + 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') + self._send(http_method='DELETE', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.0-preview.2', + route_values=route_values) + + def get_test_configuration_by_id(self, project, test_configuration_id): + """GetTestConfigurationById. + [Preview API] + :param str project: Project ID or project name + :param int test_configuration_id: + :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='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.0-preview.2', + route_values=route_values) + return self._deserialize('TestConfiguration', response) + + def get_test_configurations(self, project, skip=None, top=None, continuation_token=None, include_all_properties=None): + """GetTestConfigurations. + [Preview API] + :param str project: Project ID or project name + :param int skip: + :param int top: + :param str continuation_token: + :param bool include_all_properties: + :rtype: [TestConfiguration] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if include_all_properties is not None: + query_parameters['includeAllProperties'] = self._serialize.query('include_all_properties', include_all_properties, 'bool') + response = self._send(http_method='GET', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestConfiguration]', response) + + def update_test_configuration(self, test_configuration, project, test_configuration_id): + """UpdateTestConfiguration. + [Preview API] + :param :class:` ` test_configuration: + :param str project: Project ID or project name + :param int test_configuration_id: + :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') + content = self._serialize.body(test_configuration, 'TestConfiguration') + response = self._send(http_method='PATCH', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.0-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestConfiguration', response) + + def add_custom_fields(self, new_fields, project): + """AddCustomFields. + [Preview API] + :param [CustomTestFieldDefinition] new_fields: + :param str project: Project ID or project name + :rtype: [CustomTestFieldDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(new_fields, '[CustomTestFieldDefinition]') + response = self._send(http_method='POST', + location_id='8ce1923b-f4c7-4e22-b93b-f6284e525ec2', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[CustomTestFieldDefinition]', response) + + def query_custom_fields(self, project, scope_filter): + """QueryCustomFields. + [Preview API] + :param str project: Project ID or project name + :param str scope_filter: + :rtype: [CustomTestFieldDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if scope_filter is not None: + query_parameters['scopeFilter'] = self._serialize.query('scope_filter', scope_filter, 'str') + response = self._send(http_method='GET', + location_id='8ce1923b-f4c7-4e22-b93b-f6284e525ec2', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[CustomTestFieldDefinition]', response) + + def query_test_result_history(self, filter, project): + """QueryTestResultHistory. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'ResultsFilter') + response = self._send(http_method='POST', + location_id='234616f5-429c-4e7b-9192-affd76731dfd', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestResultHistory', response) + + def get_test_iteration(self, project, run_id, test_case_result_id, iteration_id, include_action_results=None): + """GetTestIteration. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param bool include_action_results: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + query_parameters = {} + if include_action_results is not None: + query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool') + response = self._send(http_method='GET', + location_id='73eb9074-3446-4c44-8296-2f811950ff8d', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestIterationDetailsModel', response) + + def get_test_iterations(self, project, run_id, test_case_result_id, include_action_results=None): + """GetTestIterations. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param bool include_action_results: + :rtype: [TestIterationDetailsModel] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if include_action_results is not None: + query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool') + response = self._send(http_method='GET', + location_id='73eb9074-3446-4c44-8296-2f811950ff8d', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestIterationDetailsModel]', response) + + def get_linked_work_items_by_query(self, work_item_query, project): + """GetLinkedWorkItemsByQuery. + [Preview API] + :param :class:` ` work_item_query: + :param str project: Project ID or project name + :rtype: [LinkedWorkItemsQueryResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(work_item_query, 'LinkedWorkItemsQuery') + response = self._send(http_method='POST', + location_id='a4dcb25b-9878-49ea-abfd-e440bd9b1dcd', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[LinkedWorkItemsQueryResult]', response) + + def get_test_run_logs(self, project, run_id): + """GetTestRunLogs. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestMessageLogDetails] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='a1e55200-637e-42e9-a7c0-7e5bfdedb1b3', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestMessageLogDetails]', response) + + def get_result_parameters(self, project, run_id, test_case_result_id, iteration_id, param_name=None): + """GetResultParameters. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param str param_name: + :rtype: [TestResultParameterModel] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + query_parameters = {} + if param_name is not None: + query_parameters['paramName'] = self._serialize.query('param_name', param_name, 'str') + response = self._send(http_method='GET', + location_id='7c69810d-3354-4af3-844a-180bd25db08a', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestResultParameterModel]', response) + + def create_test_plan(self, test_plan, project): + """CreateTestPlan. + :param :class:` ` test_plan: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_plan, 'PlanUpdateModel') + response = self._send(http_method='POST', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TestPlan', response) + + def delete_test_plan(self, project, plan_id): + """DeleteTestPlan. + :param str project: Project ID or project name + :param int plan_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + self._send(http_method='DELETE', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.0', + route_values=route_values) + + def get_plan_by_id(self, project, plan_id): + """GetPlanById. + :param str project: Project ID or project name + :param int plan_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + response = self._send(http_method='GET', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.0', + route_values=route_values) + return self._deserialize('TestPlan', response) + + def get_plans(self, project, owner=None, skip=None, top=None, include_plan_details=None, filter_active_plans=None): + """GetPlans. + :param str project: Project ID or project name + :param str owner: + :param int skip: + :param int top: + :param bool include_plan_details: + :param bool filter_active_plans: + :rtype: [TestPlan] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if owner is not None: + query_parameters['owner'] = self._serialize.query('owner', owner, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if include_plan_details is not None: + query_parameters['includePlanDetails'] = self._serialize.query('include_plan_details', include_plan_details, 'bool') + if filter_active_plans is not None: + query_parameters['filterActivePlans'] = self._serialize.query('filter_active_plans', filter_active_plans, 'bool') + response = self._send(http_method='GET', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestPlan]', response) + + def update_test_plan(self, plan_update_model, project, plan_id): + """UpdateTestPlan. + :param :class:` ` plan_update_model: + :param str project: Project ID or project name + :param int plan_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + content = self._serialize.body(plan_update_model, 'PlanUpdateModel') + response = self._send(http_method='PATCH', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TestPlan', response) + + def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None): + """GetPoint. + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param int point_ids: + :param str wit_fields: + :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') + if point_ids is not None: + route_values['pointIds'] = self._serialize.url('point_ids', point_ids, 'int') + 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='3bcfd5c8-be62-488e-b1da-b8289ce9299c', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestPoint', response) + + def get_points(self, project, plan_id, suite_id, wit_fields=None, configuration_id=None, test_case_id=None, test_point_ids=None, include_point_details=None, skip=None, top=None): + """GetPoints. + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param str wit_fields: + :param str configuration_id: + :param str test_case_id: + :param str test_point_ids: + :param bool include_point_details: + :param int skip: + :param int top: + :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 wit_fields is not None: + query_parameters['witFields'] = self._serialize.query('wit_fields', wit_fields, 'str') + if configuration_id is not None: + query_parameters['configurationId'] = self._serialize.query('configuration_id', configuration_id, 'str') + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'str') + if test_point_ids is not None: + query_parameters['testPointIds'] = self._serialize.query('test_point_ids', test_point_ids, 'str') + if include_point_details is not None: + query_parameters['includePointDetails'] = self._serialize.query('include_point_details', include_point_details, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestPoint]', response) + + def update_test_points(self, point_update_model, project, plan_id, suite_id, point_ids): + """UpdateTestPoints. + :param :class:` ` point_update_model: + :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') + content = self._serialize.body(point_update_model, 'PointUpdateModel') + response = self._send(http_method='PATCH', + location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestPoint]', response) + + def get_points_by_query(self, query, project, skip=None, top=None): + """GetPointsByQuery. + [Preview API] + :param :class:` ` query: + :param str project: Project ID or project name + :param int skip: + :param int top: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + content = self._serialize.body(query, 'TestPointsQuery') + response = self._send(http_method='POST', + location_id='b4264fd0-a5d1-43e2-82a5-b9c46b7da9ce', + version='4.0-preview.2', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TestPointsQuery', response) + + def get_test_result_details_for_build(self, project, build_id, publish_context=None, group_by=None, filter=None, orderby=None): + """GetTestResultDetailsForBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param str group_by: + :param str filter: + :param str orderby: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if group_by is not None: + query_parameters['groupBy'] = self._serialize.query('group_by', group_by, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + response = self._send(http_method='GET', + location_id='efb387b0-10d5-42e7-be40-95e06ee9430f', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsDetails', response) + + def get_test_result_details_for_release(self, project, release_id, release_env_id, publish_context=None, group_by=None, filter=None, orderby=None): + """GetTestResultDetailsForRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int release_env_id: + :param str publish_context: + :param str group_by: + :param str filter: + :param str orderby: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if group_by is not None: + query_parameters['groupBy'] = self._serialize.query('group_by', group_by, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + response = self._send(http_method='GET', + location_id='b834ec7e-35bb-450f-a3c8-802e70ca40dd', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsDetails', response) + + def publish_test_result_document(self, document, project, run_id): + """PublishTestResultDocument. + [Preview API] + :param :class:` ` document: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(document, 'TestResultDocument') + response = self._send(http_method='POST', + location_id='370ca04b-8eec-4ca8-8ba3-d24dca228791', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestResultDocument', response) + + def get_result_retention_settings(self, project): + """GetResultRetentionSettings. + [Preview API] + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='a3206d9e-fa8d-42d3-88cb-f75c51e69cde', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ResultRetentionSettings', response) + + def update_result_retention_settings(self, retention_settings, project): + """UpdateResultRetentionSettings. + [Preview API] + :param :class:` ` retention_settings: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(retention_settings, 'ResultRetentionSettings') + response = self._send(http_method='PATCH', + location_id='a3206d9e-fa8d-42d3-88cb-f75c51e69cde', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ResultRetentionSettings', response) + + def add_test_results_to_test_run(self, results, project, run_id): + """AddTestResultsToTestRun. + :param [TestCaseResult] results: + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(results, '[TestCaseResult]') + response = self._send(http_method='POST', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestCaseResult]', response) + + def get_test_result_by_id(self, project, run_id, test_case_result_id, details_to_include=None): + """GetTestResultById. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param str details_to_include: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + response = self._send(http_method='GET', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestCaseResult', response) + + def get_test_results(self, project, run_id, details_to_include=None, skip=None, top=None): + """GetTestResults. + :param str project: Project ID or project name + :param int run_id: + :param str details_to_include: + :param int skip: + :param int top: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestCaseResult]', response) + + def update_test_results(self, results, project, run_id): + """UpdateTestResults. + :param [TestCaseResult] results: + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(results, '[TestCaseResult]') + response = self._send(http_method='PATCH', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestCaseResult]', response) + + def get_test_results_by_query(self, query, project): + """GetTestResultsByQuery. + [Preview API] + :param :class:` ` query: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(query, 'TestResultsQuery') + response = self._send(http_method='POST', + location_id='6711da49-8e6f-4d35-9f73-cef7a3c81a5b', + version='4.0-preview.4', + route_values=route_values, + content=content) + return self._deserialize('TestResultsQuery', response) + + def query_test_results_report_for_build(self, project, build_id, publish_context=None, include_failure_details=None, build_to_compare=None): + """QueryTestResultsReportForBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param bool include_failure_details: + :param :class:` ` build_to_compare: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if include_failure_details is not None: + query_parameters['includeFailureDetails'] = self._serialize.query('include_failure_details', include_failure_details, 'bool') + if build_to_compare is not None: + if build_to_compare.id is not None: + query_parameters['buildToCompare.Id'] = build_to_compare.id + if build_to_compare.definition_id is not None: + query_parameters['buildToCompare.DefinitionId'] = build_to_compare.definition_id + if build_to_compare.number is not None: + query_parameters['buildToCompare.Number'] = build_to_compare.number + if build_to_compare.uri is not None: + query_parameters['buildToCompare.Uri'] = build_to_compare.uri + if build_to_compare.build_system is not None: + query_parameters['buildToCompare.BuildSystem'] = build_to_compare.build_system + if build_to_compare.branch_name is not None: + query_parameters['buildToCompare.BranchName'] = build_to_compare.branch_name + if build_to_compare.repository_id is not None: + query_parameters['buildToCompare.RepositoryId'] = build_to_compare.repository_id + response = self._send(http_method='GET', + location_id='000ef77b-fea2-498d-a10d-ad1a037f559f', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultSummary', response) + + def query_test_results_report_for_release(self, project, release_id, release_env_id, publish_context=None, include_failure_details=None, release_to_compare=None): + """QueryTestResultsReportForRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int release_env_id: + :param str publish_context: + :param bool include_failure_details: + :param :class:` ` release_to_compare: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if include_failure_details is not None: + query_parameters['includeFailureDetails'] = self._serialize.query('include_failure_details', include_failure_details, 'bool') + if release_to_compare is not None: + if release_to_compare.id is not None: + query_parameters['releaseToCompare.Id'] = release_to_compare.id + if release_to_compare.name is not None: + query_parameters['releaseToCompare.Name'] = release_to_compare.name + if release_to_compare.environment_id is not None: + query_parameters['releaseToCompare.EnvironmentId'] = release_to_compare.environment_id + if release_to_compare.environment_name is not None: + query_parameters['releaseToCompare.EnvironmentName'] = release_to_compare.environment_name + if release_to_compare.definition_id is not None: + query_parameters['releaseToCompare.DefinitionId'] = release_to_compare.definition_id + if release_to_compare.environment_definition_id is not None: + query_parameters['releaseToCompare.EnvironmentDefinitionId'] = release_to_compare.environment_definition_id + if release_to_compare.environment_definition_name is not None: + query_parameters['releaseToCompare.EnvironmentDefinitionName'] = release_to_compare.environment_definition_name + response = self._send(http_method='GET', + location_id='85765790-ac68-494e-b268-af36c3929744', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultSummary', response) + + def query_test_results_summary_for_releases(self, releases, project): + """QueryTestResultsSummaryForReleases. + [Preview API] + :param [ReleaseReference] releases: + :param str project: Project ID or project name + :rtype: [TestResultSummary] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(releases, '[ReleaseReference]') + response = self._send(http_method='POST', + location_id='85765790-ac68-494e-b268-af36c3929744', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestResultSummary]', response) + + def query_test_summary_by_requirement(self, results_context, project, work_item_ids=None): + """QueryTestSummaryByRequirement. + [Preview API] + :param :class:` ` results_context: + :param str project: Project ID or project name + :param [int] work_item_ids: + :rtype: [TestSummaryForWorkItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if work_item_ids is not None: + work_item_ids = ",".join(map(str, work_item_ids)) + query_parameters['workItemIds'] = self._serialize.query('work_item_ids', work_item_ids, 'str') + content = self._serialize.body(results_context, 'TestResultsContext') + response = self._send(http_method='POST', + location_id='cd08294e-308d-4460-a46e-4cfdefba0b4b', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[TestSummaryForWorkItem]', response) + + def query_result_trend_for_build(self, filter, project): + """QueryResultTrendForBuild. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: [AggregatedDataForResultTrend] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'TestResultTrendFilter') + response = self._send(http_method='POST', + location_id='fbc82a85-0786-4442-88bb-eb0fda6b01b0', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AggregatedDataForResultTrend]', response) + + def query_result_trend_for_release(self, filter, project): + """QueryResultTrendForRelease. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: [AggregatedDataForResultTrend] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'TestResultTrendFilter') + response = self._send(http_method='POST', + location_id='dd178e93-d8dd-4887-9635-d6b9560b7b6e', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AggregatedDataForResultTrend]', response) + + def get_test_run_statistics(self, project, run_id): + """GetTestRunStatistics. + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='0a42c424-d764-4a16-a2d5-5c85f87d0ae8', + version='4.0', + route_values=route_values) + return self._deserialize('TestRunStatistic', response) + + def create_test_run(self, test_run, project): + """CreateTestRun. + :param :class:` ` test_run: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_run, 'RunCreateModel') + response = self._send(http_method='POST', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TestRun', response) + + def delete_test_run(self, project, run_id): + """DeleteTestRun. + :param str project: Project ID or project name + :param int run_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + self._send(http_method='DELETE', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.0', + route_values=route_values) + + def get_test_run_by_id(self, project, run_id): + """GetTestRunById. + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.0', + route_values=route_values) + return self._deserialize('TestRun', response) + + def get_test_runs(self, project, build_uri=None, owner=None, tmi_run_id=None, plan_id=None, include_run_details=None, automated=None, skip=None, top=None): + """GetTestRuns. + :param str project: Project ID or project name + :param str build_uri: + :param str owner: + :param str tmi_run_id: + :param int plan_id: + :param bool include_run_details: + :param bool automated: + :param int skip: + :param int top: + :rtype: [TestRun] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_uri is not None: + query_parameters['buildUri'] = self._serialize.query('build_uri', build_uri, 'str') + if owner is not None: + query_parameters['owner'] = self._serialize.query('owner', owner, 'str') + if tmi_run_id is not None: + query_parameters['tmiRunId'] = self._serialize.query('tmi_run_id', tmi_run_id, 'str') + if plan_id is not None: + query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'int') + if include_run_details is not None: + query_parameters['includeRunDetails'] = self._serialize.query('include_run_details', include_run_details, 'bool') + if automated is not None: + query_parameters['automated'] = self._serialize.query('automated', automated, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestRun]', response) + + def query_test_runs(self, project, state, min_completed_date=None, max_completed_date=None, plan_id=None, is_automated=None, publish_context=None, build_id=None, build_def_id=None, branch_name=None, release_id=None, release_def_id=None, release_env_id=None, release_env_def_id=None, run_title=None, skip=None, top=None): + """QueryTestRuns. + :param str project: Project ID or project name + :param str state: + :param datetime min_completed_date: + :param datetime max_completed_date: + :param int plan_id: + :param bool is_automated: + :param str publish_context: + :param int build_id: + :param int build_def_id: + :param str branch_name: + :param int release_id: + :param int release_def_id: + :param int release_env_id: + :param int release_env_def_id: + :param str run_title: + :param int skip: + :param int top: + :rtype: [TestRun] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if state is not None: + query_parameters['state'] = self._serialize.query('state', state, 'str') + if min_completed_date is not None: + query_parameters['minCompletedDate'] = self._serialize.query('min_completed_date', min_completed_date, 'iso-8601') + if max_completed_date is not None: + query_parameters['maxCompletedDate'] = self._serialize.query('max_completed_date', max_completed_date, 'iso-8601') + if plan_id is not None: + query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'int') + if is_automated is not None: + query_parameters['IsAutomated'] = self._serialize.query('is_automated', is_automated, 'bool') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if build_def_id is not None: + query_parameters['buildDefId'] = self._serialize.query('build_def_id', build_def_id, 'int') + if branch_name is not None: + query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_def_id is not None: + query_parameters['releaseDefId'] = self._serialize.query('release_def_id', release_def_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if release_env_def_id is not None: + query_parameters['releaseEnvDefId'] = self._serialize.query('release_env_def_id', release_env_def_id, 'int') + if run_title is not None: + query_parameters['runTitle'] = self._serialize.query('run_title', run_title, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestRun]', response) + + def update_test_run(self, run_update_model, project, run_id): + """UpdateTestRun. + :param :class:` ` run_update_model: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(run_update_model, 'RunUpdateModel') + response = self._send(http_method='PATCH', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TestRun', response) + + def create_test_session(self, test_session, team_context): + """CreateTestSession. + [Preview API] + :param :class:` ` test_session: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(test_session, 'TestSession') + response = self._send(http_method='POST', + location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestSession', response) + + def get_test_sessions(self, team_context, period=None, all_sessions=None, include_all_properties=None, source=None, include_only_completed_sessions=None): + """GetTestSessions. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :param int period: + :param bool all_sessions: + :param bool include_all_properties: + :param str source: + :param bool include_only_completed_sessions: + :rtype: [TestSession] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + query_parameters = {} + if period is not None: + query_parameters['period'] = self._serialize.query('period', period, 'int') + if all_sessions is not None: + query_parameters['allSessions'] = self._serialize.query('all_sessions', all_sessions, 'bool') + if include_all_properties is not None: + query_parameters['includeAllProperties'] = self._serialize.query('include_all_properties', include_all_properties, 'bool') + if source is not None: + query_parameters['source'] = self._serialize.query('source', source, 'str') + if include_only_completed_sessions is not None: + query_parameters['includeOnlyCompletedSessions'] = self._serialize.query('include_only_completed_sessions', include_only_completed_sessions, 'bool') + response = self._send(http_method='GET', + location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestSession]', response) + + def update_test_session(self, test_session, team_context): + """UpdateTestSession. + [Preview API] + :param :class:` ` test_session: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(test_session, 'TestSession') + response = self._send(http_method='PATCH', + location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestSession', response) + + def delete_shared_parameter(self, project, shared_parameter_id): + """DeleteSharedParameter. + [Preview API] + :param str project: Project ID or project name + :param int shared_parameter_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if shared_parameter_id is not None: + route_values['sharedParameterId'] = self._serialize.url('shared_parameter_id', shared_parameter_id, 'int') + self._send(http_method='DELETE', + location_id='8300eeca-0f8c-4eff-a089-d2dda409c41f', + version='4.0-preview.1', + route_values=route_values) + + def delete_shared_step(self, project, shared_step_id): + """DeleteSharedStep. + [Preview API] + :param str project: Project ID or project name + :param int shared_step_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if shared_step_id is not None: + route_values['sharedStepId'] = self._serialize.url('shared_step_id', shared_step_id, 'int') + self._send(http_method='DELETE', + location_id='fabb3cc9-e3f8-40b7-8b62-24cc4b73fccf', + version='4.0-preview.1', + route_values=route_values) + + def get_suite_entries(self, project, suite_id): + """GetSuiteEntries. + [Preview API] + :param str project: Project ID or project name + :param int suite_id: + :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') + response = self._send(http_method='GET', + location_id='bf8b7f78-0c1f-49cb-89e9-d1a17bcaaad3', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SuiteEntry]', response) + + def reorder_suite_entries(self, suite_entries, project, suite_id): + """ReorderSuiteEntries. + [Preview API] + :param [SuiteEntryUpdateModel] suite_entries: + :param str project: Project ID or project name + :param int suite_id: + :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, '[SuiteEntryUpdateModel]') + response = self._send(http_method='PATCH', + location_id='bf8b7f78-0c1f-49cb-89e9-d1a17bcaaad3', + version='4.0-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[SuiteEntry]', response) + + def add_test_cases_to_suite(self, project, plan_id, suite_id, test_case_ids): + """AddTestCasesToSuite. + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param str test_case_ids: + :rtype: [SuiteTestCase] + """ + 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') + response = self._send(http_method='POST', + location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SuiteTestCase]', response) + + def get_test_case_by_id(self, project, plan_id, suite_id, test_case_ids): + """GetTestCaseById. + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param int test_case_ids: + :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') + if test_case_ids is not None: + route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'int') + response = self._send(http_method='GET', + location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.0', + route_values=route_values) + return self._deserialize('SuiteTestCase', response) + + def get_test_cases(self, project, plan_id, suite_id): + """GetTestCases. + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: [SuiteTestCase] + """ + 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') + response = self._send(http_method='GET', + location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SuiteTestCase]', response) + + def remove_test_cases_from_suite_url(self, project, plan_id, suite_id, test_case_ids): + """RemoveTestCasesFromSuiteUrl. + :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='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.0', + route_values=route_values) + + def create_test_suite(self, test_suite, project, plan_id, suite_id): + """CreateTestSuite. + :param :class:` ` test_suite: + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: [TestSuite] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(test_suite, 'SuiteCreateModel') + response = self._send(http_method='POST', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestSuite]', response) + + def delete_test_suite(self, project, plan_id, suite_id): + """DeleteTestSuite. + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + self._send(http_method='DELETE', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.0', + route_values=route_values) + + def get_test_suite_by_id(self, project, plan_id, suite_id, include_child_suites=None): + """GetTestSuiteById. + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param bool include_child_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') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + query_parameters = {} + if include_child_suites is not None: + query_parameters['includeChildSuites'] = self._serialize.query('include_child_suites', include_child_suites, 'bool') + response = self._send(http_method='GET', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestSuite', response) + + def get_test_suites_for_plan(self, project, plan_id, include_suites=None, skip=None, top=None, as_tree_view=None): + """GetTestSuitesForPlan. + :param str project: Project ID or project name + :param int plan_id: + :param bool include_suites: + :param int skip: + :param int top: + :param bool as_tree_view: + :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 include_suites is not None: + query_parameters['includeSuites'] = self._serialize.query('include_suites', include_suites, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if as_tree_view is not None: + query_parameters['$asTreeView'] = self._serialize.query('as_tree_view', as_tree_view, 'bool') + response = self._send(http_method='GET', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestSuite]', response) + + def update_test_suite(self, suite_update_model, project, plan_id, suite_id): + """UpdateTestSuite. + :param :class:` ` suite_update_model: + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(suite_update_model, 'SuiteUpdateModel') + response = self._send(http_method='PATCH', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TestSuite', response) + + def get_suites_by_test_case_id(self, test_case_id): + """GetSuitesByTestCaseId. + :param int test_case_id: + :rtype: [TestSuite] + """ + query_parameters = {} + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') + response = self._send(http_method='GET', + location_id='09a6167b-e969-4775-9247-b94cf3819caf', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestSuite]', response) + + def delete_test_case(self, project, test_case_id): + """DeleteTestCase. + [Preview API] + :param str project: Project ID or project name + :param int test_case_id: + """ + 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='4d472e0f-e32c-4ef8-adf4-a4078772889c', + version='4.0-preview.1', + route_values=route_values) + + def create_test_settings(self, test_settings, project): + """CreateTestSettings. + :param :class:` ` test_settings: + :param str project: Project ID or project name + :rtype: int + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_settings, 'TestSettings') + response = self._send(http_method='POST', + location_id='8133ce14-962f-42af-a5f9-6aa9defcb9c8', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('int', response) + + def delete_test_settings(self, project, test_settings_id): + """DeleteTestSettings. + :param str project: Project ID or project name + :param int test_settings_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_settings_id is not None: + route_values['testSettingsId'] = self._serialize.url('test_settings_id', test_settings_id, 'int') + self._send(http_method='DELETE', + location_id='8133ce14-962f-42af-a5f9-6aa9defcb9c8', + version='4.0', + route_values=route_values) + + def get_test_settings_by_id(self, project, test_settings_id): + """GetTestSettingsById. + :param str project: Project ID or project name + :param int test_settings_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_settings_id is not None: + route_values['testSettingsId'] = self._serialize.url('test_settings_id', test_settings_id, 'int') + response = self._send(http_method='GET', + location_id='8133ce14-962f-42af-a5f9-6aa9defcb9c8', + version='4.0', + route_values=route_values) + return self._deserialize('TestSettings', response) + + def create_test_variable(self, test_variable, project): + """CreateTestVariable. + [Preview API] + :param :class:` ` test_variable: + :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, 'TestVariable') + response = self._send(http_method='POST', + location_id='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.0-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] + :param str project: Project ID or project name + :param int test_variable_id: + """ + 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='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.0-preview.1', + route_values=route_values) + + def get_test_variable_by_id(self, project, test_variable_id): + """GetTestVariableById. + [Preview API] + :param str project: Project ID or project name + :param int test_variable_id: + :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='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('TestVariable', response) + + def get_test_variables(self, project, skip=None, top=None): + """GetTestVariables. + [Preview API] + :param str project: Project ID or project name + :param int skip: + :param int top: + :rtype: [TestVariable] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestVariable]', response) + + def update_test_variable(self, test_variable, project, test_variable_id): + """UpdateTestVariable. + [Preview API] + :param :class:` ` test_variable: + :param str project: Project ID or project name + :param int test_variable_id: + :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, 'TestVariable') + response = self._send(http_method='PATCH', + location_id='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestVariable', response) + + def add_work_item_to_test_links(self, work_item_to_test_links, project): + """AddWorkItemToTestLinks. + [Preview API] + :param :class:` ` work_item_to_test_links: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(work_item_to_test_links, 'WorkItemToTestLinks') + response = self._send(http_method='POST', + location_id='371b1655-ce05-412e-a113-64cc77bb78d2', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemToTestLinks', response) + + def delete_test_method_to_work_item_link(self, project, test_name, work_item_id): + """DeleteTestMethodToWorkItemLink. + [Preview API] + :param str project: Project ID or project name + :param str test_name: + :param int work_item_id: + :rtype: bool + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_name is not None: + query_parameters['testName'] = self._serialize.query('test_name', test_name, 'str') + if work_item_id is not None: + query_parameters['workItemId'] = self._serialize.query('work_item_id', work_item_id, 'int') + response = self._send(http_method='DELETE', + location_id='7b0bdee3-a354-47f9-a42c-89018d7808d5', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('bool', response) + + def query_test_method_linked_work_items(self, project, test_name): + """QueryTestMethodLinkedWorkItems. + [Preview API] + :param str project: Project ID or project name + :param str test_name: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_name is not None: + query_parameters['testName'] = self._serialize.query('test_name', test_name, 'str') + response = self._send(http_method='POST', + location_id='7b0bdee3-a354-47f9-a42c-89018d7808d5', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestToWorkItemLinks', response) + + def query_test_result_work_items(self, project, work_item_category, automated_test_name=None, test_case_id=None, max_complete_date=None, days=None, work_item_count=None): + """QueryTestResultWorkItems. + [Preview API] + :param str project: Project ID or project name + :param str work_item_category: + :param str automated_test_name: + :param int test_case_id: + :param datetime max_complete_date: + :param int days: + :param int work_item_count: + :rtype: [WorkItemReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if work_item_category is not None: + query_parameters['workItemCategory'] = self._serialize.query('work_item_category', work_item_category, 'str') + if automated_test_name is not None: + query_parameters['automatedTestName'] = self._serialize.query('automated_test_name', automated_test_name, 'str') + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') + if max_complete_date is not None: + query_parameters['maxCompleteDate'] = self._serialize.query('max_complete_date', max_complete_date, 'iso-8601') + if days is not None: + query_parameters['days'] = self._serialize.query('days', days, 'int') + if work_item_count is not None: + query_parameters['$workItemCount'] = self._serialize.query('work_item_count', work_item_count, 'int') + response = self._send(http_method='GET', + location_id='926ff5dc-137f-45f0-bd51-9412fa9810ce', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemReference]', response) + diff --git a/vsts/vsts/test/v4_1/__init__.py b/vsts/vsts/test/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/test/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/test/v4_1/models/__init__.py b/vsts/vsts/test/v4_1/models/__init__.py new file mode 100644 index 00000000..edc3f32d --- /dev/null +++ b/vsts/vsts/test/v4_1/models/__init__.py @@ -0,0 +1,213 @@ +# -------------------------------------------------------------------------------------------- +# 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 .aggregated_data_for_result_trend import AggregatedDataForResultTrend +from .aggregated_results_analysis import AggregatedResultsAnalysis +from .aggregated_results_by_outcome import AggregatedResultsByOutcome +from .aggregated_results_difference import AggregatedResultsDifference +from .aggregated_runs_by_state import AggregatedRunsByState +from .build_configuration import BuildConfiguration +from .build_coverage import BuildCoverage +from .build_reference import BuildReference +from .clone_operation_information import CloneOperationInformation +from .clone_options import CloneOptions +from .clone_statistics import CloneStatistics +from .code_coverage_data import CodeCoverageData +from .code_coverage_statistics import CodeCoverageStatistics +from .code_coverage_summary import CodeCoverageSummary +from .coverage_statistics import CoverageStatistics +from .custom_test_field import CustomTestField +from .custom_test_field_definition import CustomTestFieldDefinition +from .dtl_environment_details import DtlEnvironmentDetails +from .failing_since import FailingSince +from .field_details_for_test_results import FieldDetailsForTestResults +from .function_coverage import FunctionCoverage +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .last_result_details import LastResultDetails +from .linked_work_items_query import LinkedWorkItemsQuery +from .linked_work_items_query_result import LinkedWorkItemsQueryResult +from .module_coverage import ModuleCoverage +from .name_value_pair import NameValuePair +from .plan_update_model import PlanUpdateModel +from .point_assignment import PointAssignment +from .points_filter import PointsFilter +from .point_update_model import PointUpdateModel +from .property_bag import PropertyBag +from .query_model import QueryModel +from .reference_links import ReferenceLinks +from .release_environment_definition_reference import ReleaseEnvironmentDefinitionReference +from .release_reference import ReleaseReference +from .result_retention_settings import ResultRetentionSettings +from .results_filter import ResultsFilter +from .run_create_model import RunCreateModel +from .run_filter import RunFilter +from .run_statistic import RunStatistic +from .run_update_model import RunUpdateModel +from .shallow_reference import ShallowReference +from .shallow_test_case_result import ShallowTestCaseResult +from .shared_step_model import SharedStepModel +from .suite_create_model import SuiteCreateModel +from .suite_entry import SuiteEntry +from .suite_entry_update_model import SuiteEntryUpdateModel +from .suite_test_case import SuiteTestCase +from .suite_update_model import SuiteUpdateModel +from .team_context import TeamContext +from .team_project_reference import TeamProjectReference +from .test_action_result_model import TestActionResultModel +from .test_attachment import TestAttachment +from .test_attachment_reference import TestAttachmentReference +from .test_attachment_request_model import TestAttachmentRequestModel +from .test_case_result import TestCaseResult +from .test_case_result_attachment_model import TestCaseResultAttachmentModel +from .test_case_result_identifier import TestCaseResultIdentifier +from .test_case_result_update_model import TestCaseResultUpdateModel +from .test_configuration import TestConfiguration +from .test_environment import TestEnvironment +from .test_failure_details import TestFailureDetails +from .test_failures_analysis import TestFailuresAnalysis +from .test_iteration_details_model import TestIterationDetailsModel +from .test_message_log_details import TestMessageLogDetails +from .test_method import TestMethod +from .test_operation_reference import TestOperationReference +from .test_plan import TestPlan +from .test_plan_clone_request import TestPlanCloneRequest +from .test_point import TestPoint +from .test_points_query import TestPointsQuery +from .test_resolution_state import TestResolutionState +from .test_result_create_model import TestResultCreateModel +from .test_result_document import TestResultDocument +from .test_result_history import TestResultHistory +from .test_result_history_details_for_group import TestResultHistoryDetailsForGroup +from .test_result_model_base import TestResultModelBase +from .test_result_parameter_model import TestResultParameterModel +from .test_result_payload import TestResultPayload +from .test_results_context import TestResultsContext +from .test_results_details import TestResultsDetails +from .test_results_details_for_group import TestResultsDetailsForGroup +from .test_results_groups_for_build import TestResultsGroupsForBuild +from .test_results_groups_for_release import TestResultsGroupsForRelease +from .test_results_query import TestResultsQuery +from .test_result_summary import TestResultSummary +from .test_result_trend_filter import TestResultTrendFilter +from .test_run import TestRun +from .test_run_coverage import TestRunCoverage +from .test_run_statistic import TestRunStatistic +from .test_session import TestSession +from .test_settings import TestSettings +from .test_suite import TestSuite +from .test_suite_clone_request import TestSuiteCloneRequest +from .test_summary_for_work_item import TestSummaryForWorkItem +from .test_to_work_item_links import TestToWorkItemLinks +from .test_variable import TestVariable +from .work_item_reference import WorkItemReference +from .work_item_to_test_links import WorkItemToTestLinks + +__all__ = [ + 'AggregatedDataForResultTrend', + 'AggregatedResultsAnalysis', + 'AggregatedResultsByOutcome', + 'AggregatedResultsDifference', + 'AggregatedRunsByState', + 'BuildConfiguration', + 'BuildCoverage', + 'BuildReference', + 'CloneOperationInformation', + 'CloneOptions', + 'CloneStatistics', + 'CodeCoverageData', + 'CodeCoverageStatistics', + 'CodeCoverageSummary', + 'CoverageStatistics', + 'CustomTestField', + 'CustomTestFieldDefinition', + 'DtlEnvironmentDetails', + 'FailingSince', + 'FieldDetailsForTestResults', + 'FunctionCoverage', + 'GraphSubjectBase', + 'IdentityRef', + 'LastResultDetails', + 'LinkedWorkItemsQuery', + 'LinkedWorkItemsQueryResult', + 'ModuleCoverage', + 'NameValuePair', + 'PlanUpdateModel', + 'PointAssignment', + 'PointsFilter', + 'PointUpdateModel', + 'PropertyBag', + 'QueryModel', + 'ReferenceLinks', + 'ReleaseEnvironmentDefinitionReference', + 'ReleaseReference', + 'ResultRetentionSettings', + 'ResultsFilter', + 'RunCreateModel', + 'RunFilter', + 'RunStatistic', + 'RunUpdateModel', + 'ShallowReference', + 'ShallowTestCaseResult', + 'SharedStepModel', + 'SuiteCreateModel', + 'SuiteEntry', + 'SuiteEntryUpdateModel', + 'SuiteTestCase', + 'SuiteUpdateModel', + 'TeamContext', + 'TeamProjectReference', + 'TestActionResultModel', + 'TestAttachment', + 'TestAttachmentReference', + 'TestAttachmentRequestModel', + 'TestCaseResult', + 'TestCaseResultAttachmentModel', + 'TestCaseResultIdentifier', + 'TestCaseResultUpdateModel', + 'TestConfiguration', + 'TestEnvironment', + 'TestFailureDetails', + 'TestFailuresAnalysis', + 'TestIterationDetailsModel', + 'TestMessageLogDetails', + 'TestMethod', + 'TestOperationReference', + 'TestPlan', + 'TestPlanCloneRequest', + 'TestPoint', + 'TestPointsQuery', + 'TestResolutionState', + 'TestResultCreateModel', + 'TestResultDocument', + 'TestResultHistory', + 'TestResultHistoryDetailsForGroup', + 'TestResultModelBase', + 'TestResultParameterModel', + 'TestResultPayload', + 'TestResultsContext', + 'TestResultsDetails', + 'TestResultsDetailsForGroup', + 'TestResultsGroupsForBuild', + 'TestResultsGroupsForRelease', + 'TestResultsQuery', + 'TestResultSummary', + 'TestResultTrendFilter', + 'TestRun', + 'TestRunCoverage', + 'TestRunStatistic', + 'TestSession', + 'TestSettings', + 'TestSuite', + 'TestSuiteCloneRequest', + 'TestSummaryForWorkItem', + 'TestToWorkItemLinks', + 'TestVariable', + 'WorkItemReference', + 'WorkItemToTestLinks', +] diff --git a/vsts/vsts/test/v4_1/models/aggregated_data_for_result_trend.py b/vsts/vsts/test/v4_1/models/aggregated_data_for_result_trend.py new file mode 100644 index 00000000..2328b2ae --- /dev/null +++ b/vsts/vsts/test/v4_1/models/aggregated_data_for_result_trend.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedDataForResultTrend(Model): + """AggregatedDataForResultTrend. + + :param duration: This is tests execution duration. + :type duration: object + :param results_by_outcome: + :type results_by_outcome: dict + :param run_summary_by_state: + :type run_summary_by_state: dict + :param test_results_context: + :type test_results_context: :class:`TestResultsContext ` + :param total_tests: + :type total_tests: int + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'object'}, + 'results_by_outcome': {'key': 'resultsByOutcome', 'type': '{AggregatedResultsByOutcome}'}, + 'run_summary_by_state': {'key': 'runSummaryByState', 'type': '{AggregatedRunsByState}'}, + 'test_results_context': {'key': 'testResultsContext', 'type': 'TestResultsContext'}, + 'total_tests': {'key': 'totalTests', 'type': 'int'} + } + + def __init__(self, duration=None, results_by_outcome=None, run_summary_by_state=None, test_results_context=None, total_tests=None): + super(AggregatedDataForResultTrend, self).__init__() + self.duration = duration + self.results_by_outcome = results_by_outcome + self.run_summary_by_state = run_summary_by_state + self.test_results_context = test_results_context + self.total_tests = total_tests diff --git a/vsts/vsts/test/v4_1/models/aggregated_results_analysis.py b/vsts/vsts/test/v4_1/models/aggregated_results_analysis.py new file mode 100644 index 00000000..d0e2fb82 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/aggregated_results_analysis.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedResultsAnalysis(Model): + """AggregatedResultsAnalysis. + + :param duration: + :type duration: object + :param not_reported_results_by_outcome: + :type not_reported_results_by_outcome: dict + :param previous_context: + :type previous_context: :class:`TestResultsContext ` + :param results_by_outcome: + :type results_by_outcome: dict + :param results_difference: + :type results_difference: :class:`AggregatedResultsDifference ` + :param run_summary_by_state: + :type run_summary_by_state: dict + :param total_tests: + :type total_tests: int + """ + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'object'}, + 'not_reported_results_by_outcome': {'key': 'notReportedResultsByOutcome', 'type': '{AggregatedResultsByOutcome}'}, + 'previous_context': {'key': 'previousContext', 'type': 'TestResultsContext'}, + 'results_by_outcome': {'key': 'resultsByOutcome', 'type': '{AggregatedResultsByOutcome}'}, + 'results_difference': {'key': 'resultsDifference', 'type': 'AggregatedResultsDifference'}, + 'run_summary_by_state': {'key': 'runSummaryByState', 'type': '{AggregatedRunsByState}'}, + 'total_tests': {'key': 'totalTests', 'type': 'int'} + } + + def __init__(self, duration=None, not_reported_results_by_outcome=None, previous_context=None, results_by_outcome=None, results_difference=None, run_summary_by_state=None, total_tests=None): + super(AggregatedResultsAnalysis, self).__init__() + self.duration = duration + self.not_reported_results_by_outcome = not_reported_results_by_outcome + self.previous_context = previous_context + self.results_by_outcome = results_by_outcome + self.results_difference = results_difference + self.run_summary_by_state = run_summary_by_state + self.total_tests = total_tests diff --git a/vsts/vsts/test/v4_1/models/aggregated_results_by_outcome.py b/vsts/vsts/test/v4_1/models/aggregated_results_by_outcome.py new file mode 100644 index 00000000..e31fbdde --- /dev/null +++ b/vsts/vsts/test/v4_1/models/aggregated_results_by_outcome.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedResultsByOutcome(Model): + """AggregatedResultsByOutcome. + + :param count: + :type count: int + :param duration: + :type duration: object + :param group_by_field: + :type group_by_field: str + :param group_by_value: + :type group_by_value: object + :param outcome: + :type outcome: object + :param rerun_result_count: + :type rerun_result_count: int + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'duration': {'key': 'duration', 'type': 'object'}, + 'group_by_field': {'key': 'groupByField', 'type': 'str'}, + 'group_by_value': {'key': 'groupByValue', 'type': 'object'}, + 'outcome': {'key': 'outcome', 'type': 'object'}, + 'rerun_result_count': {'key': 'rerunResultCount', 'type': 'int'} + } + + def __init__(self, count=None, duration=None, group_by_field=None, group_by_value=None, outcome=None, rerun_result_count=None): + super(AggregatedResultsByOutcome, self).__init__() + self.count = count + self.duration = duration + self.group_by_field = group_by_field + self.group_by_value = group_by_value + self.outcome = outcome + self.rerun_result_count = rerun_result_count diff --git a/vsts/vsts/test/v4_1/models/aggregated_results_difference.py b/vsts/vsts/test/v4_1/models/aggregated_results_difference.py new file mode 100644 index 00000000..5bc4af42 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/aggregated_results_difference.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 AggregatedResultsDifference(Model): + """AggregatedResultsDifference. + + :param increase_in_duration: + :type increase_in_duration: object + :param increase_in_failures: + :type increase_in_failures: int + :param increase_in_other_tests: + :type increase_in_other_tests: int + :param increase_in_passed_tests: + :type increase_in_passed_tests: int + :param increase_in_total_tests: + :type increase_in_total_tests: int + """ + + _attribute_map = { + 'increase_in_duration': {'key': 'increaseInDuration', 'type': 'object'}, + 'increase_in_failures': {'key': 'increaseInFailures', 'type': 'int'}, + 'increase_in_other_tests': {'key': 'increaseInOtherTests', 'type': 'int'}, + 'increase_in_passed_tests': {'key': 'increaseInPassedTests', 'type': 'int'}, + 'increase_in_total_tests': {'key': 'increaseInTotalTests', 'type': 'int'} + } + + def __init__(self, increase_in_duration=None, increase_in_failures=None, increase_in_other_tests=None, increase_in_passed_tests=None, increase_in_total_tests=None): + super(AggregatedResultsDifference, self).__init__() + self.increase_in_duration = increase_in_duration + self.increase_in_failures = increase_in_failures + self.increase_in_other_tests = increase_in_other_tests + self.increase_in_passed_tests = increase_in_passed_tests + self.increase_in_total_tests = increase_in_total_tests diff --git a/vsts/vsts/test/v4_1/models/build_configuration.py b/vsts/vsts/test/v4_1/models/build_configuration.py new file mode 100644 index 00000000..970b738b --- /dev/null +++ b/vsts/vsts/test/v4_1/models/build_configuration.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildConfiguration(Model): + """BuildConfiguration. + + :param branch_name: + :type branch_name: str + :param build_definition_id: + :type build_definition_id: int + :param flavor: + :type flavor: str + :param id: + :type id: int + :param number: + :type number: str + :param platform: + :type platform: str + :param project: + :type project: :class:`ShallowReference ` + :param repository_id: + :type repository_id: int + :param source_version: + :type source_version: str + :param uri: + :type uri: str + """ + + _attribute_map = { + 'branch_name': {'key': 'branchName', 'type': 'str'}, + 'build_definition_id': {'key': 'buildDefinitionId', 'type': 'int'}, + 'flavor': {'key': 'flavor', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'number': {'key': 'number', 'type': 'str'}, + 'platform': {'key': 'platform', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'repository_id': {'key': 'repositoryId', 'type': 'int'}, + 'source_version': {'key': 'sourceVersion', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, branch_name=None, build_definition_id=None, flavor=None, id=None, number=None, platform=None, project=None, repository_id=None, source_version=None, uri=None): + super(BuildConfiguration, self).__init__() + self.branch_name = branch_name + self.build_definition_id = build_definition_id + self.flavor = flavor + self.id = id + self.number = number + self.platform = platform + self.project = project + self.repository_id = repository_id + self.source_version = source_version + self.uri = uri diff --git a/vsts/vsts/test/v4_1/models/build_coverage.py b/vsts/vsts/test/v4_1/models/build_coverage.py new file mode 100644 index 00000000..a1dc8ed2 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/build_coverage.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildCoverage(Model): + """BuildCoverage. + + :param code_coverage_file_url: + :type code_coverage_file_url: str + :param configuration: + :type configuration: :class:`BuildConfiguration ` + :param last_error: + :type last_error: str + :param modules: + :type modules: list of :class:`ModuleCoverage ` + :param state: + :type state: str + """ + + _attribute_map = { + 'code_coverage_file_url': {'key': 'codeCoverageFileUrl', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'BuildConfiguration'}, + 'last_error': {'key': 'lastError', 'type': 'str'}, + 'modules': {'key': 'modules', 'type': '[ModuleCoverage]'}, + 'state': {'key': 'state', 'type': 'str'} + } + + def __init__(self, code_coverage_file_url=None, configuration=None, last_error=None, modules=None, state=None): + super(BuildCoverage, self).__init__() + self.code_coverage_file_url = code_coverage_file_url + self.configuration = configuration + self.last_error = last_error + self.modules = modules + self.state = state diff --git a/vsts/vsts/test/v4_1/models/build_reference.py b/vsts/vsts/test/v4_1/models/build_reference.py new file mode 100644 index 00000000..0abda1e9 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/build_reference.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 BuildReference(Model): + """BuildReference. + + :param branch_name: + :type branch_name: str + :param build_system: + :type build_system: str + :param definition_id: + :type definition_id: int + :param id: + :type id: int + :param number: + :type number: str + :param repository_id: + :type repository_id: str + :param uri: + :type uri: str + """ + + _attribute_map = { + 'branch_name': {'key': 'branchName', 'type': 'str'}, + 'build_system': {'key': 'buildSystem', 'type': 'str'}, + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'int'}, + 'number': {'key': 'number', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'} + } + + def __init__(self, branch_name=None, build_system=None, definition_id=None, id=None, number=None, repository_id=None, uri=None): + super(BuildReference, self).__init__() + self.branch_name = branch_name + self.build_system = build_system + self.definition_id = definition_id + self.id = id + self.number = number + self.repository_id = repository_id + self.uri = uri diff --git a/vsts/vsts/test/v4_1/models/clone_operation_information.py b/vsts/vsts/test/v4_1/models/clone_operation_information.py new file mode 100644 index 00000000..a80a88e0 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/clone_operation_information.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 CloneOperationInformation(Model): + """CloneOperationInformation. + + :param clone_statistics: + :type clone_statistics: :class:`CloneStatistics ` + :param completion_date: If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue + :type completion_date: datetime + :param creation_date: DateTime when the operation was started + :type creation_date: datetime + :param destination_object: Shallow reference of the destination + :type destination_object: :class:`ShallowReference ` + :param destination_plan: Shallow reference of the destination + :type destination_plan: :class:`ShallowReference ` + :param destination_project: Shallow reference of the destination + :type destination_project: :class:`ShallowReference ` + :param message: If the operation has Failed, Message contains the reason for failure. Null otherwise. + :type message: str + :param op_id: The ID of the operation + :type op_id: int + :param result_object_type: The type of the object generated as a result of the Clone operation + :type result_object_type: object + :param source_object: Shallow reference of the source + :type source_object: :class:`ShallowReference ` + :param source_plan: Shallow reference of the source + :type source_plan: :class:`ShallowReference ` + :param source_project: Shallow reference of the source + :type source_project: :class:`ShallowReference ` + :param state: Current state of the operation. When State reaches Suceeded or Failed, the operation is complete + :type state: object + :param url: Url for geting the clone information + :type url: str + """ + + _attribute_map = { + 'clone_statistics': {'key': 'cloneStatistics', 'type': 'CloneStatistics'}, + 'completion_date': {'key': 'completionDate', 'type': 'iso-8601'}, + 'creation_date': {'key': 'creationDate', 'type': 'iso-8601'}, + 'destination_object': {'key': 'destinationObject', 'type': 'ShallowReference'}, + 'destination_plan': {'key': 'destinationPlan', 'type': 'ShallowReference'}, + 'destination_project': {'key': 'destinationProject', 'type': 'ShallowReference'}, + 'message': {'key': 'message', 'type': 'str'}, + 'op_id': {'key': 'opId', 'type': 'int'}, + 'result_object_type': {'key': 'resultObjectType', 'type': 'object'}, + 'source_object': {'key': 'sourceObject', 'type': 'ShallowReference'}, + 'source_plan': {'key': 'sourcePlan', 'type': 'ShallowReference'}, + 'source_project': {'key': 'sourceProject', 'type': 'ShallowReference'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, clone_statistics=None, completion_date=None, creation_date=None, destination_object=None, destination_plan=None, destination_project=None, message=None, op_id=None, result_object_type=None, source_object=None, source_plan=None, source_project=None, state=None, url=None): + super(CloneOperationInformation, self).__init__() + self.clone_statistics = clone_statistics + self.completion_date = completion_date + self.creation_date = creation_date + self.destination_object = destination_object + self.destination_plan = destination_plan + self.destination_project = destination_project + self.message = message + self.op_id = op_id + self.result_object_type = result_object_type + self.source_object = source_object + self.source_plan = source_plan + self.source_project = source_project + self.state = state + self.url = url diff --git a/vsts/vsts/test/v4_1/models/clone_options.py b/vsts/vsts/test/v4_1/models/clone_options.py new file mode 100644 index 00000000..f048c1c9 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/clone_options.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_1/models/clone_statistics.py b/vsts/vsts/test/v4_1/models/clone_statistics.py new file mode 100644 index 00000000..f3ba75a3 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/clone_statistics.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_1/models/code_coverage_data.py b/vsts/vsts/test/v4_1/models/code_coverage_data.py new file mode 100644 index 00000000..0c88e782 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/code_coverage_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeCoverageData(Model): + """CodeCoverageData. + + :param build_flavor: Flavor of build for which data is retrieved/published + :type build_flavor: str + :param build_platform: Platform of build for which data is retrieved/published + :type build_platform: str + :param coverage_stats: List of coverage data for the build + :type coverage_stats: list of :class:`CodeCoverageStatistics ` + """ + + _attribute_map = { + 'build_flavor': {'key': 'buildFlavor', 'type': 'str'}, + 'build_platform': {'key': 'buildPlatform', 'type': 'str'}, + 'coverage_stats': {'key': 'coverageStats', 'type': '[CodeCoverageStatistics]'} + } + + def __init__(self, build_flavor=None, build_platform=None, coverage_stats=None): + super(CodeCoverageData, self).__init__() + self.build_flavor = build_flavor + self.build_platform = build_platform + self.coverage_stats = coverage_stats diff --git a/vsts/vsts/test/v4_1/models/code_coverage_statistics.py b/vsts/vsts/test/v4_1/models/code_coverage_statistics.py new file mode 100644 index 00000000..aebd12a1 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/code_coverage_statistics.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeCoverageStatistics(Model): + """CodeCoverageStatistics. + + :param covered: Covered units + :type covered: int + :param delta: Delta of coverage + :type delta: number + :param is_delta_available: Is delta valid + :type is_delta_available: bool + :param label: Label of coverage data ("Blocks", "Statements", "Modules", etc.) + :type label: str + :param position: Position of label + :type position: int + :param total: Total units + :type total: int + """ + + _attribute_map = { + 'covered': {'key': 'covered', 'type': 'int'}, + 'delta': {'key': 'delta', 'type': 'number'}, + 'is_delta_available': {'key': 'isDeltaAvailable', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'position': {'key': 'position', 'type': 'int'}, + 'total': {'key': 'total', 'type': 'int'} + } + + def __init__(self, covered=None, delta=None, is_delta_available=None, label=None, position=None, total=None): + super(CodeCoverageStatistics, self).__init__() + self.covered = covered + self.delta = delta + self.is_delta_available = is_delta_available + self.label = label + self.position = position + self.total = total diff --git a/vsts/vsts/test/v4_1/models/code_coverage_summary.py b/vsts/vsts/test/v4_1/models/code_coverage_summary.py new file mode 100644 index 00000000..0938ea34 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/code_coverage_summary.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CodeCoverageSummary(Model): + """CodeCoverageSummary. + + :param build: Uri of build for which data is retrieved/published + :type build: :class:`ShallowReference ` + :param coverage_data: List of coverage data and details for the build + :type coverage_data: list of :class:`CodeCoverageData ` + :param delta_build: Uri of build against which difference in coverage is computed + :type delta_build: :class:`ShallowReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'coverage_data': {'key': 'coverageData', 'type': '[CodeCoverageData]'}, + 'delta_build': {'key': 'deltaBuild', 'type': 'ShallowReference'} + } + + def __init__(self, build=None, coverage_data=None, delta_build=None): + super(CodeCoverageSummary, self).__init__() + self.build = build + self.coverage_data = coverage_data + self.delta_build = delta_build diff --git a/vsts/vsts/test/v4_1/models/coverage_statistics.py b/vsts/vsts/test/v4_1/models/coverage_statistics.py new file mode 100644 index 00000000..7b7704db --- /dev/null +++ b/vsts/vsts/test/v4_1/models/coverage_statistics.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 CoverageStatistics(Model): + """CoverageStatistics. + + :param blocks_covered: + :type blocks_covered: int + :param blocks_not_covered: + :type blocks_not_covered: int + :param lines_covered: + :type lines_covered: int + :param lines_not_covered: + :type lines_not_covered: int + :param lines_partially_covered: + :type lines_partially_covered: int + """ + + _attribute_map = { + 'blocks_covered': {'key': 'blocksCovered', 'type': 'int'}, + 'blocks_not_covered': {'key': 'blocksNotCovered', 'type': 'int'}, + 'lines_covered': {'key': 'linesCovered', 'type': 'int'}, + 'lines_not_covered': {'key': 'linesNotCovered', 'type': 'int'}, + 'lines_partially_covered': {'key': 'linesPartiallyCovered', 'type': 'int'} + } + + def __init__(self, blocks_covered=None, blocks_not_covered=None, lines_covered=None, lines_not_covered=None, lines_partially_covered=None): + super(CoverageStatistics, self).__init__() + self.blocks_covered = blocks_covered + self.blocks_not_covered = blocks_not_covered + self.lines_covered = lines_covered + self.lines_not_covered = lines_not_covered + self.lines_partially_covered = lines_partially_covered diff --git a/vsts/vsts/test/v4_1/models/custom_test_field.py b/vsts/vsts/test/v4_1/models/custom_test_field.py new file mode 100644 index 00000000..80ba7cf1 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/custom_test_field.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CustomTestField(Model): + """CustomTestField. + + :param field_name: + :type field_name: str + :param value: + :type value: object + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'} + } + + def __init__(self, field_name=None, value=None): + super(CustomTestField, self).__init__() + self.field_name = field_name + self.value = value diff --git a/vsts/vsts/test/v4_1/models/custom_test_field_definition.py b/vsts/vsts/test/v4_1/models/custom_test_field_definition.py new file mode 100644 index 00000000..bbb7e2a4 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/custom_test_field_definition.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 CustomTestFieldDefinition(Model): + """CustomTestFieldDefinition. + + :param field_id: + :type field_id: int + :param field_name: + :type field_name: str + :param field_type: + :type field_type: object + :param scope: + :type scope: object + """ + + _attribute_map = { + 'field_id': {'key': 'fieldId', 'type': 'int'}, + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'field_type': {'key': 'fieldType', 'type': 'object'}, + 'scope': {'key': 'scope', 'type': 'object'} + } + + def __init__(self, field_id=None, field_name=None, field_type=None, scope=None): + super(CustomTestFieldDefinition, self).__init__() + self.field_id = field_id + self.field_name = field_name + self.field_type = field_type + self.scope = scope diff --git a/vsts/vsts/test/v4_1/models/dtl_environment_details.py b/vsts/vsts/test/v4_1/models/dtl_environment_details.py new file mode 100644 index 00000000..25bebb48 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/dtl_environment_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 DtlEnvironmentDetails(Model): + """DtlEnvironmentDetails. + + :param csm_content: + :type csm_content: str + :param csm_parameters: + :type csm_parameters: str + :param subscription_name: + :type subscription_name: str + """ + + _attribute_map = { + 'csm_content': {'key': 'csmContent', 'type': 'str'}, + 'csm_parameters': {'key': 'csmParameters', 'type': 'str'}, + 'subscription_name': {'key': 'subscriptionName', 'type': 'str'} + } + + def __init__(self, csm_content=None, csm_parameters=None, subscription_name=None): + super(DtlEnvironmentDetails, self).__init__() + self.csm_content = csm_content + self.csm_parameters = csm_parameters + self.subscription_name = subscription_name diff --git a/vsts/vsts/test/v4_1/models/failing_since.py b/vsts/vsts/test/v4_1/models/failing_since.py new file mode 100644 index 00000000..e7e9bb1c --- /dev/null +++ b/vsts/vsts/test/v4_1/models/failing_since.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 FailingSince(Model): + """FailingSince. + + :param build: + :type build: :class:`BuildReference ` + :param date: + :type date: datetime + :param release: + :type release: :class:`ReleaseReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'BuildReference'}, + 'date': {'key': 'date', 'type': 'iso-8601'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'} + } + + def __init__(self, build=None, date=None, release=None): + super(FailingSince, self).__init__() + self.build = build + self.date = date + self.release = release diff --git a/vsts/vsts/test/v4_1/models/field_details_for_test_results.py b/vsts/vsts/test/v4_1/models/field_details_for_test_results.py new file mode 100644 index 00000000..1f466b74 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/field_details_for_test_results.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 FieldDetailsForTestResults(Model): + """FieldDetailsForTestResults. + + :param field_name: Group by field name + :type field_name: str + :param groups_for_field: Group by field values + :type groups_for_field: list of object + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'groups_for_field': {'key': 'groupsForField', 'type': '[object]'} + } + + def __init__(self, field_name=None, groups_for_field=None): + super(FieldDetailsForTestResults, self).__init__() + self.field_name = field_name + self.groups_for_field = groups_for_field diff --git a/vsts/vsts/test/v4_1/models/function_coverage.py b/vsts/vsts/test/v4_1/models/function_coverage.py new file mode 100644 index 00000000..166f947f --- /dev/null +++ b/vsts/vsts/test/v4_1/models/function_coverage.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 FunctionCoverage(Model): + """FunctionCoverage. + + :param class_: + :type class_: str + :param name: + :type name: str + :param namespace: + :type namespace: str + :param source_file: + :type source_file: str + :param statistics: + :type statistics: :class:`CoverageStatistics ` + """ + + _attribute_map = { + 'class_': {'key': 'class', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'source_file': {'key': 'sourceFile', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': 'CoverageStatistics'} + } + + def __init__(self, class_=None, name=None, namespace=None, source_file=None, statistics=None): + super(FunctionCoverage, self).__init__() + self.class_ = class_ + self.name = name + self.namespace = namespace + self.source_file = source_file + self.statistics = statistics diff --git a/vsts/vsts/test/v4_1/models/identity_ref.py b/vsts/vsts/test/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/test/v4_1/models/last_result_details.py b/vsts/vsts/test/v4_1/models/last_result_details.py new file mode 100644 index 00000000..32968581 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/last_result_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_1/models/linked_work_items_query.py b/vsts/vsts/test/v4_1/models/linked_work_items_query.py new file mode 100644 index 00000000..a9d0c50e --- /dev/null +++ b/vsts/vsts/test/v4_1/models/linked_work_items_query.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 LinkedWorkItemsQuery(Model): + """LinkedWorkItemsQuery. + + :param automated_test_names: + :type automated_test_names: list of str + :param plan_id: + :type plan_id: int + :param point_ids: + :type point_ids: list of int + :param suite_ids: + :type suite_ids: list of int + :param test_case_ids: + :type test_case_ids: list of int + :param work_item_category: + :type work_item_category: str + """ + + _attribute_map = { + 'automated_test_names': {'key': 'automatedTestNames', 'type': '[str]'}, + 'plan_id': {'key': 'planId', 'type': 'int'}, + 'point_ids': {'key': 'pointIds', 'type': '[int]'}, + 'suite_ids': {'key': 'suiteIds', 'type': '[int]'}, + 'test_case_ids': {'key': 'testCaseIds', 'type': '[int]'}, + 'work_item_category': {'key': 'workItemCategory', 'type': 'str'} + } + + def __init__(self, automated_test_names=None, plan_id=None, point_ids=None, suite_ids=None, test_case_ids=None, work_item_category=None): + super(LinkedWorkItemsQuery, self).__init__() + self.automated_test_names = automated_test_names + self.plan_id = plan_id + self.point_ids = point_ids + self.suite_ids = suite_ids + self.test_case_ids = test_case_ids + self.work_item_category = work_item_category diff --git a/vsts/vsts/test/v4_1/models/linked_work_items_query_result.py b/vsts/vsts/test/v4_1/models/linked_work_items_query_result.py new file mode 100644 index 00000000..0b82bfc6 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/linked_work_items_query_result.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 LinkedWorkItemsQueryResult(Model): + """LinkedWorkItemsQueryResult. + + :param automated_test_name: + :type automated_test_name: str + :param plan_id: + :type plan_id: int + :param point_id: + :type point_id: int + :param suite_id: + :type suite_id: int + :param test_case_id: + :type test_case_id: int + :param work_items: + :type work_items: list of :class:`WorkItemReference ` + """ + + _attribute_map = { + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'plan_id': {'key': 'planId', 'type': 'int'}, + 'point_id': {'key': 'pointId', 'type': 'int'}, + 'suite_id': {'key': 'suiteId', 'type': 'int'}, + 'test_case_id': {'key': 'testCaseId', 'type': 'int'}, + 'work_items': {'key': 'workItems', 'type': '[WorkItemReference]'} + } + + def __init__(self, automated_test_name=None, plan_id=None, point_id=None, suite_id=None, test_case_id=None, work_items=None): + super(LinkedWorkItemsQueryResult, self).__init__() + self.automated_test_name = automated_test_name + self.plan_id = plan_id + self.point_id = point_id + self.suite_id = suite_id + self.test_case_id = test_case_id + self.work_items = work_items diff --git a/vsts/vsts/test/v4_1/models/module_coverage.py b/vsts/vsts/test/v4_1/models/module_coverage.py new file mode 100644 index 00000000..4b384440 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/module_coverage.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ModuleCoverage(Model): + """ModuleCoverage. + + :param block_count: + :type block_count: int + :param block_data: + :type block_data: list of number + :param functions: + :type functions: list of :class:`FunctionCoverage ` + :param name: + :type name: str + :param signature: + :type signature: str + :param signature_age: + :type signature_age: int + :param statistics: + :type statistics: :class:`CoverageStatistics ` + """ + + _attribute_map = { + 'block_count': {'key': 'blockCount', 'type': 'int'}, + 'block_data': {'key': 'blockData', 'type': '[number]'}, + 'functions': {'key': 'functions', 'type': '[FunctionCoverage]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'signature': {'key': 'signature', 'type': 'str'}, + 'signature_age': {'key': 'signatureAge', 'type': 'int'}, + 'statistics': {'key': 'statistics', 'type': 'CoverageStatistics'} + } + + def __init__(self, block_count=None, block_data=None, functions=None, name=None, signature=None, signature_age=None, statistics=None): + super(ModuleCoverage, self).__init__() + self.block_count = block_count + self.block_data = block_data + self.functions = functions + self.name = name + self.signature = signature + self.signature_age = signature_age + self.statistics = statistics diff --git a/vsts/vsts/test/v4_1/models/name_value_pair.py b/vsts/vsts/test/v4_1/models/name_value_pair.py new file mode 100644 index 00000000..0c71209a --- /dev/null +++ b/vsts/vsts/test/v4_1/models/name_value_pair.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 NameValuePair(Model): + """NameValuePair. + + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(NameValuePair, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/test/v4_1/models/plan_update_model.py b/vsts/vsts/test/v4_1/models/plan_update_model.py new file mode 100644 index 00000000..871d9971 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/plan_update_model.py @@ -0,0 +1,89 @@ +# -------------------------------------------------------------------------------------------- +# 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 PlanUpdateModel(Model): + """PlanUpdateModel. + + :param area: + :type area: :class:`ShallowReference ` + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build: + :type build: :class:`ShallowReference ` + :param build_definition: + :type build_definition: :class:`ShallowReference ` + :param configuration_ids: + :type configuration_ids: list of int + :param description: + :type description: str + :param end_date: + :type end_date: str + :param iteration: + :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: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param release_environment_definition: + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param start_date: + :type start_date: str + :param state: + :type state: str + :param status: + :type status: str + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'ShallowReference'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[int]'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + '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': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'} + } + + def __init__(self, area=None, automated_test_environment=None, automated_test_settings=None, build=None, build_definition=None, configuration_ids=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, status=None): + super(PlanUpdateModel, self).__init__() + self.area = area + self.automated_test_environment = automated_test_environment + self.automated_test_settings = automated_test_settings + self.build = build + self.build_definition = build_definition + self.configuration_ids = configuration_ids + 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.status = status diff --git a/vsts/vsts/test/v4_1/models/point_assignment.py b/vsts/vsts/test/v4_1/models/point_assignment.py new file mode 100644 index 00000000..c8018a1c --- /dev/null +++ b/vsts/vsts/test/v4_1/models/point_assignment.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PointAssignment(Model): + """PointAssignment. + + :param configuration: + :type configuration: :class:`ShallowReference ` + :param tester: + :type tester: :class:`IdentityRef ` + """ + + _attribute_map = { + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'tester': {'key': 'tester', 'type': 'IdentityRef'} + } + + def __init__(self, configuration=None, tester=None): + super(PointAssignment, self).__init__() + self.configuration = configuration + self.tester = tester diff --git a/vsts/vsts/test/v4_1/models/point_update_model.py b/vsts/vsts/test/v4_1/models/point_update_model.py new file mode 100644 index 00000000..537ea684 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/point_update_model.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PointUpdateModel(Model): + """PointUpdateModel. + + :param outcome: + :type outcome: str + :param reset_to_active: + :type reset_to_active: bool + :param tester: + :type tester: :class:`IdentityRef ` + """ + + _attribute_map = { + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'reset_to_active': {'key': 'resetToActive', 'type': 'bool'}, + 'tester': {'key': 'tester', 'type': 'IdentityRef'} + } + + def __init__(self, outcome=None, reset_to_active=None, tester=None): + super(PointUpdateModel, self).__init__() + self.outcome = outcome + self.reset_to_active = reset_to_active + self.tester = tester diff --git a/vsts/vsts/test/v4_1/models/points_filter.py b/vsts/vsts/test/v4_1/models/points_filter.py new file mode 100644 index 00000000..10c32746 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/points_filter.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 PointsFilter(Model): + """PointsFilter. + + :param configuration_names: + :type configuration_names: list of str + :param testcase_ids: + :type testcase_ids: list of int + :param testers: + :type testers: list of :class:`IdentityRef ` + """ + + _attribute_map = { + 'configuration_names': {'key': 'configurationNames', 'type': '[str]'}, + 'testcase_ids': {'key': 'testcaseIds', 'type': '[int]'}, + 'testers': {'key': 'testers', 'type': '[IdentityRef]'} + } + + def __init__(self, configuration_names=None, testcase_ids=None, testers=None): + super(PointsFilter, self).__init__() + self.configuration_names = configuration_names + self.testcase_ids = testcase_ids + self.testers = testers diff --git a/vsts/vsts/test/v4_1/models/property_bag.py b/vsts/vsts/test/v4_1/models/property_bag.py new file mode 100644 index 00000000..40505531 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/property_bag.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 PropertyBag(Model): + """PropertyBag. + + :param bag: Generic store for test session data + :type bag: dict + """ + + _attribute_map = { + 'bag': {'key': 'bag', 'type': '{str}'} + } + + def __init__(self, bag=None): + super(PropertyBag, self).__init__() + self.bag = bag diff --git a/vsts/vsts/test/v4_1/models/query_model.py b/vsts/vsts/test/v4_1/models/query_model.py new file mode 100644 index 00000000..31f521ca --- /dev/null +++ b/vsts/vsts/test/v4_1/models/query_model.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 QueryModel(Model): + """QueryModel. + + :param query: + :type query: str + """ + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'} + } + + def __init__(self, query=None): + super(QueryModel, self).__init__() + self.query = query diff --git a/vsts/vsts/test/v4_1/models/release_environment_definition_reference.py b/vsts/vsts/test/v4_1/models/release_environment_definition_reference.py new file mode 100644 index 00000000..8cc15033 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/release_environment_definition_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseEnvironmentDefinitionReference(Model): + """ReleaseEnvironmentDefinitionReference. + + :param definition_id: + :type definition_id: int + :param environment_definition_id: + :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 diff --git a/vsts/vsts/test/v4_1/models/release_reference.py b/vsts/vsts/test/v4_1/models/release_reference.py new file mode 100644 index 00000000..370c7131 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/release_reference.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ReleaseReference(Model): + """ReleaseReference. + + :param definition_id: + :type definition_id: int + :param environment_definition_id: + :type environment_definition_id: int + :param environment_definition_name: + :type environment_definition_name: str + :param environment_id: + :type environment_id: int + :param environment_name: + :type environment_name: str + :param id: + :type id: int + :param name: + :type name: str + """ + + _attribute_map = { + 'definition_id': {'key': 'definitionId', 'type': 'int'}, + 'environment_definition_id': {'key': 'environmentDefinitionId', 'type': 'int'}, + 'environment_definition_name': {'key': 'environmentDefinitionName', 'type': 'str'}, + 'environment_id': {'key': 'environmentId', 'type': 'int'}, + 'environment_name': {'key': 'environmentName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, definition_id=None, environment_definition_id=None, environment_definition_name=None, environment_id=None, environment_name=None, id=None, name=None): + super(ReleaseReference, self).__init__() + self.definition_id = definition_id + self.environment_definition_id = environment_definition_id + self.environment_definition_name = environment_definition_name + self.environment_id = environment_id + self.environment_name = environment_name + self.id = id + self.name = name diff --git a/vsts/vsts/test/v4_1/models/result_retention_settings.py b/vsts/vsts/test/v4_1/models/result_retention_settings.py new file mode 100644 index 00000000..acd8852c --- /dev/null +++ b/vsts/vsts/test/v4_1/models/result_retention_settings.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResultRetentionSettings(Model): + """ResultRetentionSettings. + + :param automated_results_retention_duration: + :type automated_results_retention_duration: int + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param manual_results_retention_duration: + :type manual_results_retention_duration: int + """ + + _attribute_map = { + 'automated_results_retention_duration': {'key': 'automatedResultsRetentionDuration', 'type': 'int'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'manual_results_retention_duration': {'key': 'manualResultsRetentionDuration', 'type': 'int'} + } + + def __init__(self, automated_results_retention_duration=None, last_updated_by=None, last_updated_date=None, manual_results_retention_duration=None): + super(ResultRetentionSettings, self).__init__() + self.automated_results_retention_duration = automated_results_retention_duration + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.manual_results_retention_duration = manual_results_retention_duration diff --git a/vsts/vsts/test/v4_1/models/results_filter.py b/vsts/vsts/test/v4_1/models/results_filter.py new file mode 100644 index 00000000..139a5be1 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/results_filter.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 ResultsFilter(Model): + """ResultsFilter. + + :param automated_test_name: + :type automated_test_name: str + :param branch: + :type branch: str + :param group_by: + :type group_by: str + :param max_complete_date: + :type max_complete_date: datetime + :param results_count: + :type results_count: int + :param test_case_reference_ids: + :type test_case_reference_ids: list of int + :param test_results_context: + :type test_results_context: :class:`TestResultsContext ` + :param trend_days: + :type trend_days: int + """ + + _attribute_map = { + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'branch': {'key': 'branch', 'type': 'str'}, + 'group_by': {'key': 'groupBy', 'type': 'str'}, + 'max_complete_date': {'key': 'maxCompleteDate', 'type': 'iso-8601'}, + 'results_count': {'key': 'resultsCount', 'type': 'int'}, + 'test_case_reference_ids': {'key': 'testCaseReferenceIds', 'type': '[int]'}, + 'test_results_context': {'key': 'testResultsContext', 'type': 'TestResultsContext'}, + 'trend_days': {'key': 'trendDays', 'type': 'int'} + } + + def __init__(self, automated_test_name=None, branch=None, group_by=None, max_complete_date=None, results_count=None, test_case_reference_ids=None, test_results_context=None, trend_days=None): + super(ResultsFilter, self).__init__() + self.automated_test_name = automated_test_name + self.branch = branch + self.group_by = group_by + self.max_complete_date = max_complete_date + self.results_count = results_count + self.test_case_reference_ids = test_case_reference_ids + self.test_results_context = test_results_context + self.trend_days = trend_days diff --git a/vsts/vsts/test/v4_1/models/run_create_model.py b/vsts/vsts/test/v4_1/models/run_create_model.py new file mode 100644 index 00000000..61f71c0d --- /dev/null +++ b/vsts/vsts/test/v4_1/models/run_create_model.py @@ -0,0 +1,145 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunCreateModel(Model): + """RunCreateModel. + + :param automated: + :type automated: bool + :param build: + :type build: :class:`ShallowReference ` + :param build_drop_location: + :type build_drop_location: str + :param build_flavor: + :type build_flavor: str + :param build_platform: + :type build_platform: str + :param comment: + :type comment: str + :param complete_date: + :type complete_date: str + :param configuration_ids: + :type configuration_ids: list of int + :param controller: + :type controller: str + :param custom_test_fields: + :type custom_test_fields: list of :class:`CustomTestField ` + :param dtl_aut_environment: + :type dtl_aut_environment: :class:`ShallowReference ` + :param dtl_test_environment: + :type dtl_test_environment: :class:`ShallowReference ` + :param due_date: + :type due_date: str + :param environment_details: + :type environment_details: :class:`DtlEnvironmentDetails ` + :param error_message: + :type error_message: str + :param filter: + :type filter: :class:`RunFilter ` + :param iteration: + :type iteration: str + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param plan: + :type plan: :class:`ShallowReference ` + :param point_ids: + :type point_ids: list of int + :param release_environment_uri: + :type release_environment_uri: str + :param release_uri: + :type release_uri: str + :param run_timeout: + :type run_timeout: object + :param source_workflow: + :type source_workflow: str + :param start_date: + :type start_date: str + :param state: + :type state: str + :param test_configurations_mapping: + :type test_configurations_mapping: str + :param test_environment_id: + :type test_environment_id: str + :param test_settings: + :type test_settings: :class:`ShallowReference ` + :param type: + :type type: str + """ + + _attribute_map = { + 'automated': {'key': 'automated', 'type': 'bool'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_drop_location': {'key': 'buildDropLocation', 'type': 'str'}, + 'build_flavor': {'key': 'buildFlavor', 'type': 'str'}, + 'build_platform': {'key': 'buildPlatform', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'complete_date': {'key': 'completeDate', 'type': 'str'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[int]'}, + 'controller': {'key': 'controller', 'type': 'str'}, + 'custom_test_fields': {'key': 'customTestFields', 'type': '[CustomTestField]'}, + 'dtl_aut_environment': {'key': 'dtlAutEnvironment', 'type': 'ShallowReference'}, + 'dtl_test_environment': {'key': 'dtlTestEnvironment', 'type': 'ShallowReference'}, + 'due_date': {'key': 'dueDate', 'type': 'str'}, + 'environment_details': {'key': 'environmentDetails', 'type': 'DtlEnvironmentDetails'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'RunFilter'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'plan': {'key': 'plan', 'type': 'ShallowReference'}, + 'point_ids': {'key': 'pointIds', 'type': '[int]'}, + 'release_environment_uri': {'key': 'releaseEnvironmentUri', 'type': 'str'}, + 'release_uri': {'key': 'releaseUri', 'type': 'str'}, + 'run_timeout': {'key': 'runTimeout', 'type': 'object'}, + 'source_workflow': {'key': 'sourceWorkflow', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_configurations_mapping': {'key': 'testConfigurationsMapping', 'type': 'str'}, + 'test_environment_id': {'key': 'testEnvironmentId', 'type': 'str'}, + 'test_settings': {'key': 'testSettings', 'type': 'ShallowReference'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, automated=None, build=None, build_drop_location=None, build_flavor=None, build_platform=None, comment=None, complete_date=None, configuration_ids=None, controller=None, custom_test_fields=None, dtl_aut_environment=None, dtl_test_environment=None, due_date=None, environment_details=None, error_message=None, filter=None, iteration=None, name=None, owner=None, plan=None, point_ids=None, release_environment_uri=None, release_uri=None, run_timeout=None, source_workflow=None, start_date=None, state=None, test_configurations_mapping=None, test_environment_id=None, test_settings=None, type=None): + super(RunCreateModel, self).__init__() + self.automated = automated + self.build = build + self.build_drop_location = build_drop_location + self.build_flavor = build_flavor + self.build_platform = build_platform + self.comment = comment + self.complete_date = complete_date + self.configuration_ids = configuration_ids + self.controller = controller + self.custom_test_fields = custom_test_fields + self.dtl_aut_environment = dtl_aut_environment + self.dtl_test_environment = dtl_test_environment + self.due_date = due_date + self.environment_details = environment_details + self.error_message = error_message + self.filter = filter + self.iteration = iteration + self.name = name + self.owner = owner + self.plan = plan + self.point_ids = point_ids + self.release_environment_uri = release_environment_uri + self.release_uri = release_uri + self.run_timeout = run_timeout + self.source_workflow = source_workflow + self.start_date = start_date + self.state = state + self.test_configurations_mapping = test_configurations_mapping + self.test_environment_id = test_environment_id + self.test_settings = test_settings + self.type = type diff --git a/vsts/vsts/test/v4_1/models/run_filter.py b/vsts/vsts/test/v4_1/models/run_filter.py new file mode 100644 index 00000000..55ba8921 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/run_filter.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunFilter(Model): + """RunFilter. + + :param source_filter: filter for the test case sources (test containers) + :type source_filter: str + :param test_case_filter: filter for the test cases + :type test_case_filter: str + """ + + _attribute_map = { + 'source_filter': {'key': 'sourceFilter', 'type': 'str'}, + 'test_case_filter': {'key': 'testCaseFilter', 'type': 'str'} + } + + def __init__(self, source_filter=None, test_case_filter=None): + super(RunFilter, self).__init__() + self.source_filter = source_filter + self.test_case_filter = test_case_filter diff --git a/vsts/vsts/test/v4_1/models/run_statistic.py b/vsts/vsts/test/v4_1/models/run_statistic.py new file mode 100644 index 00000000..45601aec --- /dev/null +++ b/vsts/vsts/test/v4_1/models/run_statistic.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunStatistic(Model): + """RunStatistic. + + :param count: + :type count: int + :param outcome: + :type outcome: str + :param resolution_state: + :type resolution_state: :class:`TestResolutionState ` + :param state: + :type state: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'TestResolutionState'}, + 'state': {'key': 'state', 'type': 'str'} + } + + def __init__(self, count=None, outcome=None, resolution_state=None, state=None): + super(RunStatistic, self).__init__() + self.count = count + self.outcome = outcome + self.resolution_state = resolution_state + self.state = state diff --git a/vsts/vsts/test/v4_1/models/run_update_model.py b/vsts/vsts/test/v4_1/models/run_update_model.py new file mode 100644 index 00000000..589291c4 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/run_update_model.py @@ -0,0 +1,117 @@ +# -------------------------------------------------------------------------------------------- +# 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 RunUpdateModel(Model): + """RunUpdateModel. + + :param build: + :type build: :class:`ShallowReference ` + :param build_drop_location: + :type build_drop_location: str + :param build_flavor: + :type build_flavor: str + :param build_platform: + :type build_platform: str + :param comment: + :type comment: str + :param completed_date: + :type completed_date: str + :param controller: + :type controller: str + :param delete_in_progress_results: + :type delete_in_progress_results: bool + :param dtl_aut_environment: + :type dtl_aut_environment: :class:`ShallowReference ` + :param dtl_environment: + :type dtl_environment: :class:`ShallowReference ` + :param dtl_environment_details: + :type dtl_environment_details: :class:`DtlEnvironmentDetails ` + :param due_date: + :type due_date: str + :param error_message: + :type error_message: str + :param iteration: + :type iteration: str + :param log_entries: + :type log_entries: list of :class:`TestMessageLogDetails ` + :param name: + :type name: str + :param release_environment_uri: + :type release_environment_uri: str + :param release_uri: + :type release_uri: str + :param source_workflow: + :type source_workflow: str + :param started_date: + :type started_date: str + :param state: + :type state: str + :param substate: + :type substate: object + :param test_environment_id: + :type test_environment_id: str + :param test_settings: + :type test_settings: :class:`ShallowReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_drop_location': {'key': 'buildDropLocation', 'type': 'str'}, + 'build_flavor': {'key': 'buildFlavor', 'type': 'str'}, + 'build_platform': {'key': 'buildPlatform', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'str'}, + 'controller': {'key': 'controller', 'type': 'str'}, + 'delete_in_progress_results': {'key': 'deleteInProgressResults', 'type': 'bool'}, + 'dtl_aut_environment': {'key': 'dtlAutEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment': {'key': 'dtlEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment_details': {'key': 'dtlEnvironmentDetails', 'type': 'DtlEnvironmentDetails'}, + 'due_date': {'key': 'dueDate', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'log_entries': {'key': 'logEntries', 'type': '[TestMessageLogDetails]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'release_environment_uri': {'key': 'releaseEnvironmentUri', 'type': 'str'}, + 'release_uri': {'key': 'releaseUri', 'type': 'str'}, + 'source_workflow': {'key': 'sourceWorkflow', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'substate': {'key': 'substate', 'type': 'object'}, + 'test_environment_id': {'key': 'testEnvironmentId', 'type': 'str'}, + 'test_settings': {'key': 'testSettings', 'type': 'ShallowReference'} + } + + def __init__(self, build=None, build_drop_location=None, build_flavor=None, build_platform=None, comment=None, completed_date=None, controller=None, delete_in_progress_results=None, dtl_aut_environment=None, dtl_environment=None, dtl_environment_details=None, due_date=None, error_message=None, iteration=None, log_entries=None, name=None, release_environment_uri=None, release_uri=None, source_workflow=None, started_date=None, state=None, substate=None, test_environment_id=None, test_settings=None): + super(RunUpdateModel, self).__init__() + self.build = build + self.build_drop_location = build_drop_location + self.build_flavor = build_flavor + self.build_platform = build_platform + self.comment = comment + self.completed_date = completed_date + self.controller = controller + self.delete_in_progress_results = delete_in_progress_results + self.dtl_aut_environment = dtl_aut_environment + self.dtl_environment = dtl_environment + self.dtl_environment_details = dtl_environment_details + self.due_date = due_date + self.error_message = error_message + self.iteration = iteration + self.log_entries = log_entries + self.name = name + self.release_environment_uri = release_environment_uri + self.release_uri = release_uri + self.source_workflow = source_workflow + self.started_date = started_date + self.state = state + self.substate = substate + self.test_environment_id = test_environment_id + self.test_settings = test_settings diff --git a/vsts/vsts/test/v4_1/models/shallow_reference.py b/vsts/vsts/test/v4_1/models/shallow_reference.py new file mode 100644 index 00000000..d4cffc81 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/shallow_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ShallowReference(Model): + """ShallowReference. + + :param id: Id of the resource + :type id: str + :param name: Name of the linked resource (definition name, controller name, etc.) + :type name: str + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, name=None, url=None): + super(ShallowReference, self).__init__() + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/test/v4_1/models/shared_step_model.py b/vsts/vsts/test/v4_1/models/shared_step_model.py new file mode 100644 index 00000000..07333033 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/shared_step_model.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SharedStepModel(Model): + """SharedStepModel. + + :param id: + :type id: int + :param revision: + :type revision: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, id=None, revision=None): + super(SharedStepModel, self).__init__() + self.id = id + self.revision = revision diff --git a/vsts/vsts/test/v4_1/models/suite_create_model.py b/vsts/vsts/test/v4_1/models/suite_create_model.py new file mode 100644 index 00000000..cbcd78dd --- /dev/null +++ b/vsts/vsts/test/v4_1/models/suite_create_model.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteCreateModel(Model): + """SuiteCreateModel. + + :param name: + :type name: str + :param query_string: + :type query_string: str + :param requirement_ids: + :type requirement_ids: list of int + :param suite_type: + :type suite_type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'query_string': {'key': 'queryString', 'type': 'str'}, + 'requirement_ids': {'key': 'requirementIds', 'type': '[int]'}, + 'suite_type': {'key': 'suiteType', 'type': 'str'} + } + + def __init__(self, name=None, query_string=None, requirement_ids=None, suite_type=None): + super(SuiteCreateModel, self).__init__() + self.name = name + self.query_string = query_string + self.requirement_ids = requirement_ids + self.suite_type = suite_type diff --git a/vsts/vsts/test/v4_1/models/suite_entry.py b/vsts/vsts/test/v4_1/models/suite_entry.py new file mode 100644 index 00000000..2f6dade3 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/suite_entry.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteEntry(Model): + """SuiteEntry. + + :param child_suite_id: Id of child suite in a suite + :type child_suite_id: int + :param sequence_number: Sequence number for the test case or child suite in the suite + :type sequence_number: int + :param suite_id: Id for the suite + :type suite_id: int + :param test_case_id: Id of a test case in a suite + :type test_case_id: int + """ + + _attribute_map = { + 'child_suite_id': {'key': 'childSuiteId', 'type': 'int'}, + 'sequence_number': {'key': 'sequenceNumber', 'type': 'int'}, + 'suite_id': {'key': 'suiteId', 'type': 'int'}, + 'test_case_id': {'key': 'testCaseId', 'type': 'int'} + } + + def __init__(self, child_suite_id=None, sequence_number=None, suite_id=None, test_case_id=None): + super(SuiteEntry, self).__init__() + self.child_suite_id = child_suite_id + self.sequence_number = sequence_number + self.suite_id = suite_id + self.test_case_id = test_case_id diff --git a/vsts/vsts/test/v4_1/models/suite_entry_update_model.py b/vsts/vsts/test/v4_1/models/suite_entry_update_model.py new file mode 100644 index 00000000..afcb6f04 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/suite_entry_update_model.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteEntryUpdateModel(Model): + """SuiteEntryUpdateModel. + + :param child_suite_id: Id of child suite in a suite + :type child_suite_id: int + :param sequence_number: Updated sequence number for the test case or child suite in the suite + :type sequence_number: int + :param test_case_id: Id of a test case in a suite + :type test_case_id: int + """ + + _attribute_map = { + 'child_suite_id': {'key': 'childSuiteId', 'type': 'int'}, + 'sequence_number': {'key': 'sequenceNumber', 'type': 'int'}, + 'test_case_id': {'key': 'testCaseId', 'type': 'int'} + } + + def __init__(self, child_suite_id=None, sequence_number=None, test_case_id=None): + super(SuiteEntryUpdateModel, self).__init__() + self.child_suite_id = child_suite_id + self.sequence_number = sequence_number + self.test_case_id = test_case_id diff --git a/vsts/vsts/test/v4_1/models/suite_test_case.py b/vsts/vsts/test/v4_1/models/suite_test_case.py new file mode 100644 index 00000000..33004848 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/suite_test_case.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteTestCase(Model): + """SuiteTestCase. + + :param point_assignments: + :type point_assignments: list of :class:`PointAssignment ` + :param test_case: + :type test_case: :class:`WorkItemReference ` + """ + + _attribute_map = { + 'point_assignments': {'key': 'pointAssignments', 'type': '[PointAssignment]'}, + 'test_case': {'key': 'testCase', 'type': 'WorkItemReference'} + } + + def __init__(self, point_assignments=None, test_case=None): + super(SuiteTestCase, self).__init__() + self.point_assignments = point_assignments + self.test_case = test_case diff --git a/vsts/vsts/test/v4_1/models/suite_update_model.py b/vsts/vsts/test/v4_1/models/suite_update_model.py new file mode 100644 index 00000000..ae660eee --- /dev/null +++ b/vsts/vsts/test/v4_1/models/suite_update_model.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 SuiteUpdateModel(Model): + """SuiteUpdateModel. + + :param default_configurations: + :type default_configurations: list of :class:`ShallowReference ` + :param default_testers: + :type default_testers: list of :class:`ShallowReference ` + :param inherit_default_configurations: + :type inherit_default_configurations: bool + :param name: + :type name: str + :param parent: + :type parent: :class:`ShallowReference ` + :param query_string: + :type query_string: str + """ + + _attribute_map = { + 'default_configurations': {'key': 'defaultConfigurations', 'type': '[ShallowReference]'}, + 'default_testers': {'key': 'defaultTesters', 'type': '[ShallowReference]'}, + 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'ShallowReference'}, + 'query_string': {'key': 'queryString', 'type': 'str'} + } + + def __init__(self, default_configurations=None, default_testers=None, inherit_default_configurations=None, name=None, parent=None, query_string=None): + super(SuiteUpdateModel, self).__init__() + self.default_configurations = default_configurations + self.default_testers = default_testers + self.inherit_default_configurations = inherit_default_configurations + self.name = name + self.parent = parent + self.query_string = query_string diff --git a/vsts/vsts/test/v4_1/models/team_context.py b/vsts/vsts/test/v4_1/models/team_context.py new file mode 100644 index 00000000..18418ce7 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/team_context.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamContext(Model): + """TeamContext. + + :param project: The team project Id or name. Ignored if ProjectId is set. + :type project: str + :param project_id: The Team Project ID. Required if Project is not set. + :type project_id: str + :param team: The Team Id or name. Ignored if TeamId is set. + :type team: str + :param team_id: The Team Id + :type team_id: str + """ + + _attribute_map = { + 'project': {'key': 'project', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'team': {'key': 'team', 'type': 'str'}, + 'team_id': {'key': 'teamId', 'type': 'str'} + } + + def __init__(self, project=None, project_id=None, team=None, team_id=None): + super(TeamContext, self).__init__() + self.project = project + self.project_id = project_id + self.team = team + self.team_id = team_id diff --git a/vsts/vsts/test/v4_1/models/team_project_reference.py b/vsts/vsts/test/v4_1/models/team_project_reference.py new file mode 100644 index 00000000..fa79d465 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/team_project_reference.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamProjectReference(Model): + """TeamProjectReference. + + :param abbreviation: Project abbreviation. + :type abbreviation: str + :param description: The project's description (if any). + :type description: str + :param id: Project identifier. + :type id: str + :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'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + '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, description=None, id=None, name=None, revision=None, state=None, url=None, visibility=None): + super(TeamProjectReference, self).__init__() + self.abbreviation = abbreviation + self.description = description + self.id = id + self.name = name + self.revision = revision + self.state = state + self.url = url + self.visibility = visibility diff --git a/vsts/vsts/test/v4_1/models/test_action_result_model.py b/vsts/vsts/test/v4_1/models/test_action_result_model.py new file mode 100644 index 00000000..219e442f --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_action_result_model.py @@ -0,0 +1,59 @@ +# -------------------------------------------------------------------------------------------- +# 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 .test_result_model_base import TestResultModelBase + + +class TestActionResultModel(TestResultModelBase): + """TestActionResultModel. + + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param outcome: + :type outcome: str + :param started_date: + :type started_date: datetime + :param action_path: + :type action_path: str + :param iteration_id: + :type iteration_id: int + :param shared_step_model: + :type shared_step_model: :class:`SharedStepModel ` + :param step_identifier: This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + :type step_identifier: str + :param url: + :type url: str + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'action_path': {'key': 'actionPath', 'type': 'str'}, + 'iteration_id': {'key': 'iterationId', 'type': 'int'}, + 'shared_step_model': {'key': 'sharedStepModel', 'type': 'SharedStepModel'}, + 'step_identifier': {'key': 'stepIdentifier', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error_message=None, outcome=None, started_date=None, action_path=None, iteration_id=None, shared_step_model=None, step_identifier=None, url=None): + super(TestActionResultModel, self).__init__(comment=comment, completed_date=completed_date, duration_in_ms=duration_in_ms, error_message=error_message, outcome=outcome, started_date=started_date) + self.action_path = action_path + self.iteration_id = iteration_id + self.shared_step_model = shared_step_model + self.step_identifier = step_identifier + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_attachment.py b/vsts/vsts/test/v4_1/models/test_attachment.py new file mode 100644 index 00000000..908c2d12 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_attachment.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestAttachment(Model): + """TestAttachment. + + :param attachment_type: + :type attachment_type: object + :param comment: + :type comment: str + :param created_date: + :type created_date: datetime + :param file_name: + :type file_name: str + :param id: + :type id: int + :param size: + :type size: long + :param url: + :type url: str + """ + + _attribute_map = { + 'attachment_type': {'key': 'attachmentType', 'type': 'object'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'long'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, attachment_type=None, comment=None, created_date=None, file_name=None, id=None, size=None, url=None): + super(TestAttachment, self).__init__() + self.attachment_type = attachment_type + self.comment = comment + self.created_date = created_date + self.file_name = file_name + self.id = id + self.size = size + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_attachment_reference.py b/vsts/vsts/test/v4_1/models/test_attachment_reference.py new file mode 100644 index 00000000..c5fbe1c7 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_attachment_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestAttachmentReference(Model): + """TestAttachmentReference. + + :param id: + :type id: int + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, url=None): + super(TestAttachmentReference, self).__init__() + self.id = id + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_attachment_request_model.py b/vsts/vsts/test/v4_1/models/test_attachment_request_model.py new file mode 100644 index 00000000..bfe9d645 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_attachment_request_model.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestAttachmentRequestModel(Model): + """TestAttachmentRequestModel. + + :param attachment_type: + :type attachment_type: str + :param comment: + :type comment: str + :param file_name: + :type file_name: str + :param stream: + :type stream: str + """ + + _attribute_map = { + 'attachment_type': {'key': 'attachmentType', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'stream': {'key': 'stream', 'type': 'str'} + } + + def __init__(self, attachment_type=None, comment=None, file_name=None, stream=None): + super(TestAttachmentRequestModel, self).__init__() + self.attachment_type = attachment_type + self.comment = comment + self.file_name = file_name + self.stream = stream diff --git a/vsts/vsts/test/v4_1/models/test_case_result.py b/vsts/vsts/test/v4_1/models/test_case_result.py new file mode 100644 index 00000000..d8515465 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_case_result.py @@ -0,0 +1,205 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResult(Model): + """TestCaseResult. + + :param afn_strip_id: + :type afn_strip_id: int + :param area: + :type area: :class:`ShallowReference ` + :param associated_bugs: + :type associated_bugs: list of :class:`ShallowReference ` + :param automated_test_id: + :type automated_test_id: str + :param automated_test_name: + :type automated_test_name: str + :param automated_test_storage: + :type automated_test_storage: str + :param automated_test_type: + :type automated_test_type: str + :param automated_test_type_id: + :type automated_test_type_id: str + :param build: + :type build: :class:`ShallowReference ` + :param build_reference: + :type build_reference: :class:`BuildReference ` + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param computer_name: + :type computer_name: str + :param configuration: + :type configuration: :class:`ShallowReference ` + :param created_date: + :type created_date: datetime + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param failing_since: + :type failing_since: :class:`FailingSince ` + :param failure_type: + :type failure_type: str + :param id: + :type id: int + :param iteration_details: + :type iteration_details: list of :class:`TestIterationDetailsModel ` + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param outcome: + :type outcome: str + :param owner: + :type owner: :class:`IdentityRef ` + :param priority: + :type priority: int + :param project: + :type project: :class:`ShallowReference ` + :param release: + :type release: :class:`ShallowReference ` + :param release_reference: + :type release_reference: :class:`ReleaseReference ` + :param reset_count: + :type reset_count: int + :param resolution_state: + :type resolution_state: str + :param resolution_state_id: + :type resolution_state_id: int + :param revision: + :type revision: int + :param run_by: + :type run_by: :class:`IdentityRef ` + :param stack_trace: + :type stack_trace: str + :param started_date: + :type started_date: datetime + :param state: + :type state: str + :param test_case: + :type test_case: :class:`ShallowReference ` + :param test_case_reference_id: + :type test_case_reference_id: int + :param test_case_title: + :type test_case_title: str + :param test_plan: + :type test_plan: :class:`ShallowReference ` + :param test_point: + :type test_point: :class:`ShallowReference ` + :param test_run: + :type test_run: :class:`ShallowReference ` + :param test_suite: + :type test_suite: :class:`ShallowReference ` + :param url: + :type url: str + """ + + _attribute_map = { + 'afn_strip_id': {'key': 'afnStripId', 'type': 'int'}, + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'associated_bugs': {'key': 'associatedBugs', 'type': '[ShallowReference]'}, + 'automated_test_id': {'key': 'automatedTestId', 'type': 'str'}, + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'automated_test_storage': {'key': 'automatedTestStorage', 'type': 'str'}, + 'automated_test_type': {'key': 'automatedTestType', 'type': 'str'}, + 'automated_test_type_id': {'key': 'automatedTestTypeId', 'type': 'str'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_reference': {'key': 'buildReference', 'type': 'BuildReference'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'failing_since': {'key': 'failingSince', 'type': 'FailingSince'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'iteration_details': {'key': 'iterationDetails', 'type': '[TestIterationDetailsModel]'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'release': {'key': 'release', 'type': 'ShallowReference'}, + 'release_reference': {'key': 'releaseReference', 'type': 'ReleaseReference'}, + 'reset_count': {'key': 'resetCount', 'type': 'int'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'str'}, + 'resolution_state_id': {'key': 'resolutionStateId', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'run_by': {'key': 'runBy', 'type': 'IdentityRef'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_case': {'key': 'testCase', 'type': 'ShallowReference'}, + 'test_case_reference_id': {'key': 'testCaseReferenceId', 'type': 'int'}, + 'test_case_title': {'key': 'testCaseTitle', 'type': 'str'}, + 'test_plan': {'key': 'testPlan', 'type': 'ShallowReference'}, + 'test_point': {'key': 'testPoint', 'type': 'ShallowReference'}, + 'test_run': {'key': 'testRun', 'type': 'ShallowReference'}, + 'test_suite': {'key': 'testSuite', 'type': 'ShallowReference'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, afn_strip_id=None, area=None, associated_bugs=None, automated_test_id=None, automated_test_name=None, automated_test_storage=None, automated_test_type=None, automated_test_type_id=None, build=None, build_reference=None, comment=None, completed_date=None, computer_name=None, configuration=None, created_date=None, custom_fields=None, duration_in_ms=None, error_message=None, failing_since=None, failure_type=None, id=None, iteration_details=None, last_updated_by=None, last_updated_date=None, outcome=None, owner=None, priority=None, project=None, release=None, release_reference=None, reset_count=None, resolution_state=None, resolution_state_id=None, revision=None, run_by=None, stack_trace=None, started_date=None, state=None, test_case=None, test_case_reference_id=None, test_case_title=None, test_plan=None, test_point=None, test_run=None, test_suite=None, url=None): + super(TestCaseResult, self).__init__() + self.afn_strip_id = afn_strip_id + self.area = area + self.associated_bugs = associated_bugs + self.automated_test_id = automated_test_id + self.automated_test_name = automated_test_name + self.automated_test_storage = automated_test_storage + self.automated_test_type = automated_test_type + self.automated_test_type_id = automated_test_type_id + self.build = build + self.build_reference = build_reference + self.comment = comment + self.completed_date = completed_date + self.computer_name = computer_name + self.configuration = configuration + self.created_date = created_date + self.custom_fields = custom_fields + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.failing_since = failing_since + self.failure_type = failure_type + self.id = id + self.iteration_details = iteration_details + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.outcome = outcome + self.owner = owner + self.priority = priority + self.project = project + self.release = release + self.release_reference = release_reference + self.reset_count = reset_count + self.resolution_state = resolution_state + self.resolution_state_id = resolution_state_id + self.revision = revision + self.run_by = run_by + self.stack_trace = stack_trace + self.started_date = started_date + self.state = state + self.test_case = test_case + self.test_case_reference_id = test_case_reference_id + self.test_case_title = test_case_title + self.test_plan = test_plan + self.test_point = test_point + self.test_run = test_run + self.test_suite = test_suite + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_case_result_attachment_model.py b/vsts/vsts/test/v4_1/models/test_case_result_attachment_model.py new file mode 100644 index 00000000..7a7412e9 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_case_result_attachment_model.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResultAttachmentModel(Model): + """TestCaseResultAttachmentModel. + + :param id: + :type id: int + :param iteration_id: + :type iteration_id: int + :param name: + :type name: str + :param size: + :type size: long + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'iteration_id': {'key': 'iterationId', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, iteration_id=None, name=None, size=None, url=None): + super(TestCaseResultAttachmentModel, self).__init__() + self.id = id + self.iteration_id = iteration_id + self.name = name + self.size = size + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_case_result_identifier.py b/vsts/vsts/test/v4_1/models/test_case_result_identifier.py new file mode 100644 index 00000000..b88a489d --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_case_result_identifier.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResultIdentifier(Model): + """TestCaseResultIdentifier. + + :param test_result_id: + :type test_result_id: int + :param test_run_id: + :type test_run_id: int + """ + + _attribute_map = { + 'test_result_id': {'key': 'testResultId', 'type': 'int'}, + 'test_run_id': {'key': 'testRunId', 'type': 'int'} + } + + def __init__(self, test_result_id=None, test_run_id=None): + super(TestCaseResultIdentifier, self).__init__() + self.test_result_id = test_result_id + self.test_run_id = test_run_id diff --git a/vsts/vsts/test/v4_1/models/test_case_result_update_model.py b/vsts/vsts/test/v4_1/models/test_case_result_update_model.py new file mode 100644 index 00000000..af1ecc54 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_case_result_update_model.py @@ -0,0 +1,93 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestCaseResultUpdateModel(Model): + """TestCaseResultUpdateModel. + + :param associated_work_items: + :type associated_work_items: list of int + :param automated_test_type_id: + :type automated_test_type_id: str + :param comment: + :type comment: str + :param completed_date: + :type completed_date: str + :param computer_name: + :type computer_name: str + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param duration_in_ms: + :type duration_in_ms: str + :param error_message: + :type error_message: str + :param failure_type: + :type failure_type: str + :param outcome: + :type outcome: str + :param owner: + :type owner: :class:`IdentityRef ` + :param resolution_state: + :type resolution_state: str + :param run_by: + :type run_by: :class:`IdentityRef ` + :param stack_trace: + :type stack_trace: str + :param started_date: + :type started_date: str + :param state: + :type state: str + :param test_case_priority: + :type test_case_priority: str + :param test_result: + :type test_result: :class:`ShallowReference ` + """ + + _attribute_map = { + 'associated_work_items': {'key': 'associatedWorkItems', 'type': '[int]'}, + 'automated_test_type_id': {'key': 'automatedTestTypeId', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'str'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'str'}, + 'run_by': {'key': 'runBy', 'type': 'IdentityRef'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_case_priority': {'key': 'testCasePriority', 'type': 'str'}, + 'test_result': {'key': 'testResult', 'type': 'ShallowReference'} + } + + def __init__(self, associated_work_items=None, automated_test_type_id=None, comment=None, completed_date=None, computer_name=None, custom_fields=None, duration_in_ms=None, error_message=None, failure_type=None, outcome=None, owner=None, resolution_state=None, run_by=None, stack_trace=None, started_date=None, state=None, test_case_priority=None, test_result=None): + super(TestCaseResultUpdateModel, self).__init__() + self.associated_work_items = associated_work_items + self.automated_test_type_id = automated_test_type_id + self.comment = comment + self.completed_date = completed_date + self.computer_name = computer_name + self.custom_fields = custom_fields + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.failure_type = failure_type + self.outcome = outcome + self.owner = owner + self.resolution_state = resolution_state + self.run_by = run_by + self.stack_trace = stack_trace + self.started_date = started_date + self.state = state + self.test_case_priority = test_case_priority + self.test_result = test_result diff --git a/vsts/vsts/test/v4_1/models/test_configuration.py b/vsts/vsts/test/v4_1/models/test_configuration.py new file mode 100644 index 00000000..5b4d53eb --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_configuration.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestConfiguration(Model): + """TestConfiguration. + + :param area: Area of the configuration + :type area: :class:`ShallowReference ` + :param description: Description of the configuration + :type description: str + :param id: Id of the configuration + :type id: int + :param is_default: Is the configuration a default for the test plans + :type is_default: bool + :param last_updated_by: Last Updated By Reference + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: Last Updated Data + :type last_updated_date: datetime + :param name: Name of the configuration + :type name: str + :param project: Project to which the configuration belongs + :type project: :class:`ShallowReference ` + :param revision: Revision of the the configuration + :type revision: int + :param state: State of the configuration + :type state: object + :param url: Url of Configuration Resource + :type url: str + :param values: Dictionary of Test Variable, Selected Value + :type values: list of :class:`NameValuePair ` + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[NameValuePair]'} + } + + def __init__(self, area=None, description=None, id=None, is_default=None, last_updated_by=None, last_updated_date=None, name=None, project=None, revision=None, state=None, url=None, values=None): + super(TestConfiguration, self).__init__() + self.area = area + self.description = description + self.id = id + self.is_default = is_default + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.name = name + self.project = project + self.revision = revision + self.state = state + self.url = url + self.values = values diff --git a/vsts/vsts/test/v4_1/models/test_environment.py b/vsts/vsts/test/v4_1/models/test_environment.py new file mode 100644 index 00000000..f8876fd0 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_environment.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_1/models/test_failure_details.py b/vsts/vsts/test/v4_1/models/test_failure_details.py new file mode 100644 index 00000000..c44af0ec --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_failure_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestFailureDetails(Model): + """TestFailureDetails. + + :param count: + :type count: int + :param test_results: + :type test_results: list of :class:`TestCaseResultIdentifier ` + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'test_results': {'key': 'testResults', 'type': '[TestCaseResultIdentifier]'} + } + + def __init__(self, count=None, test_results=None): + super(TestFailureDetails, self).__init__() + self.count = count + self.test_results = test_results diff --git a/vsts/vsts/test/v4_1/models/test_failures_analysis.py b/vsts/vsts/test/v4_1/models/test_failures_analysis.py new file mode 100644 index 00000000..459ffb7b --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_failures_analysis.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestFailuresAnalysis(Model): + """TestFailuresAnalysis. + + :param existing_failures: + :type existing_failures: :class:`TestFailureDetails ` + :param fixed_tests: + :type fixed_tests: :class:`TestFailureDetails ` + :param new_failures: + :type new_failures: :class:`TestFailureDetails ` + :param previous_context: + :type previous_context: :class:`TestResultsContext ` + """ + + _attribute_map = { + 'existing_failures': {'key': 'existingFailures', 'type': 'TestFailureDetails'}, + 'fixed_tests': {'key': 'fixedTests', 'type': 'TestFailureDetails'}, + 'new_failures': {'key': 'newFailures', 'type': 'TestFailureDetails'}, + 'previous_context': {'key': 'previousContext', 'type': 'TestResultsContext'} + } + + def __init__(self, existing_failures=None, fixed_tests=None, new_failures=None, previous_context=None): + super(TestFailuresAnalysis, self).__init__() + self.existing_failures = existing_failures + self.fixed_tests = fixed_tests + self.new_failures = new_failures + self.previous_context = previous_context diff --git a/vsts/vsts/test/v4_1/models/test_iteration_details_model.py b/vsts/vsts/test/v4_1/models/test_iteration_details_model.py new file mode 100644 index 00000000..53599377 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_iteration_details_model.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestIterationDetailsModel(Model): + """TestIterationDetailsModel. + + :param action_results: + :type action_results: list of :class:`TestActionResultModel ` + :param attachments: + :type attachments: list of :class:`TestCaseResultAttachmentModel ` + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param id: + :type id: int + :param outcome: + :type outcome: str + :param parameters: + :type parameters: list of :class:`TestResultParameterModel ` + :param started_date: + :type started_date: datetime + :param url: + :type url: str + """ + + _attribute_map = { + 'action_results': {'key': 'actionResults', 'type': '[TestActionResultModel]'}, + 'attachments': {'key': 'attachments', 'type': '[TestCaseResultAttachmentModel]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[TestResultParameterModel]'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, action_results=None, attachments=None, comment=None, completed_date=None, duration_in_ms=None, error_message=None, id=None, outcome=None, parameters=None, started_date=None, url=None): + super(TestIterationDetailsModel, self).__init__() + self.action_results = action_results + self.attachments = attachments + self.comment = comment + self.completed_date = completed_date + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.id = id + self.outcome = outcome + self.parameters = parameters + self.started_date = started_date + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_message_log_details.py b/vsts/vsts/test/v4_1/models/test_message_log_details.py new file mode 100644 index 00000000..75553733 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_message_log_details.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestMessageLogDetails(Model): + """TestMessageLogDetails. + + :param date_created: Date when the resource is created + :type date_created: datetime + :param entry_id: Id of the resource + :type entry_id: int + :param message: Message of the resource + :type message: str + """ + + _attribute_map = { + 'date_created': {'key': 'dateCreated', 'type': 'iso-8601'}, + 'entry_id': {'key': 'entryId', 'type': 'int'}, + 'message': {'key': 'message', 'type': 'str'} + } + + def __init__(self, date_created=None, entry_id=None, message=None): + super(TestMessageLogDetails, self).__init__() + self.date_created = date_created + self.entry_id = entry_id + self.message = message diff --git a/vsts/vsts/test/v4_1/models/test_method.py b/vsts/vsts/test/v4_1/models/test_method.py new file mode 100644 index 00000000..ee92559b --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_method.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestMethod(Model): + """TestMethod. + + :param container: + :type container: str + :param name: + :type name: str + """ + + _attribute_map = { + 'container': {'key': 'container', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, container=None, name=None): + super(TestMethod, self).__init__() + self.container = container + self.name = name diff --git a/vsts/vsts/test/v4_1/models/test_operation_reference.py b/vsts/vsts/test/v4_1/models/test_operation_reference.py new file mode 100644 index 00000000..47e57808 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_operation_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestOperationReference(Model): + """TestOperationReference. + + :param id: + :type id: str + :param status: + :type status: str + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, status=None, url=None): + super(TestOperationReference, self).__init__() + self.id = id + self.status = status + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_plan.py b/vsts/vsts/test/v4_1/models/test_plan.py new file mode 100644 index 00000000..a6f7c665 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_plan.py @@ -0,0 +1,117 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPlan(Model): + """TestPlan. + + :param area: + :type area: :class:`ShallowReference ` + :param automated_test_environment: + :type automated_test_environment: :class:`TestEnvironment ` + :param automated_test_settings: + :type automated_test_settings: :class:`TestSettings ` + :param build: + :type build: :class:`ShallowReference ` + :param build_definition: + :type build_definition: :class:`ShallowReference ` + :param client_url: + :type client_url: str + :param description: + :type description: str + :param end_date: + :type end_date: datetime + :param id: + :type id: int + :param iteration: + :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: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param previous_build: + :type previous_build: :class:`ShallowReference ` + :param project: + :type project: :class:`ShallowReference ` + :param release_environment_definition: + :type release_environment_definition: :class:`ReleaseEnvironmentDefinitionReference ` + :param revision: + :type revision: int + :param root_suite: + :type root_suite: :class:`ShallowReference ` + :param start_date: + :type start_date: datetime + :param state: + :type state: str + :param updated_by: + :type updated_by: :class:`IdentityRef ` + :param updated_date: + :type updated_date: datetime + :param url: + :type url: str + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'automated_test_environment': {'key': 'automatedTestEnvironment', 'type': 'TestEnvironment'}, + 'automated_test_settings': {'key': 'automatedTestSettings', 'type': 'TestSettings'}, + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_definition': {'key': 'buildDefinition', 'type': 'ShallowReference'}, + 'client_url': {'key': 'clientUrl', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + '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'}, + 'previous_build': {'key': 'previousBuild', 'type': 'ShallowReference'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'release_environment_definition': {'key': 'releaseEnvironmentDefinition', 'type': 'ReleaseEnvironmentDefinitionReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'root_suite': {'key': 'rootSuite', 'type': 'ShallowReference'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'updated_by': {'key': 'updatedBy', 'type': 'IdentityRef'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, area=None, automated_test_environment=None, automated_test_settings=None, build=None, build_definition=None, client_url=None, description=None, end_date=None, id=None, iteration=None, manual_test_environment=None, manual_test_settings=None, name=None, owner=None, previous_build=None, project=None, release_environment_definition=None, revision=None, root_suite=None, start_date=None, state=None, updated_by=None, updated_date=None, url=None): + super(TestPlan, self).__init__() + self.area = area + self.automated_test_environment = automated_test_environment + self.automated_test_settings = automated_test_settings + self.build = build + self.build_definition = build_definition + self.client_url = client_url + self.description = description + self.end_date = end_date + self.id = id + self.iteration = iteration + self.manual_test_environment = manual_test_environment + self.manual_test_settings = manual_test_settings + self.name = name + self.owner = owner + self.previous_build = previous_build + self.project = project + self.release_environment_definition = release_environment_definition + self.revision = revision + self.root_suite = root_suite + self.start_date = start_date + self.state = state + self.updated_by = updated_by + self.updated_date = updated_date + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_plan_clone_request.py b/vsts/vsts/test/v4_1/models/test_plan_clone_request.py new file mode 100644 index 00000000..e4a2542a --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_plan_clone_request.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPlanCloneRequest(Model): + """TestPlanCloneRequest. + + :param destination_test_plan: + :type destination_test_plan: :class:`TestPlan ` + :param options: + :type options: :class:`CloneOptions ` + :param suite_ids: + :type suite_ids: list of int + """ + + _attribute_map = { + 'destination_test_plan': {'key': 'destinationTestPlan', 'type': 'TestPlan'}, + 'options': {'key': 'options', 'type': 'CloneOptions'}, + 'suite_ids': {'key': 'suiteIds', 'type': '[int]'} + } + + def __init__(self, destination_test_plan=None, options=None, suite_ids=None): + super(TestPlanCloneRequest, self).__init__() + self.destination_test_plan = destination_test_plan + self.options = options + self.suite_ids = suite_ids diff --git a/vsts/vsts/test/v4_1/models/test_point.py b/vsts/vsts/test/v4_1/models/test_point.py new file mode 100644 index 00000000..2e3445a1 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_point.py @@ -0,0 +1,109 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPoint(Model): + """TestPoint. + + :param assigned_to: + :type assigned_to: :class:`IdentityRef ` + :param automated: + :type automated: bool + :param comment: + :type comment: str + :param configuration: + :type configuration: :class:`ShallowReference ` + :param failure_type: + :type failure_type: str + :param id: + :type id: int + :param last_resolution_state_id: + :type last_resolution_state_id: int + :param last_result: + :type last_result: :class:`ShallowReference ` + :param last_result_details: + :type last_result_details: :class:`LastResultDetails ` + :param last_result_state: + :type last_result_state: str + :param last_run_build_number: + :type last_run_build_number: str + :param last_test_run: + :type last_test_run: :class:`ShallowReference ` + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param outcome: + :type outcome: str + :param revision: + :type revision: int + :param state: + :type state: str + :param suite: + :type suite: :class:`ShallowReference ` + :param test_case: + :type test_case: :class:`WorkItemReference ` + :param test_plan: + :type test_plan: :class:`ShallowReference ` + :param url: + :type url: str + :param work_item_properties: + :type work_item_properties: list of object + """ + + _attribute_map = { + 'assigned_to': {'key': 'assignedTo', 'type': 'IdentityRef'}, + 'automated': {'key': 'automated', 'type': 'bool'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_resolution_state_id': {'key': 'lastResolutionStateId', 'type': 'int'}, + 'last_result': {'key': 'lastResult', 'type': 'ShallowReference'}, + 'last_result_details': {'key': 'lastResultDetails', 'type': 'LastResultDetails'}, + 'last_result_state': {'key': 'lastResultState', 'type': 'str'}, + 'last_run_build_number': {'key': 'lastRunBuildNumber', 'type': 'str'}, + 'last_test_run': {'key': 'lastTestRun', 'type': 'ShallowReference'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'str'}, + 'suite': {'key': 'suite', 'type': 'ShallowReference'}, + 'test_case': {'key': 'testCase', 'type': 'WorkItemReference'}, + 'test_plan': {'key': 'testPlan', 'type': 'ShallowReference'}, + 'url': {'key': 'url', 'type': 'str'}, + 'work_item_properties': {'key': 'workItemProperties', 'type': '[object]'} + } + + def __init__(self, assigned_to=None, automated=None, comment=None, configuration=None, failure_type=None, id=None, last_resolution_state_id=None, last_result=None, last_result_details=None, last_result_state=None, last_run_build_number=None, last_test_run=None, last_updated_by=None, last_updated_date=None, outcome=None, revision=None, state=None, suite=None, test_case=None, test_plan=None, url=None, work_item_properties=None): + super(TestPoint, self).__init__() + self.assigned_to = assigned_to + self.automated = automated + self.comment = comment + self.configuration = configuration + self.failure_type = failure_type + self.id = id + self.last_resolution_state_id = last_resolution_state_id + self.last_result = last_result + self.last_result_details = last_result_details + self.last_result_state = last_result_state + self.last_run_build_number = last_run_build_number + self.last_test_run = last_test_run + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.outcome = outcome + self.revision = revision + self.state = state + self.suite = suite + self.test_case = test_case + self.test_plan = test_plan + self.url = url + self.work_item_properties = work_item_properties diff --git a/vsts/vsts/test/v4_1/models/test_points_query.py b/vsts/vsts/test/v4_1/models/test_points_query.py new file mode 100644 index 00000000..6e6d5cfd --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_points_query.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestPointsQuery(Model): + """TestPointsQuery. + + :param order_by: + :type order_by: str + :param points: + :type points: list of :class:`TestPoint ` + :param points_filter: + :type points_filter: :class:`PointsFilter ` + :param wit_fields: + :type wit_fields: list of str + """ + + _attribute_map = { + 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'points': {'key': 'points', 'type': '[TestPoint]'}, + 'points_filter': {'key': 'pointsFilter', 'type': 'PointsFilter'}, + 'wit_fields': {'key': 'witFields', 'type': '[str]'} + } + + def __init__(self, order_by=None, points=None, points_filter=None, wit_fields=None): + super(TestPointsQuery, self).__init__() + self.order_by = order_by + self.points = points + self.points_filter = points_filter + self.wit_fields = wit_fields diff --git a/vsts/vsts/test/v4_1/models/test_resolution_state.py b/vsts/vsts/test/v4_1/models/test_resolution_state.py new file mode 100644 index 00000000..2404771f --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_resolution_state.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResolutionState(Model): + """TestResolutionState. + + :param id: + :type id: int + :param name: + :type name: str + :param project: + :type project: :class:`ShallowReference ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'} + } + + def __init__(self, id=None, name=None, project=None): + super(TestResolutionState, self).__init__() + self.id = id + self.name = name + self.project = project diff --git a/vsts/vsts/test/v4_1/models/test_result_create_model.py b/vsts/vsts/test/v4_1/models/test_result_create_model.py new file mode 100644 index 00000000..ba77983a --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_create_model.py @@ -0,0 +1,125 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultCreateModel(Model): + """TestResultCreateModel. + + :param area: + :type area: :class:`ShallowReference ` + :param associated_work_items: + :type associated_work_items: list of int + :param automated_test_id: + :type automated_test_id: str + :param automated_test_name: + :type automated_test_name: str + :param automated_test_storage: + :type automated_test_storage: str + :param automated_test_type: + :type automated_test_type: str + :param automated_test_type_id: + :type automated_test_type_id: str + :param comment: + :type comment: str + :param completed_date: + :type completed_date: str + :param computer_name: + :type computer_name: str + :param configuration: + :type configuration: :class:`ShallowReference ` + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param duration_in_ms: + :type duration_in_ms: str + :param error_message: + :type error_message: str + :param failure_type: + :type failure_type: str + :param outcome: + :type outcome: str + :param owner: + :type owner: :class:`IdentityRef ` + :param resolution_state: + :type resolution_state: str + :param run_by: + :type run_by: :class:`IdentityRef ` + :param stack_trace: + :type stack_trace: str + :param started_date: + :type started_date: str + :param state: + :type state: str + :param test_case: + :type test_case: :class:`ShallowReference ` + :param test_case_priority: + :type test_case_priority: str + :param test_case_title: + :type test_case_title: str + :param test_point: + :type test_point: :class:`ShallowReference ` + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'associated_work_items': {'key': 'associatedWorkItems', 'type': '[int]'}, + 'automated_test_id': {'key': 'automatedTestId', 'type': 'str'}, + 'automated_test_name': {'key': 'automatedTestName', 'type': 'str'}, + 'automated_test_storage': {'key': 'automatedTestStorage', 'type': 'str'}, + 'automated_test_type': {'key': 'automatedTestType', 'type': 'str'}, + 'automated_test_type_id': {'key': 'automatedTestTypeId', 'type': 'str'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'str'}, + 'computer_name': {'key': 'computerName', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'ShallowReference'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'failure_type': {'key': 'failureType', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'resolution_state': {'key': 'resolutionState', 'type': 'str'}, + 'run_by': {'key': 'runBy', 'type': 'IdentityRef'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_case': {'key': 'testCase', 'type': 'ShallowReference'}, + 'test_case_priority': {'key': 'testCasePriority', 'type': 'str'}, + 'test_case_title': {'key': 'testCaseTitle', 'type': 'str'}, + 'test_point': {'key': 'testPoint', 'type': 'ShallowReference'} + } + + def __init__(self, area=None, associated_work_items=None, automated_test_id=None, automated_test_name=None, automated_test_storage=None, automated_test_type=None, automated_test_type_id=None, comment=None, completed_date=None, computer_name=None, configuration=None, custom_fields=None, duration_in_ms=None, error_message=None, failure_type=None, outcome=None, owner=None, resolution_state=None, run_by=None, stack_trace=None, started_date=None, state=None, test_case=None, test_case_priority=None, test_case_title=None, test_point=None): + super(TestResultCreateModel, self).__init__() + self.area = area + self.associated_work_items = associated_work_items + self.automated_test_id = automated_test_id + self.automated_test_name = automated_test_name + self.automated_test_storage = automated_test_storage + self.automated_test_type = automated_test_type + self.automated_test_type_id = automated_test_type_id + self.comment = comment + self.completed_date = completed_date + self.computer_name = computer_name + self.configuration = configuration + self.custom_fields = custom_fields + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.failure_type = failure_type + self.outcome = outcome + self.owner = owner + self.resolution_state = resolution_state + self.run_by = run_by + self.stack_trace = stack_trace + self.started_date = started_date + self.state = state + self.test_case = test_case + self.test_case_priority = test_case_priority + self.test_case_title = test_case_title + self.test_point = test_point diff --git a/vsts/vsts/test/v4_1/models/test_result_document.py b/vsts/vsts/test/v4_1/models/test_result_document.py new file mode 100644 index 00000000..d57f0422 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_document.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultDocument(Model): + """TestResultDocument. + + :param operation_reference: + :type operation_reference: :class:`TestOperationReference ` + :param payload: + :type payload: :class:`TestResultPayload ` + """ + + _attribute_map = { + 'operation_reference': {'key': 'operationReference', 'type': 'TestOperationReference'}, + 'payload': {'key': 'payload', 'type': 'TestResultPayload'} + } + + def __init__(self, operation_reference=None, payload=None): + super(TestResultDocument, self).__init__() + self.operation_reference = operation_reference + self.payload = payload diff --git a/vsts/vsts/test/v4_1/models/test_result_history.py b/vsts/vsts/test/v4_1/models/test_result_history.py new file mode 100644 index 00000000..dee0f0b4 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_history.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultHistory(Model): + """TestResultHistory. + + :param group_by_field: + :type group_by_field: str + :param results_for_group: + :type results_for_group: list of :class:`TestResultHistoryDetailsForGroup ` + """ + + _attribute_map = { + 'group_by_field': {'key': 'groupByField', 'type': 'str'}, + 'results_for_group': {'key': 'resultsForGroup', 'type': '[TestResultHistoryDetailsForGroup]'} + } + + def __init__(self, group_by_field=None, results_for_group=None): + super(TestResultHistory, self).__init__() + self.group_by_field = group_by_field + self.results_for_group = results_for_group diff --git a/vsts/vsts/test/v4_1/models/test_result_history_details_for_group.py b/vsts/vsts/test/v4_1/models/test_result_history_details_for_group.py new file mode 100644 index 00000000..701513b1 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_history_details_for_group.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultHistoryDetailsForGroup(Model): + """TestResultHistoryDetailsForGroup. + + :param group_by_value: + :type group_by_value: object + :param latest_result: + :type latest_result: :class:`TestCaseResult ` + """ + + _attribute_map = { + 'group_by_value': {'key': 'groupByValue', 'type': 'object'}, + 'latest_result': {'key': 'latestResult', 'type': 'TestCaseResult'} + } + + def __init__(self, group_by_value=None, latest_result=None): + super(TestResultHistoryDetailsForGroup, self).__init__() + self.group_by_value = group_by_value + self.latest_result = latest_result diff --git a/vsts/vsts/test/v4_1/models/test_result_model_base.py b/vsts/vsts/test/v4_1/models/test_result_model_base.py new file mode 100644 index 00000000..ad003905 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_model_base.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultModelBase(Model): + """TestResultModelBase. + + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param duration_in_ms: + :type duration_in_ms: number + :param error_message: + :type error_message: str + :param outcome: + :type outcome: str + :param started_date: + :type started_date: datetime + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'duration_in_ms': {'key': 'durationInMs', 'type': 'number'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'outcome': {'key': 'outcome', 'type': 'str'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'} + } + + def __init__(self, comment=None, completed_date=None, duration_in_ms=None, error_message=None, outcome=None, started_date=None): + super(TestResultModelBase, self).__init__() + self.comment = comment + self.completed_date = completed_date + self.duration_in_ms = duration_in_ms + self.error_message = error_message + self.outcome = outcome + self.started_date = started_date diff --git a/vsts/vsts/test/v4_1/models/test_result_parameter_model.py b/vsts/vsts/test/v4_1/models/test_result_parameter_model.py new file mode 100644 index 00000000..39efe2cd --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_parameter_model.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultParameterModel(Model): + """TestResultParameterModel. + + :param action_path: + :type action_path: str + :param iteration_id: + :type iteration_id: int + :param parameter_name: + :type parameter_name: str + :param step_identifier: This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + :type step_identifier: str + :param url: + :type url: str + :param value: + :type value: str + """ + + _attribute_map = { + 'action_path': {'key': 'actionPath', 'type': 'str'}, + 'iteration_id': {'key': 'iterationId', 'type': 'int'}, + 'parameter_name': {'key': 'parameterName', 'type': 'str'}, + 'step_identifier': {'key': 'stepIdentifier', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, action_path=None, iteration_id=None, parameter_name=None, step_identifier=None, url=None, value=None): + super(TestResultParameterModel, self).__init__() + self.action_path = action_path + self.iteration_id = iteration_id + self.parameter_name = parameter_name + self.step_identifier = step_identifier + self.url = url + self.value = value diff --git a/vsts/vsts/test/v4_1/models/test_result_payload.py b/vsts/vsts/test/v4_1/models/test_result_payload.py new file mode 100644 index 00000000..22f3d447 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_payload.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultPayload(Model): + """TestResultPayload. + + :param comment: + :type comment: str + :param name: + :type name: str + :param stream: + :type stream: str + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'stream': {'key': 'stream', 'type': 'str'} + } + + def __init__(self, comment=None, name=None, stream=None): + super(TestResultPayload, self).__init__() + self.comment = comment + self.name = name + self.stream = stream diff --git a/vsts/vsts/test/v4_1/models/test_result_summary.py b/vsts/vsts/test/v4_1/models/test_result_summary.py new file mode 100644 index 00000000..417b5920 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_summary.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultSummary(Model): + """TestResultSummary. + + :param aggregated_results_analysis: + :type aggregated_results_analysis: :class:`AggregatedResultsAnalysis ` + :param team_project: + :type team_project: :class:`TeamProjectReference ` + :param test_failures: + :type test_failures: :class:`TestFailuresAnalysis ` + :param test_results_context: + :type test_results_context: :class:`TestResultsContext ` + """ + + _attribute_map = { + 'aggregated_results_analysis': {'key': 'aggregatedResultsAnalysis', 'type': 'AggregatedResultsAnalysis'}, + 'team_project': {'key': 'teamProject', 'type': 'TeamProjectReference'}, + 'test_failures': {'key': 'testFailures', 'type': 'TestFailuresAnalysis'}, + 'test_results_context': {'key': 'testResultsContext', 'type': 'TestResultsContext'} + } + + def __init__(self, aggregated_results_analysis=None, team_project=None, test_failures=None, test_results_context=None): + super(TestResultSummary, self).__init__() + self.aggregated_results_analysis = aggregated_results_analysis + self.team_project = team_project + self.test_failures = test_failures + self.test_results_context = test_results_context diff --git a/vsts/vsts/test/v4_1/models/test_result_trend_filter.py b/vsts/vsts/test/v4_1/models/test_result_trend_filter.py new file mode 100644 index 00000000..8cb60290 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_result_trend_filter.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultTrendFilter(Model): + """TestResultTrendFilter. + + :param branch_names: + :type branch_names: list of str + :param build_count: + :type build_count: int + :param definition_ids: + :type definition_ids: list of int + :param env_definition_ids: + :type env_definition_ids: list of int + :param max_complete_date: + :type max_complete_date: datetime + :param publish_context: + :type publish_context: str + :param test_run_titles: + :type test_run_titles: list of str + :param trend_days: + :type trend_days: int + """ + + _attribute_map = { + 'branch_names': {'key': 'branchNames', 'type': '[str]'}, + 'build_count': {'key': 'buildCount', 'type': 'int'}, + 'definition_ids': {'key': 'definitionIds', 'type': '[int]'}, + 'env_definition_ids': {'key': 'envDefinitionIds', 'type': '[int]'}, + 'max_complete_date': {'key': 'maxCompleteDate', 'type': 'iso-8601'}, + 'publish_context': {'key': 'publishContext', 'type': 'str'}, + 'test_run_titles': {'key': 'testRunTitles', 'type': '[str]'}, + 'trend_days': {'key': 'trendDays', 'type': 'int'} + } + + def __init__(self, branch_names=None, build_count=None, definition_ids=None, env_definition_ids=None, max_complete_date=None, publish_context=None, test_run_titles=None, trend_days=None): + super(TestResultTrendFilter, self).__init__() + self.branch_names = branch_names + self.build_count = build_count + self.definition_ids = definition_ids + self.env_definition_ids = env_definition_ids + self.max_complete_date = max_complete_date + self.publish_context = publish_context + self.test_run_titles = test_run_titles + self.trend_days = trend_days diff --git a/vsts/vsts/test/v4_1/models/test_results_context.py b/vsts/vsts/test/v4_1/models/test_results_context.py new file mode 100644 index 00000000..18dce445 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_results_context.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsContext(Model): + """TestResultsContext. + + :param build: + :type build: :class:`BuildReference ` + :param context_type: + :type context_type: object + :param release: + :type release: :class:`ReleaseReference ` + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'BuildReference'}, + 'context_type': {'key': 'contextType', 'type': 'object'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'} + } + + def __init__(self, build=None, context_type=None, release=None): + super(TestResultsContext, self).__init__() + self.build = build + self.context_type = context_type + self.release = release diff --git a/vsts/vsts/test/v4_1/models/test_results_details.py b/vsts/vsts/test/v4_1/models/test_results_details.py new file mode 100644 index 00000000..ce736c99 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_results_details.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsDetails(Model): + """TestResultsDetails. + + :param group_by_field: + :type group_by_field: str + :param results_for_group: + :type results_for_group: list of :class:`TestResultsDetailsForGroup ` + """ + + _attribute_map = { + 'group_by_field': {'key': 'groupByField', 'type': 'str'}, + 'results_for_group': {'key': 'resultsForGroup', 'type': '[TestResultsDetailsForGroup]'} + } + + def __init__(self, group_by_field=None, results_for_group=None): + super(TestResultsDetails, self).__init__() + self.group_by_field = group_by_field + self.results_for_group = results_for_group diff --git a/vsts/vsts/test/v4_1/models/test_results_details_for_group.py b/vsts/vsts/test/v4_1/models/test_results_details_for_group.py new file mode 100644 index 00000000..0fb54cd5 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_results_details_for_group.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsDetailsForGroup(Model): + """TestResultsDetailsForGroup. + + :param group_by_value: + :type group_by_value: object + :param results: + :type results: list of :class:`TestCaseResult ` + :param results_count_by_outcome: + :type results_count_by_outcome: dict + """ + + _attribute_map = { + 'group_by_value': {'key': 'groupByValue', 'type': 'object'}, + 'results': {'key': 'results', 'type': '[TestCaseResult]'}, + 'results_count_by_outcome': {'key': 'resultsCountByOutcome', 'type': '{AggregatedResultsByOutcome}'} + } + + def __init__(self, group_by_value=None, results=None, results_count_by_outcome=None): + super(TestResultsDetailsForGroup, self).__init__() + self.group_by_value = group_by_value + self.results = results + self.results_count_by_outcome = results_count_by_outcome diff --git a/vsts/vsts/test/v4_1/models/test_results_groups_for_build.py b/vsts/vsts/test/v4_1/models/test_results_groups_for_build.py new file mode 100644 index 00000000..39f95d9d --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_results_groups_for_build.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsGroupsForBuild(Model): + """TestResultsGroupsForBuild. + + :param build_id: BuildId for which groupby result is fetched. + :type build_id: int + :param fields: The group by results + :type fields: list of :class:`FieldDetailsForTestResults ` + """ + + _attribute_map = { + 'build_id': {'key': 'buildId', 'type': 'int'}, + 'fields': {'key': 'fields', 'type': '[FieldDetailsForTestResults]'} + } + + def __init__(self, build_id=None, fields=None): + super(TestResultsGroupsForBuild, self).__init__() + self.build_id = build_id + self.fields = fields diff --git a/vsts/vsts/test/v4_1/models/test_results_groups_for_release.py b/vsts/vsts/test/v4_1/models/test_results_groups_for_release.py new file mode 100644 index 00000000..e5170efc --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_results_groups_for_release.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsGroupsForRelease(Model): + """TestResultsGroupsForRelease. + + :param fields: The group by results + :type fields: list of :class:`FieldDetailsForTestResults ` + :param release_env_id: Release Environment Id for which groupby result is fetched. + :type release_env_id: int + :param release_id: ReleaseId for which groupby result is fetched. + :type release_id: int + """ + + _attribute_map = { + 'fields': {'key': 'fields', 'type': '[FieldDetailsForTestResults]'}, + 'release_env_id': {'key': 'releaseEnvId', 'type': 'int'}, + 'release_id': {'key': 'releaseId', 'type': 'int'} + } + + def __init__(self, fields=None, release_env_id=None, release_id=None): + super(TestResultsGroupsForRelease, self).__init__() + self.fields = fields + self.release_env_id = release_env_id + self.release_id = release_id diff --git a/vsts/vsts/test/v4_1/models/test_results_query.py b/vsts/vsts/test/v4_1/models/test_results_query.py new file mode 100644 index 00000000..4c77d384 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_results_query.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestResultsQuery(Model): + """TestResultsQuery. + + :param fields: + :type fields: list of str + :param results: + :type results: list of :class:`TestCaseResult ` + :param results_filter: + :type results_filter: :class:`ResultsFilter ` + """ + + _attribute_map = { + 'fields': {'key': 'fields', 'type': '[str]'}, + 'results': {'key': 'results', 'type': '[TestCaseResult]'}, + 'results_filter': {'key': 'resultsFilter', 'type': 'ResultsFilter'} + } + + def __init__(self, fields=None, results=None, results_filter=None): + super(TestResultsQuery, self).__init__() + self.fields = fields + self.results = results + self.results_filter = results_filter diff --git a/vsts/vsts/test/v4_1/models/test_run.py b/vsts/vsts/test/v4_1/models/test_run.py new file mode 100644 index 00000000..18a9d654 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_run.py @@ -0,0 +1,193 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestRun(Model): + """TestRun. + + :param build: + :type build: :class:`ShallowReference ` + :param build_configuration: + :type build_configuration: :class:`BuildConfiguration ` + :param comment: + :type comment: str + :param completed_date: + :type completed_date: datetime + :param controller: + :type controller: str + :param created_date: + :type created_date: datetime + :param custom_fields: + :type custom_fields: list of :class:`CustomTestField ` + :param drop_location: + :type drop_location: str + :param dtl_aut_environment: + :type dtl_aut_environment: :class:`ShallowReference ` + :param dtl_environment: + :type dtl_environment: :class:`ShallowReference ` + :param dtl_environment_creation_details: + :type dtl_environment_creation_details: :class:`DtlEnvironmentDetails ` + :param due_date: + :type due_date: datetime + :param error_message: + :type error_message: str + :param filter: + :type filter: :class:`RunFilter ` + :param id: + :type id: int + :param incomplete_tests: + :type incomplete_tests: int + :param is_automated: + :type is_automated: bool + :param iteration: + :type iteration: str + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param name: + :type name: str + :param not_applicable_tests: + :type not_applicable_tests: int + :param owner: + :type owner: :class:`IdentityRef ` + :param passed_tests: + :type passed_tests: int + :param phase: + :type phase: str + :param plan: + :type plan: :class:`ShallowReference ` + :param post_process_state: + :type post_process_state: str + :param project: + :type project: :class:`ShallowReference ` + :param release: + :type release: :class:`ReleaseReference ` + :param release_environment_uri: + :type release_environment_uri: str + :param release_uri: + :type release_uri: str + :param revision: + :type revision: int + :param run_statistics: + :type run_statistics: list of :class:`RunStatistic ` + :param started_date: + :type started_date: datetime + :param state: + :type state: str + :param substate: + :type substate: object + :param test_environment: + :type test_environment: :class:`TestEnvironment ` + :param test_message_log_id: + :type test_message_log_id: int + :param test_settings: + :type test_settings: :class:`ShallowReference ` + :param total_tests: + :type total_tests: int + :param unanalyzed_tests: + :type unanalyzed_tests: int + :param url: + :type url: str + :param web_access_url: + :type web_access_url: str + """ + + _attribute_map = { + 'build': {'key': 'build', 'type': 'ShallowReference'}, + 'build_configuration': {'key': 'buildConfiguration', 'type': 'BuildConfiguration'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'completed_date': {'key': 'completedDate', 'type': 'iso-8601'}, + 'controller': {'key': 'controller', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'custom_fields': {'key': 'customFields', 'type': '[CustomTestField]'}, + 'drop_location': {'key': 'dropLocation', 'type': 'str'}, + 'dtl_aut_environment': {'key': 'dtlAutEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment': {'key': 'dtlEnvironment', 'type': 'ShallowReference'}, + 'dtl_environment_creation_details': {'key': 'dtlEnvironmentCreationDetails', 'type': 'DtlEnvironmentDetails'}, + 'due_date': {'key': 'dueDate', 'type': 'iso-8601'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'RunFilter'}, + 'id': {'key': 'id', 'type': 'int'}, + 'incomplete_tests': {'key': 'incompleteTests', 'type': 'int'}, + 'is_automated': {'key': 'isAutomated', 'type': 'bool'}, + 'iteration': {'key': 'iteration', 'type': 'str'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'not_applicable_tests': {'key': 'notApplicableTests', 'type': 'int'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'passed_tests': {'key': 'passedTests', 'type': 'int'}, + 'phase': {'key': 'phase', 'type': 'str'}, + 'plan': {'key': 'plan', 'type': 'ShallowReference'}, + 'post_process_state': {'key': 'postProcessState', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'release': {'key': 'release', 'type': 'ReleaseReference'}, + 'release_environment_uri': {'key': 'releaseEnvironmentUri', 'type': 'str'}, + 'release_uri': {'key': 'releaseUri', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'run_statistics': {'key': 'runStatistics', 'type': '[RunStatistic]'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'str'}, + 'substate': {'key': 'substate', 'type': 'object'}, + 'test_environment': {'key': 'testEnvironment', 'type': 'TestEnvironment'}, + 'test_message_log_id': {'key': 'testMessageLogId', 'type': 'int'}, + 'test_settings': {'key': 'testSettings', 'type': 'ShallowReference'}, + 'total_tests': {'key': 'totalTests', 'type': 'int'}, + 'unanalyzed_tests': {'key': 'unanalyzedTests', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'web_access_url': {'key': 'webAccessUrl', 'type': 'str'} + } + + def __init__(self, build=None, build_configuration=None, comment=None, completed_date=None, controller=None, created_date=None, custom_fields=None, drop_location=None, dtl_aut_environment=None, dtl_environment=None, dtl_environment_creation_details=None, due_date=None, error_message=None, filter=None, id=None, incomplete_tests=None, is_automated=None, iteration=None, last_updated_by=None, last_updated_date=None, name=None, not_applicable_tests=None, owner=None, passed_tests=None, phase=None, plan=None, post_process_state=None, project=None, release=None, release_environment_uri=None, release_uri=None, revision=None, run_statistics=None, started_date=None, state=None, substate=None, test_environment=None, test_message_log_id=None, test_settings=None, total_tests=None, unanalyzed_tests=None, url=None, web_access_url=None): + super(TestRun, self).__init__() + self.build = build + self.build_configuration = build_configuration + self.comment = comment + self.completed_date = completed_date + self.controller = controller + self.created_date = created_date + self.custom_fields = custom_fields + self.drop_location = drop_location + self.dtl_aut_environment = dtl_aut_environment + self.dtl_environment = dtl_environment + self.dtl_environment_creation_details = dtl_environment_creation_details + self.due_date = due_date + self.error_message = error_message + self.filter = filter + self.id = id + self.incomplete_tests = incomplete_tests + self.is_automated = is_automated + self.iteration = iteration + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.name = name + self.not_applicable_tests = not_applicable_tests + self.owner = owner + self.passed_tests = passed_tests + self.phase = phase + self.plan = plan + self.post_process_state = post_process_state + self.project = project + self.release = release + self.release_environment_uri = release_environment_uri + self.release_uri = release_uri + self.revision = revision + self.run_statistics = run_statistics + self.started_date = started_date + self.state = state + self.substate = substate + self.test_environment = test_environment + self.test_message_log_id = test_message_log_id + self.test_settings = test_settings + self.total_tests = total_tests + self.unanalyzed_tests = unanalyzed_tests + self.url = url + self.web_access_url = web_access_url diff --git a/vsts/vsts/test/v4_1/models/test_run_coverage.py b/vsts/vsts/test/v4_1/models/test_run_coverage.py new file mode 100644 index 00000000..bc4dd047 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_run_coverage.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestRunCoverage(Model): + """TestRunCoverage. + + :param last_error: + :type last_error: str + :param modules: + :type modules: list of :class:`ModuleCoverage ` + :param state: + :type state: str + :param test_run: + :type test_run: :class:`ShallowReference ` + """ + + _attribute_map = { + 'last_error': {'key': 'lastError', 'type': 'str'}, + 'modules': {'key': 'modules', 'type': '[ModuleCoverage]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'test_run': {'key': 'testRun', 'type': 'ShallowReference'} + } + + def __init__(self, last_error=None, modules=None, state=None, test_run=None): + super(TestRunCoverage, self).__init__() + self.last_error = last_error + self.modules = modules + self.state = state + self.test_run = test_run diff --git a/vsts/vsts/test/v4_1/models/test_run_statistic.py b/vsts/vsts/test/v4_1/models/test_run_statistic.py new file mode 100644 index 00000000..b5885316 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_run_statistic.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestRunStatistic(Model): + """TestRunStatistic. + + :param run: + :type run: :class:`ShallowReference ` + :param run_statistics: + :type run_statistics: list of :class:`RunStatistic ` + """ + + _attribute_map = { + 'run': {'key': 'run', 'type': 'ShallowReference'}, + 'run_statistics': {'key': 'runStatistics', 'type': '[RunStatistic]'} + } + + def __init__(self, run=None, run_statistics=None): + super(TestRunStatistic, self).__init__() + self.run = run + self.run_statistics = run_statistics diff --git a/vsts/vsts/test/v4_1/models/test_session.py b/vsts/vsts/test/v4_1/models/test_session.py new file mode 100644 index 00000000..8b06b612 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_session.py @@ -0,0 +1,81 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSession(Model): + """TestSession. + + :param area: Area path of the test session + :type area: :class:`ShallowReference ` + :param comment: Comments in the test session + :type comment: str + :param end_date: Duration of the session + :type end_date: datetime + :param id: Id of the test session + :type id: int + :param last_updated_by: Last Updated By Reference + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: Last updated date + :type last_updated_date: datetime + :param owner: Owner of the test session + :type owner: :class:`IdentityRef ` + :param project: Project to which the test session belongs + :type project: :class:`ShallowReference ` + :param property_bag: Generic store for test session data + :type property_bag: :class:`PropertyBag ` + :param revision: Revision of the test session + :type revision: int + :param source: Source of the test session + :type source: object + :param start_date: Start date + :type start_date: datetime + :param state: State of the test session + :type state: object + :param title: Title of the test session + :type title: str + :param url: Url of Test Session Resource + :type url: str + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'ShallowReference'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'int'}, + 'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'IdentityRef'}, + 'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'property_bag': {'key': 'propertyBag', 'type': 'PropertyBag'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'object'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'state': {'key': 'state', 'type': 'object'}, + 'title': {'key': 'title', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, area=None, comment=None, end_date=None, id=None, last_updated_by=None, last_updated_date=None, owner=None, project=None, property_bag=None, revision=None, source=None, start_date=None, state=None, title=None, url=None): + super(TestSession, self).__init__() + self.area = area + self.comment = comment + self.end_date = end_date + self.id = id + self.last_updated_by = last_updated_by + self.last_updated_date = last_updated_date + self.owner = owner + self.project = project + self.property_bag = property_bag + self.revision = revision + self.source = source + self.start_date = start_date + self.state = state + self.title = title + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_settings.py b/vsts/vsts/test/v4_1/models/test_settings.py new file mode 100644 index 00000000..4cf25582 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_settings.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/test/v4_1/models/test_suite.py b/vsts/vsts/test/v4_1/models/test_suite.py new file mode 100644 index 00000000..be0ef32e --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_suite.py @@ -0,0 +1,117 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSuite(Model): + """TestSuite. + + :param area_uri: + :type area_uri: str + :param children: + :type children: list of :class:`TestSuite ` + :param default_configurations: + :type default_configurations: list of :class:`ShallowReference ` + :param default_testers: + :type default_testers: list of :class:`ShallowReference ` + :param id: + :type id: int + :param inherit_default_configurations: + :type inherit_default_configurations: bool + :param last_error: + :type last_error: str + :param last_populated_date: + :type last_populated_date: datetime + :param last_updated_by: + :type last_updated_by: :class:`IdentityRef ` + :param last_updated_date: + :type last_updated_date: datetime + :param name: + :type name: str + :param parent: + :type parent: :class:`ShallowReference ` + :param plan: + :type plan: :class:`ShallowReference ` + :param project: + :type project: :class:`ShallowReference ` + :param query_string: + :type query_string: str + :param requirement_id: + :type requirement_id: int + :param revision: + :type revision: int + :param state: + :type state: str + :param suites: + :type suites: list of :class:`ShallowReference ` + :param suite_type: + :type suite_type: str + :param test_case_count: + :type test_case_count: int + :param test_cases_url: + :type test_cases_url: str + :param text: + :type text: str + :param url: + :type url: str + """ + + _attribute_map = { + 'area_uri': {'key': 'areaUri', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[TestSuite]'}, + 'default_configurations': {'key': 'defaultConfigurations', 'type': '[ShallowReference]'}, + 'default_testers': {'key': 'defaultTesters', 'type': '[ShallowReference]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'inherit_default_configurations': {'key': 'inheritDefaultConfigurations', 'type': 'bool'}, + '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'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent': {'key': 'parent', 'type': 'ShallowReference'}, + 'plan': {'key': 'plan', 'type': 'ShallowReference'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'query_string': {'key': 'queryString', 'type': 'str'}, + 'requirement_id': {'key': 'requirementId', 'type': 'int'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'str'}, + 'suites': {'key': 'suites', 'type': '[ShallowReference]'}, + 'suite_type': {'key': 'suiteType', 'type': 'str'}, + 'test_case_count': {'key': 'testCaseCount', 'type': 'int'}, + 'test_cases_url': {'key': 'testCasesUrl', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, area_uri=None, children=None, default_configurations=None, default_testers=None, id=None, inherit_default_configurations=None, last_error=None, last_populated_date=None, last_updated_by=None, last_updated_date=None, name=None, parent=None, plan=None, project=None, query_string=None, requirement_id=None, revision=None, state=None, suites=None, suite_type=None, test_case_count=None, test_cases_url=None, text=None, url=None): + super(TestSuite, self).__init__() + self.area_uri = area_uri + self.children = children + self.default_configurations = default_configurations + self.default_testers = default_testers + self.id = id + self.inherit_default_configurations = inherit_default_configurations + 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.name = name + self.parent = parent + self.plan = plan + self.project = project + self.query_string = query_string + self.requirement_id = requirement_id + self.revision = revision + self.state = state + self.suites = suites + self.suite_type = suite_type + self.test_case_count = test_case_count + self.test_cases_url = test_cases_url + self.text = text + self.url = url diff --git a/vsts/vsts/test/v4_1/models/test_suite_clone_request.py b/vsts/vsts/test/v4_1/models/test_suite_clone_request.py new file mode 100644 index 00000000..b17afed5 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_suite_clone_request.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSuiteCloneRequest(Model): + """TestSuiteCloneRequest. + + :param clone_options: + :type clone_options: :class:`CloneOptions ` + :param destination_suite_id: + :type destination_suite_id: int + :param destination_suite_project_name: + :type destination_suite_project_name: str + """ + + _attribute_map = { + 'clone_options': {'key': 'cloneOptions', 'type': 'CloneOptions'}, + 'destination_suite_id': {'key': 'destinationSuiteId', 'type': 'int'}, + 'destination_suite_project_name': {'key': 'destinationSuiteProjectName', 'type': 'str'} + } + + def __init__(self, clone_options=None, destination_suite_id=None, destination_suite_project_name=None): + super(TestSuiteCloneRequest, self).__init__() + self.clone_options = clone_options + self.destination_suite_id = destination_suite_id + self.destination_suite_project_name = destination_suite_project_name diff --git a/vsts/vsts/test/v4_1/models/test_summary_for_work_item.py b/vsts/vsts/test/v4_1/models/test_summary_for_work_item.py new file mode 100644 index 00000000..701ef130 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_summary_for_work_item.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestSummaryForWorkItem(Model): + """TestSummaryForWorkItem. + + :param summary: + :type summary: :class:`AggregatedDataForResultTrend ` + :param work_item: + :type work_item: :class:`WorkItemReference ` + """ + + _attribute_map = { + 'summary': {'key': 'summary', 'type': 'AggregatedDataForResultTrend'}, + 'work_item': {'key': 'workItem', 'type': 'WorkItemReference'} + } + + def __init__(self, summary=None, work_item=None): + super(TestSummaryForWorkItem, self).__init__() + self.summary = summary + self.work_item = work_item diff --git a/vsts/vsts/test/v4_1/models/test_to_work_item_links.py b/vsts/vsts/test/v4_1/models/test_to_work_item_links.py new file mode 100644 index 00000000..402a5bb4 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_to_work_item_links.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestToWorkItemLinks(Model): + """TestToWorkItemLinks. + + :param test: + :type test: :class:`TestMethod ` + :param work_items: + :type work_items: list of :class:`WorkItemReference ` + """ + + _attribute_map = { + 'test': {'key': 'test', 'type': 'TestMethod'}, + 'work_items': {'key': 'workItems', 'type': '[WorkItemReference]'} + } + + def __init__(self, test=None, work_items=None): + super(TestToWorkItemLinks, self).__init__() + self.test = test + self.work_items = work_items diff --git a/vsts/vsts/test/v4_1/models/test_variable.py b/vsts/vsts/test/v4_1/models/test_variable.py new file mode 100644 index 00000000..9f27a0b1 --- /dev/null +++ b/vsts/vsts/test/v4_1/models/test_variable.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TestVariable(Model): + """TestVariable. + + :param description: Description of the test variable + :type description: str + :param id: Id of the test variable + :type id: int + :param name: Name of the test variable + :type name: str + :param project: Project to which the test variable belongs + :type project: :class:`ShallowReference ` + :param revision: Revision + :type revision: int + :param url: Url of the test variable + :type url: str + :param values: List of allowed values + :type values: list of str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'ShallowReference'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'} + } + + def __init__(self, description=None, id=None, name=None, project=None, revision=None, url=None, values=None): + super(TestVariable, self).__init__() + self.description = description + self.id = id + self.name = name + self.project = project + self.revision = revision + self.url = url + self.values = values diff --git a/vsts/vsts/test/v4_1/models/work_item_reference.py b/vsts/vsts/test/v4_1/models/work_item_reference.py new file mode 100644 index 00000000..1bff259b --- /dev/null +++ b/vsts/vsts/test/v4_1/models/work_item_reference.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemReference(Model): + """WorkItemReference. + + :param id: + :type id: str + :param name: + :type name: str + :param type: + :type type: str + :param url: + :type url: str + :param web_url: + :type web_url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'web_url': {'key': 'webUrl', 'type': 'str'} + } + + def __init__(self, id=None, name=None, type=None, url=None, web_url=None): + super(WorkItemReference, self).__init__() + self.id = id + self.name = name + self.type = type + self.url = url + self.web_url = web_url diff --git a/vsts/vsts/test/v4_1/models/work_item_to_test_links.py b/vsts/vsts/test/v4_1/models/work_item_to_test_links.py new file mode 100644 index 00000000..a76898ec --- /dev/null +++ b/vsts/vsts/test/v4_1/models/work_item_to_test_links.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemToTestLinks(Model): + """WorkItemToTestLinks. + + :param tests: + :type tests: list of :class:`TestMethod ` + :param work_item: + :type work_item: :class:`WorkItemReference ` + """ + + _attribute_map = { + 'tests': {'key': 'tests', 'type': '[TestMethod]'}, + 'work_item': {'key': 'workItem', 'type': 'WorkItemReference'} + } + + def __init__(self, tests=None, work_item=None): + super(WorkItemToTestLinks, self).__init__() + self.tests = tests + self.work_item = work_item diff --git a/vsts/vsts/test/v4_1/test_client.py b/vsts/vsts/test/v4_1/test_client.py new file mode 100644 index 00000000..f44c59b3 --- /dev/null +++ b/vsts/vsts/test/v4_1/test_client.py @@ -0,0 +1,2333 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TestClient(VssClient): + """Test + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TestClient, 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 = 'c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e' + + def get_action_results(self, project, run_id, test_case_result_id, iteration_id, action_path=None): + """GetActionResults. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param str action_path: + :rtype: [TestActionResultModel] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + if action_path is not None: + route_values['actionPath'] = self._serialize.url('action_path', action_path, 'str') + response = self._send(http_method='GET', + location_id='eaf40c31-ff84-4062-aafd-d5664be11a37', + version='4.1-preview.3', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestActionResultModel]', response) + + def create_test_iteration_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id, iteration_id, action_path=None): + """CreateTestIterationResultAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param str action_path: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query('iteration_id', iteration_id, 'int') + if action_path is not None: + query_parameters['actionPath'] = self._serialize.query('action_path', action_path, 'str') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def create_test_result_attachment(self, attachment_request_model, project, run_id, test_case_result_id): + """CreateTestResultAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def get_test_result_attachment_content(self, project, run_id, test_case_result_id, attachment_id): + """GetTestResultAttachmentContent. + [Preview API] Returns a test result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_test_result_attachments(self, project, run_id, test_case_result_id): + """GetTestResultAttachments. + [Preview API] Returns attachment references for test result. + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: [TestAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + response = self._send(http_method='GET', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestAttachment]', response) + + def get_test_result_attachment_zip(self, project, run_id, test_case_result_id, attachment_id): + """GetTestResultAttachmentZip. + [Preview API] Returns a test result attachment + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='2bffebe9-2f0f-4639-9af8-56129e9fed2d', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def create_test_run_attachment(self, attachment_request_model, project, run_id): + """CreateTestRunAttachment. + [Preview API] + :param :class:` ` attachment_request_model: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(attachment_request_model, 'TestAttachmentRequestModel') + response = self._send(http_method='POST', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestAttachmentReference', response) + + def get_test_run_attachment_content(self, project, run_id, attachment_id): + """GetTestRunAttachmentContent. + [Preview API] Returns a test run attachment + :param str project: Project ID or project name + :param int run_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_test_run_attachments(self, project, run_id): + """GetTestRunAttachments. + [Preview API] Returns attachment references for test run. + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestAttachment] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestAttachment]', response) + + def get_test_run_attachment_zip(self, project, run_id, attachment_id): + """GetTestRunAttachmentZip. + [Preview API] Returns a test run attachment + :param str project: Project ID or project name + :param int run_id: + :param int attachment_id: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if attachment_id is not None: + route_values['attachmentId'] = self._serialize.url('attachment_id', attachment_id, 'int') + response = self._send(http_method='GET', + location_id='4f004af4-a507-489c-9b13-cb62060beb11', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def get_bugs_linked_to_test_result(self, project, run_id, test_case_result_id): + """GetBugsLinkedToTestResult. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :rtype: [WorkItemReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + response = self._send(http_method='GET', + location_id='6de20ca2-67de-4faf-97fa-38c5d585eb00', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemReference]', response) + + def get_clone_information(self, project, clone_operation_id, include_details=None): + """GetCloneInformation. + [Preview API] + :param str project: Project ID or project name + :param int clone_operation_id: + :param bool include_details: + :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') + query_parameters = {} + if include_details is not None: + query_parameters['$includeDetails'] = self._serialize.query('include_details', include_details, 'bool') + response = self._send(http_method='GET', + location_id='5b9d6320-abed-47a5-a151-cd6dc3798be6', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CloneOperationInformation', response) + + def clone_test_plan(self, clone_request_body, project, plan_id): + """CloneTestPlan. + [Preview API] + :param :class:` ` clone_request_body: + :param str project: Project ID or project name + :param int plan_id: + :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(clone_request_body, 'TestPlanCloneRequest') + response = self._send(http_method='POST', + location_id='edc3ef4b-8460-4e86-86fa-8e4f5e9be831', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('CloneOperationInformation', response) + + def clone_test_suite(self, clone_request_body, project, plan_id, source_suite_id): + """CloneTestSuite. + [Preview API] + :param :class:` ` clone_request_body: + :param str project: Project ID or project name + :param int plan_id: + :param int source_suite_id: + :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 source_suite_id is not None: + route_values['sourceSuiteId'] = self._serialize.url('source_suite_id', source_suite_id, 'int') + content = self._serialize.body(clone_request_body, 'TestSuiteCloneRequest') + response = self._send(http_method='POST', + location_id='751e4ab5-5bf6-4fb5-9d5d-19ef347662dd', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('CloneOperationInformation', response) + + def get_build_code_coverage(self, project, build_id, flags): + """GetBuildCodeCoverage. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param int flags: + :rtype: [BuildCoverage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='77560e8a-4e8c-4d59-894e-a5f264c24444', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[BuildCoverage]', response) + + def get_code_coverage_summary(self, project, build_id, delta_build_id=None): + """GetCodeCoverageSummary. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param int delta_build_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if delta_build_id is not None: + query_parameters['deltaBuildId'] = self._serialize.query('delta_build_id', delta_build_id, 'int') + response = self._send(http_method='GET', + location_id='77560e8a-4e8c-4d59-894e-a5f264c24444', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('CodeCoverageSummary', response) + + def update_code_coverage_summary(self, coverage_data, project, build_id): + """UpdateCodeCoverageSummary. + [Preview API] http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + :param :class:` ` coverage_data: + :param str project: Project ID or project name + :param int build_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + content = self._serialize.body(coverage_data, 'CodeCoverageData') + self._send(http_method='POST', + location_id='77560e8a-4e8c-4d59-894e-a5f264c24444', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + + def get_test_run_code_coverage(self, project, run_id, flags): + """GetTestRunCodeCoverage. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int flags: + :rtype: [TestRunCoverage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if flags is not None: + query_parameters['flags'] = self._serialize.query('flags', flags, 'int') + response = self._send(http_method='GET', + location_id='9629116f-3b89-4ed8-b358-d4694efda160', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestRunCoverage]', response) + + def create_test_configuration(self, test_configuration, project): + """CreateTestConfiguration. + [Preview API] + :param :class:` ` test_configuration: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_configuration, 'TestConfiguration') + response = self._send(http_method='POST', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestConfiguration', response) + + def delete_test_configuration(self, project, test_configuration_id): + """DeleteTestConfiguration. + [Preview API] + :param str project: Project ID or project name + :param int test_configuration_id: + """ + 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') + self._send(http_method='DELETE', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.1-preview.2', + route_values=route_values) + + def get_test_configuration_by_id(self, project, test_configuration_id): + """GetTestConfigurationById. + [Preview API] + :param str project: Project ID or project name + :param int test_configuration_id: + :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='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('TestConfiguration', response) + + def get_test_configurations(self, project, skip=None, top=None, continuation_token=None, include_all_properties=None): + """GetTestConfigurations. + [Preview API] + :param str project: Project ID or project name + :param int skip: + :param int top: + :param str continuation_token: + :param bool include_all_properties: + :rtype: [TestConfiguration] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + if include_all_properties is not None: + query_parameters['includeAllProperties'] = self._serialize.query('include_all_properties', include_all_properties, 'bool') + response = self._send(http_method='GET', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestConfiguration]', response) + + def update_test_configuration(self, test_configuration, project, test_configuration_id): + """UpdateTestConfiguration. + [Preview API] + :param :class:` ` test_configuration: + :param str project: Project ID or project name + :param int test_configuration_id: + :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') + content = self._serialize.body(test_configuration, 'TestConfiguration') + response = self._send(http_method='PATCH', + location_id='d667591b-b9fd-4263-997a-9a084cca848f', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestConfiguration', response) + + def add_custom_fields(self, new_fields, project): + """AddCustomFields. + [Preview API] + :param [CustomTestFieldDefinition] new_fields: + :param str project: Project ID or project name + :rtype: [CustomTestFieldDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(new_fields, '[CustomTestFieldDefinition]') + response = self._send(http_method='POST', + location_id='8ce1923b-f4c7-4e22-b93b-f6284e525ec2', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[CustomTestFieldDefinition]', response) + + def query_custom_fields(self, project, scope_filter): + """QueryCustomFields. + [Preview API] + :param str project: Project ID or project name + :param str scope_filter: + :rtype: [CustomTestFieldDefinition] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if scope_filter is not None: + query_parameters['scopeFilter'] = self._serialize.query('scope_filter', scope_filter, 'str') + response = self._send(http_method='GET', + location_id='8ce1923b-f4c7-4e22-b93b-f6284e525ec2', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[CustomTestFieldDefinition]', response) + + def query_test_result_history(self, filter, project): + """QueryTestResultHistory. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'ResultsFilter') + response = self._send(http_method='POST', + location_id='234616f5-429c-4e7b-9192-affd76731dfd', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestResultHistory', response) + + def get_test_iteration(self, project, run_id, test_case_result_id, iteration_id, include_action_results=None): + """GetTestIteration. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param bool include_action_results: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + query_parameters = {} + if include_action_results is not None: + query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool') + response = self._send(http_method='GET', + location_id='73eb9074-3446-4c44-8296-2f811950ff8d', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestIterationDetailsModel', response) + + def get_test_iterations(self, project, run_id, test_case_result_id, include_action_results=None): + """GetTestIterations. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param bool include_action_results: + :rtype: [TestIterationDetailsModel] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if include_action_results is not None: + query_parameters['includeActionResults'] = self._serialize.query('include_action_results', include_action_results, 'bool') + response = self._send(http_method='GET', + location_id='73eb9074-3446-4c44-8296-2f811950ff8d', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestIterationDetailsModel]', response) + + def get_linked_work_items_by_query(self, work_item_query, project): + """GetLinkedWorkItemsByQuery. + [Preview API] + :param :class:` ` work_item_query: + :param str project: Project ID or project name + :rtype: [LinkedWorkItemsQueryResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(work_item_query, 'LinkedWorkItemsQuery') + response = self._send(http_method='POST', + location_id='a4dcb25b-9878-49ea-abfd-e440bd9b1dcd', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[LinkedWorkItemsQueryResult]', response) + + def get_test_run_logs(self, project, run_id): + """GetTestRunLogs. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestMessageLogDetails] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='a1e55200-637e-42e9-a7c0-7e5bfdedb1b3', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TestMessageLogDetails]', response) + + def get_result_parameters(self, project, run_id, test_case_result_id, iteration_id, param_name=None): + """GetResultParameters. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param int iteration_id: + :param str param_name: + :rtype: [TestResultParameterModel] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + query_parameters = {} + if param_name is not None: + query_parameters['paramName'] = self._serialize.query('param_name', param_name, 'str') + response = self._send(http_method='GET', + location_id='7c69810d-3354-4af3-844a-180bd25db08a', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestResultParameterModel]', response) + + def create_test_plan(self, test_plan, project): + """CreateTestPlan. + [Preview API] + :param :class:` ` test_plan: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_plan, 'PlanUpdateModel') + response = self._send(http_method='POST', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestPlan', response) + + def delete_test_plan(self, project, plan_id): + """DeleteTestPlan. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + self._send(http_method='DELETE', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.1-preview.2', + route_values=route_values) + + def get_plan_by_id(self, project, plan_id): + """GetPlanById. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + response = self._send(http_method='GET', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('TestPlan', response) + + def get_plans(self, project, owner=None, skip=None, top=None, include_plan_details=None, filter_active_plans=None): + """GetPlans. + [Preview API] + :param str project: Project ID or project name + :param str owner: + :param int skip: + :param int top: + :param bool include_plan_details: + :param bool filter_active_plans: + :rtype: [TestPlan] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if owner is not None: + query_parameters['owner'] = self._serialize.query('owner', owner, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if include_plan_details is not None: + query_parameters['includePlanDetails'] = self._serialize.query('include_plan_details', include_plan_details, 'bool') + if filter_active_plans is not None: + query_parameters['filterActivePlans'] = self._serialize.query('filter_active_plans', filter_active_plans, 'bool') + response = self._send(http_method='GET', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestPlan]', response) + + def update_test_plan(self, plan_update_model, project, plan_id): + """UpdateTestPlan. + [Preview API] + :param :class:` ` plan_update_model: + :param str project: Project ID or project name + :param int plan_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + content = self._serialize.body(plan_update_model, 'PlanUpdateModel') + response = self._send(http_method='PATCH', + location_id='51712106-7278-4208-8563-1c96f40cf5e4', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestPlan', response) + + def get_point(self, project, plan_id, suite_id, point_ids, wit_fields=None): + """GetPoint. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param int point_ids: + :param str wit_fields: + :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') + if point_ids is not None: + route_values['pointIds'] = self._serialize.url('point_ids', point_ids, 'int') + 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='3bcfd5c8-be62-488e-b1da-b8289ce9299c', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestPoint', response) + + def get_points(self, project, plan_id, suite_id, wit_fields=None, configuration_id=None, test_case_id=None, test_point_ids=None, include_point_details=None, skip=None, top=None): + """GetPoints. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param str wit_fields: + :param str configuration_id: + :param str test_case_id: + :param str test_point_ids: + :param bool include_point_details: + :param int skip: + :param int top: + :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 wit_fields is not None: + query_parameters['witFields'] = self._serialize.query('wit_fields', wit_fields, 'str') + if configuration_id is not None: + query_parameters['configurationId'] = self._serialize.query('configuration_id', configuration_id, 'str') + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'str') + if test_point_ids is not None: + query_parameters['testPointIds'] = self._serialize.query('test_point_ids', test_point_ids, 'str') + if include_point_details is not None: + query_parameters['includePointDetails'] = self._serialize.query('include_point_details', include_point_details, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestPoint]', response) + + def update_test_points(self, point_update_model, project, plan_id, suite_id, point_ids): + """UpdateTestPoints. + [Preview API] + :param :class:` ` point_update_model: + :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') + content = self._serialize.body(point_update_model, 'PointUpdateModel') + response = self._send(http_method='PATCH', + location_id='3bcfd5c8-be62-488e-b1da-b8289ce9299c', + version='4.1-preview.2', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestPoint]', response) + + def get_points_by_query(self, query, project, skip=None, top=None): + """GetPointsByQuery. + [Preview API] + :param :class:` ` query: + :param str project: Project ID or project name + :param int skip: + :param int top: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + content = self._serialize.body(query, 'TestPointsQuery') + response = self._send(http_method='POST', + location_id='b4264fd0-a5d1-43e2-82a5-b9c46b7da9ce', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('TestPointsQuery', response) + + def get_test_result_details_for_build(self, project, build_id, publish_context=None, group_by=None, filter=None, orderby=None, should_include_results=None, query_run_summary_for_in_progress=None): + """GetTestResultDetailsForBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param str group_by: + :param str filter: + :param str orderby: + :param bool should_include_results: + :param bool query_run_summary_for_in_progress: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if group_by is not None: + query_parameters['groupBy'] = self._serialize.query('group_by', group_by, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if should_include_results is not None: + query_parameters['shouldIncludeResults'] = self._serialize.query('should_include_results', should_include_results, 'bool') + if query_run_summary_for_in_progress is not None: + query_parameters['queryRunSummaryForInProgress'] = self._serialize.query('query_run_summary_for_in_progress', query_run_summary_for_in_progress, 'bool') + response = self._send(http_method='GET', + location_id='efb387b0-10d5-42e7-be40-95e06ee9430f', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsDetails', response) + + def get_test_result_details_for_release(self, project, release_id, release_env_id, publish_context=None, group_by=None, filter=None, orderby=None, should_include_results=None, query_run_summary_for_in_progress=None): + """GetTestResultDetailsForRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int release_env_id: + :param str publish_context: + :param str group_by: + :param str filter: + :param str orderby: + :param bool should_include_results: + :param bool query_run_summary_for_in_progress: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if group_by is not None: + query_parameters['groupBy'] = self._serialize.query('group_by', group_by, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if should_include_results is not None: + query_parameters['shouldIncludeResults'] = self._serialize.query('should_include_results', should_include_results, 'bool') + if query_run_summary_for_in_progress is not None: + query_parameters['queryRunSummaryForInProgress'] = self._serialize.query('query_run_summary_for_in_progress', query_run_summary_for_in_progress, 'bool') + response = self._send(http_method='GET', + location_id='b834ec7e-35bb-450f-a3c8-802e70ca40dd', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsDetails', response) + + def publish_test_result_document(self, document, project, run_id): + """PublishTestResultDocument. + [Preview API] + :param :class:` ` document: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(document, 'TestResultDocument') + response = self._send(http_method='POST', + location_id='370ca04b-8eec-4ca8-8ba3-d24dca228791', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestResultDocument', response) + + def get_result_groups_by_build(self, project, build_id, publish_context, fields=None): + """GetResultGroupsByBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param [str] fields: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if fields is not None: + fields = ",".join(fields) + query_parameters['fields'] = self._serialize.query('fields', fields, 'str') + response = self._send(http_method='GET', + location_id='d279d052-c55a-4204-b913-42f733b52958', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsGroupsForBuild', response) + + def get_result_groups_by_release(self, project, release_id, publish_context, release_env_id=None, fields=None): + """GetResultGroupsByRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param str publish_context: + :param int release_env_id: + :param [str] fields: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if fields is not None: + fields = ",".join(fields) + query_parameters['fields'] = self._serialize.query('fields', fields, 'str') + response = self._send(http_method='GET', + location_id='ef5ce5d4-a4e5-47ee-804c-354518f8d03f', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultsGroupsForRelease', response) + + def get_result_retention_settings(self, project): + """GetResultRetentionSettings. + [Preview API] + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='a3206d9e-fa8d-42d3-88cb-f75c51e69cde', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ResultRetentionSettings', response) + + def update_result_retention_settings(self, retention_settings, project): + """UpdateResultRetentionSettings. + [Preview API] + :param :class:` ` retention_settings: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(retention_settings, 'ResultRetentionSettings') + response = self._send(http_method='PATCH', + location_id='a3206d9e-fa8d-42d3-88cb-f75c51e69cde', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ResultRetentionSettings', response) + + def add_test_results_to_test_run(self, results, project, run_id): + """AddTestResultsToTestRun. + [Preview API] + :param [TestCaseResult] results: + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(results, '[TestCaseResult]') + response = self._send(http_method='POST', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.1-preview.4', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestCaseResult]', response) + + def get_test_result_by_id(self, project, run_id, test_case_result_id, details_to_include=None): + """GetTestResultById. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :param int test_case_result_id: + :param str details_to_include: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + if test_case_result_id is not None: + route_values['testCaseResultId'] = self._serialize.url('test_case_result_id', test_case_result_id, 'int') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + response = self._send(http_method='GET', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.1-preview.4', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestCaseResult', response) + + def get_test_results(self, project, run_id, details_to_include=None, skip=None, top=None, outcomes=None): + """GetTestResults. + [Preview API] Get Test Results for a run based on filters. + :param str project: Project ID or project name + :param int run_id: Test Run Id for which results need to be fetched. + :param str details_to_include: enum indicates details need to be fetched. + :param int skip: Number of results to skip from beginning. + :param int top: Number of results to return. Max is 1000 when detailsToInclude is None and 100 otherwise. + :param [TestOutcome] outcomes: List of Testoutcome to filter results, comma seperated list of Testoutcome. + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + query_parameters = {} + if details_to_include is not None: + query_parameters['detailsToInclude'] = self._serialize.query('details_to_include', details_to_include, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if outcomes is not None: + outcomes = ",".join(map(str, outcomes)) + query_parameters['outcomes'] = self._serialize.query('outcomes', outcomes, 'str') + response = self._send(http_method='GET', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.1-preview.4', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestCaseResult]', response) + + def update_test_results(self, results, project, run_id): + """UpdateTestResults. + [Preview API] + :param [TestCaseResult] results: + :param str project: Project ID or project name + :param int run_id: + :rtype: [TestCaseResult] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(results, '[TestCaseResult]') + response = self._send(http_method='PATCH', + location_id='4637d869-3a76-4468-8057-0bb02aa385cf', + version='4.1-preview.4', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestCaseResult]', response) + + def get_test_results_by_query(self, query, project): + """GetTestResultsByQuery. + [Preview API] + :param :class:` ` query: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(query, 'TestResultsQuery') + response = self._send(http_method='POST', + location_id='6711da49-8e6f-4d35-9f73-cef7a3c81a5b', + version='4.1-preview.4', + route_values=route_values, + content=content) + return self._deserialize('TestResultsQuery', response) + + def query_test_results_report_for_build(self, project, build_id, publish_context=None, include_failure_details=None, build_to_compare=None): + """QueryTestResultsReportForBuild. + [Preview API] + :param str project: Project ID or project name + :param int build_id: + :param str publish_context: + :param bool include_failure_details: + :param :class:` ` build_to_compare: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_id is not None: + query_parameters['buildId'] = self._serialize.query('build_id', build_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if include_failure_details is not None: + query_parameters['includeFailureDetails'] = self._serialize.query('include_failure_details', include_failure_details, 'bool') + if build_to_compare is not None: + if build_to_compare.id is not None: + query_parameters['buildToCompare.Id'] = build_to_compare.id + if build_to_compare.definition_id is not None: + query_parameters['buildToCompare.DefinitionId'] = build_to_compare.definition_id + if build_to_compare.number is not None: + query_parameters['buildToCompare.Number'] = build_to_compare.number + if build_to_compare.uri is not None: + query_parameters['buildToCompare.Uri'] = build_to_compare.uri + if build_to_compare.build_system is not None: + query_parameters['buildToCompare.BuildSystem'] = build_to_compare.build_system + if build_to_compare.branch_name is not None: + query_parameters['buildToCompare.BranchName'] = build_to_compare.branch_name + if build_to_compare.repository_id is not None: + query_parameters['buildToCompare.RepositoryId'] = build_to_compare.repository_id + response = self._send(http_method='GET', + location_id='000ef77b-fea2-498d-a10d-ad1a037f559f', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultSummary', response) + + def query_test_results_report_for_release(self, project, release_id, release_env_id, publish_context=None, include_failure_details=None, release_to_compare=None): + """QueryTestResultsReportForRelease. + [Preview API] + :param str project: Project ID or project name + :param int release_id: + :param int release_env_id: + :param str publish_context: + :param bool include_failure_details: + :param :class:` ` release_to_compare: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if release_id is not None: + query_parameters['releaseId'] = self._serialize.query('release_id', release_id, 'int') + if release_env_id is not None: + query_parameters['releaseEnvId'] = self._serialize.query('release_env_id', release_env_id, 'int') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if include_failure_details is not None: + query_parameters['includeFailureDetails'] = self._serialize.query('include_failure_details', include_failure_details, 'bool') + if release_to_compare is not None: + if release_to_compare.id is not None: + query_parameters['releaseToCompare.Id'] = release_to_compare.id + if release_to_compare.name is not None: + query_parameters['releaseToCompare.Name'] = release_to_compare.name + if release_to_compare.environment_id is not None: + query_parameters['releaseToCompare.EnvironmentId'] = release_to_compare.environment_id + if release_to_compare.environment_name is not None: + query_parameters['releaseToCompare.EnvironmentName'] = release_to_compare.environment_name + if release_to_compare.definition_id is not None: + query_parameters['releaseToCompare.DefinitionId'] = release_to_compare.definition_id + if release_to_compare.environment_definition_id is not None: + query_parameters['releaseToCompare.EnvironmentDefinitionId'] = release_to_compare.environment_definition_id + if release_to_compare.environment_definition_name is not None: + query_parameters['releaseToCompare.EnvironmentDefinitionName'] = release_to_compare.environment_definition_name + response = self._send(http_method='GET', + location_id='85765790-ac68-494e-b268-af36c3929744', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestResultSummary', response) + + def query_test_results_summary_for_releases(self, releases, project): + """QueryTestResultsSummaryForReleases. + [Preview API] + :param [ReleaseReference] releases: + :param str project: Project ID or project name + :rtype: [TestResultSummary] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(releases, '[ReleaseReference]') + response = self._send(http_method='POST', + location_id='85765790-ac68-494e-b268-af36c3929744', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestResultSummary]', response) + + def query_test_summary_by_requirement(self, results_context, project, work_item_ids=None): + """QueryTestSummaryByRequirement. + [Preview API] + :param :class:` ` results_context: + :param str project: Project ID or project name + :param [int] work_item_ids: + :rtype: [TestSummaryForWorkItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if work_item_ids is not None: + work_item_ids = ",".join(map(str, work_item_ids)) + query_parameters['workItemIds'] = self._serialize.query('work_item_ids', work_item_ids, 'str') + content = self._serialize.body(results_context, 'TestResultsContext') + response = self._send(http_method='POST', + location_id='cd08294e-308d-4460-a46e-4cfdefba0b4b', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[TestSummaryForWorkItem]', response) + + def query_result_trend_for_build(self, filter, project): + """QueryResultTrendForBuild. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: [AggregatedDataForResultTrend] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'TestResultTrendFilter') + response = self._send(http_method='POST', + location_id='fbc82a85-0786-4442-88bb-eb0fda6b01b0', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AggregatedDataForResultTrend]', response) + + def query_result_trend_for_release(self, filter, project): + """QueryResultTrendForRelease. + [Preview API] + :param :class:` ` filter: + :param str project: Project ID or project name + :rtype: [AggregatedDataForResultTrend] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(filter, 'TestResultTrendFilter') + response = self._send(http_method='POST', + location_id='dd178e93-d8dd-4887-9635-d6b9560b7b6e', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[AggregatedDataForResultTrend]', response) + + def get_test_run_statistics(self, project, run_id): + """GetTestRunStatistics. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='0a42c424-d764-4a16-a2d5-5c85f87d0ae8', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('TestRunStatistic', response) + + def create_test_run(self, test_run, project): + """CreateTestRun. + [Preview API] + :param :class:` ` test_run: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_run, 'RunCreateModel') + response = self._send(http_method='POST', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestRun', response) + + def delete_test_run(self, project, run_id): + """DeleteTestRun. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + self._send(http_method='DELETE', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.1-preview.2', + route_values=route_values) + + def get_test_run_by_id(self, project, run_id): + """GetTestRunById. + [Preview API] + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + response = self._send(http_method='GET', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.1-preview.2', + route_values=route_values) + return self._deserialize('TestRun', response) + + def get_test_runs(self, project, build_uri=None, owner=None, tmi_run_id=None, plan_id=None, include_run_details=None, automated=None, skip=None, top=None): + """GetTestRuns. + [Preview API] + :param str project: Project ID or project name + :param str build_uri: + :param str owner: + :param str tmi_run_id: + :param int plan_id: + :param bool include_run_details: + :param bool automated: + :param int skip: + :param int top: + :rtype: [TestRun] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if build_uri is not None: + query_parameters['buildUri'] = self._serialize.query('build_uri', build_uri, 'str') + if owner is not None: + query_parameters['owner'] = self._serialize.query('owner', owner, 'str') + if tmi_run_id is not None: + query_parameters['tmiRunId'] = self._serialize.query('tmi_run_id', tmi_run_id, 'str') + if plan_id is not None: + query_parameters['planId'] = self._serialize.query('plan_id', plan_id, 'int') + if include_run_details is not None: + query_parameters['includeRunDetails'] = self._serialize.query('include_run_details', include_run_details, 'bool') + if automated is not None: + query_parameters['automated'] = self._serialize.query('automated', automated, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestRun]', response) + + def query_test_runs(self, project, min_last_updated_date, max_last_updated_date, state=None, plan_ids=None, is_automated=None, publish_context=None, build_ids=None, build_def_ids=None, branch_name=None, release_ids=None, release_def_ids=None, release_env_ids=None, release_env_def_ids=None, run_title=None, top=None, continuation_token=None): + """QueryTestRuns. + [Preview API] Query Test Runs based on filters. + :param str project: Project ID or project name + :param datetime min_last_updated_date: Minimum Last Modified Date of run to be queried (Mandatory). + :param datetime max_last_updated_date: Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). + :param str state: Current state of the Runs to be queried. + :param [int] plan_ids: Plan Ids of the Runs to be queried, comma seperated list of valid ids. + :param bool is_automated: Automation type of the Runs to be queried. + :param str publish_context: PublishContext of the Runs to be queried. + :param [int] build_ids: Build Ids of the Runs to be queried, comma seperated list of valid ids. + :param [int] build_def_ids: Build Definition Ids of the Runs to be queried, comma seperated list of valid ids. + :param str branch_name: Source Branch name of the Runs to be queried. + :param [int] release_ids: Release Ids of the Runs to be queried, comma seperated list of valid ids. + :param [int] release_def_ids: Release Definition Ids of the Runs to be queried, comma seperated list of valid ids. + :param [int] release_env_ids: Release Environment Ids of the Runs to be queried, comma seperated list of valid ids. + :param [int] release_env_def_ids: Release Environment Definition Ids of the Runs to be queried, comma seperated list of valid ids. + :param str run_title: Run Title of the Runs to be queried. + :param int top: Number of runs to be queried. Limit is 100 + :param str continuation_token: continuationToken received from previous batch or null for first batch. + :rtype: [TestRun] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if min_last_updated_date is not None: + query_parameters['minLastUpdatedDate'] = self._serialize.query('min_last_updated_date', min_last_updated_date, 'iso-8601') + if max_last_updated_date is not None: + query_parameters['maxLastUpdatedDate'] = self._serialize.query('max_last_updated_date', max_last_updated_date, 'iso-8601') + if state is not None: + query_parameters['state'] = self._serialize.query('state', state, 'str') + if plan_ids is not None: + plan_ids = ",".join(map(str, plan_ids)) + query_parameters['planIds'] = self._serialize.query('plan_ids', plan_ids, 'str') + if is_automated is not None: + query_parameters['isAutomated'] = self._serialize.query('is_automated', is_automated, 'bool') + if publish_context is not None: + query_parameters['publishContext'] = self._serialize.query('publish_context', publish_context, 'str') + if build_ids is not None: + build_ids = ",".join(map(str, build_ids)) + query_parameters['buildIds'] = self._serialize.query('build_ids', build_ids, 'str') + if build_def_ids is not None: + build_def_ids = ",".join(map(str, build_def_ids)) + query_parameters['buildDefIds'] = self._serialize.query('build_def_ids', build_def_ids, 'str') + if branch_name is not None: + query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') + if release_ids is not None: + release_ids = ",".join(map(str, release_ids)) + query_parameters['releaseIds'] = self._serialize.query('release_ids', release_ids, 'str') + if release_def_ids is not None: + release_def_ids = ",".join(map(str, release_def_ids)) + query_parameters['releaseDefIds'] = self._serialize.query('release_def_ids', release_def_ids, 'str') + if release_env_ids is not None: + release_env_ids = ",".join(map(str, release_env_ids)) + query_parameters['releaseEnvIds'] = self._serialize.query('release_env_ids', release_env_ids, 'str') + if release_env_def_ids is not None: + release_env_def_ids = ",".join(map(str, release_env_def_ids)) + query_parameters['releaseEnvDefIds'] = self._serialize.query('release_env_def_ids', release_env_def_ids, 'str') + if run_title is not None: + query_parameters['runTitle'] = self._serialize.query('run_title', run_title, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if continuation_token is not None: + query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') + response = self._send(http_method='GET', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestRun]', response) + + def update_test_run(self, run_update_model, project, run_id): + """UpdateTestRun. + [Preview API] + :param :class:` ` run_update_model: + :param str project: Project ID or project name + :param int run_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if run_id is not None: + route_values['runId'] = self._serialize.url('run_id', run_id, 'int') + content = self._serialize.body(run_update_model, 'RunUpdateModel') + response = self._send(http_method='PATCH', + location_id='cadb3810-d47d-4a3c-a234-fe5f3be50138', + version='4.1-preview.2', + route_values=route_values, + content=content) + return self._deserialize('TestRun', response) + + def create_test_session(self, test_session, team_context): + """CreateTestSession. + [Preview API] + :param :class:` ` test_session: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(test_session, 'TestSession') + response = self._send(http_method='POST', + location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestSession', response) + + def get_test_sessions(self, team_context, period=None, all_sessions=None, include_all_properties=None, source=None, include_only_completed_sessions=None): + """GetTestSessions. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :param int period: + :param bool all_sessions: + :param bool include_all_properties: + :param str source: + :param bool include_only_completed_sessions: + :rtype: [TestSession] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + query_parameters = {} + if period is not None: + query_parameters['period'] = self._serialize.query('period', period, 'int') + if all_sessions is not None: + query_parameters['allSessions'] = self._serialize.query('all_sessions', all_sessions, 'bool') + if include_all_properties is not None: + query_parameters['includeAllProperties'] = self._serialize.query('include_all_properties', include_all_properties, 'bool') + if source is not None: + query_parameters['source'] = self._serialize.query('source', source, 'str') + if include_only_completed_sessions is not None: + query_parameters['includeOnlyCompletedSessions'] = self._serialize.query('include_only_completed_sessions', include_only_completed_sessions, 'bool') + response = self._send(http_method='GET', + location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestSession]', response) + + def update_test_session(self, test_session, team_context): + """UpdateTestSession. + [Preview API] + :param :class:` ` test_session: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(test_session, 'TestSession') + response = self._send(http_method='PATCH', + location_id='1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestSession', response) + + def delete_shared_parameter(self, project, shared_parameter_id): + """DeleteSharedParameter. + [Preview API] + :param str project: Project ID or project name + :param int shared_parameter_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if shared_parameter_id is not None: + route_values['sharedParameterId'] = self._serialize.url('shared_parameter_id', shared_parameter_id, 'int') + self._send(http_method='DELETE', + location_id='8300eeca-0f8c-4eff-a089-d2dda409c41f', + version='4.1-preview.1', + route_values=route_values) + + def delete_shared_step(self, project, shared_step_id): + """DeleteSharedStep. + [Preview API] + :param str project: Project ID or project name + :param int shared_step_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if shared_step_id is not None: + route_values['sharedStepId'] = self._serialize.url('shared_step_id', shared_step_id, 'int') + self._send(http_method='DELETE', + location_id='fabb3cc9-e3f8-40b7-8b62-24cc4b73fccf', + version='4.1-preview.1', + route_values=route_values) + + def get_suite_entries(self, project, suite_id): + """GetSuiteEntries. + [Preview API] + :param str project: Project ID or project name + :param int suite_id: + :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') + response = self._send(http_method='GET', + location_id='bf8b7f78-0c1f-49cb-89e9-d1a17bcaaad3', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SuiteEntry]', response) + + def reorder_suite_entries(self, suite_entries, project, suite_id): + """ReorderSuiteEntries. + [Preview API] + :param [SuiteEntryUpdateModel] suite_entries: + :param str project: Project ID or project name + :param int suite_id: + :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, '[SuiteEntryUpdateModel]') + response = self._send(http_method='PATCH', + location_id='bf8b7f78-0c1f-49cb-89e9-d1a17bcaaad3', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[SuiteEntry]', response) + + def add_test_cases_to_suite(self, project, plan_id, suite_id, test_case_ids): + """AddTestCasesToSuite. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param str test_case_ids: + :rtype: [SuiteTestCase] + """ + 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') + response = self._send(http_method='POST', + location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.1-preview.3', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SuiteTestCase]', response) + + def get_test_case_by_id(self, project, plan_id, suite_id, test_case_ids): + """GetTestCaseById. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param int test_case_ids: + :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') + if test_case_ids is not None: + route_values['testCaseIds'] = self._serialize.url('test_case_ids', test_case_ids, 'int') + response = self._send(http_method='GET', + location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.1-preview.3', + route_values=route_values) + return self._deserialize('SuiteTestCase', response) + + def get_test_cases(self, project, plan_id, suite_id): + """GetTestCases. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: [SuiteTestCase] + """ + 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') + response = self._send(http_method='GET', + location_id='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.1-preview.3', + route_values=route_values, + returns_collection=True) + return self._deserialize('[SuiteTestCase]', response) + + def remove_test_cases_from_suite_url(self, project, plan_id, suite_id, test_case_ids): + """RemoveTestCasesFromSuiteUrl. + [Preview API] + :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='a4a1ec1c-b03f-41ca-8857-704594ecf58e', + version='4.1-preview.3', + route_values=route_values) + + def create_test_suite(self, test_suite, project, plan_id, suite_id): + """CreateTestSuite. + [Preview API] + :param :class:` ` test_suite: + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: [TestSuite] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(test_suite, 'SuiteCreateModel') + response = self._send(http_method='POST', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.1-preview.3', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TestSuite]', response) + + def delete_test_suite(self, project, plan_id, suite_id): + """DeleteTestSuite. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + self._send(http_method='DELETE', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.1-preview.3', + route_values=route_values) + + def get_test_suite_by_id(self, project, plan_id, suite_id, expand=None): + """GetTestSuiteById. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :param int expand: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'int') + response = self._send(http_method='GET', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestSuite', response) + + def get_test_suites_for_plan(self, project, plan_id, expand=None, skip=None, top=None, as_tree_view=None): + """GetTestSuitesForPlan. + [Preview API] + :param str project: Project ID or project name + :param int plan_id: + :param int expand: + :param int skip: + :param int top: + :param bool as_tree_view: + :rtype: [TestSuite] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if as_tree_view is not None: + query_parameters['$asTreeView'] = self._serialize.query('as_tree_view', as_tree_view, 'bool') + response = self._send(http_method='GET', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestSuite]', response) + + def update_test_suite(self, suite_update_model, project, plan_id, suite_id): + """UpdateTestSuite. + [Preview API] + :param :class:` ` suite_update_model: + :param str project: Project ID or project name + :param int plan_id: + :param int suite_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if plan_id is not None: + route_values['planId'] = self._serialize.url('plan_id', plan_id, 'int') + if suite_id is not None: + route_values['suiteId'] = self._serialize.url('suite_id', suite_id, 'int') + content = self._serialize.body(suite_update_model, 'SuiteUpdateModel') + response = self._send(http_method='PATCH', + location_id='7b7619a0-cb54-4ab3-bf22-194056f45dd1', + version='4.1-preview.3', + 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] + :param int test_case_id: + :rtype: [TestSuite] + """ + query_parameters = {} + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') + response = self._send(http_method='GET', + location_id='09a6167b-e969-4775-9247-b94cf3819caf', + version='4.1-preview.3', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestSuite]', response) + + def delete_test_case(self, project, test_case_id): + """DeleteTestCase. + [Preview API] + :param str project: Project ID or project name + :param int test_case_id: + """ + 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='4d472e0f-e32c-4ef8-adf4-a4078772889c', + version='4.1-preview.1', + route_values=route_values) + + def create_test_settings(self, test_settings, project): + """CreateTestSettings. + [Preview API] + :param :class:` ` test_settings: + :param str project: Project ID or project name + :rtype: int + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(test_settings, 'TestSettings') + response = self._send(http_method='POST', + location_id='8133ce14-962f-42af-a5f9-6aa9defcb9c8', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('int', response) + + def delete_test_settings(self, project, test_settings_id): + """DeleteTestSettings. + [Preview API] + :param str project: Project ID or project name + :param int test_settings_id: + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_settings_id is not None: + route_values['testSettingsId'] = self._serialize.url('test_settings_id', test_settings_id, 'int') + self._send(http_method='DELETE', + location_id='8133ce14-962f-42af-a5f9-6aa9defcb9c8', + version='4.1-preview.1', + route_values=route_values) + + def get_test_settings_by_id(self, project, test_settings_id): + """GetTestSettingsById. + [Preview API] + :param str project: Project ID or project name + :param int test_settings_id: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if test_settings_id is not None: + route_values['testSettingsId'] = self._serialize.url('test_settings_id', test_settings_id, 'int') + response = self._send(http_method='GET', + location_id='8133ce14-962f-42af-a5f9-6aa9defcb9c8', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TestSettings', response) + + def create_test_variable(self, test_variable, project): + """CreateTestVariable. + [Preview API] + :param :class:` ` test_variable: + :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, 'TestVariable') + response = self._send(http_method='POST', + location_id='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.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] + :param str project: Project ID or project name + :param int test_variable_id: + """ + 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='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.1-preview.1', + route_values=route_values) + + def get_test_variable_by_id(self, project, test_variable_id): + """GetTestVariableById. + [Preview API] + :param str project: Project ID or project name + :param int test_variable_id: + :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='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TestVariable', response) + + def get_test_variables(self, project, skip=None, top=None): + """GetTestVariables. + [Preview API] + :param str project: Project ID or project name + :param int skip: + :param int top: + :rtype: [TestVariable] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestVariable]', response) + + def update_test_variable(self, test_variable, project, test_variable_id): + """UpdateTestVariable. + [Preview API] + :param :class:` ` test_variable: + :param str project: Project ID or project name + :param int test_variable_id: + :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, 'TestVariable') + response = self._send(http_method='PATCH', + location_id='be3fcb2b-995b-47bf-90e5-ca3cf9980912', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TestVariable', response) + + def add_work_item_to_test_links(self, work_item_to_test_links, project): + """AddWorkItemToTestLinks. + [Preview API] + :param :class:` ` work_item_to_test_links: + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(work_item_to_test_links, 'WorkItemToTestLinks') + response = self._send(http_method='POST', + location_id='371b1655-ce05-412e-a113-64cc77bb78d2', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemToTestLinks', response) + + def delete_test_method_to_work_item_link(self, project, test_name, work_item_id): + """DeleteTestMethodToWorkItemLink. + [Preview API] + :param str project: Project ID or project name + :param str test_name: + :param int work_item_id: + :rtype: bool + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_name is not None: + query_parameters['testName'] = self._serialize.query('test_name', test_name, 'str') + if work_item_id is not None: + query_parameters['workItemId'] = self._serialize.query('work_item_id', work_item_id, 'int') + response = self._send(http_method='DELETE', + location_id='7b0bdee3-a354-47f9-a42c-89018d7808d5', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('bool', response) + + def query_test_method_linked_work_items(self, project, test_name): + """QueryTestMethodLinkedWorkItems. + [Preview API] + :param str project: Project ID or project name + :param str test_name: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if test_name is not None: + query_parameters['testName'] = self._serialize.query('test_name', test_name, 'str') + response = self._send(http_method='POST', + location_id='7b0bdee3-a354-47f9-a42c-89018d7808d5', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TestToWorkItemLinks', response) + + def query_test_result_work_items(self, project, work_item_category, automated_test_name=None, test_case_id=None, max_complete_date=None, days=None, work_item_count=None): + """QueryTestResultWorkItems. + [Preview API] + :param str project: Project ID or project name + :param str work_item_category: + :param str automated_test_name: + :param int test_case_id: + :param datetime max_complete_date: + :param int days: + :param int work_item_count: + :rtype: [WorkItemReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if work_item_category is not None: + query_parameters['workItemCategory'] = self._serialize.query('work_item_category', work_item_category, 'str') + if automated_test_name is not None: + query_parameters['automatedTestName'] = self._serialize.query('automated_test_name', automated_test_name, 'str') + if test_case_id is not None: + query_parameters['testCaseId'] = self._serialize.query('test_case_id', test_case_id, 'int') + if max_complete_date is not None: + query_parameters['maxCompleteDate'] = self._serialize.query('max_complete_date', max_complete_date, 'iso-8601') + if days is not None: + query_parameters['days'] = self._serialize.query('days', days, 'int') + if work_item_count is not None: + query_parameters['$workItemCount'] = self._serialize.query('work_item_count', work_item_count, 'int') + response = self._send(http_method='GET', + location_id='926ff5dc-137f-45f0-bd51-9412fa9810ce', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemReference]', response) + diff --git a/vsts/vsts/tfvc/__init__.py b/vsts/vsts/tfvc/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/tfvc/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/tfvc/v4_0/__init__.py b/vsts/vsts/tfvc/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/tfvc/v4_0/models/__init__.py b/vsts/vsts/tfvc/v4_0/models/__init__.py new file mode 100644 index 00000000..d49eca21 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/__init__.py @@ -0,0 +1,83 @@ +# -------------------------------------------------------------------------------------------- +# 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 .associated_work_item import AssociatedWorkItem +from .change import Change +from .checkin_note import CheckinNote +from .file_content_metadata import FileContentMetadata +from .git_repository import GitRepository +from .git_repository_ref import GitRepositoryRef +from .identity_ref import IdentityRef +from .item_content import ItemContent +from .item_model import ItemModel +from .reference_links import ReferenceLinks +from .team_project_collection_reference import TeamProjectCollectionReference +from .team_project_reference import TeamProjectReference +from .tfvc_branch import TfvcBranch +from .tfvc_branch_mapping import TfvcBranchMapping +from .tfvc_branch_ref import TfvcBranchRef +from .tfvc_change import TfvcChange +from .tfvc_changeset import TfvcChangeset +from .tfvc_changeset_ref import TfvcChangesetRef +from .tfvc_changeset_search_criteria import TfvcChangesetSearchCriteria +from .tfvc_changesets_request_data import TfvcChangesetsRequestData +from .tfvc_item import TfvcItem +from .tfvc_item_descriptor import TfvcItemDescriptor +from .tfvc_item_request_data import TfvcItemRequestData +from .tfvc_label import TfvcLabel +from .tfvc_label_ref import TfvcLabelRef +from .tfvc_label_request_data import TfvcLabelRequestData +from .tfvc_merge_source import TfvcMergeSource +from .tfvc_policy_failure_info import TfvcPolicyFailureInfo +from .tfvc_policy_override_info import TfvcPolicyOverrideInfo +from .tfvc_shallow_branch_ref import TfvcShallowBranchRef +from .tfvc_shelveset import TfvcShelveset +from .tfvc_shelveset_ref import TfvcShelvesetRef +from .tfvc_shelveset_request_data import TfvcShelvesetRequestData +from .tfvc_version_descriptor import TfvcVersionDescriptor +from .version_control_project_info import VersionControlProjectInfo +from .vsts_info import VstsInfo + +__all__ = [ + 'AssociatedWorkItem', + 'Change', + 'CheckinNote', + 'FileContentMetadata', + 'GitRepository', + 'GitRepositoryRef', + 'IdentityRef', + 'ItemContent', + 'ItemModel', + 'ReferenceLinks', + 'TeamProjectCollectionReference', + 'TeamProjectReference', + 'TfvcBranch', + 'TfvcBranchMapping', + 'TfvcBranchRef', + 'TfvcChange', + 'TfvcChangeset', + 'TfvcChangesetRef', + 'TfvcChangesetSearchCriteria', + 'TfvcChangesetsRequestData', + 'TfvcItem', + 'TfvcItemDescriptor', + 'TfvcItemRequestData', + 'TfvcLabel', + 'TfvcLabelRef', + 'TfvcLabelRequestData', + 'TfvcMergeSource', + 'TfvcPolicyFailureInfo', + 'TfvcPolicyOverrideInfo', + 'TfvcShallowBranchRef', + 'TfvcShelveset', + 'TfvcShelvesetRef', + 'TfvcShelvesetRequestData', + 'TfvcVersionDescriptor', + 'VersionControlProjectInfo', + 'VstsInfo', +] diff --git a/vsts/vsts/tfvc/v4_0/models/associated_work_item.py b/vsts/vsts/tfvc/v4_0/models/associated_work_item.py new file mode 100644 index 00000000..c34ac428 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/associated_work_item.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 AssociatedWorkItem(Model): + """AssociatedWorkItem. + + :param assigned_to: + :type assigned_to: str + :param id: + :type id: int + :param state: + :type state: str + :param title: + :type title: str + :param url: REST url + :type url: str + :param web_url: + :type web_url: str + :param work_item_type: + :type work_item_type: str + """ + + _attribute_map = { + 'assigned_to': {'key': 'assignedTo', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'str'}, + 'title': {'key': 'title', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'web_url': {'key': 'webUrl', 'type': 'str'}, + 'work_item_type': {'key': 'workItemType', 'type': 'str'} + } + + def __init__(self, assigned_to=None, id=None, state=None, title=None, url=None, web_url=None, work_item_type=None): + super(AssociatedWorkItem, self).__init__() + self.assigned_to = assigned_to + self.id = id + self.state = state + self.title = title + self.url = url + self.web_url = web_url + self.work_item_type = work_item_type diff --git a/vsts/vsts/tfvc/v4_0/models/change.py b/vsts/vsts/tfvc/v4_0/models/change.py new file mode 100644 index 00000000..08955451 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/change.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Change(Model): + """Change. + + :param change_type: + :type change_type: object + :param item: + :type item: object + :param new_content: + :type new_content: :class:`ItemContent ` + :param source_server_item: + :type source_server_item: str + :param url: + :type url: str + """ + + _attribute_map = { + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'item': {'key': 'item', 'type': 'object'}, + 'new_content': {'key': 'newContent', 'type': 'ItemContent'}, + 'source_server_item': {'key': 'sourceServerItem', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, change_type=None, item=None, new_content=None, source_server_item=None, url=None): + super(Change, self).__init__() + self.change_type = change_type + self.item = item + self.new_content = new_content + self.source_server_item = source_server_item + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/checkin_note.py b/vsts/vsts/tfvc/v4_0/models/checkin_note.py new file mode 100644 index 00000000..d92f9bae --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/checkin_note.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CheckinNote(Model): + """CheckinNote. + + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(CheckinNote, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/tfvc/v4_0/models/file_content_metadata.py b/vsts/vsts/tfvc/v4_0/models/file_content_metadata.py new file mode 100644 index 00000000..d2d6667d --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/file_content_metadata.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 FileContentMetadata(Model): + """FileContentMetadata. + + :param content_type: + :type content_type: str + :param encoding: + :type encoding: int + :param extension: + :type extension: str + :param file_name: + :type file_name: str + :param is_binary: + :type is_binary: bool + :param is_image: + :type is_image: bool + :param vs_link: + :type vs_link: str + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'encoding': {'key': 'encoding', 'type': 'int'}, + 'extension': {'key': 'extension', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'is_binary': {'key': 'isBinary', 'type': 'bool'}, + 'is_image': {'key': 'isImage', 'type': 'bool'}, + 'vs_link': {'key': 'vsLink', 'type': 'str'} + } + + def __init__(self, content_type=None, encoding=None, extension=None, file_name=None, is_binary=None, is_image=None, vs_link=None): + super(FileContentMetadata, self).__init__() + self.content_type = content_type + self.encoding = encoding + self.extension = extension + self.file_name = file_name + self.is_binary = is_binary + self.is_image = is_image + self.vs_link = vs_link diff --git a/vsts/vsts/tfvc/v4_0/models/git_repository.py b/vsts/vsts/tfvc/v4_0/models/git_repository.py new file mode 100644 index 00000000..261c6cfd --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/git_repository.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 GitRepository(Model): + """GitRepository. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param default_branch: + :type default_branch: str + :param id: + :type id: str + :param is_fork: True if the repository was created as a fork + :type is_fork: bool + :param name: + :type name: str + :param parent_repository: + :type parent_repository: :class:`GitRepositoryRef ` + :param project: + :type project: :class:`TeamProjectReference ` + :param remote_url: + :type remote_url: str + :param url: + :type url: str + :param valid_remote_urls: + :type valid_remote_urls: list of str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'default_branch': {'key': 'defaultBranch', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_fork': {'key': 'isFork', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'valid_remote_urls': {'key': 'validRemoteUrls', '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, url=None, valid_remote_urls=None): + super(GitRepository, self).__init__() + self._links = _links + self.default_branch = default_branch + self.id = id + self.is_fork = is_fork + self.name = name + self.parent_repository = parent_repository + self.project = project + self.remote_url = remote_url + self.url = url + self.valid_remote_urls = valid_remote_urls diff --git a/vsts/vsts/tfvc/v4_0/models/git_repository_ref.py b/vsts/vsts/tfvc/v4_0/models/git_repository_ref.py new file mode 100644 index 00000000..6aa28bf9 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/git_repository_ref.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 GitRepositoryRef(Model): + """GitRepositoryRef. + + :param collection: Team Project Collection where this Fork resides + :type collection: :class:`TeamProjectCollectionReference ` + :param id: + :type id: str + :param name: + :type name: str + :param project: + :type project: :class:`TeamProjectReference ` + :param remote_url: + :type remote_url: str + :param url: + :type url: str + """ + + _attribute_map = { + 'collection': {'key': 'collection', 'type': 'TeamProjectCollectionReference'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, collection=None, id=None, name=None, project=None, remote_url=None, url=None): + super(GitRepositoryRef, self).__init__() + self.collection = collection + self.id = id + self.name = name + self.project = project + self.remote_url = remote_url + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/identity_ref.py b/vsts/vsts/tfvc/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/item_content.py b/vsts/vsts/tfvc/v4_0/models/item_content.py new file mode 100644 index 00000000..f5cfaef1 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/item_content.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ItemContent(Model): + """ItemContent. + + :param content: + :type content: str + :param content_type: + :type content_type: object + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'object'} + } + + def __init__(self, content=None, content_type=None): + super(ItemContent, self).__init__() + self.content = content + self.content_type = content_type diff --git a/vsts/vsts/tfvc/v4_0/models/item_model.py b/vsts/vsts/tfvc/v4_0/models/item_model.py new file mode 100644 index 00000000..162cef06 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/item_model.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ItemModel(Model): + """ItemModel. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param content_metadata: + :type content_metadata: :class:`FileContentMetadata ` + :param is_folder: + :type is_folder: bool + :param is_sym_link: + :type is_sym_link: bool + :param path: + :type path: str + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'}, + 'is_folder': {'key': 'isFolder', 'type': 'bool'}, + 'is_sym_link': {'key': 'isSymLink', 'type': 'bool'}, + 'path': {'key': 'path', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None): + super(ItemModel, self).__init__() + self._links = _links + self.content_metadata = content_metadata + self.is_folder = is_folder + self.is_sym_link = is_sym_link + self.path = path + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/reference_links.py b/vsts/vsts/tfvc/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/tfvc/v4_0/models/team_project_collection_reference.py b/vsts/vsts/tfvc/v4_0/models/team_project_collection_reference.py new file mode 100644 index 00000000..6f4a596a --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/team_project_collection_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamProjectCollectionReference(Model): + """TeamProjectCollectionReference. + + :param id: Collection Id. + :type id: str + :param name: Collection Name. + :type name: str + :param url: Collection REST Url. + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, name=None, url=None): + super(TeamProjectCollectionReference, self).__init__() + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/team_project_reference.py b/vsts/vsts/tfvc/v4_0/models/team_project_reference.py new file mode 100644 index 00000000..fa79d465 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/team_project_reference.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamProjectReference(Model): + """TeamProjectReference. + + :param abbreviation: Project abbreviation. + :type abbreviation: str + :param description: The project's description (if any). + :type description: str + :param id: Project identifier. + :type id: str + :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'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + '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, description=None, id=None, name=None, revision=None, state=None, url=None, visibility=None): + super(TeamProjectReference, self).__init__() + self.abbreviation = abbreviation + self.description = description + self.id = id + self.name = name + self.revision = revision + self.state = state + self.url = url + self.visibility = visibility diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_branch.py b/vsts/vsts/tfvc/v4_0/models/tfvc_branch.py new file mode 100644 index 00000000..5c697345 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_branch.py @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_branch_ref import TfvcBranchRef + + +class TfvcBranch(TfvcBranchRef): + """TfvcBranch. + + :param path: + :type path: str + :param _links: + :type _links: :class:`ReferenceLinks ` + :param created_date: + :type created_date: datetime + :param description: + :type description: str + :param is_deleted: + :type is_deleted: bool + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + :param children: + :type children: list of :class:`TfvcBranch ` + :param mappings: + :type mappings: list of :class:`TfvcBranchMapping ` + :param parent: + :type parent: :class:`TfvcShallowBranchRef ` + :param related_branches: + :type related_branches: list of :class:`TfvcShallowBranchRef ` + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[TfvcBranch]'}, + 'mappings': {'key': 'mappings', 'type': '[TfvcBranchMapping]'}, + 'parent': {'key': 'parent', 'type': 'TfvcShallowBranchRef'}, + 'related_branches': {'key': 'relatedBranches', 'type': '[TfvcShallowBranchRef]'} + } + + def __init__(self, path=None, _links=None, created_date=None, description=None, is_deleted=None, owner=None, url=None, children=None, mappings=None, parent=None, related_branches=None): + super(TfvcBranch, self).__init__(path=path, _links=_links, created_date=created_date, description=description, is_deleted=is_deleted, owner=owner, url=url) + self.children = children + self.mappings = mappings + self.parent = parent + self.related_branches = related_branches diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_branch_mapping.py b/vsts/vsts/tfvc/v4_0/models/tfvc_branch_mapping.py new file mode 100644 index 00000000..b6972b37 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_branch_mapping.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcBranchMapping(Model): + """TfvcBranchMapping. + + :param depth: + :type depth: str + :param server_item: + :type server_item: str + :param type: + :type type: str + """ + + _attribute_map = { + 'depth': {'key': 'depth', 'type': 'str'}, + 'server_item': {'key': 'serverItem', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, depth=None, server_item=None, type=None): + super(TfvcBranchMapping, self).__init__() + self.depth = depth + self.server_item = server_item + self.type = type diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_branch_ref.py b/vsts/vsts/tfvc/v4_0/models/tfvc_branch_ref.py new file mode 100644 index 00000000..a7aeccec --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_branch_ref.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_shallow_branch_ref import TfvcShallowBranchRef + + +class TfvcBranchRef(TfvcShallowBranchRef): + """TfvcBranchRef. + + :param path: + :type path: str + :param _links: + :type _links: :class:`ReferenceLinks ` + :param created_date: + :type created_date: datetime + :param description: + :type description: str + :param is_deleted: + :type is_deleted: bool + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, path=None, _links=None, created_date=None, description=None, is_deleted=None, owner=None, url=None): + super(TfvcBranchRef, self).__init__(path=path) + self._links = _links + self.created_date = created_date + self.description = description + self.is_deleted = is_deleted + self.owner = owner + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_change.py b/vsts/vsts/tfvc/v4_0/models/tfvc_change.py new file mode 100644 index 00000000..ecb43a6d --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_change.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 .change import Change + + +class TfvcChange(Change): + """TfvcChange. + + :param merge_sources: List of merge sources in case of rename or branch creation. + :type merge_sources: list of :class:`TfvcMergeSource ` + :param pending_version: Version at which a (shelved) change was pended against + :type pending_version: int + """ + + _attribute_map = { + 'merge_sources': {'key': 'mergeSources', 'type': '[TfvcMergeSource]'}, + 'pending_version': {'key': 'pendingVersion', 'type': 'int'} + } + + def __init__(self, merge_sources=None, pending_version=None): + super(TfvcChange, self).__init__() + self.merge_sources = merge_sources + self.pending_version = pending_version diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_changeset.py b/vsts/vsts/tfvc/v4_0/models/tfvc_changeset.py new file mode 100644 index 00000000..f06bc078 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_changeset.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_changeset_ref import TfvcChangesetRef + + +class TfvcChangeset(TfvcChangesetRef): + """TfvcChangeset. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param author: + :type author: :class:`IdentityRef ` + :param changeset_id: + :type changeset_id: int + :param checked_in_by: + :type checked_in_by: :class:`IdentityRef ` + :param comment: + :type comment: str + :param comment_truncated: + :type comment_truncated: bool + :param created_date: + :type created_date: datetime + :param url: + :type url: str + :param account_id: + :type account_id: str + :param changes: + :type changes: list of :class:`TfvcChange ` + :param checkin_notes: + :type checkin_notes: list of :class:`CheckinNote ` + :param collection_id: + :type collection_id: str + :param has_more_changes: + :type has_more_changes: bool + :param policy_override: + :type policy_override: :class:`TfvcPolicyOverrideInfo ` + :param team_project_ids: + :type team_project_ids: list of str + :param work_items: + :type work_items: list of :class:`AssociatedWorkItem ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'changeset_id': {'key': 'changesetId', 'type': 'int'}, + 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'changes': {'key': 'changes', 'type': '[TfvcChange]'}, + 'checkin_notes': {'key': 'checkinNotes', 'type': '[CheckinNote]'}, + 'collection_id': {'key': 'collectionId', 'type': 'str'}, + 'has_more_changes': {'key': 'hasMoreChanges', 'type': 'bool'}, + 'policy_override': {'key': 'policyOverride', 'type': 'TfvcPolicyOverrideInfo'}, + 'team_project_ids': {'key': 'teamProjectIds', 'type': '[str]'}, + 'work_items': {'key': 'workItems', 'type': '[AssociatedWorkItem]'} + } + + def __init__(self, _links=None, author=None, changeset_id=None, checked_in_by=None, comment=None, comment_truncated=None, created_date=None, url=None, account_id=None, changes=None, checkin_notes=None, collection_id=None, has_more_changes=None, policy_override=None, team_project_ids=None, work_items=None): + super(TfvcChangeset, self).__init__(_links=_links, author=author, changeset_id=changeset_id, checked_in_by=checked_in_by, comment=comment, comment_truncated=comment_truncated, created_date=created_date, url=url) + self.account_id = account_id + self.changes = changes + self.checkin_notes = checkin_notes + self.collection_id = collection_id + self.has_more_changes = has_more_changes + self.policy_override = policy_override + self.team_project_ids = team_project_ids + self.work_items = work_items diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_changeset_ref.py b/vsts/vsts/tfvc/v4_0/models/tfvc_changeset_ref.py new file mode 100644 index 00000000..4bfb9e4b --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_changeset_ref.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcChangesetRef(Model): + """TfvcChangesetRef. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param author: + :type author: :class:`IdentityRef ` + :param changeset_id: + :type changeset_id: int + :param checked_in_by: + :type checked_in_by: :class:`IdentityRef ` + :param comment: + :type comment: str + :param comment_truncated: + :type comment_truncated: bool + :param created_date: + :type created_date: datetime + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'changeset_id': {'key': 'changesetId', 'type': 'int'}, + 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, author=None, changeset_id=None, checked_in_by=None, comment=None, comment_truncated=None, created_date=None, url=None): + super(TfvcChangesetRef, self).__init__() + self._links = _links + self.author = author + self.changeset_id = changeset_id + self.checked_in_by = checked_in_by + self.comment = comment + self.comment_truncated = comment_truncated + self.created_date = created_date + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_changeset_search_criteria.py b/vsts/vsts/tfvc/v4_0/models/tfvc_changeset_search_criteria.py new file mode 100644 index 00000000..41d556ef --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_changeset_search_criteria.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcChangesetSearchCriteria(Model): + """TfvcChangesetSearchCriteria. + + :param author: Alias or display name of user who made the changes + :type author: str + :param follow_renames: Whether or not to follow renames for the given item being queried + :type follow_renames: bool + :param from_date: If provided, only include changesets created after this date (string) Think of a better name for this. + :type from_date: str + :param from_id: If provided, only include changesets after this changesetID + :type from_id: int + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + :param item_path: Path of item to search under + :type item_path: str + :param to_date: If provided, only include changesets created before this date (string) Think of a better name for this. + :type to_date: str + :param to_id: If provided, a version descriptor for the latest change list to include + :type to_id: int + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'str'}, + 'follow_renames': {'key': 'followRenames', 'type': 'bool'}, + 'from_date': {'key': 'fromDate', 'type': 'str'}, + 'from_id': {'key': 'fromId', 'type': 'int'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'item_path': {'key': 'itemPath', 'type': 'str'}, + 'to_date': {'key': 'toDate', 'type': 'str'}, + 'to_id': {'key': 'toId', 'type': 'int'} + } + + def __init__(self, author=None, follow_renames=None, from_date=None, from_id=None, include_links=None, item_path=None, to_date=None, to_id=None): + super(TfvcChangesetSearchCriteria, self).__init__() + self.author = author + self.follow_renames = follow_renames + self.from_date = from_date + self.from_id = from_id + self.include_links = include_links + self.item_path = item_path + self.to_date = to_date + self.to_id = to_id diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_changesets_request_data.py b/vsts/vsts/tfvc/v4_0/models/tfvc_changesets_request_data.py new file mode 100644 index 00000000..de3973ec --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_changesets_request_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcChangesetsRequestData(Model): + """TfvcChangesetsRequestData. + + :param changeset_ids: + :type changeset_ids: list of int + :param comment_length: + :type comment_length: int + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + """ + + _attribute_map = { + 'changeset_ids': {'key': 'changesetIds', 'type': '[int]'}, + 'comment_length': {'key': 'commentLength', 'type': 'int'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'} + } + + def __init__(self, changeset_ids=None, comment_length=None, include_links=None): + super(TfvcChangesetsRequestData, self).__init__() + self.changeset_ids = changeset_ids + self.comment_length = comment_length + self.include_links = include_links diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_item.py b/vsts/vsts/tfvc/v4_0/models/tfvc_item.py new file mode 100644 index 00000000..1d56665a --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_item.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 .item_model import ItemModel + + +class TfvcItem(ItemModel): + """TfvcItem. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param content_metadata: + :type content_metadata: :class:`FileContentMetadata ` + :param is_folder: + :type is_folder: bool + :param is_sym_link: + :type is_sym_link: bool + :param path: + :type path: str + :param url: + :type url: str + :param change_date: + :type change_date: datetime + :param deletion_id: + :type deletion_id: int + :param hash_value: MD5 hash as a base 64 string, applies to files only. + :type hash_value: str + :param is_branch: + :type is_branch: bool + :param is_pending_change: + :type is_pending_change: bool + :param size: The size of the file, if applicable. + :type size: long + :param version: + :type version: int + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'}, + 'is_folder': {'key': 'isFolder', 'type': 'bool'}, + 'is_sym_link': {'key': 'isSymLink', 'type': 'bool'}, + 'path': {'key': 'path', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'change_date': {'key': 'changeDate', 'type': 'iso-8601'}, + 'deletion_id': {'key': 'deletionId', 'type': 'int'}, + 'hash_value': {'key': 'hashValue', 'type': 'str'}, + 'is_branch': {'key': 'isBranch', 'type': 'bool'}, + 'is_pending_change': {'key': 'isPendingChange', 'type': 'bool'}, + 'size': {'key': 'size', 'type': 'long'}, + 'version': {'key': 'version', 'type': 'int'} + } + + def __init__(self, _links=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None, change_date=None, deletion_id=None, hash_value=None, is_branch=None, is_pending_change=None, size=None, version=None): + super(TfvcItem, self).__init__(_links=_links, content_metadata=content_metadata, is_folder=is_folder, is_sym_link=is_sym_link, path=path, url=url) + self.change_date = change_date + self.deletion_id = deletion_id + self.hash_value = hash_value + self.is_branch = is_branch + self.is_pending_change = is_pending_change + self.size = size + self.version = version diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_item_descriptor.py b/vsts/vsts/tfvc/v4_0/models/tfvc_item_descriptor.py new file mode 100644 index 00000000..47a3306c --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_item_descriptor.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcItemDescriptor(Model): + """TfvcItemDescriptor. + + :param path: + :type path: str + :param recursion_level: + :type recursion_level: object + :param version: + :type version: str + :param version_option: + :type version_option: object + :param version_type: + :type version_type: object + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'recursion_level': {'key': 'recursionLevel', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'str'}, + 'version_option': {'key': 'versionOption', 'type': 'object'}, + 'version_type': {'key': 'versionType', 'type': 'object'} + } + + def __init__(self, path=None, recursion_level=None, version=None, version_option=None, version_type=None): + super(TfvcItemDescriptor, self).__init__() + self.path = path + self.recursion_level = recursion_level + self.version = version + self.version_option = version_option + self.version_type = version_type diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_item_request_data.py b/vsts/vsts/tfvc/v4_0/models/tfvc_item_request_data.py new file mode 100644 index 00000000..da451a19 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_item_request_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcItemRequestData(Model): + """TfvcItemRequestData. + + :param include_content_metadata: If true, include metadata about the file type + :type include_content_metadata: bool + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + :param item_descriptors: + :type item_descriptors: list of :class:`TfvcItemDescriptor ` + """ + + _attribute_map = { + 'include_content_metadata': {'key': 'includeContentMetadata', 'type': 'bool'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'item_descriptors': {'key': 'itemDescriptors', 'type': '[TfvcItemDescriptor]'} + } + + def __init__(self, include_content_metadata=None, include_links=None, item_descriptors=None): + super(TfvcItemRequestData, self).__init__() + self.include_content_metadata = include_content_metadata + self.include_links = include_links + self.item_descriptors = item_descriptors diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_label.py b/vsts/vsts/tfvc/v4_0/models/tfvc_label.py new file mode 100644 index 00000000..eda6f281 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_label.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_label_ref import TfvcLabelRef + + +class TfvcLabel(TfvcLabelRef): + """TfvcLabel. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param id: + :type id: int + :param label_scope: + :type label_scope: str + :param modified_date: + :type modified_date: datetime + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + :param items: + :type items: list of :class:`TfvcItem ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'label_scope': {'key': 'labelScope', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[TfvcItem]'} + } + + def __init__(self, _links=None, description=None, id=None, label_scope=None, modified_date=None, name=None, owner=None, url=None, items=None): + super(TfvcLabel, self).__init__(_links=_links, description=description, id=id, label_scope=label_scope, modified_date=modified_date, name=name, owner=owner, url=url) + self.items = items diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_label_ref.py b/vsts/vsts/tfvc/v4_0/models/tfvc_label_ref.py new file mode 100644 index 00000000..be3d4e3f --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_label_ref.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcLabelRef(Model): + """TfvcLabelRef. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param id: + :type id: int + :param label_scope: + :type label_scope: str + :param modified_date: + :type modified_date: datetime + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'label_scope': {'key': 'labelScope', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, description=None, id=None, label_scope=None, modified_date=None, name=None, owner=None, url=None): + super(TfvcLabelRef, self).__init__() + self._links = _links + self.description = description + self.id = id + self.label_scope = label_scope + self.modified_date = modified_date + self.name = name + self.owner = owner + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_label_request_data.py b/vsts/vsts/tfvc/v4_0/models/tfvc_label_request_data.py new file mode 100644 index 00000000..bd8d12cc --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_label_request_data.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcLabelRequestData(Model): + """TfvcLabelRequestData. + + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + :param item_label_filter: + :type item_label_filter: str + :param label_scope: + :type label_scope: str + :param max_item_count: + :type max_item_count: int + :param name: + :type name: str + :param owner: + :type owner: str + """ + + _attribute_map = { + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'item_label_filter': {'key': 'itemLabelFilter', 'type': 'str'}, + 'label_scope': {'key': 'labelScope', 'type': 'str'}, + 'max_item_count': {'key': 'maxItemCount', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'} + } + + def __init__(self, include_links=None, item_label_filter=None, label_scope=None, max_item_count=None, name=None, owner=None): + super(TfvcLabelRequestData, self).__init__() + self.include_links = include_links + self.item_label_filter = item_label_filter + self.label_scope = label_scope + self.max_item_count = max_item_count + self.name = name + self.owner = owner diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_merge_source.py b/vsts/vsts/tfvc/v4_0/models/tfvc_merge_source.py new file mode 100644 index 00000000..8516dbd5 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_merge_source.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcMergeSource(Model): + """TfvcMergeSource. + + :param is_rename: Indicates if this a rename source. If false, it is a merge source. + :type is_rename: bool + :param server_item: The server item of the merge source + :type server_item: str + :param version_from: Start of the version range + :type version_from: int + :param version_to: End of the version range + :type version_to: int + """ + + _attribute_map = { + 'is_rename': {'key': 'isRename', 'type': 'bool'}, + 'server_item': {'key': 'serverItem', 'type': 'str'}, + 'version_from': {'key': 'versionFrom', 'type': 'int'}, + 'version_to': {'key': 'versionTo', 'type': 'int'} + } + + def __init__(self, is_rename=None, server_item=None, version_from=None, version_to=None): + super(TfvcMergeSource, self).__init__() + self.is_rename = is_rename + self.server_item = server_item + self.version_from = version_from + self.version_to = version_to diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_policy_failure_info.py b/vsts/vsts/tfvc/v4_0/models/tfvc_policy_failure_info.py new file mode 100644 index 00000000..72ab75d8 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_policy_failure_info.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcPolicyFailureInfo(Model): + """TfvcPolicyFailureInfo. + + :param message: + :type message: str + :param policy_name: + :type policy_name: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'} + } + + def __init__(self, message=None, policy_name=None): + super(TfvcPolicyFailureInfo, self).__init__() + self.message = message + self.policy_name = policy_name diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_policy_override_info.py b/vsts/vsts/tfvc/v4_0/models/tfvc_policy_override_info.py new file mode 100644 index 00000000..d009cb8c --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_policy_override_info.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcPolicyOverrideInfo(Model): + """TfvcPolicyOverrideInfo. + + :param comment: + :type comment: str + :param policy_failures: + :type policy_failures: list of :class:`TfvcPolicyFailureInfo ` + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'policy_failures': {'key': 'policyFailures', 'type': '[TfvcPolicyFailureInfo]'} + } + + def __init__(self, comment=None, policy_failures=None): + super(TfvcPolicyOverrideInfo, self).__init__() + self.comment = comment + self.policy_failures = policy_failures diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_shallow_branch_ref.py b/vsts/vsts/tfvc/v4_0/models/tfvc_shallow_branch_ref.py new file mode 100644 index 00000000..66fc8e75 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_shallow_branch_ref.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcShallowBranchRef(Model): + """TfvcShallowBranchRef. + + :param path: + :type path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, path=None): + super(TfvcShallowBranchRef, self).__init__() + self.path = path diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset.py b/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset.py new file mode 100644 index 00000000..42f245b7 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_shelveset_ref import TfvcShelvesetRef + + +class TfvcShelveset(TfvcShelvesetRef): + """TfvcShelveset. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param comment: + :type comment: str + :param comment_truncated: + :type comment_truncated: bool + :param created_date: + :type created_date: datetime + :param id: + :type id: str + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + :param changes: + :type changes: list of :class:`TfvcChange ` + :param notes: + :type notes: list of :class:`CheckinNote ` + :param policy_override: + :type policy_override: :class:`TfvcPolicyOverrideInfo ` + :param work_items: + :type work_items: list of :class:`AssociatedWorkItem ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'changes': {'key': 'changes', 'type': '[TfvcChange]'}, + 'notes': {'key': 'notes', 'type': '[CheckinNote]'}, + 'policy_override': {'key': 'policyOverride', 'type': 'TfvcPolicyOverrideInfo'}, + 'work_items': {'key': 'workItems', 'type': '[AssociatedWorkItem]'} + } + + def __init__(self, _links=None, comment=None, comment_truncated=None, created_date=None, id=None, name=None, owner=None, url=None, changes=None, notes=None, policy_override=None, work_items=None): + super(TfvcShelveset, self).__init__(_links=_links, comment=comment, comment_truncated=comment_truncated, created_date=created_date, id=id, name=name, owner=owner, url=url) + self.changes = changes + self.notes = notes + self.policy_override = policy_override + self.work_items = work_items diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset_ref.py b/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset_ref.py new file mode 100644 index 00000000..40d39c85 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset_ref.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcShelvesetRef(Model): + """TfvcShelvesetRef. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param comment: + :type comment: str + :param comment_truncated: + :type comment_truncated: bool + :param created_date: + :type created_date: datetime + :param id: + :type id: str + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, comment=None, comment_truncated=None, created_date=None, id=None, name=None, owner=None, url=None): + super(TfvcShelvesetRef, self).__init__() + self._links = _links + self.comment = comment + self.comment_truncated = comment_truncated + self.created_date = created_date + self.id = id + self.name = name + self.owner = owner + self.url = url diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset_request_data.py b/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset_request_data.py new file mode 100644 index 00000000..4d9c1442 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_shelveset_request_data.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcShelvesetRequestData(Model): + """TfvcShelvesetRequestData. + + :param include_details: Whether to include policyOverride and notes Only applies when requesting a single deep shelveset + :type include_details: bool + :param include_links: Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset. + :type include_links: bool + :param include_work_items: Whether to include workItems + :type include_work_items: bool + :param max_change_count: Max number of changes to include + :type max_change_count: int + :param max_comment_length: Max length of comment + :type max_comment_length: int + :param name: Shelveset's name + :type name: str + :param owner: Owner's ID. Could be a name or a guid. + :type owner: str + """ + + _attribute_map = { + 'include_details': {'key': 'includeDetails', 'type': 'bool'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'include_work_items': {'key': 'includeWorkItems', 'type': 'bool'}, + 'max_change_count': {'key': 'maxChangeCount', 'type': 'int'}, + 'max_comment_length': {'key': 'maxCommentLength', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'} + } + + def __init__(self, include_details=None, include_links=None, include_work_items=None, max_change_count=None, max_comment_length=None, name=None, owner=None): + super(TfvcShelvesetRequestData, self).__init__() + self.include_details = include_details + self.include_links = include_links + self.include_work_items = include_work_items + self.max_change_count = max_change_count + self.max_comment_length = max_comment_length + self.name = name + self.owner = owner diff --git a/vsts/vsts/tfvc/v4_0/models/tfvc_version_descriptor.py b/vsts/vsts/tfvc/v4_0/models/tfvc_version_descriptor.py new file mode 100644 index 00000000..13187560 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/tfvc_version_descriptor.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcVersionDescriptor(Model): + """TfvcVersionDescriptor. + + :param version: + :type version: str + :param version_option: + :type version_option: object + :param version_type: + :type version_type: object + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'version_option': {'key': 'versionOption', 'type': 'object'}, + 'version_type': {'key': 'versionType', 'type': 'object'} + } + + def __init__(self, version=None, version_option=None, version_type=None): + super(TfvcVersionDescriptor, self).__init__() + self.version = version + self.version_option = version_option + self.version_type = version_type diff --git a/vsts/vsts/tfvc/v4_0/models/version_control_project_info.py b/vsts/vsts/tfvc/v4_0/models/version_control_project_info.py new file mode 100644 index 00000000..28ec52e6 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/version_control_project_info.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 VersionControlProjectInfo(Model): + """VersionControlProjectInfo. + + :param default_source_control_type: + :type default_source_control_type: object + :param project: + :type project: :class:`TeamProjectReference ` + :param supports_git: + :type supports_git: bool + :param supports_tFVC: + :type supports_tFVC: bool + """ + + _attribute_map = { + 'default_source_control_type': {'key': 'defaultSourceControlType', 'type': 'object'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'supports_git': {'key': 'supportsGit', 'type': 'bool'}, + 'supports_tFVC': {'key': 'supportsTFVC', 'type': 'bool'} + } + + def __init__(self, default_source_control_type=None, project=None, supports_git=None, supports_tFVC=None): + super(VersionControlProjectInfo, self).__init__() + self.default_source_control_type = default_source_control_type + self.project = project + self.supports_git = supports_git + self.supports_tFVC = supports_tFVC diff --git a/vsts/vsts/tfvc/v4_0/models/vsts_info.py b/vsts/vsts/tfvc/v4_0/models/vsts_info.py new file mode 100644 index 00000000..abeb98e8 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/models/vsts_info.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 VstsInfo(Model): + """VstsInfo. + + :param collection: + :type collection: :class:`TeamProjectCollectionReference ` + :param repository: + :type repository: :class:`GitRepository ` + :param server_url: + :type server_url: str + """ + + _attribute_map = { + 'collection': {'key': 'collection', 'type': 'TeamProjectCollectionReference'}, + 'repository': {'key': 'repository', 'type': 'GitRepository'}, + 'server_url': {'key': 'serverUrl', 'type': 'str'} + } + + def __init__(self, collection=None, repository=None, server_url=None): + super(VstsInfo, self).__init__() + self.collection = collection + self.repository = repository + self.server_url = server_url diff --git a/vsts/vsts/tfvc/v4_0/tfvc_client.py b/vsts/vsts/tfvc/v4_0/tfvc_client.py new file mode 100644 index 00000000..54e9ce02 --- /dev/null +++ b/vsts/vsts/tfvc/v4_0/tfvc_client.py @@ -0,0 +1,722 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TfvcClient(VssClient): + """Tfvc + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TfvcClient, 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 = '8aa40520-446d-40e6-89f6-9c9f9ce44c48' + + def get_branch(self, path, project=None, include_parent=None, include_children=None): + """GetBranch. + Get a single branch hierarchy at the given path with parents or children (if specified) + :param str path: + :param str project: Project ID or project name + :param bool include_parent: + :param bool include_children: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if include_parent is not None: + query_parameters['includeParent'] = self._serialize.query('include_parent', include_parent, 'bool') + if include_children is not None: + query_parameters['includeChildren'] = self._serialize.query('include_children', include_children, 'bool') + response = self._send(http_method='GET', + location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcBranch', response) + + def get_branches(self, project=None, include_parent=None, include_children=None, include_deleted=None, include_links=None): + """GetBranches. + Get a collection of branch roots -- first-level children, branches with no parents + :param str project: Project ID or project name + :param bool include_parent: + :param bool include_children: + :param bool include_deleted: + :param bool include_links: + :rtype: [TfvcBranch] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if include_parent is not None: + query_parameters['includeParent'] = self._serialize.query('include_parent', include_parent, 'bool') + if include_children is not None: + query_parameters['includeChildren'] = self._serialize.query('include_children', include_children, 'bool') + if include_deleted is not None: + query_parameters['includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') + if include_links is not None: + query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') + response = self._send(http_method='GET', + location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcBranch]', response) + + def get_branch_refs(self, scope_path, project=None, include_deleted=None, include_links=None): + """GetBranchRefs. + Get branch hierarchies below the specified scopePath + :param str scope_path: + :param str project: Project ID or project name + :param bool include_deleted: + :param bool include_links: + :rtype: [TfvcBranchRef] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if include_deleted is not None: + query_parameters['includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') + if include_links is not None: + query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') + response = self._send(http_method='GET', + location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcBranchRef]', response) + + def get_changeset_changes(self, id=None, skip=None, top=None): + """GetChangesetChanges. + Retrieve Tfvc changes for a given changeset + :param int id: + :param int skip: + :param int top: + :rtype: [TfvcChange] + """ + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcChange]', response) + + def create_changeset(self, changeset, project=None): + """CreateChangeset. + Create a new changeset. + :param :class:` ` changeset: + :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(changeset, 'TfvcChangeset') + response = self._send(http_method='POST', + location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TfvcChangesetRef', response) + + def get_changeset(self, id, project=None, max_change_count=None, include_details=None, include_work_items=None, max_comment_length=None, include_source_rename=None, skip=None, top=None, orderby=None, search_criteria=None): + """GetChangeset. + Retrieve a Tfvc Changeset + :param int id: + :param str project: Project ID or project name + :param int max_change_count: + :param bool include_details: + :param bool include_work_items: + :param int max_comment_length: + :param bool include_source_rename: + :param int skip: + :param int top: + :param str orderby: + :param :class:` ` search_criteria: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + query_parameters = {} + if max_change_count is not None: + query_parameters['maxChangeCount'] = self._serialize.query('max_change_count', max_change_count, 'int') + if include_details is not None: + query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') + if include_work_items is not None: + query_parameters['includeWorkItems'] = self._serialize.query('include_work_items', include_work_items, 'bool') + if max_comment_length is not None: + query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') + if include_source_rename is not None: + query_parameters['includeSourceRename'] = self._serialize.query('include_source_rename', include_source_rename, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if search_criteria is not None: + if search_criteria.item_path is not None: + query_parameters['searchCriteria.itemPath'] = search_criteria.item_path + if search_criteria.author is not None: + query_parameters['searchCriteria.author'] = search_criteria.author + if search_criteria.from_date is not None: + query_parameters['searchCriteria.fromDate'] = search_criteria.from_date + if search_criteria.to_date is not None: + query_parameters['searchCriteria.toDate'] = search_criteria.to_date + if search_criteria.from_id is not None: + query_parameters['searchCriteria.fromId'] = search_criteria.from_id + if search_criteria.to_id is not None: + query_parameters['searchCriteria.toId'] = search_criteria.to_id + if search_criteria.follow_renames is not None: + query_parameters['searchCriteria.followRenames'] = search_criteria.follow_renames + if search_criteria.include_links is not None: + query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links + response = self._send(http_method='GET', + location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcChangeset', response) + + def get_changesets(self, project=None, max_comment_length=None, skip=None, top=None, orderby=None, search_criteria=None): + """GetChangesets. + Retrieve Tfvc changesets Note: This is a new version of the GetChangesets API that doesn't expose the unneeded queryParams present in the 1.0 version of the API. + :param str project: Project ID or project name + :param int max_comment_length: + :param int skip: + :param int top: + :param str orderby: + :param :class:` ` search_criteria: + :rtype: [TfvcChangesetRef] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if max_comment_length is not None: + query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if search_criteria is not None: + if search_criteria.item_path is not None: + query_parameters['searchCriteria.itemPath'] = search_criteria.item_path + if search_criteria.author is not None: + query_parameters['searchCriteria.author'] = search_criteria.author + if search_criteria.from_date is not None: + query_parameters['searchCriteria.fromDate'] = search_criteria.from_date + if search_criteria.to_date is not None: + query_parameters['searchCriteria.toDate'] = search_criteria.to_date + if search_criteria.from_id is not None: + query_parameters['searchCriteria.fromId'] = search_criteria.from_id + if search_criteria.to_id is not None: + query_parameters['searchCriteria.toId'] = search_criteria.to_id + if search_criteria.follow_renames is not None: + query_parameters['searchCriteria.followRenames'] = search_criteria.follow_renames + if search_criteria.include_links is not None: + query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links + response = self._send(http_method='GET', + location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcChangesetRef]', response) + + def get_batched_changesets(self, changesets_request_data): + """GetBatchedChangesets. + :param :class:` ` changesets_request_data: + :rtype: [TfvcChangesetRef] + """ + content = self._serialize.body(changesets_request_data, 'TfvcChangesetsRequestData') + response = self._send(http_method='POST', + location_id='b7e7c173-803c-4fea-9ec8-31ee35c5502a', + version='4.0', + content=content, + returns_collection=True) + return self._deserialize('[TfvcChangesetRef]', response) + + def get_changeset_work_items(self, id=None): + """GetChangesetWorkItems. + :param int id: + :rtype: [AssociatedWorkItem] + """ + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + response = self._send(http_method='GET', + location_id='64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[AssociatedWorkItem]', response) + + def get_items_batch(self, item_request_data, project=None): + """GetItemsBatch. + Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + :param :class:` ` item_request_data: + :param str project: Project ID or project name + :rtype: [[TfvcItem]] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(item_request_data, 'TfvcItemRequestData') + response = self._send(http_method='POST', + location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[[TfvcItem]]', response) + + def get_items_batch_zip(self, item_request_data, project=None): + """GetItemsBatchZip. + Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + :param :class:` ` item_request_data: + :param str project: Project ID or project name + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(item_request_data, 'TfvcItemRequestData') + response = self._send(http_method='POST', + location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('object', response) + + def get_item(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None): + """GetItem. + Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: + :param str project: Project ID or project name + :param str file_name: + :param bool download: + :param str scope_path: + :param str recursion_level: + :param :class:` ` version_descriptor: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcItem', response) + + def get_item_content(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None): + """GetItemContent. + Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: + :param str project: Project ID or project name + :param str file_name: + :param bool download: + :param str scope_path: + :param str recursion_level: + :param :class:` ` version_descriptor: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_items(self, project=None, scope_path=None, recursion_level=None, include_links=None, version_descriptor=None): + """GetItems. + Get a list of Tfvc items + :param str project: Project ID or project name + :param str scope_path: + :param str recursion_level: + :param bool include_links: + :param :class:` ` version_descriptor: + :rtype: [TfvcItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if include_links is not None: + query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcItem]', response) + + def get_item_text(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None): + """GetItemText. + Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: + :param str project: Project ID or project name + :param str file_name: + :param bool download: + :param str scope_path: + :param str recursion_level: + :param :class:` ` version_descriptor: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_item_zip(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None): + """GetItemZip. + Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: + :param str project: Project ID or project name + :param str file_name: + :param bool download: + :param str scope_path: + :param str recursion_level: + :param :class:` ` version_descriptor: + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_label_items(self, label_id, top=None, skip=None): + """GetLabelItems. + Get items under a label. + :param str label_id: Unique identifier of label + :param int top: Max number of items to return + :param int skip: Number of items to skip + :rtype: [TfvcItem] + """ + route_values = {} + if label_id is not None: + route_values['labelId'] = self._serialize.url('label_id', label_id, 'str') + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='06166e34-de17-4b60-8cd1-23182a346fda', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcItem]', response) + + def get_label(self, label_id, request_data, project=None): + """GetLabel. + Get a single deep label. + :param str label_id: Unique identifier of label + :param :class:` ` request_data: maxItemCount + :param 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 label_id is not None: + route_values['labelId'] = self._serialize.url('label_id', label_id, 'str') + query_parameters = {} + if request_data is not None: + if request_data.label_scope is not None: + query_parameters['requestData.LabelScope'] = request_data.label_scope + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.item_label_filter is not None: + query_parameters['requestData.ItemLabelFilter'] = request_data.item_label_filter + if request_data.max_item_count is not None: + query_parameters['requestData.MaxItemCount'] = request_data.max_item_count + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + response = self._send(http_method='GET', + location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54', + version='4.0', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcLabel', response) + + def get_labels(self, request_data, project=None, top=None, skip=None): + """GetLabels. + Get a collection of shallow label references. + :param :class:` ` request_data: labelScope, name, owner, and itemLabelFilter + :param str project: Project ID or project name + :param int top: Max number of labels to return + :param int skip: Number of labels to skip + :rtype: [TfvcLabelRef] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if request_data is not None: + if request_data.label_scope is not None: + query_parameters['requestData.LabelScope'] = request_data.label_scope + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.item_label_filter is not None: + query_parameters['requestData.ItemLabelFilter'] = request_data.item_label_filter + if request_data.max_item_count is not None: + query_parameters['requestData.MaxItemCount'] = request_data.max_item_count + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcLabelRef]', response) + + def get_shelveset_changes(self, shelveset_id, top=None, skip=None): + """GetShelvesetChanges. + Get changes included in a shelveset. + :param str shelveset_id: Shelveset's unique ID + :param int top: Max number of changes to return + :param int skip: Number of changes to skip + :rtype: [TfvcChange] + """ + query_parameters = {} + if shelveset_id is not None: + query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='dbaf075b-0445-4c34-9e5b-82292f856522', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcChange]', response) + + def get_shelveset(self, shelveset_id, request_data=None): + """GetShelveset. + Get a single deep shelveset. + :param str shelveset_id: Shelveset's unique ID + :param :class:` ` request_data: includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + :rtype: :class:` ` + """ + query_parameters = {} + if shelveset_id is not None: + query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') + if request_data is not None: + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.max_comment_length is not None: + query_parameters['requestData.MaxCommentLength'] = request_data.max_comment_length + if request_data.max_change_count is not None: + query_parameters['requestData.MaxChangeCount'] = request_data.max_change_count + if request_data.include_details is not None: + query_parameters['requestData.IncludeDetails'] = request_data.include_details + if request_data.include_work_items is not None: + query_parameters['requestData.IncludeWorkItems'] = request_data.include_work_items + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + response = self._send(http_method='GET', + location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', + version='4.0', + query_parameters=query_parameters) + return self._deserialize('TfvcShelveset', response) + + def get_shelvesets(self, request_data=None, top=None, skip=None): + """GetShelvesets. + Return a collection of shallow shelveset references. + :param :class:` ` request_data: name, owner, and maxCommentLength + :param int top: Max number of shelvesets to return + :param int skip: Number of shelvesets to skip + :rtype: [TfvcShelvesetRef] + """ + query_parameters = {} + if request_data is not None: + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.max_comment_length is not None: + query_parameters['requestData.MaxCommentLength'] = request_data.max_comment_length + if request_data.max_change_count is not None: + query_parameters['requestData.MaxChangeCount'] = request_data.max_change_count + if request_data.include_details is not None: + query_parameters['requestData.IncludeDetails'] = request_data.include_details + if request_data.include_work_items is not None: + query_parameters['requestData.IncludeWorkItems'] = request_data.include_work_items + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcShelvesetRef]', response) + + def get_shelveset_work_items(self, shelveset_id): + """GetShelvesetWorkItems. + Get work items associated with a shelveset. + :param str shelveset_id: Shelveset's unique ID + :rtype: [AssociatedWorkItem] + """ + query_parameters = {} + if shelveset_id is not None: + query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') + response = self._send(http_method='GET', + location_id='a7a0c1c1-373e-425a-b031-a519474d743d', + version='4.0', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[AssociatedWorkItem]', response) + diff --git a/vsts/vsts/tfvc/v4_1/__init__.py b/vsts/vsts/tfvc/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/tfvc/v4_1/models/__init__.py b/vsts/vsts/tfvc/v4_1/models/__init__.py new file mode 100644 index 00000000..54666a57 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/__init__.py @@ -0,0 +1,85 @@ +# -------------------------------------------------------------------------------------------- +# 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 .associated_work_item import AssociatedWorkItem +from .change import Change +from .checkin_note import CheckinNote +from .file_content_metadata import FileContentMetadata +from .git_repository import GitRepository +from .git_repository_ref import GitRepositoryRef +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .item_content import ItemContent +from .item_model import ItemModel +from .reference_links import ReferenceLinks +from .team_project_collection_reference import TeamProjectCollectionReference +from .team_project_reference import TeamProjectReference +from .tfvc_branch import TfvcBranch +from .tfvc_branch_mapping import TfvcBranchMapping +from .tfvc_branch_ref import TfvcBranchRef +from .tfvc_change import TfvcChange +from .tfvc_changeset import TfvcChangeset +from .tfvc_changeset_ref import TfvcChangesetRef +from .tfvc_changeset_search_criteria import TfvcChangesetSearchCriteria +from .tfvc_changesets_request_data import TfvcChangesetsRequestData +from .tfvc_item import TfvcItem +from .tfvc_item_descriptor import TfvcItemDescriptor +from .tfvc_item_request_data import TfvcItemRequestData +from .tfvc_label import TfvcLabel +from .tfvc_label_ref import TfvcLabelRef +from .tfvc_label_request_data import TfvcLabelRequestData +from .tfvc_merge_source import TfvcMergeSource +from .tfvc_policy_failure_info import TfvcPolicyFailureInfo +from .tfvc_policy_override_info import TfvcPolicyOverrideInfo +from .tfvc_shallow_branch_ref import TfvcShallowBranchRef +from .tfvc_shelveset import TfvcShelveset +from .tfvc_shelveset_ref import TfvcShelvesetRef +from .tfvc_shelveset_request_data import TfvcShelvesetRequestData +from .tfvc_version_descriptor import TfvcVersionDescriptor +from .version_control_project_info import VersionControlProjectInfo +from .vsts_info import VstsInfo + +__all__ = [ + 'AssociatedWorkItem', + 'Change', + 'CheckinNote', + 'FileContentMetadata', + 'GitRepository', + 'GitRepositoryRef', + 'GraphSubjectBase', + 'IdentityRef', + 'ItemContent', + 'ItemModel', + 'ReferenceLinks', + 'TeamProjectCollectionReference', + 'TeamProjectReference', + 'TfvcBranch', + 'TfvcBranchMapping', + 'TfvcBranchRef', + 'TfvcChange', + 'TfvcChangeset', + 'TfvcChangesetRef', + 'TfvcChangesetSearchCriteria', + 'TfvcChangesetsRequestData', + 'TfvcItem', + 'TfvcItemDescriptor', + 'TfvcItemRequestData', + 'TfvcLabel', + 'TfvcLabelRef', + 'TfvcLabelRequestData', + 'TfvcMergeSource', + 'TfvcPolicyFailureInfo', + 'TfvcPolicyOverrideInfo', + 'TfvcShallowBranchRef', + 'TfvcShelveset', + 'TfvcShelvesetRef', + 'TfvcShelvesetRequestData', + 'TfvcVersionDescriptor', + 'VersionControlProjectInfo', + 'VstsInfo', +] diff --git a/vsts/vsts/git/v4_1/models/associated_work_item.py b/vsts/vsts/tfvc/v4_1/models/associated_work_item.py similarity index 100% rename from vsts/vsts/git/v4_1/models/associated_work_item.py rename to vsts/vsts/tfvc/v4_1/models/associated_work_item.py diff --git a/vsts/vsts/tfvc/v4_1/models/change.py b/vsts/vsts/tfvc/v4_1/models/change.py new file mode 100644 index 00000000..833f8744 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/change.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Change(Model): + """Change. + + :param change_type: The type of change that was made to the item. + :type change_type: object + :param item: Current version. + :type item: object + :param new_content: Content of the item after the change. + :type new_content: :class:`ItemContent ` + :param source_server_item: Path of the item on the server. + :type source_server_item: str + :param url: URL to retrieve the item. + :type url: str + """ + + _attribute_map = { + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'item': {'key': 'item', 'type': 'object'}, + 'new_content': {'key': 'newContent', 'type': 'ItemContent'}, + 'source_server_item': {'key': 'sourceServerItem', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, change_type=None, item=None, new_content=None, source_server_item=None, url=None): + super(Change, self).__init__() + self.change_type = change_type + self.item = item + self.new_content = new_content + self.source_server_item = source_server_item + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/checkin_note.py b/vsts/vsts/tfvc/v4_1/models/checkin_note.py new file mode 100644 index 00000000..d92f9bae --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/checkin_note.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CheckinNote(Model): + """CheckinNote. + + :param name: + :type name: str + :param value: + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, name=None, value=None): + super(CheckinNote, self).__init__() + self.name = name + self.value = value diff --git a/vsts/vsts/tfvc/v4_1/models/file_content_metadata.py b/vsts/vsts/tfvc/v4_1/models/file_content_metadata.py new file mode 100644 index 00000000..d2d6667d --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/file_content_metadata.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 FileContentMetadata(Model): + """FileContentMetadata. + + :param content_type: + :type content_type: str + :param encoding: + :type encoding: int + :param extension: + :type extension: str + :param file_name: + :type file_name: str + :param is_binary: + :type is_binary: bool + :param is_image: + :type is_image: bool + :param vs_link: + :type vs_link: str + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'encoding': {'key': 'encoding', 'type': 'int'}, + 'extension': {'key': 'extension', 'type': 'str'}, + 'file_name': {'key': 'fileName', 'type': 'str'}, + 'is_binary': {'key': 'isBinary', 'type': 'bool'}, + 'is_image': {'key': 'isImage', 'type': 'bool'}, + 'vs_link': {'key': 'vsLink', 'type': 'str'} + } + + def __init__(self, content_type=None, encoding=None, extension=None, file_name=None, is_binary=None, is_image=None, vs_link=None): + super(FileContentMetadata, self).__init__() + self.content_type = content_type + self.encoding = encoding + self.extension = extension + self.file_name = file_name + self.is_binary = is_binary + self.is_image = is_image + self.vs_link = vs_link diff --git a/vsts/vsts/tfvc/v4_1/models/git_repository.py b/vsts/vsts/tfvc/v4_1/models/git_repository.py new file mode 100644 index 00000000..cbc542ed --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/git_repository.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 GitRepository(Model): + """GitRepository. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param default_branch: + :type default_branch: str + :param id: + :type id: str + :param is_fork: True if the repository was created as a fork + :type is_fork: bool + :param name: + :type name: str + :param parent_repository: + :type parent_repository: :class:`GitRepositoryRef ` + :param project: + :type project: :class:`TeamProjectReference ` + :param remote_url: + :type remote_url: str + :param ssh_url: + :type ssh_url: str + :param url: + :type url: str + :param valid_remote_urls: + :type valid_remote_urls: list of str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'default_branch': {'key': 'defaultBranch', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_fork': {'key': 'isFork', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_repository': {'key': 'parentRepository', 'type': 'GitRepositoryRef'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, + 'ssh_url': {'key': 'sshUrl', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'valid_remote_urls': {'key': 'validRemoteUrls', '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, ssh_url=None, url=None, valid_remote_urls=None): + super(GitRepository, self).__init__() + self._links = _links + self.default_branch = default_branch + self.id = id + self.is_fork = is_fork + self.name = name + self.parent_repository = parent_repository + self.project = project + self.remote_url = remote_url + self.ssh_url = ssh_url + self.url = url + self.valid_remote_urls = valid_remote_urls diff --git a/vsts/vsts/tfvc/v4_1/models/git_repository_ref.py b/vsts/vsts/tfvc/v4_1/models/git_repository_ref.py new file mode 100644 index 00000000..caa8c101 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/git_repository_ref.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 GitRepositoryRef(Model): + """GitRepositoryRef. + + :param collection: Team Project Collection where this Fork resides + :type collection: :class:`TeamProjectCollectionReference ` + :param id: + :type id: str + :param is_fork: True if the repository was created as a fork + :type is_fork: bool + :param name: + :type name: str + :param project: + :type project: :class:`TeamProjectReference ` + :param remote_url: + :type remote_url: str + :param ssh_url: + :type ssh_url: str + :param url: + :type url: str + """ + + _attribute_map = { + 'collection': {'key': 'collection', 'type': 'TeamProjectCollectionReference'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_fork': {'key': 'isFork', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, + 'ssh_url': {'key': 'sshUrl', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, collection=None, id=None, is_fork=None, name=None, project=None, remote_url=None, ssh_url=None, url=None): + super(GitRepositoryRef, self).__init__() + self.collection = collection + self.id = id + self.is_fork = is_fork + self.name = name + self.project = project + self.remote_url = remote_url + self.ssh_url = ssh_url + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/identity_ref.py b/vsts/vsts/tfvc/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/tfvc/v4_1/models/item_content.py b/vsts/vsts/tfvc/v4_1/models/item_content.py new file mode 100644 index 00000000..f5cfaef1 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/item_content.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 ItemContent(Model): + """ItemContent. + + :param content: + :type content: str + :param content_type: + :type content_type: object + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'object'} + } + + def __init__(self, content=None, content_type=None): + super(ItemContent, self).__init__() + self.content = content + self.content_type = content_type diff --git a/vsts/vsts/tfvc/v4_1/models/item_model.py b/vsts/vsts/tfvc/v4_1/models/item_model.py new file mode 100644 index 00000000..e346b148 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/item_model.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 ItemModel(Model): + """ItemModel. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param content: + :type content: str + :param content_metadata: + :type content_metadata: :class:`FileContentMetadata ` + :param is_folder: + :type is_folder: bool + :param is_sym_link: + :type is_sym_link: bool + :param path: + :type path: str + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'content': {'key': 'content', 'type': 'str'}, + 'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'}, + 'is_folder': {'key': 'isFolder', 'type': 'bool'}, + 'is_sym_link': {'key': 'isSymLink', 'type': 'bool'}, + 'path': {'key': 'path', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None): + super(ItemModel, self).__init__() + self._links = _links + self.content = content + self.content_metadata = content_metadata + self.is_folder = is_folder + self.is_sym_link = is_sym_link + self.path = path + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/reference_links.py b/vsts/vsts/tfvc/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/tfvc/v4_1/models/team_project_collection_reference.py b/vsts/vsts/tfvc/v4_1/models/team_project_collection_reference.py new file mode 100644 index 00000000..6f4a596a --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/team_project_collection_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamProjectCollectionReference(Model): + """TeamProjectCollectionReference. + + :param id: Collection Id. + :type id: str + :param name: Collection Name. + :type name: str + :param url: Collection REST Url. + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, name=None, url=None): + super(TeamProjectCollectionReference, self).__init__() + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/team_project_reference.py b/vsts/vsts/tfvc/v4_1/models/team_project_reference.py new file mode 100644 index 00000000..fa79d465 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/team_project_reference.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamProjectReference(Model): + """TeamProjectReference. + + :param abbreviation: Project abbreviation. + :type abbreviation: str + :param description: The project's description (if any). + :type description: str + :param id: Project identifier. + :type id: str + :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'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + '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, description=None, id=None, name=None, revision=None, state=None, url=None, visibility=None): + super(TeamProjectReference, self).__init__() + self.abbreviation = abbreviation + self.description = description + self.id = id + self.name = name + self.revision = revision + self.state = state + self.url = url + self.visibility = visibility diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_branch.py b/vsts/vsts/tfvc/v4_1/models/tfvc_branch.py new file mode 100644 index 00000000..d8e7a214 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_branch.py @@ -0,0 +1,58 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_branch_ref import TfvcBranchRef + + +class TfvcBranch(TfvcBranchRef): + """TfvcBranch. + + :param path: Path for the branch. + :type path: str + :param _links: A collection of REST reference links. + :type _links: :class:`ReferenceLinks ` + :param created_date: Creation date of the branch. + :type created_date: datetime + :param description: Description of the branch. + :type description: str + :param is_deleted: Is the branch deleted? + :type is_deleted: bool + :param owner: Alias or display name of user + :type owner: :class:`IdentityRef ` + :param url: URL to retrieve the item. + :type url: str + :param children: List of children for the branch. + :type children: list of :class:`TfvcBranch ` + :param mappings: List of branch mappings. + :type mappings: list of :class:`TfvcBranchMapping ` + :param parent: Path of the branch's parent. + :type parent: :class:`TfvcShallowBranchRef ` + :param related_branches: List of paths of the related branches. + :type related_branches: list of :class:`TfvcShallowBranchRef ` + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'children': {'key': 'children', 'type': '[TfvcBranch]'}, + 'mappings': {'key': 'mappings', 'type': '[TfvcBranchMapping]'}, + 'parent': {'key': 'parent', 'type': 'TfvcShallowBranchRef'}, + 'related_branches': {'key': 'relatedBranches', 'type': '[TfvcShallowBranchRef]'} + } + + def __init__(self, path=None, _links=None, created_date=None, description=None, is_deleted=None, owner=None, url=None, children=None, mappings=None, parent=None, related_branches=None): + super(TfvcBranch, self).__init__(path=path, _links=_links, created_date=created_date, description=description, is_deleted=is_deleted, owner=owner, url=url) + self.children = children + self.mappings = mappings + self.parent = parent + self.related_branches = related_branches diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_branch_mapping.py b/vsts/vsts/tfvc/v4_1/models/tfvc_branch_mapping.py new file mode 100644 index 00000000..0e0bf579 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_branch_mapping.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcBranchMapping(Model): + """TfvcBranchMapping. + + :param depth: Depth of the branch. + :type depth: str + :param server_item: Server item for the branch. + :type server_item: str + :param type: Type of the branch. + :type type: str + """ + + _attribute_map = { + 'depth': {'key': 'depth', 'type': 'str'}, + 'server_item': {'key': 'serverItem', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, depth=None, server_item=None, type=None): + super(TfvcBranchMapping, self).__init__() + self.depth = depth + self.server_item = server_item + self.type = type diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_branch_ref.py b/vsts/vsts/tfvc/v4_1/models/tfvc_branch_ref.py new file mode 100644 index 00000000..cf094f99 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_branch_ref.py @@ -0,0 +1,48 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_shallow_branch_ref import TfvcShallowBranchRef + + +class TfvcBranchRef(TfvcShallowBranchRef): + """TfvcBranchRef. + + :param path: Path for the branch. + :type path: str + :param _links: A collection of REST reference links. + :type _links: :class:`ReferenceLinks ` + :param created_date: Creation date of the branch. + :type created_date: datetime + :param description: Description of the branch. + :type description: str + :param is_deleted: Is the branch deleted? + :type is_deleted: bool + :param owner: Alias or display name of user + :type owner: :class:`IdentityRef ` + :param url: URL to retrieve the item. + :type url: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, path=None, _links=None, created_date=None, description=None, is_deleted=None, owner=None, url=None): + super(TfvcBranchRef, self).__init__(path=path) + self._links = _links + self.created_date = created_date + self.description = description + self.is_deleted = is_deleted + self.owner = owner + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_change.py b/vsts/vsts/tfvc/v4_1/models/tfvc_change.py new file mode 100644 index 00000000..9880c769 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_change.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 .change import Change + + +class TfvcChange(Change): + """TfvcChange. + + :param merge_sources: List of merge sources in case of rename or branch creation. + :type merge_sources: list of :class:`TfvcMergeSource ` + :param pending_version: Version at which a (shelved) change was pended against + :type pending_version: int + """ + + _attribute_map = { + 'merge_sources': {'key': 'mergeSources', 'type': '[TfvcMergeSource]'}, + 'pending_version': {'key': 'pendingVersion', 'type': 'int'} + } + + def __init__(self, merge_sources=None, pending_version=None): + super(TfvcChange, self).__init__() + self.merge_sources = merge_sources + self.pending_version = pending_version diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_changeset.py b/vsts/vsts/tfvc/v4_1/models/tfvc_changeset.py new file mode 100644 index 00000000..76850429 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_changeset.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_changeset_ref import TfvcChangesetRef + + +class TfvcChangeset(TfvcChangesetRef): + """TfvcChangeset. + + :param _links: A collection of REST reference links. + :type _links: :class:`ReferenceLinks ` + :param author: Alias or display name of user + :type author: :class:`IdentityRef ` + :param changeset_id: Id of the changeset. + :type changeset_id: int + :param checked_in_by: Alias or display name of user + :type checked_in_by: :class:`IdentityRef ` + :param comment: Comment for the changeset. + :type comment: str + :param comment_truncated: Was the Comment result truncated? + :type comment_truncated: bool + :param created_date: Creation date of the changeset. + :type created_date: datetime + :param url: URL to retrieve the item. + :type url: str + :param account_id: Account Id of the changeset. + :type account_id: str + :param changes: List of associated changes. + :type changes: list of :class:`TfvcChange ` + :param checkin_notes: Checkin Notes for the changeset. + :type checkin_notes: list of :class:`CheckinNote ` + :param collection_id: Collection Id of the changeset. + :type collection_id: str + :param has_more_changes: Are more changes available. + :type has_more_changes: bool + :param policy_override: Policy Override for the changeset. + :type policy_override: :class:`TfvcPolicyOverrideInfo ` + :param team_project_ids: Team Project Ids for the changeset. + :type team_project_ids: list of str + :param work_items: List of work items associated with the changeset. + :type work_items: list of :class:`AssociatedWorkItem ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'changeset_id': {'key': 'changesetId', 'type': 'int'}, + 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'}, + 'account_id': {'key': 'accountId', 'type': 'str'}, + 'changes': {'key': 'changes', 'type': '[TfvcChange]'}, + 'checkin_notes': {'key': 'checkinNotes', 'type': '[CheckinNote]'}, + 'collection_id': {'key': 'collectionId', 'type': 'str'}, + 'has_more_changes': {'key': 'hasMoreChanges', 'type': 'bool'}, + 'policy_override': {'key': 'policyOverride', 'type': 'TfvcPolicyOverrideInfo'}, + 'team_project_ids': {'key': 'teamProjectIds', 'type': '[str]'}, + 'work_items': {'key': 'workItems', 'type': '[AssociatedWorkItem]'} + } + + def __init__(self, _links=None, author=None, changeset_id=None, checked_in_by=None, comment=None, comment_truncated=None, created_date=None, url=None, account_id=None, changes=None, checkin_notes=None, collection_id=None, has_more_changes=None, policy_override=None, team_project_ids=None, work_items=None): + super(TfvcChangeset, self).__init__(_links=_links, author=author, changeset_id=changeset_id, checked_in_by=checked_in_by, comment=comment, comment_truncated=comment_truncated, created_date=created_date, url=url) + self.account_id = account_id + self.changes = changes + self.checkin_notes = checkin_notes + self.collection_id = collection_id + self.has_more_changes = has_more_changes + self.policy_override = policy_override + self.team_project_ids = team_project_ids + self.work_items = work_items diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_changeset_ref.py b/vsts/vsts/tfvc/v4_1/models/tfvc_changeset_ref.py new file mode 100644 index 00000000..ae48f998 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_changeset_ref.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcChangesetRef(Model): + """TfvcChangesetRef. + + :param _links: A collection of REST reference links. + :type _links: :class:`ReferenceLinks ` + :param author: Alias or display name of user + :type author: :class:`IdentityRef ` + :param changeset_id: Id of the changeset. + :type changeset_id: int + :param checked_in_by: Alias or display name of user + :type checked_in_by: :class:`IdentityRef ` + :param comment: Comment for the changeset. + :type comment: str + :param comment_truncated: Was the Comment result truncated? + :type comment_truncated: bool + :param created_date: Creation date of the changeset. + :type created_date: datetime + :param url: URL to retrieve the item. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'author': {'key': 'author', 'type': 'IdentityRef'}, + 'changeset_id': {'key': 'changesetId', 'type': 'int'}, + 'checked_in_by': {'key': 'checkedInBy', 'type': 'IdentityRef'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, author=None, changeset_id=None, checked_in_by=None, comment=None, comment_truncated=None, created_date=None, url=None): + super(TfvcChangesetRef, self).__init__() + self._links = _links + self.author = author + self.changeset_id = changeset_id + self.checked_in_by = checked_in_by + self.comment = comment + self.comment_truncated = comment_truncated + self.created_date = created_date + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_changeset_search_criteria.py b/vsts/vsts/tfvc/v4_1/models/tfvc_changeset_search_criteria.py new file mode 100644 index 00000000..41d556ef --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_changeset_search_criteria.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcChangesetSearchCriteria(Model): + """TfvcChangesetSearchCriteria. + + :param author: Alias or display name of user who made the changes + :type author: str + :param follow_renames: Whether or not to follow renames for the given item being queried + :type follow_renames: bool + :param from_date: If provided, only include changesets created after this date (string) Think of a better name for this. + :type from_date: str + :param from_id: If provided, only include changesets after this changesetID + :type from_id: int + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + :param item_path: Path of item to search under + :type item_path: str + :param to_date: If provided, only include changesets created before this date (string) Think of a better name for this. + :type to_date: str + :param to_id: If provided, a version descriptor for the latest change list to include + :type to_id: int + """ + + _attribute_map = { + 'author': {'key': 'author', 'type': 'str'}, + 'follow_renames': {'key': 'followRenames', 'type': 'bool'}, + 'from_date': {'key': 'fromDate', 'type': 'str'}, + 'from_id': {'key': 'fromId', 'type': 'int'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'item_path': {'key': 'itemPath', 'type': 'str'}, + 'to_date': {'key': 'toDate', 'type': 'str'}, + 'to_id': {'key': 'toId', 'type': 'int'} + } + + def __init__(self, author=None, follow_renames=None, from_date=None, from_id=None, include_links=None, item_path=None, to_date=None, to_id=None): + super(TfvcChangesetSearchCriteria, self).__init__() + self.author = author + self.follow_renames = follow_renames + self.from_date = from_date + self.from_id = from_id + self.include_links = include_links + self.item_path = item_path + self.to_date = to_date + self.to_id = to_id diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_changesets_request_data.py b/vsts/vsts/tfvc/v4_1/models/tfvc_changesets_request_data.py new file mode 100644 index 00000000..2f22a642 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_changesets_request_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcChangesetsRequestData(Model): + """TfvcChangesetsRequestData. + + :param changeset_ids: List of changeset Ids. + :type changeset_ids: list of int + :param comment_length: Length of the comment. + :type comment_length: int + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + """ + + _attribute_map = { + 'changeset_ids': {'key': 'changesetIds', 'type': '[int]'}, + 'comment_length': {'key': 'commentLength', 'type': 'int'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'} + } + + def __init__(self, changeset_ids=None, comment_length=None, include_links=None): + super(TfvcChangesetsRequestData, self).__init__() + self.changeset_ids = changeset_ids + self.comment_length = comment_length + self.include_links = include_links diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_item.py b/vsts/vsts/tfvc/v4_1/models/tfvc_item.py new file mode 100644 index 00000000..7d30e4fd --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_item.py @@ -0,0 +1,70 @@ +# -------------------------------------------------------------------------------------------- +# 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 .item_model import ItemModel + + +class TfvcItem(ItemModel): + """TfvcItem. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param content: + :type content: str + :param content_metadata: + :type content_metadata: :class:`FileContentMetadata ` + :param is_folder: + :type is_folder: bool + :param is_sym_link: + :type is_sym_link: bool + :param path: + :type path: str + :param url: + :type url: str + :param change_date: + :type change_date: datetime + :param deletion_id: + :type deletion_id: int + :param hash_value: MD5 hash as a base 64 string, applies to files only. + :type hash_value: str + :param is_branch: + :type is_branch: bool + :param is_pending_change: + :type is_pending_change: bool + :param size: The size of the file, if applicable. + :type size: long + :param version: + :type version: int + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'content': {'key': 'content', 'type': 'str'}, + 'content_metadata': {'key': 'contentMetadata', 'type': 'FileContentMetadata'}, + 'is_folder': {'key': 'isFolder', 'type': 'bool'}, + 'is_sym_link': {'key': 'isSymLink', 'type': 'bool'}, + 'path': {'key': 'path', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'change_date': {'key': 'changeDate', 'type': 'iso-8601'}, + 'deletion_id': {'key': 'deletionId', 'type': 'int'}, + 'hash_value': {'key': 'hashValue', 'type': 'str'}, + 'is_branch': {'key': 'isBranch', 'type': 'bool'}, + 'is_pending_change': {'key': 'isPendingChange', 'type': 'bool'}, + 'size': {'key': 'size', 'type': 'long'}, + 'version': {'key': 'version', 'type': 'int'} + } + + def __init__(self, _links=None, content=None, content_metadata=None, is_folder=None, is_sym_link=None, path=None, url=None, change_date=None, deletion_id=None, hash_value=None, is_branch=None, is_pending_change=None, size=None, version=None): + super(TfvcItem, self).__init__(_links=_links, content=content, content_metadata=content_metadata, is_folder=is_folder, is_sym_link=is_sym_link, path=path, url=url) + self.change_date = change_date + self.deletion_id = deletion_id + self.hash_value = hash_value + self.is_branch = is_branch + self.is_pending_change = is_pending_change + self.size = size + self.version = version diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_item_descriptor.py b/vsts/vsts/tfvc/v4_1/models/tfvc_item_descriptor.py new file mode 100644 index 00000000..47a3306c --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_item_descriptor.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcItemDescriptor(Model): + """TfvcItemDescriptor. + + :param path: + :type path: str + :param recursion_level: + :type recursion_level: object + :param version: + :type version: str + :param version_option: + :type version_option: object + :param version_type: + :type version_type: object + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'recursion_level': {'key': 'recursionLevel', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'str'}, + 'version_option': {'key': 'versionOption', 'type': 'object'}, + 'version_type': {'key': 'versionType', 'type': 'object'} + } + + def __init__(self, path=None, recursion_level=None, version=None, version_option=None, version_type=None): + super(TfvcItemDescriptor, self).__init__() + self.path = path + self.recursion_level = recursion_level + self.version = version + self.version_option = version_option + self.version_type = version_type diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_item_request_data.py b/vsts/vsts/tfvc/v4_1/models/tfvc_item_request_data.py new file mode 100644 index 00000000..981cd2bb --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_item_request_data.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcItemRequestData(Model): + """TfvcItemRequestData. + + :param include_content_metadata: If true, include metadata about the file type + :type include_content_metadata: bool + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + :param item_descriptors: + :type item_descriptors: list of :class:`TfvcItemDescriptor ` + """ + + _attribute_map = { + 'include_content_metadata': {'key': 'includeContentMetadata', 'type': 'bool'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'item_descriptors': {'key': 'itemDescriptors', 'type': '[TfvcItemDescriptor]'} + } + + def __init__(self, include_content_metadata=None, include_links=None, item_descriptors=None): + super(TfvcItemRequestData, self).__init__() + self.include_content_metadata = include_content_metadata + self.include_links = include_links + self.item_descriptors = item_descriptors diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_label.py b/vsts/vsts/tfvc/v4_1/models/tfvc_label.py new file mode 100644 index 00000000..c4c6c477 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_label.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_label_ref import TfvcLabelRef + + +class TfvcLabel(TfvcLabelRef): + """TfvcLabel. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param id: + :type id: int + :param label_scope: + :type label_scope: str + :param modified_date: + :type modified_date: datetime + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + :param items: + :type items: list of :class:`TfvcItem ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'label_scope': {'key': 'labelScope', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[TfvcItem]'} + } + + def __init__(self, _links=None, description=None, id=None, label_scope=None, modified_date=None, name=None, owner=None, url=None, items=None): + super(TfvcLabel, self).__init__(_links=_links, description=description, id=id, label_scope=label_scope, modified_date=modified_date, name=name, owner=owner, url=url) + self.items = items diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_label_ref.py b/vsts/vsts/tfvc/v4_1/models/tfvc_label_ref.py new file mode 100644 index 00000000..d614f0fb --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_label_ref.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcLabelRef(Model): + """TfvcLabelRef. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param description: + :type description: str + :param id: + :type id: int + :param label_scope: + :type label_scope: str + :param modified_date: + :type modified_date: datetime + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'label_scope': {'key': 'labelScope', 'type': 'str'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, description=None, id=None, label_scope=None, modified_date=None, name=None, owner=None, url=None): + super(TfvcLabelRef, self).__init__() + self._links = _links + self.description = description + self.id = id + self.label_scope = label_scope + self.modified_date = modified_date + self.name = name + self.owner = owner + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_label_request_data.py b/vsts/vsts/tfvc/v4_1/models/tfvc_label_request_data.py new file mode 100644 index 00000000..bd8d12cc --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_label_request_data.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcLabelRequestData(Model): + """TfvcLabelRequestData. + + :param include_links: Whether to include the _links field on the shallow references + :type include_links: bool + :param item_label_filter: + :type item_label_filter: str + :param label_scope: + :type label_scope: str + :param max_item_count: + :type max_item_count: int + :param name: + :type name: str + :param owner: + :type owner: str + """ + + _attribute_map = { + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'item_label_filter': {'key': 'itemLabelFilter', 'type': 'str'}, + 'label_scope': {'key': 'labelScope', 'type': 'str'}, + 'max_item_count': {'key': 'maxItemCount', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'} + } + + def __init__(self, include_links=None, item_label_filter=None, label_scope=None, max_item_count=None, name=None, owner=None): + super(TfvcLabelRequestData, self).__init__() + self.include_links = include_links + self.item_label_filter = item_label_filter + self.label_scope = label_scope + self.max_item_count = max_item_count + self.name = name + self.owner = owner diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_merge_source.py b/vsts/vsts/tfvc/v4_1/models/tfvc_merge_source.py new file mode 100644 index 00000000..8516dbd5 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_merge_source.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcMergeSource(Model): + """TfvcMergeSource. + + :param is_rename: Indicates if this a rename source. If false, it is a merge source. + :type is_rename: bool + :param server_item: The server item of the merge source + :type server_item: str + :param version_from: Start of the version range + :type version_from: int + :param version_to: End of the version range + :type version_to: int + """ + + _attribute_map = { + 'is_rename': {'key': 'isRename', 'type': 'bool'}, + 'server_item': {'key': 'serverItem', 'type': 'str'}, + 'version_from': {'key': 'versionFrom', 'type': 'int'}, + 'version_to': {'key': 'versionTo', 'type': 'int'} + } + + def __init__(self, is_rename=None, server_item=None, version_from=None, version_to=None): + super(TfvcMergeSource, self).__init__() + self.is_rename = is_rename + self.server_item = server_item + self.version_from = version_from + self.version_to = version_to diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_policy_failure_info.py b/vsts/vsts/tfvc/v4_1/models/tfvc_policy_failure_info.py new file mode 100644 index 00000000..72ab75d8 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_policy_failure_info.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcPolicyFailureInfo(Model): + """TfvcPolicyFailureInfo. + + :param message: + :type message: str + :param policy_name: + :type policy_name: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'} + } + + def __init__(self, message=None, policy_name=None): + super(TfvcPolicyFailureInfo, self).__init__() + self.message = message + self.policy_name = policy_name diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_policy_override_info.py b/vsts/vsts/tfvc/v4_1/models/tfvc_policy_override_info.py new file mode 100644 index 00000000..9477c03a --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_policy_override_info.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcPolicyOverrideInfo(Model): + """TfvcPolicyOverrideInfo. + + :param comment: + :type comment: str + :param policy_failures: + :type policy_failures: list of :class:`TfvcPolicyFailureInfo ` + """ + + _attribute_map = { + 'comment': {'key': 'comment', 'type': 'str'}, + 'policy_failures': {'key': 'policyFailures', 'type': '[TfvcPolicyFailureInfo]'} + } + + def __init__(self, comment=None, policy_failures=None): + super(TfvcPolicyOverrideInfo, self).__init__() + self.comment = comment + self.policy_failures = policy_failures diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_shallow_branch_ref.py b/vsts/vsts/tfvc/v4_1/models/tfvc_shallow_branch_ref.py new file mode 100644 index 00000000..3c863aa0 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_shallow_branch_ref.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcShallowBranchRef(Model): + """TfvcShallowBranchRef. + + :param path: Path for the branch. + :type path: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, path=None): + super(TfvcShallowBranchRef, self).__init__() + self.path = path diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset.py b/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset.py new file mode 100644 index 00000000..9562f3f6 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 .tfvc_shelveset_ref import TfvcShelvesetRef + + +class TfvcShelveset(TfvcShelvesetRef): + """TfvcShelveset. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param comment: + :type comment: str + :param comment_truncated: + :type comment_truncated: bool + :param created_date: + :type created_date: datetime + :param id: + :type id: str + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + :param changes: + :type changes: list of :class:`TfvcChange ` + :param notes: + :type notes: list of :class:`CheckinNote ` + :param policy_override: + :type policy_override: :class:`TfvcPolicyOverrideInfo ` + :param work_items: + :type work_items: list of :class:`AssociatedWorkItem ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'}, + 'changes': {'key': 'changes', 'type': '[TfvcChange]'}, + 'notes': {'key': 'notes', 'type': '[CheckinNote]'}, + 'policy_override': {'key': 'policyOverride', 'type': 'TfvcPolicyOverrideInfo'}, + 'work_items': {'key': 'workItems', 'type': '[AssociatedWorkItem]'} + } + + def __init__(self, _links=None, comment=None, comment_truncated=None, created_date=None, id=None, name=None, owner=None, url=None, changes=None, notes=None, policy_override=None, work_items=None): + super(TfvcShelveset, self).__init__(_links=_links, comment=comment, comment_truncated=comment_truncated, created_date=created_date, id=id, name=name, owner=owner, url=url) + self.changes = changes + self.notes = notes + self.policy_override = policy_override + self.work_items = work_items diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset_ref.py b/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset_ref.py new file mode 100644 index 00000000..10a96a20 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset_ref.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcShelvesetRef(Model): + """TfvcShelvesetRef. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param comment: + :type comment: str + :param comment_truncated: + :type comment_truncated: bool + :param created_date: + :type created_date: datetime + :param id: + :type id: str + :param name: + :type name: str + :param owner: + :type owner: :class:`IdentityRef ` + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'IdentityRef'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, comment=None, comment_truncated=None, created_date=None, id=None, name=None, owner=None, url=None): + super(TfvcShelvesetRef, self).__init__() + self._links = _links + self.comment = comment + self.comment_truncated = comment_truncated + self.created_date = created_date + self.id = id + self.name = name + self.owner = owner + self.url = url diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset_request_data.py b/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset_request_data.py new file mode 100644 index 00000000..4d9c1442 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_shelveset_request_data.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcShelvesetRequestData(Model): + """TfvcShelvesetRequestData. + + :param include_details: Whether to include policyOverride and notes Only applies when requesting a single deep shelveset + :type include_details: bool + :param include_links: Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset. + :type include_links: bool + :param include_work_items: Whether to include workItems + :type include_work_items: bool + :param max_change_count: Max number of changes to include + :type max_change_count: int + :param max_comment_length: Max length of comment + :type max_comment_length: int + :param name: Shelveset's name + :type name: str + :param owner: Owner's ID. Could be a name or a guid. + :type owner: str + """ + + _attribute_map = { + 'include_details': {'key': 'includeDetails', 'type': 'bool'}, + 'include_links': {'key': 'includeLinks', 'type': 'bool'}, + 'include_work_items': {'key': 'includeWorkItems', 'type': 'bool'}, + 'max_change_count': {'key': 'maxChangeCount', 'type': 'int'}, + 'max_comment_length': {'key': 'maxCommentLength', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'owner': {'key': 'owner', 'type': 'str'} + } + + def __init__(self, include_details=None, include_links=None, include_work_items=None, max_change_count=None, max_comment_length=None, name=None, owner=None): + super(TfvcShelvesetRequestData, self).__init__() + self.include_details = include_details + self.include_links = include_links + self.include_work_items = include_work_items + self.max_change_count = max_change_count + self.max_comment_length = max_comment_length + self.name = name + self.owner = owner diff --git a/vsts/vsts/tfvc/v4_1/models/tfvc_version_descriptor.py b/vsts/vsts/tfvc/v4_1/models/tfvc_version_descriptor.py new file mode 100644 index 00000000..13187560 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/tfvc_version_descriptor.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TfvcVersionDescriptor(Model): + """TfvcVersionDescriptor. + + :param version: + :type version: str + :param version_option: + :type version_option: object + :param version_type: + :type version_type: object + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'version_option': {'key': 'versionOption', 'type': 'object'}, + 'version_type': {'key': 'versionType', 'type': 'object'} + } + + def __init__(self, version=None, version_option=None, version_type=None): + super(TfvcVersionDescriptor, self).__init__() + self.version = version + self.version_option = version_option + self.version_type = version_type diff --git a/vsts/vsts/tfvc/v4_1/models/version_control_project_info.py b/vsts/vsts/tfvc/v4_1/models/version_control_project_info.py new file mode 100644 index 00000000..3ec9fc3d --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/version_control_project_info.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 VersionControlProjectInfo(Model): + """VersionControlProjectInfo. + + :param default_source_control_type: + :type default_source_control_type: object + :param project: + :type project: :class:`TeamProjectReference ` + :param supports_git: + :type supports_git: bool + :param supports_tFVC: + :type supports_tFVC: bool + """ + + _attribute_map = { + 'default_source_control_type': {'key': 'defaultSourceControlType', 'type': 'object'}, + 'project': {'key': 'project', 'type': 'TeamProjectReference'}, + 'supports_git': {'key': 'supportsGit', 'type': 'bool'}, + 'supports_tFVC': {'key': 'supportsTFVC', 'type': 'bool'} + } + + def __init__(self, default_source_control_type=None, project=None, supports_git=None, supports_tFVC=None): + super(VersionControlProjectInfo, self).__init__() + self.default_source_control_type = default_source_control_type + self.project = project + self.supports_git = supports_git + self.supports_tFVC = supports_tFVC diff --git a/vsts/vsts/tfvc/v4_1/models/vsts_info.py b/vsts/vsts/tfvc/v4_1/models/vsts_info.py new file mode 100644 index 00000000..294db212 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/models/vsts_info.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 VstsInfo(Model): + """VstsInfo. + + :param collection: + :type collection: :class:`TeamProjectCollectionReference ` + :param repository: + :type repository: :class:`GitRepository ` + :param server_url: + :type server_url: str + """ + + _attribute_map = { + 'collection': {'key': 'collection', 'type': 'TeamProjectCollectionReference'}, + 'repository': {'key': 'repository', 'type': 'GitRepository'}, + 'server_url': {'key': 'serverUrl', 'type': 'str'} + } + + def __init__(self, collection=None, repository=None, server_url=None): + super(VstsInfo, self).__init__() + self.collection = collection + self.repository = repository + self.server_url = server_url diff --git a/vsts/vsts/tfvc/v4_1/tfvc_client.py b/vsts/vsts/tfvc/v4_1/tfvc_client.py new file mode 100644 index 00000000..3a6e87f5 --- /dev/null +++ b/vsts/vsts/tfvc/v4_1/tfvc_client.py @@ -0,0 +1,736 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class TfvcClient(VssClient): + """Tfvc + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(TfvcClient, 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 = '8aa40520-446d-40e6-89f6-9c9f9ce44c48' + + def get_branch(self, path, project=None, include_parent=None, include_children=None): + """GetBranch. + [Preview API] Get a single branch hierarchy at the given path with parents or children as specified. + :param str path: Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. + :param str project: Project ID or project name + :param bool include_parent: Return the parent branch, if there is one. Default: False + :param bool include_children: Return child branches, if there are any. Default: False + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if include_parent is not None: + query_parameters['includeParent'] = self._serialize.query('include_parent', include_parent, 'bool') + if include_children is not None: + query_parameters['includeChildren'] = self._serialize.query('include_children', include_children, 'bool') + response = self._send(http_method='GET', + location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcBranch', response) + + def get_branches(self, project=None, include_parent=None, include_children=None, include_deleted=None, include_links=None): + """GetBranches. + [Preview API] Get a collection of branch roots -- first-level children, branches with no parents. + :param str project: Project ID or project name + :param bool include_parent: Return the parent branch, if there is one. Default: False + :param bool include_children: Return the child branches for each root branch. Default: False + :param bool include_deleted: Return deleted branches. Default: False + :param bool include_links: Return links. Default: False + :rtype: [TfvcBranch] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if include_parent is not None: + query_parameters['includeParent'] = self._serialize.query('include_parent', include_parent, 'bool') + if include_children is not None: + query_parameters['includeChildren'] = self._serialize.query('include_children', include_children, 'bool') + if include_deleted is not None: + query_parameters['includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') + if include_links is not None: + query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') + response = self._send(http_method='GET', + location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcBranch]', response) + + def get_branch_refs(self, scope_path, project=None, include_deleted=None, include_links=None): + """GetBranchRefs. + [Preview API] Get branch hierarchies below the specified scopePath + :param str scope_path: Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. + :param str project: Project ID or project name + :param bool include_deleted: Return deleted branches. Default: False + :param bool include_links: Return links. Default: False + :rtype: [TfvcBranchRef] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if include_deleted is not None: + query_parameters['includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') + if include_links is not None: + query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') + response = self._send(http_method='GET', + location_id='bc1f417e-239d-42e7-85e1-76e80cb2d6eb', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcBranchRef]', response) + + def get_changeset_changes(self, id=None, skip=None, top=None): + """GetChangesetChanges. + [Preview API] Retrieve Tfvc changes for a given changeset. + :param int id: ID of the changeset. Default: null + :param int skip: Number of results to skip. Default: null + :param int top: The maximum number of results to return. Default: null + :rtype: [TfvcChange] + """ + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + query_parameters = {} + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='f32b86f2-15b9-4fe6-81b1-6f8938617ee5', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcChange]', response) + + def create_changeset(self, changeset, project=None): + """CreateChangeset. + [Preview API] Create a new changeset. + :param :class:` ` changeset: + :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(changeset, 'TfvcChangeset') + response = self._send(http_method='POST', + location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', + version='4.1-preview.3', + route_values=route_values, + content=content) + return self._deserialize('TfvcChangesetRef', response) + + def get_changeset(self, id, project=None, max_change_count=None, include_details=None, include_work_items=None, max_comment_length=None, include_source_rename=None, skip=None, top=None, orderby=None, search_criteria=None): + """GetChangeset. + [Preview API] Retrieve a Tfvc Changeset + :param int id: Changeset Id to retrieve. + :param str project: Project ID or project name + :param int max_change_count: Number of changes to return (maximum 100 changes) Default: 0 + :param bool include_details: Include policy details and check-in notes in the response. Default: false + :param bool include_work_items: Include workitems. Default: false + :param int max_comment_length: Include details about associated work items in the response. Default: null + :param bool include_source_rename: Include renames. Default: false + :param int skip: Number of results to skip. Default: null + :param int top: The maximum number of results to return. Default: null + :param str orderby: Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + query_parameters = {} + if max_change_count is not None: + query_parameters['maxChangeCount'] = self._serialize.query('max_change_count', max_change_count, 'int') + if include_details is not None: + query_parameters['includeDetails'] = self._serialize.query('include_details', include_details, 'bool') + if include_work_items is not None: + query_parameters['includeWorkItems'] = self._serialize.query('include_work_items', include_work_items, 'bool') + if max_comment_length is not None: + query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') + if include_source_rename is not None: + query_parameters['includeSourceRename'] = self._serialize.query('include_source_rename', include_source_rename, 'bool') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if search_criteria is not None: + if search_criteria.item_path is not None: + query_parameters['searchCriteria.itemPath'] = search_criteria.item_path + if search_criteria.author is not None: + query_parameters['searchCriteria.author'] = search_criteria.author + if search_criteria.from_date is not None: + query_parameters['searchCriteria.fromDate'] = search_criteria.from_date + if search_criteria.to_date is not None: + query_parameters['searchCriteria.toDate'] = search_criteria.to_date + if search_criteria.from_id is not None: + query_parameters['searchCriteria.fromId'] = search_criteria.from_id + if search_criteria.to_id is not None: + query_parameters['searchCriteria.toId'] = search_criteria.to_id + if search_criteria.follow_renames is not None: + query_parameters['searchCriteria.followRenames'] = search_criteria.follow_renames + if search_criteria.include_links is not None: + query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links + response = self._send(http_method='GET', + location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcChangeset', response) + + def get_changesets(self, project=None, max_comment_length=None, skip=None, top=None, orderby=None, search_criteria=None): + """GetChangesets. + [Preview API] Retrieve Tfvc Changesets + :param str project: Project ID or project name + :param int max_comment_length: Include details about associated work items in the response. Default: null + :param int skip: Number of results to skip. Default: null + :param int top: The maximum number of results to return. Default: null + :param str orderby: Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + :param :class:` ` search_criteria: Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + :rtype: [TfvcChangesetRef] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if max_comment_length is not None: + query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if orderby is not None: + query_parameters['$orderby'] = self._serialize.query('orderby', orderby, 'str') + if search_criteria is not None: + if search_criteria.item_path is not None: + query_parameters['searchCriteria.itemPath'] = search_criteria.item_path + if search_criteria.author is not None: + query_parameters['searchCriteria.author'] = search_criteria.author + if search_criteria.from_date is not None: + query_parameters['searchCriteria.fromDate'] = search_criteria.from_date + if search_criteria.to_date is not None: + query_parameters['searchCriteria.toDate'] = search_criteria.to_date + if search_criteria.from_id is not None: + query_parameters['searchCriteria.fromId'] = search_criteria.from_id + if search_criteria.to_id is not None: + query_parameters['searchCriteria.toId'] = search_criteria.to_id + if search_criteria.follow_renames is not None: + query_parameters['searchCriteria.followRenames'] = search_criteria.follow_renames + if search_criteria.include_links is not None: + query_parameters['searchCriteria.includeLinks'] = search_criteria.include_links + response = self._send(http_method='GET', + location_id='0bc8f0a4-6bfb-42a9-ba84-139da7b99c49', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcChangesetRef]', response) + + def get_batched_changesets(self, changesets_request_data): + """GetBatchedChangesets. + [Preview API] Returns changesets for a given list of changeset Ids. + :param :class:` ` changesets_request_data: List of changeset IDs. + :rtype: [TfvcChangesetRef] + """ + content = self._serialize.body(changesets_request_data, 'TfvcChangesetsRequestData') + response = self._send(http_method='POST', + location_id='b7e7c173-803c-4fea-9ec8-31ee35c5502a', + version='4.1-preview.1', + content=content, + returns_collection=True) + return self._deserialize('[TfvcChangesetRef]', response) + + def get_changeset_work_items(self, id=None): + """GetChangesetWorkItems. + [Preview API] Retrieves the work items associated with a particular changeset. + :param int id: ID of the changeset. Default: null + :rtype: [AssociatedWorkItem] + """ + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + response = self._send(http_method='GET', + location_id='64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[AssociatedWorkItem]', response) + + def get_items_batch(self, item_request_data, project=None): + """GetItemsBatch. + [Preview API] Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + :param :class:` ` item_request_data: + :param str project: Project ID or project name + :rtype: [[TfvcItem]] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(item_request_data, 'TfvcItemRequestData') + response = self._send(http_method='POST', + location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[[TfvcItem]]', response) + + def get_items_batch_zip(self, item_request_data, project=None): + """GetItemsBatchZip. + [Preview API] Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + :param :class:` ` item_request_data: + :param str project: Project ID or project name + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(item_request_data, 'TfvcItemRequestData') + response = self._send(http_method='POST', + location_id='fe6f827b-5f64-480f-b8af-1eca3b80e833', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('object', response) + + def get_item(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None): + """GetItem. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: Version control path of an individual item to return. + :param str project: Project ID or project name + :param str file_name: file name of item returned. + :param bool download: If true, create a downloadable attachment. + :param str scope_path: Version control path of a folder to return multiple items. + :param str recursion_level: None (just the item), or OneLevel (contents of a folder). + :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcItem', response) + + def get_item_content(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None): + """GetItemContent. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: Version control path of an individual item to return. + :param str project: Project ID or project name + :param str file_name: file name of item returned. + :param bool download: If true, create a downloadable attachment. + :param str scope_path: Version control path of a folder to return multiple items. + :param str recursion_level: None (just the item), or OneLevel (contents of a folder). + :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_items(self, project=None, scope_path=None, recursion_level=None, include_links=None, version_descriptor=None): + """GetItems. + [Preview API] Get a list of Tfvc items + :param str project: Project ID or project name + :param str scope_path: Version control path of a folder to return multiple items. + :param str recursion_level: None (just the item), or OneLevel (contents of a folder). + :param bool include_links: True to include links. + :param :class:` ` version_descriptor: + :rtype: [TfvcItem] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if include_links is not None: + query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcItem]', response) + + def get_item_text(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None): + """GetItemText. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: Version control path of an individual item to return. + :param str project: Project ID or project name + :param str file_name: file name of item returned. + :param bool download: If true, create a downloadable attachment. + :param str scope_path: Version control path of a folder to return multiple items. + :param str recursion_level: None (just the item), or OneLevel (contents of a folder). + :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_item_zip(self, path, project=None, file_name=None, download=None, scope_path=None, recursion_level=None, version_descriptor=None, include_content=None): + """GetItemZip. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + :param str path: Version control path of an individual item to return. + :param str project: Project ID or project name + :param str file_name: file name of item returned. + :param bool download: If true, create a downloadable attachment. + :param str scope_path: Version control path of a folder to return multiple items. + :param str recursion_level: None (just the item), or OneLevel (contents of a folder). + :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param bool include_content: Set to true to include item content when requesting json. Default is false. + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if file_name is not None: + query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') + if scope_path is not None: + query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_option is not None: + query_parameters['versionDescriptor.VersionOption'] = version_descriptor.version_option + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') + response = self._send(http_method='GET', + location_id='ba9fc436-9a38-4578-89d6-e4f3241f5040', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_label_items(self, label_id, top=None, skip=None): + """GetLabelItems. + [Preview API] Get items under a label. + :param str label_id: Unique identifier of label + :param int top: Max number of items to return + :param int skip: Number of items to skip + :rtype: [TfvcItem] + """ + route_values = {} + if label_id is not None: + route_values['labelId'] = self._serialize.url('label_id', label_id, 'str') + query_parameters = {} + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='06166e34-de17-4b60-8cd1-23182a346fda', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcItem]', response) + + def get_label(self, label_id, request_data, project=None): + """GetLabel. + [Preview API] Get a single deep label. + :param str label_id: Unique identifier of label + :param :class:` ` request_data: maxItemCount + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if label_id is not None: + route_values['labelId'] = self._serialize.url('label_id', label_id, 'str') + query_parameters = {} + if request_data is not None: + if request_data.label_scope is not None: + query_parameters['requestData.LabelScope'] = request_data.label_scope + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.item_label_filter is not None: + query_parameters['requestData.ItemLabelFilter'] = request_data.item_label_filter + if request_data.max_item_count is not None: + query_parameters['requestData.MaxItemCount'] = request_data.max_item_count + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + response = self._send(http_method='GET', + location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('TfvcLabel', response) + + def get_labels(self, request_data, project=None, top=None, skip=None): + """GetLabels. + [Preview API] Get a collection of shallow label references. + :param :class:` ` request_data: labelScope, name, owner, and itemLabelFilter + :param str project: Project ID or project name + :param int top: Max number of labels to return + :param int skip: Number of labels to skip + :rtype: [TfvcLabelRef] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if request_data is not None: + if request_data.label_scope is not None: + query_parameters['requestData.LabelScope'] = request_data.label_scope + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.item_label_filter is not None: + query_parameters['requestData.ItemLabelFilter'] = request_data.item_label_filter + if request_data.max_item_count is not None: + query_parameters['requestData.MaxItemCount'] = request_data.max_item_count + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='a5d9bd7f-b661-4d0e-b9be-d9c16affae54', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcLabelRef]', response) + + def get_shelveset_changes(self, shelveset_id, top=None, skip=None): + """GetShelvesetChanges. + [Preview API] Get changes included in a shelveset. + :param str shelveset_id: Shelveset's unique ID + :param int top: Max number of changes to return + :param int skip: Number of changes to skip + :rtype: [TfvcChange] + """ + query_parameters = {} + if shelveset_id is not None: + query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='dbaf075b-0445-4c34-9e5b-82292f856522', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcChange]', response) + + def get_shelveset(self, shelveset_id, request_data=None): + """GetShelveset. + [Preview API] Get a single deep shelveset. + :param str shelveset_id: Shelveset's unique ID + :param :class:` ` request_data: includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + :rtype: :class:` ` + """ + query_parameters = {} + if shelveset_id is not None: + query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') + if request_data is not None: + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.max_comment_length is not None: + query_parameters['requestData.MaxCommentLength'] = request_data.max_comment_length + if request_data.max_change_count is not None: + query_parameters['requestData.MaxChangeCount'] = request_data.max_change_count + if request_data.include_details is not None: + query_parameters['requestData.IncludeDetails'] = request_data.include_details + if request_data.include_work_items is not None: + query_parameters['requestData.IncludeWorkItems'] = request_data.include_work_items + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + response = self._send(http_method='GET', + location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', + version='4.1-preview.1', + query_parameters=query_parameters) + return self._deserialize('TfvcShelveset', response) + + def get_shelvesets(self, request_data=None, top=None, skip=None): + """GetShelvesets. + [Preview API] Return a collection of shallow shelveset references. + :param :class:` ` request_data: name, owner, and maxCommentLength + :param int top: Max number of shelvesets to return + :param int skip: Number of shelvesets to skip + :rtype: [TfvcShelvesetRef] + """ + query_parameters = {} + if request_data is not None: + if request_data.name is not None: + query_parameters['requestData.Name'] = request_data.name + if request_data.owner is not None: + query_parameters['requestData.Owner'] = request_data.owner + if request_data.max_comment_length is not None: + query_parameters['requestData.MaxCommentLength'] = request_data.max_comment_length + if request_data.max_change_count is not None: + query_parameters['requestData.MaxChangeCount'] = request_data.max_change_count + if request_data.include_details is not None: + query_parameters['requestData.IncludeDetails'] = request_data.include_details + if request_data.include_work_items is not None: + query_parameters['requestData.IncludeWorkItems'] = request_data.include_work_items + if request_data.include_links is not None: + query_parameters['requestData.includeLinks'] = request_data.include_links + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='e36d44fb-e907-4b0a-b194-f83f1ed32ad3', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TfvcShelvesetRef]', response) + + def get_shelveset_work_items(self, shelveset_id): + """GetShelvesetWorkItems. + [Preview API] Get work items associated with a shelveset. + :param str shelveset_id: Shelveset's unique ID + :rtype: [AssociatedWorkItem] + """ + query_parameters = {} + if shelveset_id is not None: + query_parameters['shelvesetId'] = self._serialize.query('shelveset_id', shelveset_id, 'str') + response = self._send(http_method='GET', + location_id='a7a0c1c1-373e-425a-b031-a519474d743d', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[AssociatedWorkItem]', response) + diff --git a/vsts/vsts/version.py b/vsts/vsts/version.py index f8340f47..8492465c 100644 --- a/vsts/vsts/version.py +++ b/vsts/vsts/version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -VERSION = "0.1.0b0" +VERSION = "0.1.1" diff --git a/vsts/vsts/vss_client.py b/vsts/vsts/vss_client.py index 687c7ef4..197f5cc0 100644 --- a/vsts/vsts/vss_client.py +++ b/vsts/vsts/vss_client.py @@ -3,6 +3,8 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +from __future__ import print_function + import logging import os import re @@ -18,7 +20,7 @@ from ._file_cache import OPTIONS_CACHE as OPTIONS_FILE_CACHE -class VssClient: +class VssClient(object): """VssClient. :param str base_url: Service URL :param Authentication creds: Authenticated credentials. @@ -225,9 +227,14 @@ def _handle_error(self, request, response): # Following code is to handle this unusual exception json case. # TODO: dig into this. collection_wrapper = self._base_deserialize('VssJsonCollectionWrapper', response) - if collection_wrapper is not None: + if collection_wrapper is not None and collection_wrapper.value is not None: wrapped_exception = self._base_deserialize('ImproperException', collection_wrapper.value) - raise VstsClientRequestError(wrapped_exception.message) + if wrapped_exception is not None and wrapped_exception.message is not None: + raise VstsClientRequestError(wrapped_exception.message) + # if we get here we still have not raised an exception, try to deserialize as a System Exception + system_exception = self._base_deserialize('SystemException', response) + if system_exception is not None and system_exception.message is not None: + raise VstsClientRequestError(system_exception.message) except DeserializationError: pass elif response.content is not None: diff --git a/vsts/vsts/vss_connection.py b/vsts/vsts/vss_connection.py index 10361408..b150b9a9 100644 --- a/vsts/vsts/vss_connection.py +++ b/vsts/vsts/vss_connection.py @@ -12,7 +12,7 @@ from .vss_client_configuration import VssClientConfiguration -class VssConnection: +class VssConnection(object): """VssConnection. """ @@ -59,7 +59,7 @@ def _get_url_for_client_instance(self, client_class): if resource_areas is None: raise VstsClientRequestError(('Failed to retrieve resource areas ' + 'from server: {url}').format(url=self.base_url)) - if len(resource_areas) == 0: + if not resource_areas: # For OnPrem environments we get an empty list. return self.base_url for resource_area in resource_areas: diff --git a/vsts/vsts/work/__init__.py b/vsts/vsts/work/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/work/v4_0/__init__.py b/vsts/vsts/work/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work/v4_0/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/work/v4_0/models/__init__.py b/vsts/vsts/work/v4_0/models/__init__.py new file mode 100644 index 00000000..3d4a641c --- /dev/null +++ b/vsts/vsts/work/v4_0/models/__init__.py @@ -0,0 +1,131 @@ +# -------------------------------------------------------------------------------------------- +# 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 .activity import Activity +from .attribute import attribute +from .backlog_column import BacklogColumn +from .backlog_configuration import BacklogConfiguration +from .backlog_fields import BacklogFields +from .backlog_level import BacklogLevel +from .backlog_level_configuration import BacklogLevelConfiguration +from .board import Board +from .board_card_rule_settings import BoardCardRuleSettings +from .board_card_settings import BoardCardSettings +from .board_chart import BoardChart +from .board_chart_reference import BoardChartReference +from .board_column import BoardColumn +from .board_fields import BoardFields +from .board_filter_settings import BoardFilterSettings +from .board_reference import BoardReference +from .board_row import BoardRow +from .board_suggested_value import BoardSuggestedValue +from .board_user_settings import BoardUserSettings +from .capacity_patch import CapacityPatch +from .category_configuration import CategoryConfiguration +from .create_plan import CreatePlan +from .date_range import DateRange +from .delivery_view_data import DeliveryViewData +from .field_reference import FieldReference +from .field_setting import FieldSetting +from .filter_clause import FilterClause +from .filter_group import FilterGroup +from .filter_model import FilterModel +from .identity_ref import IdentityRef +from .member import Member +from .parent_child_wIMap import ParentChildWIMap +from .plan import Plan +from .plan_view_data import PlanViewData +from .process_configuration import ProcessConfiguration +from .reference_links import ReferenceLinks +from .rule import Rule +from .team_context import TeamContext +from .team_field_value import TeamFieldValue +from .team_field_values import TeamFieldValues +from .team_field_values_patch import TeamFieldValuesPatch +from .team_iteration_attributes import TeamIterationAttributes +from .team_member_capacity import TeamMemberCapacity +from .team_setting import TeamSetting +from .team_settings_data_contract_base import TeamSettingsDataContractBase +from .team_settings_days_off import TeamSettingsDaysOff +from .team_settings_days_off_patch import TeamSettingsDaysOffPatch +from .team_settings_iteration import TeamSettingsIteration +from .team_settings_patch import TeamSettingsPatch +from .timeline_criteria_status import TimelineCriteriaStatus +from .timeline_iteration_status import TimelineIterationStatus +from .timeline_team_data import TimelineTeamData +from .timeline_team_iteration import TimelineTeamIteration +from .timeline_team_status import TimelineTeamStatus +from .update_plan import UpdatePlan +from .work_item_color import WorkItemColor +from .work_item_field_reference import WorkItemFieldReference +from .work_item_tracking_resource_reference import WorkItemTrackingResourceReference +from .work_item_type_reference import WorkItemTypeReference +from .work_item_type_state_info import WorkItemTypeStateInfo + +__all__ = [ + 'Activity', + 'attribute', + 'BacklogColumn', + 'BacklogConfiguration', + 'BacklogFields', + 'BacklogLevel', + 'BacklogLevelConfiguration', + 'Board', + 'BoardCardRuleSettings', + 'BoardCardSettings', + 'BoardChart', + 'BoardChartReference', + 'BoardColumn', + 'BoardFields', + 'BoardFilterSettings', + 'BoardReference', + 'BoardRow', + 'BoardSuggestedValue', + 'BoardUserSettings', + 'CapacityPatch', + 'CategoryConfiguration', + 'CreatePlan', + 'DateRange', + 'DeliveryViewData', + 'FieldReference', + 'FieldSetting', + 'FilterClause', + 'FilterGroup', + 'FilterModel', + 'IdentityRef', + 'Member', + 'ParentChildWIMap', + 'Plan', + 'PlanViewData', + 'ProcessConfiguration', + 'ReferenceLinks', + 'Rule', + 'TeamContext', + 'TeamFieldValue', + 'TeamFieldValues', + 'TeamFieldValuesPatch', + 'TeamIterationAttributes', + 'TeamMemberCapacity', + 'TeamSetting', + 'TeamSettingsDataContractBase', + 'TeamSettingsDaysOff', + 'TeamSettingsDaysOffPatch', + 'TeamSettingsIteration', + 'TeamSettingsPatch', + 'TimelineCriteriaStatus', + 'TimelineIterationStatus', + 'TimelineTeamData', + 'TimelineTeamIteration', + 'TimelineTeamStatus', + 'UpdatePlan', + 'WorkItemColor', + 'WorkItemFieldReference', + 'WorkItemTrackingResourceReference', + 'WorkItemTypeReference', + 'WorkItemTypeStateInfo', +] diff --git a/vsts/vsts/work/v4_0/models/activity.py b/vsts/vsts/work/v4_0/models/activity.py new file mode 100644 index 00000000..2b9c616f --- /dev/null +++ b/vsts/vsts/work/v4_0/models/activity.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Activity(Model): + """Activity. + + :param capacity_per_day: + :type capacity_per_day: number + :param name: + :type name: str + """ + + _attribute_map = { + 'capacity_per_day': {'key': 'capacityPerDay', 'type': 'number'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, capacity_per_day=None, name=None): + super(Activity, self).__init__() + self.capacity_per_day = capacity_per_day + self.name = name diff --git a/vsts/vsts/work/v4_0/models/attribute.py b/vsts/vsts/work/v4_0/models/attribute.py new file mode 100644 index 00000000..6f113cc3 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/attribute.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class attribute(dict): + """attribute. + + """ + + _attribute_map = { + } + + def __init__(self): + super(attribute, self).__init__() diff --git a/vsts/vsts/work/v4_0/models/backlog_column.py b/vsts/vsts/work/v4_0/models/backlog_column.py new file mode 100644 index 00000000..c8858fae --- /dev/null +++ b/vsts/vsts/work/v4_0/models/backlog_column.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogColumn(Model): + """BacklogColumn. + + :param column_field_reference: + :type column_field_reference: :class:`WorkItemFieldReference ` + :param width: + :type width: int + """ + + _attribute_map = { + 'column_field_reference': {'key': 'columnFieldReference', 'type': 'WorkItemFieldReference'}, + 'width': {'key': 'width', 'type': 'int'} + } + + def __init__(self, column_field_reference=None, width=None): + super(BacklogColumn, self).__init__() + self.column_field_reference = column_field_reference + self.width = width diff --git a/vsts/vsts/work/v4_0/models/backlog_configuration.py b/vsts/vsts/work/v4_0/models/backlog_configuration.py new file mode 100644 index 00000000..be40efb5 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/backlog_configuration.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogConfiguration(Model): + """BacklogConfiguration. + + :param backlog_fields: Behavior/type field mapping + :type backlog_fields: :class:`BacklogFields ` + :param bugs_behavior: Bugs behavior + :type bugs_behavior: object + :param hidden_backlogs: Hidden Backlog + :type hidden_backlogs: list of str + :param portfolio_backlogs: Portfolio backlog descriptors + :type portfolio_backlogs: list of :class:`BacklogLevelConfiguration ` + :param requirement_backlog: Requirement backlog + :type requirement_backlog: :class:`BacklogLevelConfiguration ` + :param task_backlog: Task backlog + :type task_backlog: :class:`BacklogLevelConfiguration ` + :param url: + :type url: str + :param work_item_type_mapped_states: Mapped states for work item types + :type work_item_type_mapped_states: list of :class:`WorkItemTypeStateInfo ` + """ + + _attribute_map = { + 'backlog_fields': {'key': 'backlogFields', 'type': 'BacklogFields'}, + 'bugs_behavior': {'key': 'bugsBehavior', 'type': 'object'}, + 'hidden_backlogs': {'key': 'hiddenBacklogs', 'type': '[str]'}, + 'portfolio_backlogs': {'key': 'portfolioBacklogs', 'type': '[BacklogLevelConfiguration]'}, + 'requirement_backlog': {'key': 'requirementBacklog', 'type': 'BacklogLevelConfiguration'}, + 'task_backlog': {'key': 'taskBacklog', 'type': 'BacklogLevelConfiguration'}, + 'url': {'key': 'url', 'type': 'str'}, + 'work_item_type_mapped_states': {'key': 'workItemTypeMappedStates', 'type': '[WorkItemTypeStateInfo]'} + } + + def __init__(self, backlog_fields=None, bugs_behavior=None, hidden_backlogs=None, portfolio_backlogs=None, requirement_backlog=None, task_backlog=None, url=None, work_item_type_mapped_states=None): + super(BacklogConfiguration, self).__init__() + self.backlog_fields = backlog_fields + self.bugs_behavior = bugs_behavior + self.hidden_backlogs = hidden_backlogs + self.portfolio_backlogs = portfolio_backlogs + self.requirement_backlog = requirement_backlog + self.task_backlog = task_backlog + self.url = url + self.work_item_type_mapped_states = work_item_type_mapped_states diff --git a/vsts/vsts/work/v4_0/models/backlog_fields.py b/vsts/vsts/work/v4_0/models/backlog_fields.py new file mode 100644 index 00000000..0aa2c795 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/backlog_fields.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogFields(Model): + """BacklogFields. + + :param type_fields: Field Type (e.g. Order, Activity) to Field Reference Name map + :type type_fields: dict + """ + + _attribute_map = { + 'type_fields': {'key': 'typeFields', 'type': '{str}'} + } + + def __init__(self, type_fields=None): + super(BacklogFields, self).__init__() + self.type_fields = type_fields diff --git a/vsts/vsts/work/v4_0/models/backlog_level.py b/vsts/vsts/work/v4_0/models/backlog_level.py new file mode 100644 index 00000000..aaad0af8 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/backlog_level.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogLevel(Model): + """BacklogLevel. + + :param category_reference_name: Reference name of the corresponding WIT category + :type category_reference_name: str + :param plural_name: Plural name for the backlog level + :type plural_name: str + :param work_item_states: Collection of work item states that are included in the plan. The server will filter to only these work item types. + :type work_item_states: list of str + :param work_item_types: Collection of valid workitem type names for the given backlog level + :type work_item_types: list of str + """ + + _attribute_map = { + 'category_reference_name': {'key': 'categoryReferenceName', 'type': 'str'}, + 'plural_name': {'key': 'pluralName', 'type': 'str'}, + 'work_item_states': {'key': 'workItemStates', 'type': '[str]'}, + 'work_item_types': {'key': 'workItemTypes', 'type': '[str]'} + } + + def __init__(self, category_reference_name=None, plural_name=None, work_item_states=None, work_item_types=None): + super(BacklogLevel, self).__init__() + self.category_reference_name = category_reference_name + self.plural_name = plural_name + self.work_item_states = work_item_states + self.work_item_types = work_item_types diff --git a/vsts/vsts/work/v4_0/models/backlog_level_configuration.py b/vsts/vsts/work/v4_0/models/backlog_level_configuration.py new file mode 100644 index 00000000..62a2328d --- /dev/null +++ b/vsts/vsts/work/v4_0/models/backlog_level_configuration.py @@ -0,0 +1,57 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogLevelConfiguration(Model): + """BacklogLevelConfiguration. + + :param add_panel_fields: List of fields to include in Add Panel + :type add_panel_fields: list of :class:`WorkItemFieldReference ` + :param color: Color for the backlog level + :type color: str + :param column_fields: Default list of columns for the backlog + :type column_fields: list of :class:`BacklogColumn ` + :param default_work_item_type: Defaulst Work Item Type for the backlog + :type default_work_item_type: :class:`WorkItemTypeReference ` + :param id: Backlog Id (for Legacy Backlog Level from process config it can be categoryref name) + :type id: str + :param name: Backlog Name + :type name: str + :param rank: Backlog Rank (Taskbacklog is 0) + :type rank: int + :param work_item_count_limit: Max number of work items to show in the given backlog + :type work_item_count_limit: int + :param work_item_types: Work Item types participating in this backlog as known by the project/Process, can be overridden by team settings for bugs + :type work_item_types: list of :class:`WorkItemTypeReference ` + """ + + _attribute_map = { + 'add_panel_fields': {'key': 'addPanelFields', 'type': '[WorkItemFieldReference]'}, + 'color': {'key': 'color', 'type': 'str'}, + 'column_fields': {'key': 'columnFields', 'type': '[BacklogColumn]'}, + 'default_work_item_type': {'key': 'defaultWorkItemType', 'type': 'WorkItemTypeReference'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'work_item_count_limit': {'key': 'workItemCountLimit', 'type': 'int'}, + 'work_item_types': {'key': 'workItemTypes', 'type': '[WorkItemTypeReference]'} + } + + def __init__(self, add_panel_fields=None, color=None, column_fields=None, default_work_item_type=None, id=None, name=None, rank=None, work_item_count_limit=None, work_item_types=None): + super(BacklogLevelConfiguration, self).__init__() + self.add_panel_fields = add_panel_fields + self.color = color + self.column_fields = column_fields + self.default_work_item_type = default_work_item_type + self.id = id + self.name = name + self.rank = rank + self.work_item_count_limit = work_item_count_limit + self.work_item_types = work_item_types diff --git a/vsts/vsts/work/v4_0/models/board.py b/vsts/vsts/work/v4_0/models/board.py new file mode 100644 index 00000000..4ffae814 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board.py @@ -0,0 +1,62 @@ +# -------------------------------------------------------------------------------------------- +# 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 .board_reference import BoardReference + + +class Board(BoardReference): + """Board. + + :param id: Id of the resource + :type id: str + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + :param _links: + :type _links: :class:`ReferenceLinks ` + :param allowed_mappings: + :type allowed_mappings: dict + :param can_edit: + :type can_edit: bool + :param columns: + :type columns: list of :class:`BoardColumn ` + :param fields: + :type fields: :class:`BoardFields ` + :param is_valid: + :type is_valid: bool + :param revision: + :type revision: int + :param rows: + :type rows: list of :class:`BoardRow ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allowed_mappings': {'key': 'allowedMappings', 'type': '{{[str]}}'}, + 'can_edit': {'key': 'canEdit', 'type': 'bool'}, + 'columns': {'key': 'columns', 'type': '[BoardColumn]'}, + 'fields': {'key': 'fields', 'type': 'BoardFields'}, + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'rows': {'key': 'rows', 'type': '[BoardRow]'} + } + + def __init__(self, id=None, name=None, url=None, _links=None, allowed_mappings=None, can_edit=None, columns=None, fields=None, is_valid=None, revision=None, rows=None): + super(Board, self).__init__(id=id, name=name, url=url) + self._links = _links + self.allowed_mappings = allowed_mappings + self.can_edit = can_edit + self.columns = columns + self.fields = fields + self.is_valid = is_valid + self.revision = revision + self.rows = rows diff --git a/vsts/vsts/work/v4_0/models/board_card_rule_settings.py b/vsts/vsts/work/v4_0/models/board_card_rule_settings.py new file mode 100644 index 00000000..c5848fb5 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_card_rule_settings.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardCardRuleSettings(Model): + """BoardCardRuleSettings. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param rules: + :type rules: dict + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'rules': {'key': 'rules', 'type': '{[Rule]}'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, rules=None, url=None): + super(BoardCardRuleSettings, self).__init__() + self._links = _links + self.rules = rules + self.url = url diff --git a/vsts/vsts/work/v4_0/models/board_card_settings.py b/vsts/vsts/work/v4_0/models/board_card_settings.py new file mode 100644 index 00000000..77861a9d --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_card_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardCardSettings(Model): + """BoardCardSettings. + + :param cards: + :type cards: dict + """ + + _attribute_map = { + 'cards': {'key': 'cards', 'type': '{[FieldSetting]}'} + } + + def __init__(self, cards=None): + super(BoardCardSettings, self).__init__() + self.cards = cards diff --git a/vsts/vsts/work/v4_0/models/board_chart.py b/vsts/vsts/work/v4_0/models/board_chart.py new file mode 100644 index 00000000..64275056 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_chart.py @@ -0,0 +1,35 @@ +# -------------------------------------------------------------------------------------------- +# 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 .board_chart_reference import BoardChartReference + + +class BoardChart(BoardChartReference): + """BoardChart. + + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + :param _links: The links for the resource + :type _links: :class:`ReferenceLinks ` + :param settings: The settings for the resource + :type settings: dict + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'settings': {'key': 'settings', 'type': '{object}'} + } + + def __init__(self, name=None, url=None, _links=None, settings=None): + super(BoardChart, self).__init__(name=name, url=url) + self._links = _links + self.settings = settings diff --git a/vsts/vsts/work/v4_0/models/board_chart_reference.py b/vsts/vsts/work/v4_0/models/board_chart_reference.py new file mode 100644 index 00000000..382d9bfc --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_chart_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardChartReference(Model): + """BoardChartReference. + + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, name=None, url=None): + super(BoardChartReference, self).__init__() + self.name = name + self.url = url diff --git a/vsts/vsts/work/v4_0/models/board_column.py b/vsts/vsts/work/v4_0/models/board_column.py new file mode 100644 index 00000000..e994435b --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_column.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardColumn(Model): + """BoardColumn. + + :param column_type: + :type column_type: object + :param description: + :type description: str + :param id: + :type id: str + :param is_split: + :type is_split: bool + :param item_limit: + :type item_limit: int + :param name: + :type name: str + :param state_mappings: + :type state_mappings: dict + """ + + _attribute_map = { + 'column_type': {'key': 'columnType', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_split': {'key': 'isSplit', 'type': 'bool'}, + 'item_limit': {'key': 'itemLimit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'state_mappings': {'key': 'stateMappings', 'type': '{str}'} + } + + def __init__(self, column_type=None, description=None, id=None, is_split=None, item_limit=None, name=None, state_mappings=None): + super(BoardColumn, self).__init__() + self.column_type = column_type + self.description = description + self.id = id + self.is_split = is_split + self.item_limit = item_limit + self.name = name + self.state_mappings = state_mappings diff --git a/vsts/vsts/work/v4_0/models/board_fields.py b/vsts/vsts/work/v4_0/models/board_fields.py new file mode 100644 index 00000000..988ebe21 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_fields.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardFields(Model): + """BoardFields. + + :param column_field: + :type column_field: :class:`FieldReference ` + :param done_field: + :type done_field: :class:`FieldReference ` + :param row_field: + :type row_field: :class:`FieldReference ` + """ + + _attribute_map = { + 'column_field': {'key': 'columnField', 'type': 'FieldReference'}, + 'done_field': {'key': 'doneField', 'type': 'FieldReference'}, + 'row_field': {'key': 'rowField', 'type': 'FieldReference'} + } + + def __init__(self, column_field=None, done_field=None, row_field=None): + super(BoardFields, self).__init__() + self.column_field = column_field + self.done_field = done_field + self.row_field = row_field diff --git a/vsts/vsts/work/v4_0/models/board_filter_settings.py b/vsts/vsts/work/v4_0/models/board_filter_settings.py new file mode 100644 index 00000000..500883d4 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_filter_settings.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardFilterSettings(Model): + """BoardFilterSettings. + + :param criteria: + :type criteria: :class:`FilterModel ` + :param parent_work_item_ids: + :type parent_work_item_ids: list of int + :param query_text: + :type query_text: str + """ + + _attribute_map = { + 'criteria': {'key': 'criteria', 'type': 'FilterModel'}, + 'parent_work_item_ids': {'key': 'parentWorkItemIds', 'type': '[int]'}, + 'query_text': {'key': 'queryText', 'type': 'str'} + } + + def __init__(self, criteria=None, parent_work_item_ids=None, query_text=None): + super(BoardFilterSettings, self).__init__() + self.criteria = criteria + self.parent_work_item_ids = parent_work_item_ids + self.query_text = query_text diff --git a/vsts/vsts/work/v4_0/models/board_reference.py b/vsts/vsts/work/v4_0/models/board_reference.py new file mode 100644 index 00000000..6380e11e --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardReference(Model): + """BoardReference. + + :param id: Id of the resource + :type id: str + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, name=None, url=None): + super(BoardReference, self).__init__() + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/work/v4_0/models/board_row.py b/vsts/vsts/work/v4_0/models/board_row.py new file mode 100644 index 00000000..313e4810 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_row.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardRow(Model): + """BoardRow. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(BoardRow, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/work/v4_0/models/board_suggested_value.py b/vsts/vsts/work/v4_0/models/board_suggested_value.py new file mode 100644 index 00000000..058045af --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_suggested_value.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardSuggestedValue(Model): + """BoardSuggestedValue. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, name=None): + super(BoardSuggestedValue, self).__init__() + self.name = name diff --git a/vsts/vsts/work/v4_0/models/board_user_settings.py b/vsts/vsts/work/v4_0/models/board_user_settings.py new file mode 100644 index 00000000..d20fbc57 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/board_user_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardUserSettings(Model): + """BoardUserSettings. + + :param auto_refresh_state: + :type auto_refresh_state: bool + """ + + _attribute_map = { + 'auto_refresh_state': {'key': 'autoRefreshState', 'type': 'bool'} + } + + def __init__(self, auto_refresh_state=None): + super(BoardUserSettings, self).__init__() + self.auto_refresh_state = auto_refresh_state diff --git a/vsts/vsts/work/v4_0/models/capacity_patch.py b/vsts/vsts/work/v4_0/models/capacity_patch.py new file mode 100644 index 00000000..dbd8c31d --- /dev/null +++ b/vsts/vsts/work/v4_0/models/capacity_patch.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CapacityPatch(Model): + """CapacityPatch. + + :param activities: + :type activities: list of :class:`Activity ` + :param days_off: + :type days_off: list of :class:`DateRange ` + """ + + _attribute_map = { + 'activities': {'key': 'activities', 'type': '[Activity]'}, + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'} + } + + def __init__(self, activities=None, days_off=None): + super(CapacityPatch, self).__init__() + self.activities = activities + self.days_off = days_off diff --git a/vsts/vsts/work/v4_0/models/category_configuration.py b/vsts/vsts/work/v4_0/models/category_configuration.py new file mode 100644 index 00000000..2a986338 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/category_configuration.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CategoryConfiguration(Model): + """CategoryConfiguration. + + :param name: Name + :type name: str + :param reference_name: Category Reference Name + :type reference_name: str + :param work_item_types: Work item types for the backlog category + :type work_item_types: list of :class:`WorkItemTypeReference ` + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'work_item_types': {'key': 'workItemTypes', 'type': '[WorkItemTypeReference]'} + } + + def __init__(self, name=None, reference_name=None, work_item_types=None): + super(CategoryConfiguration, self).__init__() + self.name = name + self.reference_name = reference_name + self.work_item_types = work_item_types diff --git a/vsts/vsts/work/v4_0/models/create_plan.py b/vsts/vsts/work/v4_0/models/create_plan.py new file mode 100644 index 00000000..e0fe8aa2 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/create_plan.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 CreatePlan(Model): + """CreatePlan. + + :param description: Description of the plan + :type description: str + :param name: Name of the plan to create. + :type name: str + :param properties: Plan properties. + :type properties: object + :param type: Type of plan to create. + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, properties=None, type=None): + super(CreatePlan, self).__init__() + self.description = description + self.name = name + self.properties = properties + self.type = type diff --git a/vsts/vsts/work/v4_0/models/date_range.py b/vsts/vsts/work/v4_0/models/date_range.py new file mode 100644 index 00000000..94694335 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/date_range.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DateRange(Model): + """DateRange. + + :param end: End of the date range. + :type end: datetime + :param start: Start of the date range. + :type start: datetime + """ + + _attribute_map = { + 'end': {'key': 'end', 'type': 'iso-8601'}, + 'start': {'key': 'start', 'type': 'iso-8601'} + } + + def __init__(self, end=None, start=None): + super(DateRange, self).__init__() + self.end = end + self.start = start diff --git a/vsts/vsts/work/v4_0/models/delivery_view_data.py b/vsts/vsts/work/v4_0/models/delivery_view_data.py new file mode 100644 index 00000000..459e1fb2 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/delivery_view_data.py @@ -0,0 +1,47 @@ +# -------------------------------------------------------------------------------------------- +# 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 .plan_view_data import PlanViewData + + +class DeliveryViewData(PlanViewData): + """DeliveryViewData. + + :param id: + :type id: str + :param revision: + :type revision: int + :param child_id_to_parent_id_map: Work item child id to parenet id map + :type child_id_to_parent_id_map: dict + :param criteria_status: Filter criteria status of the timeline + :type criteria_status: :class:`TimelineCriteriaStatus ` + :param end_date: The end date of the delivery view data + :type end_date: datetime + :param start_date: The start date for the delivery view data + :type start_date: datetime + :param teams: All the team data + :type teams: list of :class:`TimelineTeamData ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'child_id_to_parent_id_map': {'key': 'childIdToParentIdMap', 'type': '{int}'}, + 'criteria_status': {'key': 'criteriaStatus', 'type': 'TimelineCriteriaStatus'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'teams': {'key': 'teams', 'type': '[TimelineTeamData]'} + } + + def __init__(self, id=None, revision=None, child_id_to_parent_id_map=None, criteria_status=None, end_date=None, start_date=None, teams=None): + super(DeliveryViewData, self).__init__(id=id, revision=revision) + self.child_id_to_parent_id_map = child_id_to_parent_id_map + self.criteria_status = criteria_status + self.end_date = end_date + self.start_date = start_date + self.teams = teams diff --git a/vsts/vsts/work/v4_0/models/field_reference.py b/vsts/vsts/work/v4_0/models/field_reference.py new file mode 100644 index 00000000..6741b93e --- /dev/null +++ b/vsts/vsts/work/v4_0/models/field_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 FieldReference(Model): + """FieldReference. + + :param reference_name: fieldRefName for the field + :type reference_name: str + :param url: Full http link to more information about the field + :type url: str + """ + + _attribute_map = { + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, reference_name=None, url=None): + super(FieldReference, self).__init__() + self.reference_name = reference_name + self.url = url diff --git a/vsts/vsts/work/v4_0/models/field_setting.py b/vsts/vsts/work/v4_0/models/field_setting.py new file mode 100644 index 00000000..28a2b6a6 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/field_setting.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class FieldSetting(dict): + """FieldSetting. + + """ + + _attribute_map = { + } + + def __init__(self): + super(FieldSetting, self).__init__() diff --git a/vsts/vsts/work/v4_0/models/filter_clause.py b/vsts/vsts/work/v4_0/models/filter_clause.py new file mode 100644 index 00000000..1bb06642 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/filter_clause.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 FilterClause(Model): + """FilterClause. + + :param field_name: + :type field_name: str + :param index: + :type index: int + :param logical_operator: + :type logical_operator: str + :param operator: + :type operator: str + :param value: + :type value: str + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'index': {'key': 'index', 'type': 'int'}, + 'logical_operator': {'key': 'logicalOperator', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, field_name=None, index=None, logical_operator=None, operator=None, value=None): + super(FilterClause, self).__init__() + self.field_name = field_name + self.index = index + self.logical_operator = logical_operator + self.operator = operator + self.value = value diff --git a/vsts/vsts/work/v4_0/models/filter_group.py b/vsts/vsts/work/v4_0/models/filter_group.py new file mode 100644 index 00000000..b7f7142e --- /dev/null +++ b/vsts/vsts/work/v4_0/models/filter_group.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 FilterGroup(Model): + """FilterGroup. + + :param end: + :type end: int + :param level: + :type level: int + :param start: + :type start: int + """ + + _attribute_map = { + 'end': {'key': 'end', 'type': 'int'}, + 'level': {'key': 'level', 'type': 'int'}, + 'start': {'key': 'start', 'type': 'int'} + } + + def __init__(self, end=None, level=None, start=None): + super(FilterGroup, self).__init__() + self.end = end + self.level = level + self.start = start diff --git a/vsts/vsts/work/v4_0/models/filter_model.py b/vsts/vsts/work/v4_0/models/filter_model.py new file mode 100644 index 00000000..bb6acce6 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/filter_model.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 FilterModel(Model): + """FilterModel. + + :param clauses: + :type clauses: list of :class:`FilterClause ` + :param groups: + :type groups: list of :class:`FilterGroup ` + :param max_group_level: + :type max_group_level: int + """ + + _attribute_map = { + 'clauses': {'key': 'clauses', 'type': '[FilterClause]'}, + 'groups': {'key': 'groups', 'type': '[FilterGroup]'}, + 'max_group_level': {'key': 'maxGroupLevel', 'type': 'int'} + } + + def __init__(self, clauses=None, groups=None, max_group_level=None): + super(FilterModel, self).__init__() + self.clauses = clauses + self.groups = groups + self.max_group_level = max_group_level diff --git a/vsts/vsts/work/v4_0/models/identity_ref.py b/vsts/vsts/work/v4_0/models/identity_ref.py new file mode 100644 index 00000000..40c776c5 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/identity_ref.py @@ -0,0 +1,61 @@ +# -------------------------------------------------------------------------------------------- +# 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 IdentityRef(Model): + """IdentityRef. + + :param directory_alias: + :type directory_alias: str + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + 'display_name': {'key': 'displayName', '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'}, + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): + super(IdentityRef, self).__init__() + self.directory_alias = directory_alias + self.display_name = display_name + self.id = id + self.image_url = image_url + self.inactive = inactive + self.is_aad_identity = is_aad_identity + self.is_container = is_container + self.profile_url = profile_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/work/v4_0/models/member.py b/vsts/vsts/work/v4_0/models/member.py new file mode 100644 index 00000000..27ca2b67 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/member.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Member(Model): + """Member. + + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, display_name=None, id=None, image_url=None, unique_name=None, url=None): + super(Member, self).__init__() + self.display_name = display_name + self.id = id + self.image_url = image_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/work/v4_0/models/parent_child_wIMap.py b/vsts/vsts/work/v4_0/models/parent_child_wIMap.py new file mode 100644 index 00000000..87678f18 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/parent_child_wIMap.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ParentChildWIMap(Model): + """ParentChildWIMap. + + :param child_work_item_ids: + :type child_work_item_ids: list of int + :param id: + :type id: int + :param title: + :type title: str + """ + + _attribute_map = { + 'child_work_item_ids': {'key': 'childWorkItemIds', 'type': '[int]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, child_work_item_ids=None, id=None, title=None): + super(ParentChildWIMap, self).__init__() + self.child_work_item_ids = child_work_item_ids + self.id = id + self.title = title diff --git a/vsts/vsts/work/v4_0/models/plan.py b/vsts/vsts/work/v4_0/models/plan.py new file mode 100644 index 00000000..05e3b2fd --- /dev/null +++ b/vsts/vsts/work/v4_0/models/plan.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 Plan(Model): + """Plan. + + :param created_by_identity: Identity that created this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. + :type created_by_identity: :class:`IdentityRef ` + :param created_date: Date when the plan was created + :type created_date: datetime + :param description: Description of the plan + :type description: str + :param id: Id of the plan + :type id: str + :param modified_by_identity: Identity that last modified this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. + :type modified_by_identity: :class:`IdentityRef ` + :param modified_date: Date when the plan was last modified. Default to CreatedDate when the plan is first created. + :type modified_date: datetime + :param name: Name of the plan + :type name: str + :param properties: The PlanPropertyCollection instance associated with the plan. These are dependent on the type of the plan. For example, DeliveryTimelineView, it would be of type DeliveryViewPropertyCollection. + :type properties: object + :param revision: Revision of the plan. Used to safeguard users from overwriting each other's changes. + :type revision: int + :param type: Type of the plan + :type type: object + :param url: The resource url to locate the plan via rest api + :type url: str + :param user_permissions: Bit flag indicating set of permissions a user has to the plan. + :type user_permissions: object + """ + + _attribute_map = { + 'created_by_identity': {'key': 'createdByIdentity', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'modified_by_identity': {'key': 'modifiedByIdentity', 'type': 'IdentityRef'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'user_permissions': {'key': 'userPermissions', 'type': 'object'} + } + + def __init__(self, created_by_identity=None, created_date=None, description=None, id=None, modified_by_identity=None, modified_date=None, name=None, properties=None, revision=None, type=None, url=None, user_permissions=None): + super(Plan, self).__init__() + self.created_by_identity = created_by_identity + self.created_date = created_date + self.description = description + self.id = id + self.modified_by_identity = modified_by_identity + self.modified_date = modified_date + self.name = name + self.properties = properties + self.revision = revision + self.type = type + self.url = url + self.user_permissions = user_permissions diff --git a/vsts/vsts/work/v4_0/models/plan_view_data.py b/vsts/vsts/work/v4_0/models/plan_view_data.py new file mode 100644 index 00000000..fb99dc33 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/plan_view_data.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PlanViewData(Model): + """PlanViewData. + + :param id: + :type id: str + :param revision: + :type revision: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, id=None, revision=None): + super(PlanViewData, self).__init__() + self.id = id + self.revision = revision diff --git a/vsts/vsts/work/v4_0/models/process_configuration.py b/vsts/vsts/work/v4_0/models/process_configuration.py new file mode 100644 index 00000000..d6aad164 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/process_configuration.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProcessConfiguration(Model): + """ProcessConfiguration. + + :param bug_work_items: Details about bug work items + :type bug_work_items: :class:`CategoryConfiguration ` + :param portfolio_backlogs: Details about portfolio backlogs + :type portfolio_backlogs: list of :class:`CategoryConfiguration ` + :param requirement_backlog: Details of requirement backlog + :type requirement_backlog: :class:`CategoryConfiguration ` + :param task_backlog: Details of task backlog + :type task_backlog: :class:`CategoryConfiguration ` + :param type_fields: Type fields for the process configuration + :type type_fields: dict + :param url: + :type url: str + """ + + _attribute_map = { + 'bug_work_items': {'key': 'bugWorkItems', 'type': 'CategoryConfiguration'}, + 'portfolio_backlogs': {'key': 'portfolioBacklogs', 'type': '[CategoryConfiguration]'}, + 'requirement_backlog': {'key': 'requirementBacklog', 'type': 'CategoryConfiguration'}, + 'task_backlog': {'key': 'taskBacklog', 'type': 'CategoryConfiguration'}, + 'type_fields': {'key': 'typeFields', 'type': '{WorkItemFieldReference}'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, bug_work_items=None, portfolio_backlogs=None, requirement_backlog=None, task_backlog=None, type_fields=None, url=None): + super(ProcessConfiguration, self).__init__() + self.bug_work_items = bug_work_items + self.portfolio_backlogs = portfolio_backlogs + self.requirement_backlog = requirement_backlog + self.task_backlog = task_backlog + self.type_fields = type_fields + self.url = url diff --git a/vsts/vsts/work/v4_0/models/reference_links.py b/vsts/vsts/work/v4_0/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/work/v4_0/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/work/v4_0/models/rule.py b/vsts/vsts/work/v4_0/models/rule.py new file mode 100644 index 00000000..faf0f574 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/rule.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Rule(Model): + """Rule. + + :param clauses: + :type clauses: list of :class:`FilterClause ` + :param filter: + :type filter: str + :param is_enabled: + :type is_enabled: str + :param name: + :type name: str + :param settings: + :type settings: :class:`attribute ` + """ + + _attribute_map = { + 'clauses': {'key': 'clauses', 'type': '[FilterClause]'}, + 'filter': {'key': 'filter', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'attribute'} + } + + def __init__(self, clauses=None, filter=None, is_enabled=None, name=None, settings=None): + super(Rule, self).__init__() + self.clauses = clauses + self.filter = filter + self.is_enabled = is_enabled + self.name = name + self.settings = settings diff --git a/vsts/vsts/work/v4_0/models/team_context.py b/vsts/vsts/work/v4_0/models/team_context.py new file mode 100644 index 00000000..18418ce7 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_context.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamContext(Model): + """TeamContext. + + :param project: The team project Id or name. Ignored if ProjectId is set. + :type project: str + :param project_id: The Team Project ID. Required if Project is not set. + :type project_id: str + :param team: The Team Id or name. Ignored if TeamId is set. + :type team: str + :param team_id: The Team Id + :type team_id: str + """ + + _attribute_map = { + 'project': {'key': 'project', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'team': {'key': 'team', 'type': 'str'}, + 'team_id': {'key': 'teamId', 'type': 'str'} + } + + def __init__(self, project=None, project_id=None, team=None, team_id=None): + super(TeamContext, self).__init__() + self.project = project + self.project_id = project_id + self.team = team + self.team_id = team_id diff --git a/vsts/vsts/work/v4_0/models/team_field_value.py b/vsts/vsts/work/v4_0/models/team_field_value.py new file mode 100644 index 00000000..08d7ad84 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_field_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamFieldValue(Model): + """TeamFieldValue. + + :param include_children: + :type include_children: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'include_children': {'key': 'includeChildren', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, include_children=None, value=None): + super(TeamFieldValue, self).__init__() + self.include_children = include_children + self.value = value diff --git a/vsts/vsts/work/v4_0/models/team_field_values.py b/vsts/vsts/work/v4_0/models/team_field_values.py new file mode 100644 index 00000000..52254b57 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_field_values.py @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamFieldValues(TeamSettingsDataContractBase): + """TeamFieldValues. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param default_value: The default team field value + :type default_value: str + :param field: Shallow ref to the field being used as a team field + :type field: :class:`FieldReference ` + :param values: Collection of all valid team field values + :type values: list of :class:`TeamFieldValue ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'field': {'key': 'field', 'type': 'FieldReference'}, + 'values': {'key': 'values', 'type': '[TeamFieldValue]'} + } + + def __init__(self, _links=None, url=None, default_value=None, field=None, values=None): + super(TeamFieldValues, self).__init__(_links=_links, url=url) + self.default_value = default_value + self.field = field + self.values = values diff --git a/vsts/vsts/work/v4_0/models/team_field_values_patch.py b/vsts/vsts/work/v4_0/models/team_field_values_patch.py new file mode 100644 index 00000000..acc13dbb --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_field_values_patch.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamFieldValuesPatch(Model): + """TeamFieldValuesPatch. + + :param default_value: + :type default_value: str + :param values: + :type values: list of :class:`TeamFieldValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[TeamFieldValue]'} + } + + def __init__(self, default_value=None, values=None): + super(TeamFieldValuesPatch, self).__init__() + self.default_value = default_value + self.values = values diff --git a/vsts/vsts/work/v4_0/models/team_iteration_attributes.py b/vsts/vsts/work/v4_0/models/team_iteration_attributes.py new file mode 100644 index 00000000..1529ee88 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_iteration_attributes.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamIterationAttributes(Model): + """TeamIterationAttributes. + + :param finish_date: + :type finish_date: datetime + :param start_date: + :type start_date: datetime + """ + + _attribute_map = { + 'finish_date': {'key': 'finishDate', 'type': 'iso-8601'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'} + } + + def __init__(self, finish_date=None, start_date=None): + super(TeamIterationAttributes, self).__init__() + self.finish_date = finish_date + self.start_date = start_date diff --git a/vsts/vsts/work/v4_0/models/team_member_capacity.py b/vsts/vsts/work/v4_0/models/team_member_capacity.py new file mode 100644 index 00000000..eed15795 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_member_capacity.py @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamMemberCapacity(TeamSettingsDataContractBase): + """TeamMemberCapacity. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param activities: Collection of capacities associated with the team member + :type activities: list of :class:`Activity ` + :param days_off: The days off associated with the team member + :type days_off: list of :class:`DateRange ` + :param team_member: Shallow Ref to the associated team member + :type team_member: :class:`Member ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'activities': {'key': 'activities', 'type': '[Activity]'}, + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'}, + 'team_member': {'key': 'teamMember', 'type': 'Member'} + } + + def __init__(self, _links=None, url=None, activities=None, days_off=None, team_member=None): + super(TeamMemberCapacity, self).__init__(_links=_links, url=url) + self.activities = activities + self.days_off = days_off + self.team_member = team_member diff --git a/vsts/vsts/work/v4_0/models/team_setting.py b/vsts/vsts/work/v4_0/models/team_setting.py new file mode 100644 index 00000000..3a35cfa7 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_setting.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamSetting(TeamSettingsDataContractBase): + """TeamSetting. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param backlog_iteration: Backlog Iteration + :type backlog_iteration: :class:`TeamSettingsIteration ` + :param backlog_visibilities: Information about categories that are visible on the backlog. + :type backlog_visibilities: dict + :param bugs_behavior: BugsBehavior (Off, AsTasks, AsRequirements, ...) + :type bugs_behavior: object + :param default_iteration: Default Iteration, the iteration used when creating a new work item on the queries page. + :type default_iteration: :class:`TeamSettingsIteration ` + :param default_iteration_macro: Default Iteration macro (if any) + :type default_iteration_macro: str + :param working_days: Days that the team is working + :type working_days: list of DayOfWeek + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'backlog_iteration': {'key': 'backlogIteration', 'type': 'TeamSettingsIteration'}, + 'backlog_visibilities': {'key': 'backlogVisibilities', 'type': '{bool}'}, + 'bugs_behavior': {'key': 'bugsBehavior', 'type': 'object'}, + 'default_iteration': {'key': 'defaultIteration', 'type': 'TeamSettingsIteration'}, + 'default_iteration_macro': {'key': 'defaultIterationMacro', 'type': 'str'}, + 'working_days': {'key': 'workingDays', 'type': '[DayOfWeek]'} + } + + def __init__(self, _links=None, url=None, backlog_iteration=None, backlog_visibilities=None, bugs_behavior=None, default_iteration=None, default_iteration_macro=None, working_days=None): + super(TeamSetting, self).__init__(_links=_links, url=url) + self.backlog_iteration = backlog_iteration + self.backlog_visibilities = backlog_visibilities + self.bugs_behavior = bugs_behavior + self.default_iteration = default_iteration + self.default_iteration_macro = default_iteration_macro + self.working_days = working_days diff --git a/vsts/vsts/work/v4_0/models/team_settings_data_contract_base.py b/vsts/vsts/work/v4_0/models/team_settings_data_contract_base.py new file mode 100644 index 00000000..c490b84d --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_settings_data_contract_base.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamSettingsDataContractBase(Model): + """TeamSettingsDataContractBase. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, url=None): + super(TeamSettingsDataContractBase, self).__init__() + self._links = _links + self.url = url diff --git a/vsts/vsts/work/v4_0/models/team_settings_days_off.py b/vsts/vsts/work/v4_0/models/team_settings_days_off.py new file mode 100644 index 00000000..7bc53a90 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_settings_days_off.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamSettingsDaysOff(TeamSettingsDataContractBase): + """TeamSettingsDaysOff. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param days_off: + :type days_off: list of :class:`DateRange ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'} + } + + def __init__(self, _links=None, url=None, days_off=None): + super(TeamSettingsDaysOff, self).__init__(_links=_links, url=url) + self.days_off = days_off diff --git a/vsts/vsts/work/v4_0/models/team_settings_days_off_patch.py b/vsts/vsts/work/v4_0/models/team_settings_days_off_patch.py new file mode 100644 index 00000000..1a40dd34 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_settings_days_off_patch.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamSettingsDaysOffPatch(Model): + """TeamSettingsDaysOffPatch. + + :param days_off: + :type days_off: list of :class:`DateRange ` + """ + + _attribute_map = { + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'} + } + + def __init__(self, days_off=None): + super(TeamSettingsDaysOffPatch, self).__init__() + self.days_off = days_off diff --git a/vsts/vsts/work/v4_0/models/team_settings_iteration.py b/vsts/vsts/work/v4_0/models/team_settings_iteration.py new file mode 100644 index 00000000..633f536c --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_settings_iteration.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamSettingsIteration(TeamSettingsDataContractBase): + """TeamSettingsIteration. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param attributes: Attributes such as start and end date + :type attributes: :class:`TeamIterationAttributes ` + :param id: Id of the resource + :type id: str + :param name: Name of the resource + :type name: str + :param path: Relative path of the iteration + :type path: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'TeamIterationAttributes'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, _links=None, url=None, attributes=None, id=None, name=None, path=None): + super(TeamSettingsIteration, self).__init__(_links=_links, url=url) + self.attributes = attributes + self.id = id + self.name = name + self.path = path diff --git a/vsts/vsts/work/v4_0/models/team_settings_patch.py b/vsts/vsts/work/v4_0/models/team_settings_patch.py new file mode 100644 index 00000000..3942385c --- /dev/null +++ b/vsts/vsts/work/v4_0/models/team_settings_patch.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamSettingsPatch(Model): + """TeamSettingsPatch. + + :param backlog_iteration: + :type backlog_iteration: str + :param backlog_visibilities: + :type backlog_visibilities: dict + :param bugs_behavior: + :type bugs_behavior: object + :param default_iteration: + :type default_iteration: str + :param default_iteration_macro: + :type default_iteration_macro: str + :param working_days: + :type working_days: list of DayOfWeek + """ + + _attribute_map = { + 'backlog_iteration': {'key': 'backlogIteration', 'type': 'str'}, + 'backlog_visibilities': {'key': 'backlogVisibilities', 'type': '{bool}'}, + 'bugs_behavior': {'key': 'bugsBehavior', 'type': 'object'}, + 'default_iteration': {'key': 'defaultIteration', 'type': 'str'}, + 'default_iteration_macro': {'key': 'defaultIterationMacro', 'type': 'str'}, + 'working_days': {'key': 'workingDays', 'type': '[DayOfWeek]'} + } + + def __init__(self, backlog_iteration=None, backlog_visibilities=None, bugs_behavior=None, default_iteration=None, default_iteration_macro=None, working_days=None): + super(TeamSettingsPatch, self).__init__() + self.backlog_iteration = backlog_iteration + self.backlog_visibilities = backlog_visibilities + self.bugs_behavior = bugs_behavior + self.default_iteration = default_iteration + self.default_iteration_macro = default_iteration_macro + self.working_days = working_days diff --git a/vsts/vsts/work/v4_0/models/timeline_criteria_status.py b/vsts/vsts/work/v4_0/models/timeline_criteria_status.py new file mode 100644 index 00000000..d34fc208 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/timeline_criteria_status.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineCriteriaStatus(Model): + """TimelineCriteriaStatus. + + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, type=None): + super(TimelineCriteriaStatus, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/work/v4_0/models/timeline_iteration_status.py b/vsts/vsts/work/v4_0/models/timeline_iteration_status.py new file mode 100644 index 00000000..56ad40fb --- /dev/null +++ b/vsts/vsts/work/v4_0/models/timeline_iteration_status.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineIterationStatus(Model): + """TimelineIterationStatus. + + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, type=None): + super(TimelineIterationStatus, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/work/v4_0/models/timeline_team_data.py b/vsts/vsts/work/v4_0/models/timeline_team_data.py new file mode 100644 index 00000000..6d29a511 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/timeline_team_data.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineTeamData(Model): + """TimelineTeamData. + + :param backlog: Backlog matching the mapped backlog associated with this team. + :type backlog: :class:`BacklogLevel ` + :param field_reference_names: The field reference names of the work item data + :type field_reference_names: list of str + :param id: The id of the team + :type id: str + :param is_expanded: Was iteration and work item data retrieved for this team. Teams with IsExpanded false have not had their iteration, work item, and field related data queried and will never contain this data. If true then these items are queried and, if there are items in the queried range, there will be data. + :type is_expanded: bool + :param iterations: The iteration data, including the work items, in the queried date range. + :type iterations: list of :class:`TimelineTeamIteration ` + :param name: The name of the team + :type name: str + :param order_by_field: The order by field name of this team + :type order_by_field: str + :param partially_paged_field_reference_names: The field reference names of the partially paged work items, such as ID, WorkItemType + :type partially_paged_field_reference_names: list of str + :param project_id: The project id the team belongs team + :type project_id: str + :param status: Status for this team. + :type status: :class:`TimelineTeamStatus ` + :param team_field_default_value: The team field default value + :type team_field_default_value: str + :param team_field_name: The team field name of this team + :type team_field_name: str + :param team_field_values: The team field values + :type team_field_values: list of :class:`TeamFieldValue ` + :param work_item_type_colors: Colors for the work item types. + :type work_item_type_colors: list of :class:`WorkItemColor ` + """ + + _attribute_map = { + 'backlog': {'key': 'backlog', 'type': 'BacklogLevel'}, + 'field_reference_names': {'key': 'fieldReferenceNames', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_expanded': {'key': 'isExpanded', 'type': 'bool'}, + 'iterations': {'key': 'iterations', 'type': '[TimelineTeamIteration]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order_by_field': {'key': 'orderByField', 'type': 'str'}, + 'partially_paged_field_reference_names': {'key': 'partiallyPagedFieldReferenceNames', 'type': '[str]'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'TimelineTeamStatus'}, + 'team_field_default_value': {'key': 'teamFieldDefaultValue', 'type': 'str'}, + 'team_field_name': {'key': 'teamFieldName', 'type': 'str'}, + 'team_field_values': {'key': 'teamFieldValues', 'type': '[TeamFieldValue]'}, + 'work_item_type_colors': {'key': 'workItemTypeColors', 'type': '[WorkItemColor]'} + } + + def __init__(self, backlog=None, field_reference_names=None, id=None, is_expanded=None, iterations=None, name=None, order_by_field=None, partially_paged_field_reference_names=None, project_id=None, status=None, team_field_default_value=None, team_field_name=None, team_field_values=None, work_item_type_colors=None): + super(TimelineTeamData, self).__init__() + self.backlog = backlog + self.field_reference_names = field_reference_names + self.id = id + self.is_expanded = is_expanded + self.iterations = iterations + self.name = name + self.order_by_field = order_by_field + self.partially_paged_field_reference_names = partially_paged_field_reference_names + self.project_id = project_id + self.status = status + self.team_field_default_value = team_field_default_value + self.team_field_name = team_field_name + self.team_field_values = team_field_values + self.work_item_type_colors = work_item_type_colors diff --git a/vsts/vsts/work/v4_0/models/timeline_team_iteration.py b/vsts/vsts/work/v4_0/models/timeline_team_iteration.py new file mode 100644 index 00000000..36b8eaaf --- /dev/null +++ b/vsts/vsts/work/v4_0/models/timeline_team_iteration.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineTeamIteration(Model): + """TimelineTeamIteration. + + :param finish_date: The end date of the iteration + :type finish_date: datetime + :param name: The iteration name + :type name: str + :param partially_paged_work_items: All the partially paged workitems in this iteration. + :type partially_paged_work_items: list of [object] + :param path: The iteration path + :type path: str + :param start_date: The start date of the iteration + :type start_date: datetime + :param status: The status of this iteration + :type status: :class:`TimelineIterationStatus ` + :param work_items: The work items that have been paged in this iteration + :type work_items: list of [object] + """ + + _attribute_map = { + 'finish_date': {'key': 'finishDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'partially_paged_work_items': {'key': 'partiallyPagedWorkItems', 'type': '[[object]]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'TimelineIterationStatus'}, + 'work_items': {'key': 'workItems', 'type': '[[object]]'} + } + + def __init__(self, finish_date=None, name=None, partially_paged_work_items=None, path=None, start_date=None, status=None, work_items=None): + super(TimelineTeamIteration, self).__init__() + self.finish_date = finish_date + self.name = name + self.partially_paged_work_items = partially_paged_work_items + self.path = path + self.start_date = start_date + self.status = status + self.work_items = work_items diff --git a/vsts/vsts/work/v4_0/models/timeline_team_status.py b/vsts/vsts/work/v4_0/models/timeline_team_status.py new file mode 100644 index 00000000..ba0e89d1 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/timeline_team_status.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineTeamStatus(Model): + """TimelineTeamStatus. + + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, type=None): + super(TimelineTeamStatus, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/work/v4_0/models/update_plan.py b/vsts/vsts/work/v4_0/models/update_plan.py new file mode 100644 index 00000000..901ad0ed --- /dev/null +++ b/vsts/vsts/work/v4_0/models/update_plan.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 UpdatePlan(Model): + """UpdatePlan. + + :param description: Description of the plan + :type description: str + :param name: Name of the plan to create. + :type name: str + :param properties: Plan properties. + :type properties: object + :param revision: Revision of the plan that was updated - the value used here should match the one the server gave the client in the Plan. + :type revision: int + :param type: Type of the plan + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, properties=None, revision=None, type=None): + super(UpdatePlan, self).__init__() + self.description = description + self.name = name + self.properties = properties + self.revision = revision + self.type = type diff --git a/vsts/vsts/work/v4_0/models/work_item_color.py b/vsts/vsts/work/v4_0/models/work_item_color.py new file mode 100644 index 00000000..7d2c9de7 --- /dev/null +++ b/vsts/vsts/work/v4_0/models/work_item_color.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemColor(Model): + """WorkItemColor. + + :param icon: + :type icon: str + :param primary_color: + :type primary_color: str + :param work_item_type_name: + :type work_item_type_name: str + """ + + _attribute_map = { + 'icon': {'key': 'icon', 'type': 'str'}, + 'primary_color': {'key': 'primaryColor', 'type': 'str'}, + 'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'} + } + + def __init__(self, icon=None, primary_color=None, work_item_type_name=None): + super(WorkItemColor, self).__init__() + self.icon = icon + self.primary_color = primary_color + self.work_item_type_name = work_item_type_name diff --git a/vsts/vsts/work/v4_0/models/work_item_field_reference.py b/vsts/vsts/work/v4_0/models/work_item_field_reference.py new file mode 100644 index 00000000..625dbfdf --- /dev/null +++ b/vsts/vsts/work/v4_0/models/work_item_field_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemFieldReference(Model): + """WorkItemFieldReference. + + :param name: + :type name: str + :param reference_name: + :type reference_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, name=None, reference_name=None, url=None): + super(WorkItemFieldReference, self).__init__() + self.name = name + self.reference_name = reference_name + self.url = url diff --git a/vsts/vsts/work/v4_0/models/work_item_tracking_resource_reference.py b/vsts/vsts/work/v4_0/models/work_item_tracking_resource_reference.py new file mode 100644 index 00000000..de9a728b --- /dev/null +++ b/vsts/vsts/work/v4_0/models/work_item_tracking_resource_reference.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemTrackingResourceReference(Model): + """WorkItemTrackingResourceReference. + + :param url: + :type url: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, url=None): + super(WorkItemTrackingResourceReference, self).__init__() + self.url = url diff --git a/vsts/vsts/work/v4_0/models/work_item_type_reference.py b/vsts/vsts/work/v4_0/models/work_item_type_reference.py new file mode 100644 index 00000000..29f8ec5b --- /dev/null +++ b/vsts/vsts/work/v4_0/models/work_item_type_reference.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# 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 .work_item_tracking_resource_reference import WorkItemTrackingResourceReference + + +class WorkItemTypeReference(WorkItemTrackingResourceReference): + """WorkItemTypeReference. + + :param url: + :type url: str + :param name: + :type name: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, url=None, name=None): + super(WorkItemTypeReference, self).__init__(url=url) + self.name = name diff --git a/vsts/vsts/work/v4_0/models/work_item_type_state_info.py b/vsts/vsts/work/v4_0/models/work_item_type_state_info.py new file mode 100644 index 00000000..7ff5045e --- /dev/null +++ b/vsts/vsts/work/v4_0/models/work_item_type_state_info.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemTypeStateInfo(Model): + """WorkItemTypeStateInfo. + + :param states: State name to state category map + :type states: dict + :param work_item_type_name: Work Item type name + :type work_item_type_name: str + """ + + _attribute_map = { + 'states': {'key': 'states', 'type': '{str}'}, + 'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'} + } + + def __init__(self, states=None, work_item_type_name=None): + super(WorkItemTypeStateInfo, self).__init__() + self.states = states + self.work_item_type_name = work_item_type_name diff --git a/vsts/vsts/work/v4_0/work_client.py b/vsts/vsts/work/v4_0/work_client.py new file mode 100644 index 00000000..ea88bda2 --- /dev/null +++ b/vsts/vsts/work/v4_0/work_client.py @@ -0,0 +1,1243 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class WorkClient(VssClient): + """Work + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(WorkClient, 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 = '1d4f49f9-02b9-4e26-b826-2cdb6195f2a9' + + def get_backlog_configurations(self, team_context): + """GetBacklogConfigurations. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='7799f497-3cb5-4f16-ad4f-5cd06012db64', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('BacklogConfiguration', response) + + def get_column_suggested_values(self, project=None): + """GetColumnSuggestedValues. + :param str project: Project ID or project name + :rtype: [BoardSuggestedValue] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardSuggestedValue]', response) + + def get_board_mapping_parent_items(self, team_context, child_backlog_context_category_ref_name, workitem_ids): + """GetBoardMappingParentItems. + [Preview API] Returns the list of parent field filter model for the given list of workitem ids + :param :class:` ` team_context: The team context for the operation + :param str child_backlog_context_category_ref_name: + :param [int] workitem_ids: + :rtype: [ParentChildWIMap] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + query_parameters = {} + if child_backlog_context_category_ref_name is not None: + query_parameters['childBacklogContextCategoryRefName'] = self._serialize.query('child_backlog_context_category_ref_name', child_backlog_context_category_ref_name, 'str') + if workitem_ids is not None: + workitem_ids = ",".join(map(str, workitem_ids)) + query_parameters['workitemIds'] = self._serialize.query('workitem_ids', workitem_ids, 'str') + response = self._send(http_method='GET', + location_id='186abea3-5c35-432f-9e28-7a15b4312a0e', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ParentChildWIMap]', response) + + def get_row_suggested_values(self, project=None): + """GetRowSuggestedValues. + :param str project: Project ID or project name + :rtype: [BoardSuggestedValue] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardSuggestedValue]', response) + + def get_board(self, team_context, id): + """GetBoard. + Get board + :param :class:` ` team_context: The team context for the operation + :param str id: identifier for board, either board's backlog level name (Eg:"Stories") or Id + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + response = self._send(http_method='GET', + location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', + version='4.0', + route_values=route_values) + return self._deserialize('Board', response) + + def get_boards(self, team_context): + """GetBoards. + Get boards + :param :class:` ` team_context: The team context for the operation + :rtype: [BoardReference] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardReference]', response) + + def set_board_options(self, options, team_context, id): + """SetBoardOptions. + Update board options + :param {str} options: options to updated + :param :class:` ` team_context: The team context for the operation + :param str id: identifier for board, either category plural name (Eg:"Stories") or guid + :rtype: {str} + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + content = self._serialize.body(options, '{str}') + response = self._send(http_method='PUT', + location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('{str}', response) + + def get_board_user_settings(self, team_context, board): + """GetBoardUserSettings. + [Preview API] + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('BoardUserSettings', response) + + def update_board_user_settings(self, board_user_settings, team_context, board): + """UpdateBoardUserSettings. + [Preview API] Update board user settings for the board id + :param {str} board_user_settings: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_user_settings, '{str}') + response = self._send(http_method='PATCH', + location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BoardUserSettings', response) + + def get_capacities(self, team_context, iteration_id): + """GetCapacities. + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: + :rtype: [TeamMemberCapacity] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + response = self._send(http_method='GET', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TeamMemberCapacity]', response) + + def get_capacity(self, team_context, iteration_id, team_member_id): + """GetCapacity. + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: + :param str team_member_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + if team_member_id is not None: + route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str') + response = self._send(http_method='GET', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.0', + route_values=route_values) + return self._deserialize('TeamMemberCapacity', response) + + def replace_capacities(self, capacities, team_context, iteration_id): + """ReplaceCapacities. + :param [TeamMemberCapacity] capacities: + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: + :rtype: [TeamMemberCapacity] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + content = self._serialize.body(capacities, '[TeamMemberCapacity]') + response = self._send(http_method='PUT', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TeamMemberCapacity]', response) + + def update_capacity(self, patch, team_context, iteration_id, team_member_id): + """UpdateCapacity. + :param :class:` ` patch: + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: + :param str team_member_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + if team_member_id is not None: + route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str') + content = self._serialize.body(patch, 'CapacityPatch') + response = self._send(http_method='PATCH', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TeamMemberCapacity', response) + + def get_board_card_rule_settings(self, team_context, board): + """GetBoardCardRuleSettings. + [Preview API] Get board card Rule settings for the board id or board by name + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('BoardCardRuleSettings', response) + + def update_board_card_rule_settings(self, board_card_rule_settings, team_context, board): + """UpdateBoardCardRuleSettings. + [Preview API] Update board card Rule settings for the board id or board by name + :param :class:` ` board_card_rule_settings: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') + response = self._send(http_method='PATCH', + location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BoardCardRuleSettings', response) + + def get_board_card_settings(self, team_context, board): + """GetBoardCardSettings. + Get board card settings for the board id or board by name + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', + version='4.0', + route_values=route_values) + return self._deserialize('BoardCardSettings', response) + + def update_board_card_settings(self, board_card_settings_to_save, team_context, board): + """UpdateBoardCardSettings. + Update board card settings for the board id or board by name + :param :class:` ` board_card_settings_to_save: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') + response = self._send(http_method='PUT', + location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('BoardCardSettings', response) + + def get_board_chart(self, team_context, board, name): + """GetBoardChart. + Get a board chart + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :param str name: The chart name + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='4.0', + route_values=route_values) + return self._deserialize('BoardChart', response) + + def get_board_charts(self, team_context, board): + """GetBoardCharts. + Get board charts + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :rtype: [BoardChartReference] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardChartReference]', response) + + def update_board_chart(self, chart, team_context, board, name): + """UpdateBoardChart. + Update a board chart + :param :class:` ` chart: + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :param str name: The chart name + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + content = self._serialize.body(chart, 'BoardChart') + response = self._send(http_method='PATCH', + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('BoardChart', response) + + def get_board_columns(self, team_context, board): + """GetBoardColumns. + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: [BoardColumn] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardColumn]', response) + + def update_board_columns(self, board_columns, team_context, board): + """UpdateBoardColumns. + :param [BoardColumn] board_columns: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: [BoardColumn] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_columns, '[BoardColumn]') + response = self._send(http_method='PUT', + location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[BoardColumn]', response) + + def get_delivery_timeline_data(self, project, id, revision=None, start_date=None, end_date=None): + """GetDeliveryTimelineData. + [Preview API] Get Delivery View Data + :param str project: Project ID or project name + :param str id: Identifier for delivery view + :param int revision: Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. + :param datetime start_date: The start date of timeline + :param datetime end_date: The end date of timeline + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + query_parameters = {} + if revision is not None: + query_parameters['revision'] = self._serialize.query('revision', revision, 'int') + if start_date is not None: + query_parameters['startDate'] = self._serialize.query('start_date', start_date, 'iso-8601') + if end_date is not None: + query_parameters['endDate'] = self._serialize.query('end_date', end_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='bdd0834e-101f-49f0-a6ae-509f384a12b4', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeliveryViewData', response) + + def delete_team_iteration(self, team_context, id): + """DeleteTeamIteration. + :param :class:` ` team_context: The team context for the operation + :param str id: + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + self._send(http_method='DELETE', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.0', + route_values=route_values) + + def get_team_iteration(self, team_context, id): + """GetTeamIteration. + :param :class:` ` team_context: The team context for the operation + :param str id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + response = self._send(http_method='GET', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.0', + route_values=route_values) + return self._deserialize('TeamSettingsIteration', response) + + def get_team_iterations(self, team_context, timeframe=None): + """GetTeamIterations. + :param :class:` ` team_context: The team context for the operation + :param str timeframe: + :rtype: [TeamSettingsIteration] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + query_parameters = {} + if timeframe is not None: + query_parameters['$timeframe'] = self._serialize.query('timeframe', timeframe, 'str') + response = self._send(http_method='GET', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.0', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TeamSettingsIteration]', response) + + def post_team_iteration(self, iteration, team_context): + """PostTeamIteration. + :param :class:` ` iteration: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(iteration, 'TeamSettingsIteration') + response = self._send(http_method='POST', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TeamSettingsIteration', response) + + def create_plan(self, posted_plan, project): + """CreatePlan. + [Preview API] Add a new plan for the team + :param :class:` ` posted_plan: Plan definition + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(posted_plan, 'CreatePlan') + response = self._send(http_method='POST', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Plan', response) + + def delete_plan(self, project, id): + """DeletePlan. + [Preview API] Delete the specified plan + :param str project: Project ID or project name + :param str id: Identifier of the plan + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + self._send(http_method='DELETE', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.0-preview.1', + route_values=route_values) + + def get_plan(self, project, id): + """GetPlan. + [Preview API] Get the information for the specified plan + :param str project: Project ID or project name + :param str id: Identifier of the plan + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + response = self._send(http_method='GET', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('Plan', response) + + def get_plans(self, project): + """GetPlans. + [Preview API] Get the information for all the plans configured for the given team + :param str project: Project ID or project name + :rtype: [Plan] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[Plan]', response) + + def update_plan(self, updated_plan, project, id): + """UpdatePlan. + [Preview API] Update the information for the specified plan + :param :class:` ` updated_plan: Plan definition to be updated + :param str project: Project ID or project name + :param str id: Identifier of the plan + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + content = self._serialize.body(updated_plan, 'UpdatePlan') + response = self._send(http_method='PUT', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Plan', response) + + def get_process_configuration(self, project): + """GetProcessConfiguration. + [Preview API] + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='f901ba42-86d2-4b0c-89c1-3f86d06daa84', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('ProcessConfiguration', response) + + def get_board_rows(self, team_context, board): + """GetBoardRows. + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: [BoardRow] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', + version='4.0', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardRow]', response) + + def update_board_rows(self, board_rows, team_context, board): + """UpdateBoardRows. + :param [BoardRow] board_rows: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: [BoardRow] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_rows, '[BoardRow]') + response = self._send(http_method='PUT', + location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', + version='4.0', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[BoardRow]', response) + + def get_team_days_off(self, team_context, iteration_id): + """GetTeamDaysOff. + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + response = self._send(http_method='GET', + location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', + version='4.0', + route_values=route_values) + return self._deserialize('TeamSettingsDaysOff', response) + + def update_team_days_off(self, days_off_patch, team_context, iteration_id): + """UpdateTeamDaysOff. + :param :class:` ` days_off_patch: + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + content = self._serialize.body(days_off_patch, 'TeamSettingsDaysOffPatch') + response = self._send(http_method='PATCH', + location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TeamSettingsDaysOff', response) + + def get_team_field_values(self, team_context): + """GetTeamFieldValues. + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', + version='4.0', + route_values=route_values) + return self._deserialize('TeamFieldValues', response) + + def update_team_field_values(self, patch, team_context): + """UpdateTeamFieldValues. + :param :class:` ` patch: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(patch, 'TeamFieldValuesPatch') + response = self._send(http_method='PATCH', + location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TeamFieldValues', response) + + def get_team_settings(self, team_context): + """GetTeamSettings. + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', + version='4.0', + route_values=route_values) + return self._deserialize('TeamSetting', response) + + def update_team_settings(self, team_settings_patch, team_context): + """UpdateTeamSettings. + :param :class:` ` team_settings_patch: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(team_settings_patch, 'TeamSettingsPatch') + response = self._send(http_method='PATCH', + location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', + version='4.0', + route_values=route_values, + content=content) + return self._deserialize('TeamSetting', response) + diff --git a/vsts/vsts/work/v4_1/__init__.py b/vsts/vsts/work/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work/v4_1/__init__.py @@ -0,0 +1,7 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- diff --git a/vsts/vsts/work/v4_1/models/__init__.py b/vsts/vsts/work/v4_1/models/__init__.py new file mode 100644 index 00000000..9414a1cb --- /dev/null +++ b/vsts/vsts/work/v4_1/models/__init__.py @@ -0,0 +1,135 @@ +# -------------------------------------------------------------------------------------------- +# 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 .activity import Activity +from .attribute import attribute +from .backlog_column import BacklogColumn +from .backlog_configuration import BacklogConfiguration +from .backlog_fields import BacklogFields +from .backlog_level import BacklogLevel +from .backlog_level_configuration import BacklogLevelConfiguration +from .backlog_level_work_items import BacklogLevelWorkItems +from .board import Board +from .board_card_rule_settings import BoardCardRuleSettings +from .board_card_settings import BoardCardSettings +from .board_chart import BoardChart +from .board_chart_reference import BoardChartReference +from .board_column import BoardColumn +from .board_fields import BoardFields +from .board_reference import BoardReference +from .board_row import BoardRow +from .board_suggested_value import BoardSuggestedValue +from .board_user_settings import BoardUserSettings +from .capacity_patch import CapacityPatch +from .category_configuration import CategoryConfiguration +from .create_plan import CreatePlan +from .date_range import DateRange +from .delivery_view_data import DeliveryViewData +from .field_reference import FieldReference +from .field_setting import FieldSetting +from .filter_clause import FilterClause +from .graph_subject_base import GraphSubjectBase +from .identity_ref import IdentityRef +from .iteration_work_items import IterationWorkItems +from .member import Member +from .parent_child_wIMap import ParentChildWIMap +from .plan import Plan +from .plan_view_data import PlanViewData +from .process_configuration import ProcessConfiguration +from .reference_links import ReferenceLinks +from .rule import Rule +from .team_context import TeamContext +from .team_field_value import TeamFieldValue +from .team_field_values import TeamFieldValues +from .team_field_values_patch import TeamFieldValuesPatch +from .team_iteration_attributes import TeamIterationAttributes +from .team_member_capacity import TeamMemberCapacity +from .team_setting import TeamSetting +from .team_settings_data_contract_base import TeamSettingsDataContractBase +from .team_settings_days_off import TeamSettingsDaysOff +from .team_settings_days_off_patch import TeamSettingsDaysOffPatch +from .team_settings_iteration import TeamSettingsIteration +from .team_settings_patch import TeamSettingsPatch +from .timeline_criteria_status import TimelineCriteriaStatus +from .timeline_iteration_status import TimelineIterationStatus +from .timeline_team_data import TimelineTeamData +from .timeline_team_iteration import TimelineTeamIteration +from .timeline_team_status import TimelineTeamStatus +from .update_plan import UpdatePlan +from .work_item_color import WorkItemColor +from .work_item_field_reference import WorkItemFieldReference +from .work_item_link import WorkItemLink +from .work_item_reference import WorkItemReference +from .work_item_tracking_resource_reference import WorkItemTrackingResourceReference +from .work_item_type_reference import WorkItemTypeReference +from .work_item_type_state_info import WorkItemTypeStateInfo + +__all__ = [ + 'Activity', + 'attribute', + 'BacklogColumn', + 'BacklogConfiguration', + 'BacklogFields', + 'BacklogLevel', + 'BacklogLevelConfiguration', + 'BacklogLevelWorkItems', + 'Board', + 'BoardCardRuleSettings', + 'BoardCardSettings', + 'BoardChart', + 'BoardChartReference', + 'BoardColumn', + 'BoardFields', + 'BoardReference', + 'BoardRow', + 'BoardSuggestedValue', + 'BoardUserSettings', + 'CapacityPatch', + 'CategoryConfiguration', + 'CreatePlan', + 'DateRange', + 'DeliveryViewData', + 'FieldReference', + 'FieldSetting', + 'FilterClause', + 'GraphSubjectBase', + 'IdentityRef', + 'IterationWorkItems', + 'Member', + 'ParentChildWIMap', + 'Plan', + 'PlanViewData', + 'ProcessConfiguration', + 'ReferenceLinks', + 'Rule', + 'TeamContext', + 'TeamFieldValue', + 'TeamFieldValues', + 'TeamFieldValuesPatch', + 'TeamIterationAttributes', + 'TeamMemberCapacity', + 'TeamSetting', + 'TeamSettingsDataContractBase', + 'TeamSettingsDaysOff', + 'TeamSettingsDaysOffPatch', + 'TeamSettingsIteration', + 'TeamSettingsPatch', + 'TimelineCriteriaStatus', + 'TimelineIterationStatus', + 'TimelineTeamData', + 'TimelineTeamIteration', + 'TimelineTeamStatus', + 'UpdatePlan', + 'WorkItemColor', + 'WorkItemFieldReference', + 'WorkItemLink', + 'WorkItemReference', + 'WorkItemTrackingResourceReference', + 'WorkItemTypeReference', + 'WorkItemTypeStateInfo', +] diff --git a/vsts/vsts/work/v4_1/models/activity.py b/vsts/vsts/work/v4_1/models/activity.py new file mode 100644 index 00000000..2b9c616f --- /dev/null +++ b/vsts/vsts/work/v4_1/models/activity.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 Activity(Model): + """Activity. + + :param capacity_per_day: + :type capacity_per_day: number + :param name: + :type name: str + """ + + _attribute_map = { + 'capacity_per_day': {'key': 'capacityPerDay', 'type': 'number'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, capacity_per_day=None, name=None): + super(Activity, self).__init__() + self.capacity_per_day = capacity_per_day + self.name = name diff --git a/vsts/vsts/work/v4_1/models/attribute.py b/vsts/vsts/work/v4_1/models/attribute.py new file mode 100644 index 00000000..6f113cc3 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/attribute.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class attribute(dict): + """attribute. + + """ + + _attribute_map = { + } + + def __init__(self): + super(attribute, self).__init__() diff --git a/vsts/vsts/work/v4_1/models/backlog_column.py b/vsts/vsts/work/v4_1/models/backlog_column.py new file mode 100644 index 00000000..e66106f7 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/backlog_column.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogColumn(Model): + """BacklogColumn. + + :param column_field_reference: + :type column_field_reference: :class:`WorkItemFieldReference ` + :param width: + :type width: int + """ + + _attribute_map = { + 'column_field_reference': {'key': 'columnFieldReference', 'type': 'WorkItemFieldReference'}, + 'width': {'key': 'width', 'type': 'int'} + } + + def __init__(self, column_field_reference=None, width=None): + super(BacklogColumn, self).__init__() + self.column_field_reference = column_field_reference + self.width = width diff --git a/vsts/vsts/work/v4_1/models/backlog_configuration.py b/vsts/vsts/work/v4_1/models/backlog_configuration.py new file mode 100644 index 00000000..f579fae2 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/backlog_configuration.py @@ -0,0 +1,53 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogConfiguration(Model): + """BacklogConfiguration. + + :param backlog_fields: Behavior/type field mapping + :type backlog_fields: :class:`BacklogFields ` + :param bugs_behavior: Bugs behavior + :type bugs_behavior: object + :param hidden_backlogs: Hidden Backlog + :type hidden_backlogs: list of str + :param portfolio_backlogs: Portfolio backlog descriptors + :type portfolio_backlogs: list of :class:`BacklogLevelConfiguration ` + :param requirement_backlog: Requirement backlog + :type requirement_backlog: :class:`BacklogLevelConfiguration ` + :param task_backlog: Task backlog + :type task_backlog: :class:`BacklogLevelConfiguration ` + :param url: + :type url: str + :param work_item_type_mapped_states: Mapped states for work item types + :type work_item_type_mapped_states: list of :class:`WorkItemTypeStateInfo ` + """ + + _attribute_map = { + 'backlog_fields': {'key': 'backlogFields', 'type': 'BacklogFields'}, + 'bugs_behavior': {'key': 'bugsBehavior', 'type': 'object'}, + 'hidden_backlogs': {'key': 'hiddenBacklogs', 'type': '[str]'}, + 'portfolio_backlogs': {'key': 'portfolioBacklogs', 'type': '[BacklogLevelConfiguration]'}, + 'requirement_backlog': {'key': 'requirementBacklog', 'type': 'BacklogLevelConfiguration'}, + 'task_backlog': {'key': 'taskBacklog', 'type': 'BacklogLevelConfiguration'}, + 'url': {'key': 'url', 'type': 'str'}, + 'work_item_type_mapped_states': {'key': 'workItemTypeMappedStates', 'type': '[WorkItemTypeStateInfo]'} + } + + def __init__(self, backlog_fields=None, bugs_behavior=None, hidden_backlogs=None, portfolio_backlogs=None, requirement_backlog=None, task_backlog=None, url=None, work_item_type_mapped_states=None): + super(BacklogConfiguration, self).__init__() + self.backlog_fields = backlog_fields + self.bugs_behavior = bugs_behavior + self.hidden_backlogs = hidden_backlogs + self.portfolio_backlogs = portfolio_backlogs + self.requirement_backlog = requirement_backlog + self.task_backlog = task_backlog + self.url = url + self.work_item_type_mapped_states = work_item_type_mapped_states diff --git a/vsts/vsts/work/v4_1/models/backlog_fields.py b/vsts/vsts/work/v4_1/models/backlog_fields.py new file mode 100644 index 00000000..0aa2c795 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/backlog_fields.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogFields(Model): + """BacklogFields. + + :param type_fields: Field Type (e.g. Order, Activity) to Field Reference Name map + :type type_fields: dict + """ + + _attribute_map = { + 'type_fields': {'key': 'typeFields', 'type': '{str}'} + } + + def __init__(self, type_fields=None): + super(BacklogFields, self).__init__() + self.type_fields = type_fields diff --git a/vsts/vsts/work/v4_1/models/backlog_level.py b/vsts/vsts/work/v4_1/models/backlog_level.py new file mode 100644 index 00000000..aaad0af8 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/backlog_level.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogLevel(Model): + """BacklogLevel. + + :param category_reference_name: Reference name of the corresponding WIT category + :type category_reference_name: str + :param plural_name: Plural name for the backlog level + :type plural_name: str + :param work_item_states: Collection of work item states that are included in the plan. The server will filter to only these work item types. + :type work_item_states: list of str + :param work_item_types: Collection of valid workitem type names for the given backlog level + :type work_item_types: list of str + """ + + _attribute_map = { + 'category_reference_name': {'key': 'categoryReferenceName', 'type': 'str'}, + 'plural_name': {'key': 'pluralName', 'type': 'str'}, + 'work_item_states': {'key': 'workItemStates', 'type': '[str]'}, + 'work_item_types': {'key': 'workItemTypes', 'type': '[str]'} + } + + def __init__(self, category_reference_name=None, plural_name=None, work_item_states=None, work_item_types=None): + super(BacklogLevel, self).__init__() + self.category_reference_name = category_reference_name + self.plural_name = plural_name + self.work_item_states = work_item_states + self.work_item_types = work_item_types diff --git a/vsts/vsts/work/v4_1/models/backlog_level_configuration.py b/vsts/vsts/work/v4_1/models/backlog_level_configuration.py new file mode 100644 index 00000000..970bf259 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/backlog_level_configuration.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 BacklogLevelConfiguration(Model): + """BacklogLevelConfiguration. + + :param add_panel_fields: List of fields to include in Add Panel + :type add_panel_fields: list of :class:`WorkItemFieldReference ` + :param color: Color for the backlog level + :type color: str + :param column_fields: Default list of columns for the backlog + :type column_fields: list of :class:`BacklogColumn ` + :param default_work_item_type: Defaulst Work Item Type for the backlog + :type default_work_item_type: :class:`WorkItemTypeReference ` + :param id: Backlog Id (for Legacy Backlog Level from process config it can be categoryref name) + :type id: str + :param is_hidden: Indicates whether the backlog level is hidden + :type is_hidden: bool + :param name: Backlog Name + :type name: str + :param rank: Backlog Rank (Taskbacklog is 0) + :type rank: int + :param type: The type of this backlog level + :type type: object + :param work_item_count_limit: Max number of work items to show in the given backlog + :type work_item_count_limit: int + :param work_item_types: Work Item types participating in this backlog as known by the project/Process, can be overridden by team settings for bugs + :type work_item_types: list of :class:`WorkItemTypeReference ` + """ + + _attribute_map = { + 'add_panel_fields': {'key': 'addPanelFields', 'type': '[WorkItemFieldReference]'}, + 'color': {'key': 'color', 'type': 'str'}, + 'column_fields': {'key': 'columnFields', 'type': '[BacklogColumn]'}, + 'default_work_item_type': {'key': 'defaultWorkItemType', 'type': 'WorkItemTypeReference'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'object'}, + 'work_item_count_limit': {'key': 'workItemCountLimit', 'type': 'int'}, + 'work_item_types': {'key': 'workItemTypes', 'type': '[WorkItemTypeReference]'} + } + + def __init__(self, add_panel_fields=None, color=None, column_fields=None, default_work_item_type=None, id=None, is_hidden=None, name=None, rank=None, type=None, work_item_count_limit=None, work_item_types=None): + super(BacklogLevelConfiguration, self).__init__() + self.add_panel_fields = add_panel_fields + self.color = color + self.column_fields = column_fields + self.default_work_item_type = default_work_item_type + self.id = id + self.is_hidden = is_hidden + self.name = name + self.rank = rank + self.type = type + self.work_item_count_limit = work_item_count_limit + self.work_item_types = work_item_types diff --git a/vsts/vsts/work/v4_1/models/board.py b/vsts/vsts/work/v4_1/models/board.py new file mode 100644 index 00000000..04b9107e --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board.py @@ -0,0 +1,62 @@ +# -------------------------------------------------------------------------------------------- +# 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 .board_reference import BoardReference + + +class Board(BoardReference): + """Board. + + :param id: Id of the resource + :type id: str + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + :param _links: + :type _links: :class:`ReferenceLinks ` + :param allowed_mappings: + :type allowed_mappings: dict + :param can_edit: + :type can_edit: bool + :param columns: + :type columns: list of :class:`BoardColumn ` + :param fields: + :type fields: :class:`BoardFields ` + :param is_valid: + :type is_valid: bool + :param revision: + :type revision: int + :param rows: + :type rows: list of :class:`BoardRow ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'allowed_mappings': {'key': 'allowedMappings', 'type': '{{[str]}}'}, + 'can_edit': {'key': 'canEdit', 'type': 'bool'}, + 'columns': {'key': 'columns', 'type': '[BoardColumn]'}, + 'fields': {'key': 'fields', 'type': 'BoardFields'}, + 'is_valid': {'key': 'isValid', 'type': 'bool'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'rows': {'key': 'rows', 'type': '[BoardRow]'} + } + + def __init__(self, id=None, name=None, url=None, _links=None, allowed_mappings=None, can_edit=None, columns=None, fields=None, is_valid=None, revision=None, rows=None): + super(Board, self).__init__(id=id, name=name, url=url) + self._links = _links + self.allowed_mappings = allowed_mappings + self.can_edit = can_edit + self.columns = columns + self.fields = fields + self.is_valid = is_valid + self.revision = revision + self.rows = rows diff --git a/vsts/vsts/work/v4_1/models/board_card_rule_settings.py b/vsts/vsts/work/v4_1/models/board_card_rule_settings.py new file mode 100644 index 00000000..dcd66935 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_card_rule_settings.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardCardRuleSettings(Model): + """BoardCardRuleSettings. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param rules: + :type rules: dict + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'rules': {'key': 'rules', 'type': '{[Rule]}'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, rules=None, url=None): + super(BoardCardRuleSettings, self).__init__() + self._links = _links + self.rules = rules + self.url = url diff --git a/vsts/vsts/work/v4_1/models/board_card_settings.py b/vsts/vsts/work/v4_1/models/board_card_settings.py new file mode 100644 index 00000000..77861a9d --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_card_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardCardSettings(Model): + """BoardCardSettings. + + :param cards: + :type cards: dict + """ + + _attribute_map = { + 'cards': {'key': 'cards', 'type': '{[FieldSetting]}'} + } + + def __init__(self, cards=None): + super(BoardCardSettings, self).__init__() + self.cards = cards diff --git a/vsts/vsts/work/v4_1/models/board_chart.py b/vsts/vsts/work/v4_1/models/board_chart.py new file mode 100644 index 00000000..05294f0f --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_chart.py @@ -0,0 +1,35 @@ +# -------------------------------------------------------------------------------------------- +# 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 .board_chart_reference import BoardChartReference + + +class BoardChart(BoardChartReference): + """BoardChart. + + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + :param _links: The links for the resource + :type _links: :class:`ReferenceLinks ` + :param settings: The settings for the resource + :type settings: dict + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'settings': {'key': 'settings', 'type': '{object}'} + } + + def __init__(self, name=None, url=None, _links=None, settings=None): + super(BoardChart, self).__init__(name=name, url=url) + self._links = _links + self.settings = settings diff --git a/vsts/vsts/work/v4_1/models/board_chart_reference.py b/vsts/vsts/work/v4_1/models/board_chart_reference.py new file mode 100644 index 00000000..382d9bfc --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_chart_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardChartReference(Model): + """BoardChartReference. + + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, name=None, url=None): + super(BoardChartReference, self).__init__() + self.name = name + self.url = url diff --git a/vsts/vsts/work/v4_1/models/board_column.py b/vsts/vsts/work/v4_1/models/board_column.py new file mode 100644 index 00000000..e994435b --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_column.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardColumn(Model): + """BoardColumn. + + :param column_type: + :type column_type: object + :param description: + :type description: str + :param id: + :type id: str + :param is_split: + :type is_split: bool + :param item_limit: + :type item_limit: int + :param name: + :type name: str + :param state_mappings: + :type state_mappings: dict + """ + + _attribute_map = { + 'column_type': {'key': 'columnType', 'type': 'object'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_split': {'key': 'isSplit', 'type': 'bool'}, + 'item_limit': {'key': 'itemLimit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'state_mappings': {'key': 'stateMappings', 'type': '{str}'} + } + + def __init__(self, column_type=None, description=None, id=None, is_split=None, item_limit=None, name=None, state_mappings=None): + super(BoardColumn, self).__init__() + self.column_type = column_type + self.description = description + self.id = id + self.is_split = is_split + self.item_limit = item_limit + self.name = name + self.state_mappings = state_mappings diff --git a/vsts/vsts/work/v4_1/models/board_fields.py b/vsts/vsts/work/v4_1/models/board_fields.py new file mode 100644 index 00000000..97888618 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_fields.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardFields(Model): + """BoardFields. + + :param column_field: + :type column_field: :class:`FieldReference ` + :param done_field: + :type done_field: :class:`FieldReference ` + :param row_field: + :type row_field: :class:`FieldReference ` + """ + + _attribute_map = { + 'column_field': {'key': 'columnField', 'type': 'FieldReference'}, + 'done_field': {'key': 'doneField', 'type': 'FieldReference'}, + 'row_field': {'key': 'rowField', 'type': 'FieldReference'} + } + + def __init__(self, column_field=None, done_field=None, row_field=None): + super(BoardFields, self).__init__() + self.column_field = column_field + self.done_field = done_field + self.row_field = row_field diff --git a/vsts/vsts/work/v4_1/models/board_reference.py b/vsts/vsts/work/v4_1/models/board_reference.py new file mode 100644 index 00000000..6380e11e --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_reference.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardReference(Model): + """BoardReference. + + :param id: Id of the resource + :type id: str + :param name: Name of the resource + :type name: str + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, name=None, url=None): + super(BoardReference, self).__init__() + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/work/v4_1/models/board_row.py b/vsts/vsts/work/v4_1/models/board_row.py new file mode 100644 index 00000000..313e4810 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_row.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardRow(Model): + """BoardRow. + + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, id=None, name=None): + super(BoardRow, self).__init__() + self.id = id + self.name = name diff --git a/vsts/vsts/work/v4_1/models/board_suggested_value.py b/vsts/vsts/work/v4_1/models/board_suggested_value.py new file mode 100644 index 00000000..058045af --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_suggested_value.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardSuggestedValue(Model): + """BoardSuggestedValue. + + :param name: + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, name=None): + super(BoardSuggestedValue, self).__init__() + self.name = name diff --git a/vsts/vsts/work/v4_1/models/board_user_settings.py b/vsts/vsts/work/v4_1/models/board_user_settings.py new file mode 100644 index 00000000..d20fbc57 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/board_user_settings.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 BoardUserSettings(Model): + """BoardUserSettings. + + :param auto_refresh_state: + :type auto_refresh_state: bool + """ + + _attribute_map = { + 'auto_refresh_state': {'key': 'autoRefreshState', 'type': 'bool'} + } + + def __init__(self, auto_refresh_state=None): + super(BoardUserSettings, self).__init__() + self.auto_refresh_state = auto_refresh_state diff --git a/vsts/vsts/work/v4_1/models/capacity_patch.py b/vsts/vsts/work/v4_1/models/capacity_patch.py new file mode 100644 index 00000000..1f27eb84 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/capacity_patch.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 CapacityPatch(Model): + """CapacityPatch. + + :param activities: + :type activities: list of :class:`Activity ` + :param days_off: + :type days_off: list of :class:`DateRange ` + """ + + _attribute_map = { + 'activities': {'key': 'activities', 'type': '[Activity]'}, + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'} + } + + def __init__(self, activities=None, days_off=None): + super(CapacityPatch, self).__init__() + self.activities = activities + self.days_off = days_off diff --git a/vsts/vsts/work/v4_1/models/category_configuration.py b/vsts/vsts/work/v4_1/models/category_configuration.py new file mode 100644 index 00000000..ffab97a3 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/category_configuration.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 CategoryConfiguration(Model): + """CategoryConfiguration. + + :param name: Name + :type name: str + :param reference_name: Category Reference Name + :type reference_name: str + :param work_item_types: Work item types for the backlog category + :type work_item_types: list of :class:`WorkItemTypeReference ` + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'work_item_types': {'key': 'workItemTypes', 'type': '[WorkItemTypeReference]'} + } + + def __init__(self, name=None, reference_name=None, work_item_types=None): + super(CategoryConfiguration, self).__init__() + self.name = name + self.reference_name = reference_name + self.work_item_types = work_item_types diff --git a/vsts/vsts/work/v4_1/models/create_plan.py b/vsts/vsts/work/v4_1/models/create_plan.py new file mode 100644 index 00000000..e0fe8aa2 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/create_plan.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 CreatePlan(Model): + """CreatePlan. + + :param description: Description of the plan + :type description: str + :param name: Name of the plan to create. + :type name: str + :param properties: Plan properties. + :type properties: object + :param type: Type of plan to create. + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, properties=None, type=None): + super(CreatePlan, self).__init__() + self.description = description + self.name = name + self.properties = properties + self.type = type diff --git a/vsts/vsts/work/v4_1/models/date_range.py b/vsts/vsts/work/v4_1/models/date_range.py new file mode 100644 index 00000000..94694335 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/date_range.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 DateRange(Model): + """DateRange. + + :param end: End of the date range. + :type end: datetime + :param start: Start of the date range. + :type start: datetime + """ + + _attribute_map = { + 'end': {'key': 'end', 'type': 'iso-8601'}, + 'start': {'key': 'start', 'type': 'iso-8601'} + } + + def __init__(self, end=None, start=None): + super(DateRange, self).__init__() + self.end = end + self.start = start diff --git a/vsts/vsts/work/v4_1/models/delivery_view_data.py b/vsts/vsts/work/v4_1/models/delivery_view_data.py new file mode 100644 index 00000000..24424d5f --- /dev/null +++ b/vsts/vsts/work/v4_1/models/delivery_view_data.py @@ -0,0 +1,47 @@ +# -------------------------------------------------------------------------------------------- +# 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 .plan_view_data import PlanViewData + + +class DeliveryViewData(PlanViewData): + """DeliveryViewData. + + :param id: + :type id: str + :param revision: + :type revision: int + :param child_id_to_parent_id_map: Work item child id to parenet id map + :type child_id_to_parent_id_map: dict + :param criteria_status: Filter criteria status of the timeline + :type criteria_status: :class:`TimelineCriteriaStatus ` + :param end_date: The end date of the delivery view data + :type end_date: datetime + :param start_date: The start date for the delivery view data + :type start_date: datetime + :param teams: All the team data + :type teams: list of :class:`TimelineTeamData ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'child_id_to_parent_id_map': {'key': 'childIdToParentIdMap', 'type': '{int}'}, + 'criteria_status': {'key': 'criteriaStatus', 'type': 'TimelineCriteriaStatus'}, + 'end_date': {'key': 'endDate', 'type': 'iso-8601'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'teams': {'key': 'teams', 'type': '[TimelineTeamData]'} + } + + def __init__(self, id=None, revision=None, child_id_to_parent_id_map=None, criteria_status=None, end_date=None, start_date=None, teams=None): + super(DeliveryViewData, self).__init__(id=id, revision=revision) + self.child_id_to_parent_id_map = child_id_to_parent_id_map + self.criteria_status = criteria_status + self.end_date = end_date + self.start_date = start_date + self.teams = teams diff --git a/vsts/vsts/work/v4_1/models/field_reference.py b/vsts/vsts/work/v4_1/models/field_reference.py new file mode 100644 index 00000000..6741b93e --- /dev/null +++ b/vsts/vsts/work/v4_1/models/field_reference.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 FieldReference(Model): + """FieldReference. + + :param reference_name: fieldRefName for the field + :type reference_name: str + :param url: Full http link to more information about the field + :type url: str + """ + + _attribute_map = { + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, reference_name=None, url=None): + super(FieldReference, self).__init__() + self.reference_name = reference_name + self.url = url diff --git a/vsts/vsts/work/v4_1/models/field_setting.py b/vsts/vsts/work/v4_1/models/field_setting.py new file mode 100644 index 00000000..28a2b6a6 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/field_setting.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class FieldSetting(dict): + """FieldSetting. + + """ + + _attribute_map = { + } + + def __init__(self): + super(FieldSetting, self).__init__() diff --git a/vsts/vsts/work/v4_1/models/filter_clause.py b/vsts/vsts/work/v4_1/models/filter_clause.py new file mode 100644 index 00000000..1bb06642 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/filter_clause.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 FilterClause(Model): + """FilterClause. + + :param field_name: + :type field_name: str + :param index: + :type index: int + :param logical_operator: + :type logical_operator: str + :param operator: + :type operator: str + :param value: + :type value: str + """ + + _attribute_map = { + 'field_name': {'key': 'fieldName', 'type': 'str'}, + 'index': {'key': 'index', 'type': 'int'}, + 'logical_operator': {'key': 'logicalOperator', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, field_name=None, index=None, logical_operator=None, operator=None, value=None): + super(FilterClause, self).__init__() + self.field_name = field_name + self.index = index + self.logical_operator = logical_operator + self.operator = operator + self.value = value diff --git a/vsts/vsts/work/v4_1/models/identity_ref.py b/vsts/vsts/work/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/identity_ref.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# 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 .graph_subject_base import GraphSubjectBase + + +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: + :type directory_alias: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param inactive: + :type inactive: bool + :param is_aad_identity: + :type is_aad_identity: bool + :param is_container: + :type is_container: bool + :param profile_url: + :type profile_url: str + :param unique_name: + :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'}, + '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, 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.profile_url = profile_url + self.unique_name = unique_name diff --git a/vsts/vsts/work/v4_1/models/member.py b/vsts/vsts/work/v4_1/models/member.py new file mode 100644 index 00000000..27ca2b67 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/member.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Member(Model): + """Member. + + :param display_name: + :type display_name: str + :param id: + :type id: str + :param image_url: + :type image_url: str + :param unique_name: + :type unique_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'image_url': {'key': 'imageUrl', 'type': 'str'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, display_name=None, id=None, image_url=None, unique_name=None, url=None): + super(Member, self).__init__() + self.display_name = display_name + self.id = id + self.image_url = image_url + self.unique_name = unique_name + self.url = url diff --git a/vsts/vsts/work/v4_1/models/parent_child_wIMap.py b/vsts/vsts/work/v4_1/models/parent_child_wIMap.py new file mode 100644 index 00000000..87678f18 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/parent_child_wIMap.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 ParentChildWIMap(Model): + """ParentChildWIMap. + + :param child_work_item_ids: + :type child_work_item_ids: list of int + :param id: + :type id: int + :param title: + :type title: str + """ + + _attribute_map = { + 'child_work_item_ids': {'key': 'childWorkItemIds', 'type': '[int]'}, + 'id': {'key': 'id', 'type': 'int'}, + 'title': {'key': 'title', 'type': 'str'} + } + + def __init__(self, child_work_item_ids=None, id=None, title=None): + super(ParentChildWIMap, self).__init__() + self.child_work_item_ids = child_work_item_ids + self.id = id + self.title = title diff --git a/vsts/vsts/work/v4_1/models/plan.py b/vsts/vsts/work/v4_1/models/plan.py new file mode 100644 index 00000000..f86b5833 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/plan.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------------------------- +# 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 Plan(Model): + """Plan. + + :param created_by_identity: Identity that created this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. + :type created_by_identity: :class:`IdentityRef ` + :param created_date: Date when the plan was created + :type created_date: datetime + :param description: Description of the plan + :type description: str + :param id: Id of the plan + :type id: str + :param modified_by_identity: Identity that last modified this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. + :type modified_by_identity: :class:`IdentityRef ` + :param modified_date: Date when the plan was last modified. Default to CreatedDate when the plan is first created. + :type modified_date: datetime + :param name: Name of the plan + :type name: str + :param properties: The PlanPropertyCollection instance associated with the plan. These are dependent on the type of the plan. For example, DeliveryTimelineView, it would be of type DeliveryViewPropertyCollection. + :type properties: object + :param revision: Revision of the plan. Used to safeguard users from overwriting each other's changes. + :type revision: int + :param type: Type of the plan + :type type: object + :param url: The resource url to locate the plan via rest api + :type url: str + :param user_permissions: Bit flag indicating set of permissions a user has to the plan. + :type user_permissions: object + """ + + _attribute_map = { + 'created_by_identity': {'key': 'createdByIdentity', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'modified_by_identity': {'key': 'modifiedByIdentity', 'type': 'IdentityRef'}, + 'modified_date': {'key': 'modifiedDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'user_permissions': {'key': 'userPermissions', 'type': 'object'} + } + + def __init__(self, created_by_identity=None, created_date=None, description=None, id=None, modified_by_identity=None, modified_date=None, name=None, properties=None, revision=None, type=None, url=None, user_permissions=None): + super(Plan, self).__init__() + self.created_by_identity = created_by_identity + self.created_date = created_date + self.description = description + self.id = id + self.modified_by_identity = modified_by_identity + self.modified_date = modified_date + self.name = name + self.properties = properties + self.revision = revision + self.type = type + self.url = url + self.user_permissions = user_permissions diff --git a/vsts/vsts/work/v4_1/models/plan_view_data.py b/vsts/vsts/work/v4_1/models/plan_view_data.py new file mode 100644 index 00000000..fb99dc33 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/plan_view_data.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 PlanViewData(Model): + """PlanViewData. + + :param id: + :type id: str + :param revision: + :type revision: int + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, id=None, revision=None): + super(PlanViewData, self).__init__() + self.id = id + self.revision = revision diff --git a/vsts/vsts/work/v4_1/models/process_configuration.py b/vsts/vsts/work/v4_1/models/process_configuration.py new file mode 100644 index 00000000..5ca2d3e1 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/process_configuration.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 ProcessConfiguration(Model): + """ProcessConfiguration. + + :param bug_work_items: Details about bug work items + :type bug_work_items: :class:`CategoryConfiguration ` + :param portfolio_backlogs: Details about portfolio backlogs + :type portfolio_backlogs: list of :class:`CategoryConfiguration ` + :param requirement_backlog: Details of requirement backlog + :type requirement_backlog: :class:`CategoryConfiguration ` + :param task_backlog: Details of task backlog + :type task_backlog: :class:`CategoryConfiguration ` + :param type_fields: Type fields for the process configuration + :type type_fields: dict + :param url: + :type url: str + """ + + _attribute_map = { + 'bug_work_items': {'key': 'bugWorkItems', 'type': 'CategoryConfiguration'}, + 'portfolio_backlogs': {'key': 'portfolioBacklogs', 'type': '[CategoryConfiguration]'}, + 'requirement_backlog': {'key': 'requirementBacklog', 'type': 'CategoryConfiguration'}, + 'task_backlog': {'key': 'taskBacklog', 'type': 'CategoryConfiguration'}, + 'type_fields': {'key': 'typeFields', 'type': '{WorkItemFieldReference}'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, bug_work_items=None, portfolio_backlogs=None, requirement_backlog=None, task_backlog=None, type_fields=None, url=None): + super(ProcessConfiguration, self).__init__() + self.bug_work_items = bug_work_items + self.portfolio_backlogs = portfolio_backlogs + self.requirement_backlog = requirement_backlog + self.task_backlog = task_backlog + self.type_fields = type_fields + self.url = url diff --git a/vsts/vsts/work/v4_1/models/reference_links.py b/vsts/vsts/work/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/work/v4_1/models/reference_links.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 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 diff --git a/vsts/vsts/work/v4_1/models/rule.py b/vsts/vsts/work/v4_1/models/rule.py new file mode 100644 index 00000000..d431c108 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/rule.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 Rule(Model): + """Rule. + + :param clauses: + :type clauses: list of :class:`FilterClause ` + :param filter: + :type filter: str + :param is_enabled: + :type is_enabled: str + :param name: + :type name: str + :param settings: + :type settings: :class:`attribute ` + """ + + _attribute_map = { + 'clauses': {'key': 'clauses', 'type': '[FilterClause]'}, + 'filter': {'key': 'filter', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'attribute'} + } + + def __init__(self, clauses=None, filter=None, is_enabled=None, name=None, settings=None): + super(Rule, self).__init__() + self.clauses = clauses + self.filter = filter + self.is_enabled = is_enabled + self.name = name + self.settings = settings diff --git a/vsts/vsts/work/v4_1/models/team_context.py b/vsts/vsts/work/v4_1/models/team_context.py new file mode 100644 index 00000000..18418ce7 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_context.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamContext(Model): + """TeamContext. + + :param project: The team project Id or name. Ignored if ProjectId is set. + :type project: str + :param project_id: The Team Project ID. Required if Project is not set. + :type project_id: str + :param team: The Team Id or name. Ignored if TeamId is set. + :type team: str + :param team_id: The Team Id + :type team_id: str + """ + + _attribute_map = { + 'project': {'key': 'project', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'team': {'key': 'team', 'type': 'str'}, + 'team_id': {'key': 'teamId', 'type': 'str'} + } + + def __init__(self, project=None, project_id=None, team=None, team_id=None): + super(TeamContext, self).__init__() + self.project = project + self.project_id = project_id + self.team = team + self.team_id = team_id diff --git a/vsts/vsts/work/v4_1/models/team_field_value.py b/vsts/vsts/work/v4_1/models/team_field_value.py new file mode 100644 index 00000000..08d7ad84 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_field_value.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamFieldValue(Model): + """TeamFieldValue. + + :param include_children: + :type include_children: bool + :param value: + :type value: str + """ + + _attribute_map = { + 'include_children': {'key': 'includeChildren', 'type': 'bool'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, include_children=None, value=None): + super(TeamFieldValue, self).__init__() + self.include_children = include_children + self.value = value diff --git a/vsts/vsts/work/v4_1/models/team_field_values.py b/vsts/vsts/work/v4_1/models/team_field_values.py new file mode 100644 index 00000000..12e5bec7 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_field_values.py @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamFieldValues(TeamSettingsDataContractBase): + """TeamFieldValues. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param default_value: The default team field value + :type default_value: str + :param field: Shallow ref to the field being used as a team field + :type field: :class:`FieldReference ` + :param values: Collection of all valid team field values + :type values: list of :class:`TeamFieldValue ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'field': {'key': 'field', 'type': 'FieldReference'}, + 'values': {'key': 'values', 'type': '[TeamFieldValue]'} + } + + def __init__(self, _links=None, url=None, default_value=None, field=None, values=None): + super(TeamFieldValues, self).__init__(_links=_links, url=url) + self.default_value = default_value + self.field = field + self.values = values diff --git a/vsts/vsts/work/v4_1/models/team_field_values_patch.py b/vsts/vsts/work/v4_1/models/team_field_values_patch.py new file mode 100644 index 00000000..68c735e9 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_field_values_patch.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamFieldValuesPatch(Model): + """TeamFieldValuesPatch. + + :param default_value: + :type default_value: str + :param values: + :type values: list of :class:`TeamFieldValue ` + """ + + _attribute_map = { + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[TeamFieldValue]'} + } + + def __init__(self, default_value=None, values=None): + super(TeamFieldValuesPatch, self).__init__() + self.default_value = default_value + self.values = values diff --git a/vsts/vsts/work/v4_1/models/team_iteration_attributes.py b/vsts/vsts/work/v4_1/models/team_iteration_attributes.py new file mode 100644 index 00000000..10427d6b --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_iteration_attributes.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamIterationAttributes(Model): + """TeamIterationAttributes. + + :param finish_date: + :type finish_date: datetime + :param start_date: + :type start_date: datetime + :param time_frame: + :type time_frame: object + """ + + _attribute_map = { + 'finish_date': {'key': 'finishDate', 'type': 'iso-8601'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'time_frame': {'key': 'timeFrame', 'type': 'object'} + } + + def __init__(self, finish_date=None, start_date=None, time_frame=None): + super(TeamIterationAttributes, self).__init__() + self.finish_date = finish_date + self.start_date = start_date + self.time_frame = time_frame diff --git a/vsts/vsts/work/v4_1/models/team_member_capacity.py b/vsts/vsts/work/v4_1/models/team_member_capacity.py new file mode 100644 index 00000000..fd391fb8 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_member_capacity.py @@ -0,0 +1,39 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamMemberCapacity(TeamSettingsDataContractBase): + """TeamMemberCapacity. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param activities: Collection of capacities associated with the team member + :type activities: list of :class:`Activity ` + :param days_off: The days off associated with the team member + :type days_off: list of :class:`DateRange ` + :param team_member: Shallow Ref to the associated team member + :type team_member: :class:`Member ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'activities': {'key': 'activities', 'type': '[Activity]'}, + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'}, + 'team_member': {'key': 'teamMember', 'type': 'Member'} + } + + def __init__(self, _links=None, url=None, activities=None, days_off=None, team_member=None): + super(TeamMemberCapacity, self).__init__(_links=_links, url=url) + self.activities = activities + self.days_off = days_off + self.team_member = team_member diff --git a/vsts/vsts/work/v4_1/models/team_setting.py b/vsts/vsts/work/v4_1/models/team_setting.py new file mode 100644 index 00000000..d26a8565 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_setting.py @@ -0,0 +1,51 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamSetting(TeamSettingsDataContractBase): + """TeamSetting. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param backlog_iteration: Backlog Iteration + :type backlog_iteration: :class:`TeamSettingsIteration ` + :param backlog_visibilities: Information about categories that are visible on the backlog. + :type backlog_visibilities: dict + :param bugs_behavior: BugsBehavior (Off, AsTasks, AsRequirements, ...) + :type bugs_behavior: object + :param default_iteration: Default Iteration, the iteration used when creating a new work item on the queries page. + :type default_iteration: :class:`TeamSettingsIteration ` + :param default_iteration_macro: Default Iteration macro (if any) + :type default_iteration_macro: str + :param working_days: Days that the team is working + :type working_days: list of DayOfWeek + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'backlog_iteration': {'key': 'backlogIteration', 'type': 'TeamSettingsIteration'}, + 'backlog_visibilities': {'key': 'backlogVisibilities', 'type': '{bool}'}, + 'bugs_behavior': {'key': 'bugsBehavior', 'type': 'object'}, + 'default_iteration': {'key': 'defaultIteration', 'type': 'TeamSettingsIteration'}, + 'default_iteration_macro': {'key': 'defaultIterationMacro', 'type': 'str'}, + 'working_days': {'key': 'workingDays', 'type': '[DayOfWeek]'} + } + + def __init__(self, _links=None, url=None, backlog_iteration=None, backlog_visibilities=None, bugs_behavior=None, default_iteration=None, default_iteration_macro=None, working_days=None): + super(TeamSetting, self).__init__(_links=_links, url=url) + self.backlog_iteration = backlog_iteration + self.backlog_visibilities = backlog_visibilities + self.bugs_behavior = bugs_behavior + self.default_iteration = default_iteration + self.default_iteration_macro = default_iteration_macro + self.working_days = working_days diff --git a/vsts/vsts/work/v4_1/models/team_settings_data_contract_base.py b/vsts/vsts/work/v4_1/models/team_settings_data_contract_base.py new file mode 100644 index 00000000..a8a5e6f1 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_settings_data_contract_base.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamSettingsDataContractBase(Model): + """TeamSettingsDataContractBase. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, url=None): + super(TeamSettingsDataContractBase, self).__init__() + self._links = _links + self.url = url diff --git a/vsts/vsts/work/v4_1/models/team_settings_days_off.py b/vsts/vsts/work/v4_1/models/team_settings_days_off.py new file mode 100644 index 00000000..947095d0 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_settings_days_off.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamSettingsDaysOff(TeamSettingsDataContractBase): + """TeamSettingsDaysOff. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param days_off: + :type days_off: list of :class:`DateRange ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'} + } + + def __init__(self, _links=None, url=None, days_off=None): + super(TeamSettingsDaysOff, self).__init__(_links=_links, url=url) + self.days_off = days_off diff --git a/vsts/vsts/work/v4_1/models/team_settings_days_off_patch.py b/vsts/vsts/work/v4_1/models/team_settings_days_off_patch.py new file mode 100644 index 00000000..4e669e6d --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_settings_days_off_patch.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamSettingsDaysOffPatch(Model): + """TeamSettingsDaysOffPatch. + + :param days_off: + :type days_off: list of :class:`DateRange ` + """ + + _attribute_map = { + 'days_off': {'key': 'daysOff', 'type': '[DateRange]'} + } + + def __init__(self, days_off=None): + super(TeamSettingsDaysOffPatch, self).__init__() + self.days_off = days_off diff --git a/vsts/vsts/work/v4_1/models/team_settings_iteration.py b/vsts/vsts/work/v4_1/models/team_settings_iteration.py new file mode 100644 index 00000000..6fa928c6 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_settings_iteration.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------------------------- +# 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 .team_settings_data_contract_base import TeamSettingsDataContractBase + + +class TeamSettingsIteration(TeamSettingsDataContractBase): + """TeamSettingsIteration. + + :param _links: Collection of links relevant to resource + :type _links: :class:`ReferenceLinks ` + :param url: Full http link to the resource + :type url: str + :param attributes: Attributes such as start and end date + :type attributes: :class:`TeamIterationAttributes ` + :param id: Id of the resource + :type id: str + :param name: Name of the resource + :type name: str + :param path: Relative path of the iteration + :type path: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'url': {'key': 'url', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'TeamIterationAttributes'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, _links=None, url=None, attributes=None, id=None, name=None, path=None): + super(TeamSettingsIteration, self).__init__(_links=_links, url=url) + self.attributes = attributes + self.id = id + self.name = name + self.path = path diff --git a/vsts/vsts/work/v4_1/models/team_settings_patch.py b/vsts/vsts/work/v4_1/models/team_settings_patch.py new file mode 100644 index 00000000..3942385c --- /dev/null +++ b/vsts/vsts/work/v4_1/models/team_settings_patch.py @@ -0,0 +1,45 @@ +# -------------------------------------------------------------------------------------------- +# 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 TeamSettingsPatch(Model): + """TeamSettingsPatch. + + :param backlog_iteration: + :type backlog_iteration: str + :param backlog_visibilities: + :type backlog_visibilities: dict + :param bugs_behavior: + :type bugs_behavior: object + :param default_iteration: + :type default_iteration: str + :param default_iteration_macro: + :type default_iteration_macro: str + :param working_days: + :type working_days: list of DayOfWeek + """ + + _attribute_map = { + 'backlog_iteration': {'key': 'backlogIteration', 'type': 'str'}, + 'backlog_visibilities': {'key': 'backlogVisibilities', 'type': '{bool}'}, + 'bugs_behavior': {'key': 'bugsBehavior', 'type': 'object'}, + 'default_iteration': {'key': 'defaultIteration', 'type': 'str'}, + 'default_iteration_macro': {'key': 'defaultIterationMacro', 'type': 'str'}, + 'working_days': {'key': 'workingDays', 'type': '[DayOfWeek]'} + } + + def __init__(self, backlog_iteration=None, backlog_visibilities=None, bugs_behavior=None, default_iteration=None, default_iteration_macro=None, working_days=None): + super(TeamSettingsPatch, self).__init__() + self.backlog_iteration = backlog_iteration + self.backlog_visibilities = backlog_visibilities + self.bugs_behavior = bugs_behavior + self.default_iteration = default_iteration + self.default_iteration_macro = default_iteration_macro + self.working_days = working_days diff --git a/vsts/vsts/work/v4_1/models/timeline_criteria_status.py b/vsts/vsts/work/v4_1/models/timeline_criteria_status.py new file mode 100644 index 00000000..d34fc208 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/timeline_criteria_status.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineCriteriaStatus(Model): + """TimelineCriteriaStatus. + + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, type=None): + super(TimelineCriteriaStatus, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/work/v4_1/models/timeline_iteration_status.py b/vsts/vsts/work/v4_1/models/timeline_iteration_status.py new file mode 100644 index 00000000..56ad40fb --- /dev/null +++ b/vsts/vsts/work/v4_1/models/timeline_iteration_status.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineIterationStatus(Model): + """TimelineIterationStatus. + + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, type=None): + super(TimelineIterationStatus, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/work/v4_1/models/timeline_team_data.py b/vsts/vsts/work/v4_1/models/timeline_team_data.py new file mode 100644 index 00000000..c05a77f5 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/timeline_team_data.py @@ -0,0 +1,77 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineTeamData(Model): + """TimelineTeamData. + + :param backlog: Backlog matching the mapped backlog associated with this team. + :type backlog: :class:`BacklogLevel ` + :param field_reference_names: The field reference names of the work item data + :type field_reference_names: list of str + :param id: The id of the team + :type id: str + :param is_expanded: Was iteration and work item data retrieved for this team. Teams with IsExpanded false have not had their iteration, work item, and field related data queried and will never contain this data. If true then these items are queried and, if there are items in the queried range, there will be data. + :type is_expanded: bool + :param iterations: The iteration data, including the work items, in the queried date range. + :type iterations: list of :class:`TimelineTeamIteration ` + :param name: The name of the team + :type name: str + :param order_by_field: The order by field name of this team + :type order_by_field: str + :param partially_paged_field_reference_names: The field reference names of the partially paged work items, such as ID, WorkItemType + :type partially_paged_field_reference_names: list of str + :param project_id: The project id the team belongs team + :type project_id: str + :param status: Status for this team. + :type status: :class:`TimelineTeamStatus ` + :param team_field_default_value: The team field default value + :type team_field_default_value: str + :param team_field_name: The team field name of this team + :type team_field_name: str + :param team_field_values: The team field values + :type team_field_values: list of :class:`TeamFieldValue ` + :param work_item_type_colors: Colors for the work item types. + :type work_item_type_colors: list of :class:`WorkItemColor ` + """ + + _attribute_map = { + 'backlog': {'key': 'backlog', 'type': 'BacklogLevel'}, + 'field_reference_names': {'key': 'fieldReferenceNames', 'type': '[str]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_expanded': {'key': 'isExpanded', 'type': 'bool'}, + 'iterations': {'key': 'iterations', 'type': '[TimelineTeamIteration]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order_by_field': {'key': 'orderByField', 'type': 'str'}, + 'partially_paged_field_reference_names': {'key': 'partiallyPagedFieldReferenceNames', 'type': '[str]'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'TimelineTeamStatus'}, + 'team_field_default_value': {'key': 'teamFieldDefaultValue', 'type': 'str'}, + 'team_field_name': {'key': 'teamFieldName', 'type': 'str'}, + 'team_field_values': {'key': 'teamFieldValues', 'type': '[TeamFieldValue]'}, + 'work_item_type_colors': {'key': 'workItemTypeColors', 'type': '[WorkItemColor]'} + } + + def __init__(self, backlog=None, field_reference_names=None, id=None, is_expanded=None, iterations=None, name=None, order_by_field=None, partially_paged_field_reference_names=None, project_id=None, status=None, team_field_default_value=None, team_field_name=None, team_field_values=None, work_item_type_colors=None): + super(TimelineTeamData, self).__init__() + self.backlog = backlog + self.field_reference_names = field_reference_names + self.id = id + self.is_expanded = is_expanded + self.iterations = iterations + self.name = name + self.order_by_field = order_by_field + self.partially_paged_field_reference_names = partially_paged_field_reference_names + self.project_id = project_id + self.status = status + self.team_field_default_value = team_field_default_value + self.team_field_name = team_field_name + self.team_field_values = team_field_values + self.work_item_type_colors = work_item_type_colors diff --git a/vsts/vsts/work/v4_1/models/timeline_team_iteration.py b/vsts/vsts/work/v4_1/models/timeline_team_iteration.py new file mode 100644 index 00000000..bd289370 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/timeline_team_iteration.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineTeamIteration(Model): + """TimelineTeamIteration. + + :param finish_date: The end date of the iteration + :type finish_date: datetime + :param name: The iteration name + :type name: str + :param partially_paged_work_items: All the partially paged workitems in this iteration. + :type partially_paged_work_items: list of [object] + :param path: The iteration path + :type path: str + :param start_date: The start date of the iteration + :type start_date: datetime + :param status: The status of this iteration + :type status: :class:`TimelineIterationStatus ` + :param work_items: The work items that have been paged in this iteration + :type work_items: list of [object] + """ + + _attribute_map = { + 'finish_date': {'key': 'finishDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'partially_paged_work_items': {'key': 'partiallyPagedWorkItems', 'type': '[[object]]'}, + 'path': {'key': 'path', 'type': 'str'}, + 'start_date': {'key': 'startDate', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'TimelineIterationStatus'}, + 'work_items': {'key': 'workItems', 'type': '[[object]]'} + } + + def __init__(self, finish_date=None, name=None, partially_paged_work_items=None, path=None, start_date=None, status=None, work_items=None): + super(TimelineTeamIteration, self).__init__() + self.finish_date = finish_date + self.name = name + self.partially_paged_work_items = partially_paged_work_items + self.path = path + self.start_date = start_date + self.status = status + self.work_items = work_items diff --git a/vsts/vsts/work/v4_1/models/timeline_team_status.py b/vsts/vsts/work/v4_1/models/timeline_team_status.py new file mode 100644 index 00000000..ba0e89d1 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/timeline_team_status.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 TimelineTeamStatus(Model): + """TimelineTeamStatus. + + :param message: + :type message: str + :param type: + :type type: object + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, message=None, type=None): + super(TimelineTeamStatus, self).__init__() + self.message = message + self.type = type diff --git a/vsts/vsts/work/v4_1/models/update_plan.py b/vsts/vsts/work/v4_1/models/update_plan.py new file mode 100644 index 00000000..901ad0ed --- /dev/null +++ b/vsts/vsts/work/v4_1/models/update_plan.py @@ -0,0 +1,41 @@ +# -------------------------------------------------------------------------------------------- +# 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 UpdatePlan(Model): + """UpdatePlan. + + :param description: Description of the plan + :type description: str + :param name: Name of the plan to create. + :type name: str + :param properties: Plan properties. + :type properties: object + :param revision: Revision of the plan that was updated - the value used here should match the one the server gave the client in the Plan. + :type revision: int + :param type: Type of the plan + :type type: object + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, description=None, name=None, properties=None, revision=None, type=None): + super(UpdatePlan, self).__init__() + self.description = description + self.name = name + self.properties = properties + self.revision = revision + self.type = type diff --git a/vsts/vsts/work/v4_1/models/work_item_color.py b/vsts/vsts/work/v4_1/models/work_item_color.py new file mode 100644 index 00000000..7d2c9de7 --- /dev/null +++ b/vsts/vsts/work/v4_1/models/work_item_color.py @@ -0,0 +1,33 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemColor(Model): + """WorkItemColor. + + :param icon: + :type icon: str + :param primary_color: + :type primary_color: str + :param work_item_type_name: + :type work_item_type_name: str + """ + + _attribute_map = { + 'icon': {'key': 'icon', 'type': 'str'}, + 'primary_color': {'key': 'primaryColor', 'type': 'str'}, + 'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'} + } + + def __init__(self, icon=None, primary_color=None, work_item_type_name=None): + super(WorkItemColor, self).__init__() + self.icon = icon + self.primary_color = primary_color + self.work_item_type_name = work_item_type_name diff --git a/vsts/vsts/work/v4_1/models/work_item_field_reference.py b/vsts/vsts/work/v4_1/models/work_item_field_reference.py new file mode 100644 index 00000000..943b036d --- /dev/null +++ b/vsts/vsts/work/v4_1/models/work_item_field_reference.py @@ -0,0 +1,32 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class WorkItemFieldReference(BaseSecuredObject): + """WorkItemFieldReference. + + :param name: The name of the field. + :type name: str + :param reference_name: The reference name of the field. + :type reference_name: str + :param url: The REST URL of the resource. + :type url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, name=None, reference_name=None, url=None): + super(WorkItemFieldReference, self).__init__() + self.name = name + self.reference_name = reference_name + self.url = url diff --git a/vsts/vsts/work/v4_1/models/work_item_tracking_resource_reference.py b/vsts/vsts/work/v4_1/models/work_item_tracking_resource_reference.py new file mode 100644 index 00000000..75c0959e --- /dev/null +++ b/vsts/vsts/work/v4_1/models/work_item_tracking_resource_reference.py @@ -0,0 +1,24 @@ +# -------------------------------------------------------------------------------------------- +# 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. +# -------------------------------------------------------------------------------------------- + + + +class WorkItemTrackingResourceReference(BaseSecuredObject): + """WorkItemTrackingResourceReference. + + :param url: + :type url: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, url=None): + super(WorkItemTrackingResourceReference, self).__init__() + self.url = url diff --git a/vsts/vsts/work/v4_1/models/work_item_type_reference.py b/vsts/vsts/work/v4_1/models/work_item_type_reference.py new file mode 100644 index 00000000..8757dc1d --- /dev/null +++ b/vsts/vsts/work/v4_1/models/work_item_type_reference.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# 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 .work_item_tracking_resource_reference import WorkItemTrackingResourceReference + + +class WorkItemTypeReference(WorkItemTrackingResourceReference): + """WorkItemTypeReference. + + :param url: + :type url: str + :param name: Name of the work item type. + :type name: str + """ + + _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, url=None, name=None): + super(WorkItemTypeReference, self).__init__(url=url) + self.name = name diff --git a/vsts/vsts/work/v4_1/models/work_item_type_state_info.py b/vsts/vsts/work/v4_1/models/work_item_type_state_info.py new file mode 100644 index 00000000..7ff5045e --- /dev/null +++ b/vsts/vsts/work/v4_1/models/work_item_type_state_info.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# 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 WorkItemTypeStateInfo(Model): + """WorkItemTypeStateInfo. + + :param states: State name to state category map + :type states: dict + :param work_item_type_name: Work Item type name + :type work_item_type_name: str + """ + + _attribute_map = { + 'states': {'key': 'states', 'type': '{str}'}, + 'work_item_type_name': {'key': 'workItemTypeName', 'type': 'str'} + } + + def __init__(self, states=None, work_item_type_name=None): + super(WorkItemTypeStateInfo, self).__init__() + self.states = states + self.work_item_type_name = work_item_type_name diff --git a/vsts/vsts/work/v4_1/work_client.py b/vsts/vsts/work/v4_1/work_client.py new file mode 100644 index 00000000..1b560078 --- /dev/null +++ b/vsts/vsts/work/v4_1/work_client.py @@ -0,0 +1,1389 @@ +# -------------------------------------------------------------------------------------------- +# 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 ...vss_client import VssClient +from . import models + + +class WorkClient(VssClient): + """Work + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(WorkClient, 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 = '1d4f49f9-02b9-4e26-b826-2cdb6195f2a9' + + def get_backlog_configurations(self, team_context): + """GetBacklogConfigurations. + [Preview API] Gets backlog configuration for a team + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='7799f497-3cb5-4f16-ad4f-5cd06012db64', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BacklogConfiguration', response) + + def get_backlog_level_work_items(self, team_context, backlog_id): + """GetBacklogLevelWorkItems. + [Preview API] Get a list of work items within a backlog level + :param :class:` ` team_context: The team context for the operation + :param str backlog_id: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if backlog_id is not None: + route_values['backlogId'] = self._serialize.url('backlog_id', backlog_id, 'str') + response = self._send(http_method='GET', + location_id='7c468d96-ab1d-4294-a360-92f07e9ccd98', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BacklogLevelWorkItems', response) + + def get_backlog(self, team_context, id): + """GetBacklog. + [Preview API] Get a backlog level + :param :class:` ` team_context: The team context for the operation + :param str id: The id of the backlog level + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + response = self._send(http_method='GET', + location_id='a93726f9-7867-4e38-b4f2-0bfafc2f6a94', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BacklogLevelConfiguration', response) + + def get_backlogs(self, team_context): + """GetBacklogs. + [Preview API] List all backlog levels + :param :class:` ` team_context: The team context for the operation + :rtype: [BacklogLevelConfiguration] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='a93726f9-7867-4e38-b4f2-0bfafc2f6a94', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BacklogLevelConfiguration]', response) + + def get_column_suggested_values(self, project=None): + """GetColumnSuggestedValues. + [Preview API] Get available board columns in a project + :param str project: Project ID or project name + :rtype: [BoardSuggestedValue] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardSuggestedValue]', response) + + def get_board_mapping_parent_items(self, team_context, child_backlog_context_category_ref_name, workitem_ids): + """GetBoardMappingParentItems. + [Preview API] Returns the list of parent field filter model for the given list of workitem ids + :param :class:` ` team_context: The team context for the operation + :param str child_backlog_context_category_ref_name: + :param [int] workitem_ids: + :rtype: [ParentChildWIMap] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + query_parameters = {} + if child_backlog_context_category_ref_name is not None: + query_parameters['childBacklogContextCategoryRefName'] = self._serialize.query('child_backlog_context_category_ref_name', child_backlog_context_category_ref_name, 'str') + if workitem_ids is not None: + workitem_ids = ",".join(map(str, workitem_ids)) + query_parameters['workitemIds'] = self._serialize.query('workitem_ids', workitem_ids, 'str') + response = self._send(http_method='GET', + location_id='186abea3-5c35-432f-9e28-7a15b4312a0e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ParentChildWIMap]', response) + + def get_row_suggested_values(self, project=None): + """GetRowSuggestedValues. + [Preview API] Get available board rows in a project + :param str project: Project ID or project name + :rtype: [BoardSuggestedValue] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardSuggestedValue]', response) + + def get_board(self, team_context, id): + """GetBoard. + [Preview API] Get board + :param :class:` ` team_context: The team context for the operation + :param str id: identifier for board, either board's backlog level name (Eg:"Stories") or Id + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + response = self._send(http_method='GET', + location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('Board', response) + + def get_boards(self, team_context): + """GetBoards. + [Preview API] Get boards + :param :class:` ` team_context: The team context for the operation + :rtype: [BoardReference] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardReference]', response) + + def set_board_options(self, options, team_context, id): + """SetBoardOptions. + [Preview API] Update board options + :param {str} options: options to updated + :param :class:` ` team_context: The team context for the operation + :param str id: identifier for board, either category plural name (Eg:"Stories") or guid + :rtype: {str} + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + content = self._serialize.body(options, '{str}') + response = self._send(http_method='PUT', + location_id='23ad19fc-3b8e-4877-8462-b3f92bc06b40', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('{str}', response) + + def get_board_user_settings(self, team_context, board): + """GetBoardUserSettings. + [Preview API] Get board user settings for a board id + :param :class:` ` team_context: The team context for the operation + :param str board: Board ID or Name + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BoardUserSettings', response) + + def update_board_user_settings(self, board_user_settings, team_context, board): + """UpdateBoardUserSettings. + [Preview API] Update board user settings for the board id + :param {str} board_user_settings: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_user_settings, '{str}') + response = self._send(http_method='PATCH', + location_id='b30d9f58-1891-4b0a-b168-c46408f919b0', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BoardUserSettings', response) + + def get_capacities(self, team_context, iteration_id): + """GetCapacities. + [Preview API] Get a team's capacity + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: ID of the iteration + :rtype: [TeamMemberCapacity] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + response = self._send(http_method='GET', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[TeamMemberCapacity]', response) + + def get_capacity(self, team_context, iteration_id, team_member_id): + """GetCapacity. + [Preview API] Get a team member's capacity + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: ID of the iteration + :param str team_member_id: ID of the team member + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + if team_member_id is not None: + route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str') + response = self._send(http_method='GET', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TeamMemberCapacity', response) + + def replace_capacities(self, capacities, team_context, iteration_id): + """ReplaceCapacities. + [Preview API] Replace a team's capacity + :param [TeamMemberCapacity] capacities: Team capacity to replace + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: ID of the iteration + :rtype: [TeamMemberCapacity] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + content = self._serialize.body(capacities, '[TeamMemberCapacity]') + response = self._send(http_method='PUT', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[TeamMemberCapacity]', response) + + def update_capacity(self, patch, team_context, iteration_id, team_member_id): + """UpdateCapacity. + [Preview API] Update a team member's capacity + :param :class:` ` patch: Updated capacity + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: ID of the iteration + :param str team_member_id: ID of the team member + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + if team_member_id is not None: + route_values['teamMemberId'] = self._serialize.url('team_member_id', team_member_id, 'str') + content = self._serialize.body(patch, 'CapacityPatch') + response = self._send(http_method='PATCH', + location_id='74412d15-8c1a-4352-a48d-ef1ed5587d57', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TeamMemberCapacity', response) + + def get_board_card_rule_settings(self, team_context, board): + """GetBoardCardRuleSettings. + [Preview API] Get board card Rule settings for the board id or board by name + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BoardCardRuleSettings', response) + + def update_board_card_rule_settings(self, board_card_rule_settings, team_context, board): + """UpdateBoardCardRuleSettings. + [Preview API] Update board card Rule settings for the board id or board by name + :param :class:` ` board_card_rule_settings: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_card_rule_settings, 'BoardCardRuleSettings') + response = self._send(http_method='PATCH', + location_id='b044a3d9-02ea-49c7-91a1-b730949cc896', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BoardCardRuleSettings', response) + + def get_board_card_settings(self, team_context, board): + """GetBoardCardSettings. + [Preview API] Get board card settings for the board id or board by name + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BoardCardSettings', response) + + def update_board_card_settings(self, board_card_settings_to_save, team_context, board): + """UpdateBoardCardSettings. + [Preview API] Update board card settings for the board id or board by name + :param :class:` ` board_card_settings_to_save: + :param :class:` ` team_context: The team context for the operation + :param str board: + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_card_settings_to_save, 'BoardCardSettings') + response = self._send(http_method='PUT', + location_id='07c3b467-bc60-4f05-8e34-599ce288fafc', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BoardCardSettings', response) + + def get_board_chart(self, team_context, board, name): + """GetBoardChart. + [Preview API] Get a board chart + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :param str name: The chart name + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + response = self._send(http_method='GET', + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BoardChart', response) + + def get_board_charts(self, team_context, board): + """GetBoardCharts. + [Preview API] Get board charts + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :rtype: [BoardChartReference] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardChartReference]', response) + + def update_board_chart(self, chart, team_context, board, name): + """UpdateBoardChart. + [Preview API] Update a board chart + :param :class:` ` chart: + :param :class:` ` team_context: The team context for the operation + :param str board: Identifier for board, either board's backlog level name (Eg:"Stories") or Id + :param str name: The chart name + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') + content = self._serialize.body(chart, 'BoardChart') + response = self._send(http_method='PATCH', + location_id='45fe888c-239e-49fd-958c-df1a1ab21d97', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BoardChart', response) + + def get_board_columns(self, team_context, board): + """GetBoardColumns. + [Preview API] Get columns on a board + :param :class:` ` team_context: The team context for the operation + :param str board: Name or ID of the specific board + :rtype: [BoardColumn] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardColumn]', response) + + def update_board_columns(self, board_columns, team_context, board): + """UpdateBoardColumns. + [Preview API] Update columns on a board + :param [BoardColumn] board_columns: List of board columns to update + :param :class:` ` team_context: The team context for the operation + :param str board: Name or ID of the specific board + :rtype: [BoardColumn] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_columns, '[BoardColumn]') + response = self._send(http_method='PUT', + location_id='c555d7ff-84e1-47df-9923-a3fe0cd8751b', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[BoardColumn]', response) + + def get_delivery_timeline_data(self, project, id, revision=None, start_date=None, end_date=None): + """GetDeliveryTimelineData. + [Preview API] Get Delivery View Data + :param str project: Project ID or project name + :param str id: Identifier for delivery view + :param int revision: Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. + :param datetime start_date: The start date of timeline + :param datetime end_date: The end date of timeline + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + query_parameters = {} + if revision is not None: + query_parameters['revision'] = self._serialize.query('revision', revision, 'int') + if start_date is not None: + query_parameters['startDate'] = self._serialize.query('start_date', start_date, 'iso-8601') + if end_date is not None: + query_parameters['endDate'] = self._serialize.query('end_date', end_date, 'iso-8601') + response = self._send(http_method='GET', + location_id='bdd0834e-101f-49f0-a6ae-509f384a12b4', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('DeliveryViewData', response) + + def delete_team_iteration(self, team_context, id): + """DeleteTeamIteration. + [Preview API] Delete a team's iteration by iterationId + :param :class:` ` team_context: The team context for the operation + :param str id: ID of the iteration + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + self._send(http_method='DELETE', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.1-preview.1', + route_values=route_values) + + def get_team_iteration(self, team_context, id): + """GetTeamIteration. + [Preview API] Get team's iteration by iterationId + :param :class:` ` team_context: The team context for the operation + :param str id: ID of the iteration + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + response = self._send(http_method='GET', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TeamSettingsIteration', response) + + def get_team_iterations(self, team_context, timeframe=None): + """GetTeamIterations. + [Preview API] Get a team's iterations using timeframe filter + :param :class:` ` team_context: The team context for the operation + :param str timeframe: A filter for which iterations are returned based on relative time + :rtype: [TeamSettingsIteration] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + query_parameters = {} + if timeframe is not None: + query_parameters['$timeframe'] = self._serialize.query('timeframe', timeframe, 'str') + response = self._send(http_method='GET', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TeamSettingsIteration]', response) + + def post_team_iteration(self, iteration, team_context): + """PostTeamIteration. + [Preview API] Add an iteration to the team + :param :class:` ` iteration: Iteration to add + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(iteration, 'TeamSettingsIteration') + response = self._send(http_method='POST', + location_id='c9175577-28a1-4b06-9197-8636af9f64ad', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TeamSettingsIteration', response) + + def create_plan(self, posted_plan, project): + """CreatePlan. + [Preview API] Add a new plan for the team + :param :class:` ` posted_plan: Plan definition + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + content = self._serialize.body(posted_plan, 'CreatePlan') + response = self._send(http_method='POST', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Plan', response) + + def delete_plan(self, project, id): + """DeletePlan. + [Preview API] Delete the specified plan + :param str project: Project ID or project name + :param str id: Identifier of the plan + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + self._send(http_method='DELETE', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.1-preview.1', + route_values=route_values) + + def get_plan(self, project, id): + """GetPlan. + [Preview API] Get the information for the specified plan + :param str project: Project ID or project name + :param str id: Identifier of the plan + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + response = self._send(http_method='GET', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('Plan', response) + + def get_plans(self, project): + """GetPlans. + [Preview API] Get the information for all the plans configured for the given team + :param str project: Project ID or project name + :rtype: [Plan] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[Plan]', response) + + def update_plan(self, updated_plan, project, id): + """UpdatePlan. + [Preview API] Update the information for the specified plan + :param :class:` ` updated_plan: Plan definition to be updated + :param str project: Project ID or project name + :param str id: Identifier of the plan + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + content = self._serialize.body(updated_plan, 'UpdatePlan') + response = self._send(http_method='PUT', + location_id='0b42cb47-cd73-4810-ac90-19c9ba147453', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Plan', response) + + def get_process_configuration(self, project): + """GetProcessConfiguration. + [Preview API] Get process configuration + :param str project: Project ID or project name + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='f901ba42-86d2-4b0c-89c1-3f86d06daa84', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ProcessConfiguration', response) + + def get_board_rows(self, team_context, board): + """GetBoardRows. + [Preview API] Get rows on a board + :param :class:` ` team_context: The team context for the operation + :param str board: Name or ID of the specific board + :rtype: [BoardRow] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + response = self._send(http_method='GET', + location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BoardRow]', response) + + def update_board_rows(self, board_rows, team_context, board): + """UpdateBoardRows. + [Preview API] Update rows on a board + :param [BoardRow] board_rows: List of board rows to update + :param :class:` ` team_context: The team context for the operation + :param str board: Name or ID of the specific board + :rtype: [BoardRow] + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if board is not None: + route_values['board'] = self._serialize.url('board', board, 'str') + content = self._serialize.body(board_rows, '[BoardRow]') + response = self._send(http_method='PUT', + location_id='0863355d-aefd-4d63-8669-984c9b7b0e78', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[BoardRow]', response) + + def get_team_days_off(self, team_context, iteration_id): + """GetTeamDaysOff. + [Preview API] Get team's days off for an iteration + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: ID of the iteration + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + response = self._send(http_method='GET', + location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TeamSettingsDaysOff', response) + + def update_team_days_off(self, days_off_patch, team_context, iteration_id): + """UpdateTeamDaysOff. + [Preview API] Set a team's days off for an iteration + :param :class:` ` days_off_patch: Team's days off patch containting a list of start and end dates + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: ID of the iteration + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + content = self._serialize.body(days_off_patch, 'TeamSettingsDaysOffPatch') + response = self._send(http_method='PATCH', + location_id='2d4faa2e-9150-4cbf-a47a-932b1b4a0773', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TeamSettingsDaysOff', response) + + def get_team_field_values(self, team_context): + """GetTeamFieldValues. + [Preview API] Get a collection of team field values + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TeamFieldValues', response) + + def update_team_field_values(self, patch, team_context): + """UpdateTeamFieldValues. + [Preview API] Update team field values + :param :class:` ` patch: + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(patch, 'TeamFieldValuesPatch') + response = self._send(http_method='PATCH', + location_id='07ced576-58ed-49e6-9c1e-5cb53ab8bf2a', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TeamFieldValues', response) + + def get_team_settings(self, team_context): + """GetTeamSettings. + [Preview API] Get a team's settings + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + response = self._send(http_method='GET', + location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('TeamSetting', response) + + def update_team_settings(self, team_settings_patch, team_context): + """UpdateTeamSettings. + [Preview API] Update a team's settings + :param :class:` ` team_settings_patch: TeamSettings changes + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + content = self._serialize.body(team_settings_patch, 'TeamSettingsPatch') + response = self._send(http_method='PATCH', + location_id='c3c1012b-bea7-49d7-b45e-1664e566f84c', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('TeamSetting', response) + + def get_iteration_work_items(self, team_context, iteration_id): + """GetIterationWorkItems. + [Preview API] Get work items for iteration + :param :class:` ` team_context: The team context for the operation + :param str iteration_id: ID of the iteration + :rtype: :class:` ` + """ + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.project_id + else: + project = team_context.project + if team_context.teamId: + team = team_context.team_id + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'str') + response = self._send(http_method='GET', + location_id='5b3ef1a6-d3ab-44cd-bafd-c7f45db850fa', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('IterationWorkItems', response) + diff --git a/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py b/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py index 2aa104c0..45aef248 100644 --- a/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py +++ b/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py @@ -18,7 +18,7 @@ class WorkItemTrackingClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(WorkItemTrackingClient, 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) @@ -252,7 +252,7 @@ def get_comments(self, id, from_revision=None, top=None, order=None): :param int id: Work item id :param int from_revision: Revision from which comments are to be fetched :param int top: The number of comments to return - :param CommentSortOrder order: Ascending or descending by revision id + :param str order: Ascending or descending by revision id :rtype: :class:` ` """ route_values = {} @@ -264,7 +264,7 @@ def get_comments(self, id, from_revision=None, top=None, order=None): if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if order is not None: - query_parameters['order'] = self._serialize.query('order', order, 'CommentSortOrder') + query_parameters['order'] = self._serialize.query('order', order, 'str') response = self._send(http_method='GET', location_id='19335ae7-22f7-4308-93d8-261f9384b7cf', version='4.0-preview.1', @@ -309,7 +309,7 @@ def get_fields(self, project=None, expand=None): """GetFields. Returns information for all fields. :param str project: Project ID or project name - :param GetFieldsExpand expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. + :param str expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. :rtype: [WorkItemField] """ route_values = {} @@ -317,7 +317,7 @@ def get_fields(self, project=None, expand=None): route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'GetFieldsExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', version='4.0', @@ -384,7 +384,7 @@ def get_queries(self, project, expand=None, depth=None, include_deleted=None): """GetQueries. Retrieves all queries the user has access to in the current project :param str project: Project ID or project name - :param QueryExpand expand: + :param str expand: :param int depth: :param bool include_deleted: :rtype: [QueryHierarchyItem] @@ -394,7 +394,7 @@ def get_queries(self, project, expand=None, depth=None, include_deleted=None): route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') if include_deleted is not None: @@ -412,7 +412,7 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non Retrieves a single query by project and either id or path :param str project: Project ID or project name :param str query: - :param QueryExpand expand: + :param str expand: :param int depth: :param bool include_deleted: :rtype: :class:` ` @@ -424,7 +424,7 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non route_values['query'] = self._serialize.url('query', query, 'str') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') if include_deleted is not None: @@ -442,7 +442,7 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted :param str project: Project ID or project name :param str filter: :param int top: - :param QueryExpand expand: + :param str expand: :param bool include_deleted: :rtype: :class:` ` """ @@ -455,7 +455,7 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if include_deleted is not None: query_parameters['$includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') response = self._send(http_method='GET', @@ -588,7 +588,7 @@ def get_revision(self, id, revision_number, expand=None): Returns a fully hydrated work item for the requested revision :param int id: :param int revision_number: - :param WorkItemExpand expand: + :param str expand: :rtype: :class:` ` """ route_values = {} @@ -598,7 +598,7 @@ def get_revision(self, id, revision_number, expand=None): route_values['revisionNumber'] = self._serialize.url('revision_number', revision_number, 'int') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='a00c85a5-80fa-4565-99c3-bcd2181434bb', version='4.0', @@ -612,7 +612,7 @@ def get_revisions(self, id, top=None, skip=None, expand=None): :param int id: :param int top: :param int skip: - :param WorkItemExpand expand: + :param str expand: :rtype: [WorkItem] """ route_values = {} @@ -624,7 +624,7 @@ def get_revisions(self, id, top=None, skip=None, expand=None): if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='a00c85a5-80fa-4565-99c3-bcd2181434bb', version='4.0', @@ -655,11 +655,11 @@ def create_template(self, template, team_context): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -687,11 +687,11 @@ def get_templates(self, team_context, workitemtypename=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -721,11 +721,11 @@ def delete_template(self, team_context, template_id): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -752,11 +752,11 @@ def get_template(self, team_context, template_id): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -785,11 +785,11 @@ def replace_template(self, template_content, team_context, template_id): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -863,11 +863,11 @@ def query_by_wiql(self, wiql, team_context=None, time_precision=None, top=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -902,11 +902,11 @@ def get_query_result_count(self, id, team_context=None, time_precision=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -939,11 +939,11 @@ def query_by_id(self, id, team_context=None, time_precision=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -1086,7 +1086,7 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co :param bool include_deleted: Specify if the deleted item should be returned. :param bool include_tag_ref: Specify if the tag objects should be returned for System.Tags field. :param bool include_latest_only: Return only the latest revisions of work items, skipping all historical revisions - :param ReportingRevisionsExpand expand: Return all the fields in work item revisions, including long text fields which are not returned by default + :param str expand: Return all the fields in work item revisions, including long text fields which are not returned by default :param bool include_discussion_changes_only: Return only the those revisions of work items, where only history field was changed :rtype: :class:` ` """ @@ -1113,7 +1113,7 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co if include_latest_only is not None: query_parameters['includeLatestOnly'] = self._serialize.query('include_latest_only', include_latest_only, 'bool') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'ReportingRevisionsExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if include_discussion_changes_only is not None: query_parameters['includeDiscussionChangesOnly'] = self._serialize.query('include_discussion_changes_only', include_discussion_changes_only, 'bool') response = self._send(http_method='GET', @@ -1130,7 +1130,7 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token :param str project: Project ID or project name :param str continuation_token: Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. :param datetime start_date_time: Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - :param ReportingRevisionsExpand expand: + :param str expand: :rtype: :class:` ` """ route_values = {} @@ -1142,7 +1142,7 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token if start_date_time is not None: query_parameters['startDateTime'] = self._serialize.query('start_date_time', start_date_time, 'iso-8601') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'ReportingRevisionsExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') content = self._serialize.body(filter, 'ReportingWorkItemRevisionsFilter') response = self._send(http_method='POST', location_id='f828fe59-dd87-495d-a17c-7a8d6211ca6c', @@ -1177,7 +1177,7 @@ def get_work_item(self, id, fields=None, as_of=None, expand=None): :param int id: :param [str] fields: :param datetime as_of: - :param WorkItemExpand expand: + :param str expand: :rtype: :class:` ` """ route_values = {} @@ -1190,7 +1190,7 @@ def get_work_item(self, id, fields=None, as_of=None, expand=None): if as_of is not None: query_parameters['asOf'] = self._serialize.query('as_of', as_of, 'iso-8601') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', version='4.0', @@ -1204,8 +1204,8 @@ def get_work_items(self, ids, fields=None, as_of=None, expand=None, error_policy :param [int] ids: :param [str] fields: :param datetime as_of: - :param WorkItemExpand expand: - :param WorkItemErrorPolicy error_policy: + :param str expand: + :param str error_policy: :rtype: [WorkItem] """ query_parameters = {} @@ -1218,9 +1218,9 @@ def get_work_items(self, ids, fields=None, as_of=None, expand=None, error_policy if as_of is not None: query_parameters['asOf'] = self._serialize.query('as_of', as_of, 'iso-8601') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if error_policy is not None: - query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'WorkItemErrorPolicy') + query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'str') response = self._send(http_method='GET', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', version='4.0', @@ -1298,7 +1298,7 @@ def get_work_item_template(self, project, type, fields=None, as_of=None, expand= :param str type: :param str fields: :param datetime as_of: - :param WorkItemExpand expand: + :param str expand: :rtype: :class:` ` """ route_values = {} @@ -1312,7 +1312,7 @@ def get_work_item_template(self, project, type, fields=None, as_of=None, expand= if as_of is not None: query_parameters['asOf'] = self._serialize.query('as_of', as_of, 'iso-8601') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', version='4.0', diff --git a/vsts/vsts/work_item_tracking/v4_1/models/__init__.py b/vsts/vsts/work_item_tracking/v4_1/models/__init__.py index 996ebf8d..6e41be02 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/__init__.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/__init__.py @@ -15,6 +15,7 @@ from .attachment_reference import AttachmentReference from .field_dependent_rule import FieldDependentRule from .fields_to_evaluate import FieldsToEvaluate +from .graph_subject_base import GraphSubjectBase from .identity_ref import IdentityRef from .identity_reference import IdentityReference from .json_patch_operation import JsonPatchOperation @@ -38,6 +39,7 @@ from .work_item_comments import WorkItemComments from .work_item_delete import WorkItemDelete from .work_item_delete_reference import WorkItemDeleteReference +from .work_item_delete_shallow_reference import WorkItemDeleteShallowReference from .work_item_delete_update import WorkItemDeleteUpdate from .work_item_field import WorkItemField from .work_item_field_operation import WorkItemFieldOperation @@ -66,6 +68,8 @@ from .work_item_type_color import WorkItemTypeColor from .work_item_type_color_and_icon import WorkItemTypeColorAndIcon from .work_item_type_field_instance import WorkItemTypeFieldInstance +from .work_item_type_field_instance_base import WorkItemTypeFieldInstanceBase +from .work_item_type_field_with_references import WorkItemTypeFieldWithReferences from .work_item_type_reference import WorkItemTypeReference from .work_item_type_state_colors import WorkItemTypeStateColors from .work_item_type_template import WorkItemTypeTemplate @@ -82,6 +86,7 @@ 'AttachmentReference', 'FieldDependentRule', 'FieldsToEvaluate', + 'GraphSubjectBase', 'IdentityRef', 'IdentityReference', 'JsonPatchOperation', @@ -105,6 +110,7 @@ 'WorkItemComments', 'WorkItemDelete', 'WorkItemDeleteReference', + 'WorkItemDeleteShallowReference', 'WorkItemDeleteUpdate', 'WorkItemField', 'WorkItemFieldOperation', @@ -133,6 +139,8 @@ 'WorkItemTypeColor', 'WorkItemTypeColorAndIcon', 'WorkItemTypeFieldInstance', + 'WorkItemTypeFieldInstanceBase', + 'WorkItemTypeFieldWithReferences', 'WorkItemTypeReference', 'WorkItemTypeStateColors', 'WorkItemTypeTemplate', diff --git a/vsts/vsts/work_item_tracking/v4_1/models/identity_ref.py b/vsts/vsts/work_item_tracking/v4_1/models/identity_ref.py index 40c776c5..c4c35ad5 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/identity_ref.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/identity_ref.py @@ -6,16 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .graph_subject_base import GraphSubjectBase -class IdentityRef(Model): +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: :type directory_alias: str - :param display_name: - :type display_name: str :param id: :type id: str :param image_url: @@ -30,27 +36,26 @@ class IdentityRef(Model): :type profile_url: str :param unique_name: :type unique_name: str - :param url: - :type url: str """ _attribute_map = { - 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + '_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'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, - 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'} + 'unique_name': {'key': 'uniqueName', 'type': 'str'} } - def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None): - super(IdentityRef, self).__init__() + 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, 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.display_name = display_name self.id = id self.image_url = image_url self.inactive = inactive @@ -58,4 +63,3 @@ def __init__(self, directory_alias=None, display_name=None, id=None, image_url=N self.is_container = is_container self.profile_url = profile_url self.unique_name = unique_name - self.url = url diff --git a/vsts/vsts/work_item_tracking/v4_1/models/identity_reference.py b/vsts/vsts/work_item_tracking/v4_1/models/identity_reference.py index 29c2e6ee..35d909ef 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/identity_reference.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/identity_reference.py @@ -12,10 +12,16 @@ class IdentityReference(IdentityRef): """IdentityReference. + :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: :type directory_alias: str - :param display_name: - :type display_name: str :param image_url: :type image_url: str :param inactive: @@ -28,8 +34,6 @@ class IdentityReference(IdentityRef): :type profile_url: str :param unique_name: :type unique_name: str - :param url: - :type url: str :param id: :type id: str :param name: Legacy back-compat property. This has been the WIT specific value from Constants. Will be hidden (but exists) on the client unless they are targeting the newest version @@ -37,20 +41,22 @@ class IdentityReference(IdentityRef): """ _attribute_map = { - 'directory_alias': {'key': 'directoryAlias', 'type': 'str'}, + '_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'}, 'image_url': {'key': 'imageUrl', 'type': 'str'}, 'inactive': {'key': 'inactive', 'type': 'bool'}, 'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'}, 'is_container': {'key': 'isContainer', 'type': 'bool'}, 'profile_url': {'key': 'profileUrl', 'type': 'str'}, 'unique_name': {'key': 'uniqueName', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'} } - def __init__(self, directory_alias=None, display_name=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None, id=None, name=None): - super(IdentityReference, self).__init__(directory_alias=directory_alias, display_name=display_name, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, profile_url=profile_url, unique_name=unique_name, url=url) + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, id=None, name=None): + super(IdentityReference, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, directory_alias=directory_alias, image_url=image_url, inactive=inactive, is_aad_identity=is_aad_identity, is_container=is_container, profile_url=profile_url, unique_name=unique_name) self.id = id self.name = name diff --git a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py index fe37d45c..d6bc200b 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py @@ -16,53 +16,55 @@ class QueryHierarchyItem(WorkItemTrackingResource): :type url: str :param _links: Link references to related REST resources. :type _links: :class:`ReferenceLinks ` - :param children: + :param children: The child query items inside a query folder. :type children: list of :class:`QueryHierarchyItem ` - :param clauses: + :param clauses: The clauses for a flat query. :type clauses: :class:`WorkItemQueryClause ` - :param columns: + :param columns: The columns of the query. :type columns: list of :class:`WorkItemFieldReference ` - :param created_by: + :param created_by: The identity who created the query item. :type created_by: :class:`IdentityReference ` - :param created_date: + :param created_date: When the query item was created. :type created_date: datetime - :param filter_options: + :param filter_options: The link query mode. :type filter_options: object - :param has_children: + :param has_children: If this is a query folder, indicates if it contains any children. :type has_children: bool - :param id: + :param id: The id of the query item. :type id: str - :param is_deleted: + :param is_deleted: Indicates if this query item is deleted. Setting this to false on a deleted query item will undelete it. Undeleting a query or folder will not bring back the permission changes that were previously applied to it. :type is_deleted: bool - :param is_folder: + :param is_folder: Indicates if this is a query folder or a query. :type is_folder: bool - :param is_invalid_syntax: + :param is_invalid_syntax: Indicates if the WIQL of this query is invalid. This could be due to invalid syntax or a no longer valid area/iteration path. :type is_invalid_syntax: bool - :param is_public: + :param is_public: Indicates if this query item is public or private. :type is_public: bool - :param last_executed_by: + :param last_executed_by: The identity who last ran the query. :type last_executed_by: :class:`IdentityReference ` - :param last_executed_date: + :param last_executed_date: When the query was last run. :type last_executed_date: datetime - :param last_modified_by: + :param last_modified_by: The identity who last modified the query item. :type last_modified_by: :class:`IdentityReference ` - :param last_modified_date: + :param last_modified_date: When the query item was last modified. :type last_modified_date: datetime - :param link_clauses: + :param link_clauses: The link query clause. :type link_clauses: :class:`WorkItemQueryClause ` - :param name: + :param name: The name of the query item. :type name: str - :param path: + :param path: The path of the query item. :type path: str - :param query_type: + :param query_recursion_option: The recursion option for use in a tree query. + :type query_recursion_option: object + :param query_type: The type of query. :type query_type: object - :param sort_columns: + :param sort_columns: The sort columns of the query. :type sort_columns: list of :class:`WorkItemQuerySortColumn ` - :param source_clauses: + :param source_clauses: The source clauses in a tree or one-hop link query. :type source_clauses: :class:`WorkItemQueryClause ` - :param target_clauses: + :param target_clauses: The target clauses in a tree or one-hop link query. :type target_clauses: :class:`WorkItemQueryClause ` - :param wiql: + :param wiql: The WIQL text of the query :type wiql: str """ @@ -88,6 +90,7 @@ class QueryHierarchyItem(WorkItemTrackingResource): 'link_clauses': {'key': 'linkClauses', 'type': 'WorkItemQueryClause'}, 'name': {'key': 'name', 'type': 'str'}, 'path': {'key': 'path', 'type': 'str'}, + 'query_recursion_option': {'key': 'queryRecursionOption', 'type': 'object'}, 'query_type': {'key': 'queryType', 'type': 'object'}, 'sort_columns': {'key': 'sortColumns', 'type': '[WorkItemQuerySortColumn]'}, 'source_clauses': {'key': 'sourceClauses', 'type': 'WorkItemQueryClause'}, @@ -95,7 +98,7 @@ class QueryHierarchyItem(WorkItemTrackingResource): 'wiql': {'key': 'wiql', 'type': 'str'} } - def __init__(self, url=None, _links=None, children=None, clauses=None, columns=None, created_by=None, created_date=None, filter_options=None, has_children=None, id=None, is_deleted=None, is_folder=None, is_invalid_syntax=None, is_public=None, last_executed_by=None, last_executed_date=None, last_modified_by=None, last_modified_date=None, link_clauses=None, name=None, path=None, query_type=None, sort_columns=None, source_clauses=None, target_clauses=None, wiql=None): + def __init__(self, url=None, _links=None, children=None, clauses=None, columns=None, created_by=None, created_date=None, filter_options=None, has_children=None, id=None, is_deleted=None, is_folder=None, is_invalid_syntax=None, is_public=None, last_executed_by=None, last_executed_date=None, last_modified_by=None, last_modified_date=None, link_clauses=None, name=None, path=None, query_recursion_option=None, query_type=None, sort_columns=None, source_clauses=None, target_clauses=None, wiql=None): super(QueryHierarchyItem, self).__init__(url=url, _links=_links) self.children = children self.clauses = clauses @@ -116,6 +119,7 @@ def __init__(self, url=None, _links=None, children=None, clauses=None, columns=N self.link_clauses = link_clauses self.name = name self.path = path + self.query_recursion_option = query_recursion_option self.query_type = query_type self.sort_columns = sort_columns self.source_clauses = source_clauses diff --git a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py index ff5a4898..c1c8e0a8 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py @@ -12,11 +12,11 @@ class QueryHierarchyItemsResult(Model): """QueryHierarchyItemsResult. - :param count: + :param count: The count of items. :type count: int - :param has_more: + :param has_more: Indicates if the max return limit was hit but there are still more items :type has_more: bool - :param value: + :param value: The list of items :type value: list of :class:`QueryHierarchyItem ` """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/wiql.py b/vsts/vsts/work_item_tracking/v4_1/models/wiql.py index 963d17e3..9cf1b515 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/wiql.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/wiql.py @@ -12,7 +12,7 @@ class Wiql(Model): """Wiql. - :param query: + :param query: The text of the WIQL query :type query: str """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py index 3298de29..662c9838 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py @@ -16,13 +16,13 @@ class WorkItemComment(WorkItemTrackingResource): :type url: str :param _links: Link references to related REST resources. :type _links: :class:`ReferenceLinks ` - :param revised_by: + :param revised_by: Identity of user who added the comment. :type revised_by: :class:`IdentityReference ` - :param revised_date: + :param revised_date: The date of comment. :type revised_date: datetime - :param revision: + :param revision: The work item revision number. :type revision: int - :param text: + :param text: The text of the comment. :type text: str """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py index 549ad7bf..6463b857 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py @@ -6,12 +6,16 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from msrest.serialization import Model +from .work_item_tracking_resource import WorkItemTrackingResource -class WorkItemComments(Model): +class WorkItemComments(WorkItemTrackingResource): """WorkItemComments. + :param url: + :type url: str + :param _links: Link references to related REST resources. + :type _links: :class:`ReferenceLinks ` :param comments: Comments collection. :type comments: list of :class:`WorkItemComment ` :param count: The count of comments. @@ -23,14 +27,16 @@ class WorkItemComments(Model): """ _attribute_map = { + 'url': {'key': 'url', 'type': 'str'}, + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, 'comments': {'key': 'comments', 'type': '[WorkItemComment]'}, 'count': {'key': 'count', 'type': 'int'}, 'from_revision_count': {'key': 'fromRevisionCount', 'type': 'int'}, 'total_count': {'key': 'totalCount', 'type': 'int'} } - def __init__(self, comments=None, count=None, from_revision_count=None, total_count=None): - super(WorkItemComments, self).__init__() + def __init__(self, url=None, _links=None, comments=None, count=None, from_revision_count=None, total_count=None): + super(WorkItemComments, self).__init__(url=url, _links=_links) self.comments = comments self.count = count self.from_revision_count = from_revision_count diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py index 190f060c..fa4794a9 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py @@ -12,11 +12,11 @@ class WorkItemLink(Model): """WorkItemLink. - :param rel: + :param rel: The type of link. :type rel: str - :param source: + :param source: The source work item. :type source: :class:`WorkItemReference ` - :param target: + :param target: The target work item. :type target: :class:`WorkItemReference ` """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py index 4a260268..6e298ecb 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py @@ -12,19 +12,19 @@ class WorkItemQueryClause(Model): """WorkItemQueryClause. - :param clauses: + :param clauses: Child clauses if the current clause is a logical operator :type clauses: list of :class:`WorkItemQueryClause ` - :param field: + :param field: Field associated with condition :type field: :class:`WorkItemFieldReference ` - :param field_value: + :param field_value: Right side of the condition when a field to field comparison :type field_value: :class:`WorkItemFieldReference ` - :param is_field_value: + :param is_field_value: Determines if this is a field to field comparison :type is_field_value: bool - :param logical_operator: + :param logical_operator: Logical operator separating the condition clause :type logical_operator: object - :param operator: + :param operator: The field operator :type operator: :class:`WorkItemFieldOperation ` - :param value: + :param value: Right side of the condition when a field to value comparison :type value: str """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py index 3c342d4c..d51e21c4 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py @@ -12,19 +12,19 @@ class WorkItemQueryResult(Model): """WorkItemQueryResult. - :param as_of: + :param as_of: The date the query was run in the context of. :type as_of: datetime - :param columns: + :param columns: The columns of the query. :type columns: list of :class:`WorkItemFieldReference ` - :param query_result_type: + :param query_result_type: The result type :type query_result_type: object - :param query_type: + :param query_type: The type of the query :type query_type: object - :param sort_columns: + :param sort_columns: The sort columns of the query. :type sort_columns: list of :class:`WorkItemQuerySortColumn ` - :param work_item_relations: + :param work_item_relations: The work item links returned by the query. :type work_item_relations: list of :class:`WorkItemLink ` - :param work_items: + :param work_items: The work items returned by the query. :type work_items: list of :class:`WorkItemReference ` """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py index 7517ac9a..1811b845 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py @@ -12,9 +12,9 @@ class WorkItemQuerySortColumn(Model): """WorkItemQuerySortColumn. - :param descending: + :param descending: The direction to sort by. :type descending: bool - :param field: + :param field: A work item field. :type field: :class:`WorkItemFieldReference ` """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_state_color.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_state_color.py index 360fe743..239ebb0b 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_state_color.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_state_color.py @@ -12,6 +12,8 @@ class WorkItemStateColor(Model): """WorkItemStateColor. + :param category: Category of state + :type category: str :param color: Color value :type color: str :param name: Work item type state name @@ -19,11 +21,13 @@ class WorkItemStateColor(Model): """ _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, 'color': {'key': 'color', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'} } - def __init__(self, color=None, name=None): + def __init__(self, category=None, color=None, name=None): super(WorkItemStateColor, self).__init__() + self.category = category self.color = color self.name = name diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py index 26647eeb..2dbb8e69 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py @@ -26,6 +26,8 @@ class WorkItemType(WorkItemTrackingResource): :type fields: list of :class:`WorkItemTypeFieldInstance ` :param icon: The icon of the work item type. :type icon: :class:`WorkItemIcon ` + :param is_disabled: True if work item type is disabled + :type is_disabled: bool :param name: Gets the name of the work item type. :type name: str :param reference_name: The reference name of the work item type. @@ -44,19 +46,21 @@ class WorkItemType(WorkItemTrackingResource): 'field_instances': {'key': 'fieldInstances', 'type': '[WorkItemTypeFieldInstance]'}, 'fields': {'key': 'fields', 'type': '[WorkItemTypeFieldInstance]'}, 'icon': {'key': 'icon', 'type': 'WorkItemIcon'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'reference_name': {'key': 'referenceName', 'type': 'str'}, 'transitions': {'key': 'transitions', 'type': '{[WorkItemStateTransition]}'}, 'xml_form': {'key': 'xmlForm', 'type': 'str'} } - def __init__(self, url=None, _links=None, color=None, description=None, field_instances=None, fields=None, icon=None, name=None, reference_name=None, transitions=None, xml_form=None): + def __init__(self, url=None, _links=None, color=None, description=None, field_instances=None, fields=None, icon=None, is_disabled=None, name=None, reference_name=None, transitions=None, xml_form=None): super(WorkItemType, self).__init__(url=url, _links=_links) self.color = color self.description = description self.field_instances = field_instances self.fields = fields self.icon = icon + self.is_disabled = is_disabled self.name = name self.reference_name = reference_name self.transitions = transitions diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_field_instance.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_field_instance.py index 20f833b7..f7547d21 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_field_instance.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_field_instance.py @@ -6,10 +6,10 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------------------------- -from .work_item_field_reference import WorkItemFieldReference +from .work_item_type_field_instance_base import WorkItemTypeFieldInstanceBase -class WorkItemTypeFieldInstance(WorkItemFieldReference): +class WorkItemTypeFieldInstance(WorkItemTypeFieldInstanceBase): """WorkItemTypeFieldInstance. :param name: The name of the field. @@ -20,8 +20,14 @@ class WorkItemTypeFieldInstance(WorkItemFieldReference): :type url: str :param always_required: Indicates whether field value is always required. :type always_required: bool + :param dependent_fields: The list of dependent fields. + :type dependent_fields: list of :class:`WorkItemFieldReference ` :param help_text: Gets the help text for the field. :type help_text: str + :param allowed_values: The list of field allowed values. + :type allowed_values: list of str + :param default_value: Represents the default value of the field. + :type default_value: str """ _attribute_map = { @@ -29,10 +35,13 @@ class WorkItemTypeFieldInstance(WorkItemFieldReference): 'reference_name': {'key': 'referenceName', 'type': 'str'}, 'url': {'key': 'url', 'type': 'str'}, 'always_required': {'key': 'alwaysRequired', 'type': 'bool'}, - 'help_text': {'key': 'helpText', 'type': 'str'} + 'dependent_fields': {'key': 'dependentFields', 'type': '[WorkItemFieldReference]'}, + 'help_text': {'key': 'helpText', 'type': 'str'}, + 'allowed_values': {'key': 'allowedValues', 'type': '[str]'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'} } - def __init__(self, name=None, reference_name=None, url=None, always_required=None, help_text=None): - super(WorkItemTypeFieldInstance, self).__init__(name=name, reference_name=reference_name, url=url) - self.always_required = always_required - self.help_text = help_text + def __init__(self, name=None, reference_name=None, url=None, always_required=None, dependent_fields=None, help_text=None, allowed_values=None, default_value=None): + super(WorkItemTypeFieldInstance, self).__init__(name=name, reference_name=reference_name, url=url, always_required=always_required, dependent_fields=dependent_fields, help_text=help_text) + self.allowed_values = allowed_values + self.default_value = default_value diff --git a/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py b/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py index 1f6b8de9..05e720d1 100644 --- a/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py +++ b/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py @@ -18,7 +18,7 @@ class WorkItemTrackingClient(VssClient): """ def __init__(self, base_url=None, creds=None): - VssClient.__init__(self, base_url, creds) + super(WorkItemTrackingClient, 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) @@ -36,28 +36,37 @@ def get_work_artifact_link_types(self): returns_collection=True) return self._deserialize('[WorkArtifactLink]', response) - def query_work_items_for_artifact_uris(self, artifact_uri_query): + def query_work_items_for_artifact_uris(self, artifact_uri_query, project=None): """QueryWorkItemsForArtifactUris. [Preview API] Queries work items linked to a given list of artifact URI. :param :class:` ` artifact_uri_query: Defines a list of artifact URI for querying work items. + :param str project: Project ID or project name :rtype: :class:` ` """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(artifact_uri_query, 'ArtifactUriQuery') response = self._send(http_method='POST', location_id='a9a9aa7a-8c09-44d3-ad1b-46e855c1e3d3', version='4.1-preview.1', + route_values=route_values, content=content) return self._deserialize('ArtifactUriQueryResult', response) - def create_attachment(self, upload_stream, file_name=None, upload_type=None, area_path=None): + def create_attachment(self, upload_stream, project=None, file_name=None, upload_type=None, area_path=None): """CreateAttachment. [Preview API] Uploads an attachment. :param object upload_stream: Stream to upload + :param str project: Project ID or project name :param str file_name: The name of the file :param str upload_type: Attachment upload type: Simple or Chunked :param str area_path: Target project Area Path :rtype: :class:` ` """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') @@ -68,52 +77,93 @@ def create_attachment(self, upload_stream, file_name=None, upload_type=None, are content = self._serialize.body(upload_stream, 'object') response = self._send(http_method='POST', location_id='e07b5fa4-1499-494d-a496-64b860fd64ff', - version='4.1-preview.2', + version='4.1-preview.3', + route_values=route_values, query_parameters=query_parameters, content=content, media_type='application/octet-stream') return self._deserialize('AttachmentReference', response) - def get_attachment_content(self, id, file_name=None): + def get_attachment_content(self, id, project=None, file_name=None, download=None): """GetAttachmentContent. [Preview API] Downloads an attachment. :param str id: Attachment ID + :param str project: Project ID or project name :param str file_name: Name of the file + :param bool download: If set to true always download attachment :rtype: object """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') response = self._send(http_method='GET', location_id='e07b5fa4-1499-494d-a496-64b860fd64ff', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) - def get_attachment_zip(self, id, file_name=None): + def get_attachment_zip(self, id, project=None, file_name=None, download=None): """GetAttachmentZip. [Preview API] Downloads an attachment. :param str id: Attachment ID + :param str project: Project ID or project name :param str file_name: Name of the file + :param bool download: If set to true always download attachment :rtype: object """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') + if download is not None: + query_parameters['download'] = self._serialize.query('download', download, 'bool') response = self._send(http_method='GET', location_id='e07b5fa4-1499-494d-a496-64b860fd64ff', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('object', response) + def get_classification_nodes(self, project, ids, depth=None, error_policy=None): + """GetClassificationNodes. + [Preview API] Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project. + :param str project: Project ID or project name + :param [int] ids: Comma seperated integer classification nodes ids. It's not required, if you want root nodes. + :param int depth: Depth of children to fetch. + :param str error_policy: Flag to handle errors in getting some nodes. Possible options are Fail and Omit. + :rtype: [WorkItemClassificationNode] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if ids is not None: + ids = ",".join(map(str, ids)) + query_parameters['ids'] = self._serialize.query('ids', ids, 'str') + if depth is not None: + query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') + if error_policy is not None: + query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'str') + response = self._send(http_method='GET', + location_id='a70579d1-f53a-48ee-a5be-7be8659023b9', + version='4.1-preview.2', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemClassificationNode]', response) + def get_root_nodes(self, project, depth=None): """GetRootNodes. [Preview API] Gets root classification nodes under the project. @@ -233,34 +283,40 @@ def update_classification_node(self, posted_node, project, structure_group, path content=content) return self._deserialize('WorkItemClassificationNode', response) - def get_comment(self, id, revision): + def get_comment(self, id, revision, project=None): """GetComment. [Preview API] Gets a comment for a work item at the specified revision. :param int id: Work item id :param int revision: Revision for which the comment need to be fetched + :param str project: Project ID or project name :rtype: :class:` ` """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'int') if revision is not None: route_values['revision'] = self._serialize.url('revision', revision, 'int') response = self._send(http_method='GET', location_id='19335ae7-22f7-4308-93d8-261f9384b7cf', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values) return self._deserialize('WorkItemComment', response) - def get_comments(self, id, from_revision=None, top=None, order=None): + def get_comments(self, id, project=None, from_revision=None, top=None, order=None): """GetComments. [Preview API] Gets the specified number of comments for a work item from the specified revision. :param int id: Work item id - :param int from_revision: Revision from which comments are to be fetched - :param int top: The number of comments to return - :param CommentSortOrder order: Ascending or descending by revision id + :param str project: Project ID or project name + :param int from_revision: Revision from which comments are to be fetched (default is 1) + :param int top: The number of comments to return (default is 200) + :param str order: Ascending or descending by revision id (default is ascending) :rtype: :class:` ` """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} @@ -269,10 +325,10 @@ def get_comments(self, id, from_revision=None, top=None, order=None): if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if order is not None: - query_parameters['order'] = self._serialize.query('order', order, 'CommentSortOrder') + query_parameters['order'] = self._serialize.query('order', order, 'str') response = self._send(http_method='GET', location_id='19335ae7-22f7-4308-93d8-261f9384b7cf', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemComments', response) @@ -315,7 +371,7 @@ def get_fields(self, project=None, expand=None): """GetFields. [Preview API] Returns information for all fields. :param str project: Project ID or project name - :param GetFieldsExpand expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. + :param str expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. :rtype: [WorkItemField] """ route_values = {} @@ -323,7 +379,7 @@ def get_fields(self, project=None, expand=None): route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'GetFieldsExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', version='4.1-preview.2', @@ -374,7 +430,7 @@ def create_query(self, posted_query, project, query): def delete_query(self, project, query): """DeleteQuery. - [Preview API] Delete a query or a folder + [Preview API] Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder. :param str project: Project ID or project name :param str query: ID or path of the query or folder to delete. """ @@ -392,7 +448,7 @@ def get_queries(self, project, expand=None, depth=None, include_deleted=None): """GetQueries. [Preview API] Gets the root queries and their children :param str project: Project ID or project name - :param QueryExpand expand: Include the query string (wiql), clauses, query result columns, and sort options in the results. + :param str expand: Include the query string (wiql), clauses, query result columns, and sort options in the results. :param int depth: In the folder of queries, return child queries and folders to this depth. :param bool include_deleted: Include deleted queries and folders :rtype: [QueryHierarchyItem] @@ -402,7 +458,7 @@ def get_queries(self, project, expand=None, depth=None, include_deleted=None): route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') if include_deleted is not None: @@ -420,7 +476,7 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non [Preview API] Retrieves an individual query and its children :param str project: Project ID or project name :param str query: - :param QueryExpand expand: Include the query string (wiql), clauses, query result columns, and sort options in the results. + :param str expand: Include the query string (wiql), clauses, query result columns, and sort options in the results. :param int depth: In the folder of queries, return child queries and folders to this depth. :param bool include_deleted: Include deleted queries and folders :rtype: :class:` ` @@ -432,7 +488,7 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non route_values['query'] = self._serialize.url('query', query, 'str') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') if include_deleted is not None: @@ -450,7 +506,7 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted :param str project: Project ID or project name :param str filter: The text to filter the queries with. :param int top: The number of queries to return (Default is 50 and maximum is 200). - :param QueryExpand expand: + :param str expand: :param bool include_deleted: Include deleted queries and folders :rtype: :class:` ` """ @@ -463,7 +519,7 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if include_deleted is not None: query_parameters['$includeDeleted'] = self._serialize.query('include_deleted', include_deleted, 'bool') response = self._send(http_method='GET', @@ -479,7 +535,7 @@ def update_query(self, query_update, project, query, undelete_descendants=None): :param :class:` ` query_update: The query to update. :param str project: Project ID or project name :param str query: The path for the query to update. - :param bool undelete_descendants: Undelete the children of this folder. + :param bool undelete_descendants: Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants. :rtype: :class:` ` """ route_values = {} @@ -512,7 +568,7 @@ def destroy_work_item(self, id, project=None): route_values['id'] = self._serialize.url('id', id, 'int') self._send(http_method='DELETE', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values) def get_deleted_work_item(self, id, project=None): @@ -529,26 +585,10 @@ def get_deleted_work_item(self, id, project=None): route_values['id'] = self._serialize.url('id', id, 'int') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values) return self._deserialize('WorkItemDelete', response) - def get_deleted_work_item_references(self, project=None): - """GetDeletedWorkItemReferences. - [Preview API] Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. - :param str project: Project ID or project name - :rtype: [WorkItemReference] - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - response = self._send(http_method='GET', - location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='4.1-preview.1', - route_values=route_values, - returns_collection=True) - return self._deserialize('[WorkItemReference]', response) - def get_deleted_work_items(self, ids, project=None): """GetDeletedWorkItems. [Preview API] Gets the work items from the recycle bin, whose IDs have been specified in the parameters @@ -565,12 +605,28 @@ def get_deleted_work_items(self, ids, project=None): query_parameters['ids'] = self._serialize.query('ids', ids, 'str') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values, query_parameters=query_parameters, returns_collection=True) return self._deserialize('[WorkItemDeleteReference]', response) + def get_deleted_work_item_shallow_references(self, project=None): + """GetDeletedWorkItemShallowReferences. + [Preview API] Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. + :param str project: Project ID or project name + :rtype: [WorkItemDeleteShallowReference] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', + version='4.1-preview.2', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemDeleteShallowReference]', response) + def restore_work_item(self, payload, id, project=None): """RestoreWorkItem. [Preview API] Restores the deleted work item from Recycle Bin. @@ -587,7 +643,7 @@ def restore_work_item(self, payload, id, project=None): content = self._serialize.body(payload, 'WorkItemDeleteUpdate') response = self._send(http_method='PATCH', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values, content=content) return self._deserialize('WorkItemDelete', response) @@ -597,7 +653,7 @@ def get_revision(self, id, revision_number, expand=None): [Preview API] Returns a fully hydrated work item for the requested revision :param int id: :param int revision_number: - :param WorkItemExpand expand: + :param str expand: :rtype: :class:` ` """ route_values = {} @@ -607,10 +663,10 @@ def get_revision(self, id, revision_number, expand=None): route_values['revisionNumber'] = self._serialize.url('revision_number', revision_number, 'int') query_parameters = {} if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='a00c85a5-80fa-4565-99c3-bcd2181434bb', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) @@ -621,7 +677,7 @@ def get_revisions(self, id, top=None, skip=None, expand=None): :param int id: :param int top: :param int skip: - :param WorkItemExpand expand: + :param str expand: :rtype: [WorkItem] """ route_values = {} @@ -633,10 +689,10 @@ def get_revisions(self, id, top=None, skip=None, expand=None): if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='a00c85a5-80fa-4565-99c3-bcd2181434bb', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters, returns_collection=True) @@ -653,11 +709,11 @@ def create_template(self, template, team_context): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -685,11 +741,11 @@ def get_templates(self, team_context, workitemtypename=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -719,11 +775,11 @@ def delete_template(self, team_context, template_id): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -750,11 +806,11 @@ def get_template(self, team_context, template_id): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -783,11 +839,11 @@ def replace_template(self, template_content, team_context, template_id): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -820,7 +876,7 @@ def get_update(self, id, update_number): route_values['updateNumber'] = self._serialize.url('update_number', update_number, 'int') response = self._send(http_method='GET', location_id='6570bf97-d02c-4a91-8d93-3abe9895b1a9', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values) return self._deserialize('WorkItemUpdate', response) @@ -842,7 +898,7 @@ def get_updates(self, id, top=None, skip=None): query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='6570bf97-d02c-4a91-8d93-3abe9895b1a9', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters, returns_collection=True) @@ -861,11 +917,11 @@ def query_by_wiql(self, wiql, team_context=None, time_precision=None, top=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -900,11 +956,11 @@ def get_query_result_count(self, id, team_context=None, time_precision=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -937,11 +993,11 @@ def query_by_id(self, id, team_context=None, time_precision=None): team = None if team_context is not None: if team_context.projectId: - project = team_context.projectId + project = team_context.project_id else: project = team_context.project if team_context.teamId: - team = team_context.teamId + team = team_context.team_id else: team = team_context.team @@ -1019,10 +1075,11 @@ def get_work_item_icon_svg(self, icon, color=None, v=None): query_parameters=query_parameters) return self._deserialize('object', response) - def get_reporting_links(self, project=None, types=None, continuation_token=None, start_date_time=None): - """GetReportingLinks. + def get_reporting_links_by_link_type(self, project=None, link_types=None, types=None, continuation_token=None, start_date_time=None): + """GetReportingLinksByLinkType. [Preview API] Get a batch of work item links :param str project: Project ID or project name + :param [str] link_types: A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types. :param [str] types: A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. :param str continuation_token: Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. :param datetime start_date_time: Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. @@ -1032,6 +1089,9 @@ def get_reporting_links(self, project=None, types=None, continuation_token=None, if project is not None: route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} + if link_types is not None: + link_types = ",".join(link_types) + query_parameters['linkTypes'] = self._serialize.query('link_types', link_types, 'str') if types is not None: types = ",".join(types) query_parameters['types'] = self._serialize.query('types', types, 'str') @@ -1084,7 +1144,7 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co :param bool include_deleted: Specify if the deleted item should be returned. :param bool include_tag_ref: Specify if the tag objects should be returned for System.Tags field. :param bool include_latest_only: Return only the latest revisions of work items, skipping all historical revisions - :param ReportingRevisionsExpand expand: Return all the fields in work item revisions, including long text fields which are not returned by default + :param str expand: Return all the fields in work item revisions, including long text fields which are not returned by default :param bool include_discussion_changes_only: Return only the those revisions of work items, where only history field was changed :param int max_page_size: The maximum number of results to return in this batch :rtype: :class:` ` @@ -1112,7 +1172,7 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co if include_latest_only is not None: query_parameters['includeLatestOnly'] = self._serialize.query('include_latest_only', include_latest_only, 'bool') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'ReportingRevisionsExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if include_discussion_changes_only is not None: query_parameters['includeDiscussionChangesOnly'] = self._serialize.query('include_discussion_changes_only', include_discussion_changes_only, 'bool') if max_page_size is not None: @@ -1131,7 +1191,7 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token :param str project: Project ID or project name :param str continuation_token: Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. :param datetime start_date_time: Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. - :param ReportingRevisionsExpand expand: + :param str expand: :rtype: :class:` ` """ route_values = {} @@ -1143,7 +1203,7 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token if start_date_time is not None: query_parameters['startDateTime'] = self._serialize.query('start_date_time', start_date_time, 'iso-8601') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'ReportingRevisionsExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') content = self._serialize.body(filter, 'ReportingWorkItemRevisionsFilter') response = self._send(http_method='POST', location_id='f828fe59-dd87-495d-a17c-7a8d6211ca6c', @@ -1153,14 +1213,79 @@ def read_reporting_revisions_post(self, filter, project=None, continuation_token content=content) return self._deserialize('ReportingWorkItemRevisionsBatch', response) - def delete_work_item(self, id, destroy=None): + def create_work_item(self, document, project, type, validate_only=None, bypass_rules=None, suppress_notifications=None): + """CreateWorkItem. + [Preview API] Creates a single work item. + :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item + :param str project: Project ID or project name + :param str type: The work item type of the work item to create + :param bool validate_only: Indicate if you only want to validate the changes without saving the work item + :param bool bypass_rules: Do not enforce the work item type rules on this update + :param bool suppress_notifications: Do not fire any notifications for this change + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + query_parameters = {} + if validate_only is not None: + query_parameters['validateOnly'] = self._serialize.query('validate_only', validate_only, 'bool') + if bypass_rules is not None: + query_parameters['bypassRules'] = self._serialize.query('bypass_rules', bypass_rules, 'bool') + if suppress_notifications is not None: + query_parameters['suppressNotifications'] = self._serialize.query('suppress_notifications', suppress_notifications, 'bool') + content = self._serialize.body(document, '[JsonPatchOperation]') + response = self._send(http_method='POST', + location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + content=content, + media_type='application/json-patch+json') + return self._deserialize('WorkItem', response) + + def get_work_item_template(self, project, type, fields=None, as_of=None, expand=None): + """GetWorkItemTemplate. + [Preview API] Returns a single work item from a template. + :param str project: Project ID or project name + :param str type: The work item type name + :param str fields: Comma-separated list of requested fields + :param datetime as_of: AsOf UTC date time string + :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + query_parameters = {} + if fields is not None: + query_parameters['fields'] = self._serialize.query('fields', fields, 'str') + if as_of is not None: + query_parameters['asOf'] = self._serialize.query('as_of', as_of, 'iso-8601') + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItem', response) + + def delete_work_item(self, id, project=None, destroy=None): """DeleteWorkItem. [Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. :param int id: ID of the work item to be deleted + :param str project: Project ID or project name :param bool destroy: Optional parameter, if set to true, the work item is deleted permanently :rtype: :class:` ` """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} @@ -1168,21 +1293,24 @@ def delete_work_item(self, id, destroy=None): query_parameters['destroy'] = self._serialize.query('destroy', destroy, 'bool') response = self._send(http_method='DELETE', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItemDelete', response) - def get_work_item(self, id, fields=None, as_of=None, expand=None): + def get_work_item(self, id, project=None, fields=None, as_of=None, expand=None): """GetWorkItem. [Preview API] Returns a single work item. :param int id: The work item id + :param str project: Project ID or project name :param [str] fields: Comma-separated list of requested fields :param datetime as_of: AsOf UTC date time string - :param WorkItemExpand expand: The expand parameters for work item attributes + :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. :rtype: :class:` ` """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} @@ -1192,24 +1320,28 @@ def get_work_item(self, id, fields=None, as_of=None, expand=None): if as_of is not None: query_parameters['asOf'] = self._serialize.query('as_of', as_of, 'iso-8601') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters) return self._deserialize('WorkItem', response) - def get_work_items(self, ids, fields=None, as_of=None, expand=None, error_policy=None): + def get_work_items(self, ids, project=None, fields=None, as_of=None, expand=None, error_policy=None): """GetWorkItems. [Preview API] Returns a list of work items. :param [int] ids: The comma-separated list of requested work item ids + :param str project: Project ID or project name :param [str] fields: Comma-separated list of requested fields :param datetime as_of: AsOf UTC date time string - :param WorkItemExpand expand: The expand parameters for work item attributes - :param WorkItemErrorPolicy error_policy: The flag to control error policy in a bulk get work items request + :param str expand: The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + :param str error_policy: The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}. :rtype: [WorkItem] """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if ids is not None: ids = ",".join(map(str, ids)) @@ -1220,27 +1352,31 @@ def get_work_items(self, ids, fields=None, as_of=None, expand=None, error_policy if as_of is not None: query_parameters['asOf'] = self._serialize.query('as_of', as_of, 'iso-8601') if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') if error_policy is not None: - query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'WorkItemErrorPolicy') + query_parameters['errorPolicy'] = self._serialize.query('error_policy', error_policy, 'str') response = self._send(http_method='GET', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='4.1-preview.2', + version='4.1-preview.3', + route_values=route_values, query_parameters=query_parameters, returns_collection=True) return self._deserialize('[WorkItem]', response) - def update_work_item(self, document, id, validate_only=None, bypass_rules=None, suppress_notifications=None): + def update_work_item(self, document, id, project=None, validate_only=None, bypass_rules=None, suppress_notifications=None): """UpdateWorkItem. [Preview API] Updates a single work item. :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the update :param int id: The id of the work item to update + :param str project: Project ID or project name :param bool validate_only: Indicate if you only want to validate the changes without saving the work item :param bool bypass_rules: Do not enforce the work item type rules on this update :param bool suppress_notifications: Do not fire any notifications for this change :rtype: :class:` ` """ route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') if id is not None: route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} @@ -1253,75 +1389,13 @@ def update_work_item(self, document, id, validate_only=None, bypass_rules=None, content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='72c7ddf8-2cdc-4f60-90cd-ab71c14a399b', - version='4.1-preview.2', - route_values=route_values, - query_parameters=query_parameters, - content=content, - media_type='application/json-patch+json') - return self._deserialize('WorkItem', response) - - def create_work_item(self, document, project, type, validate_only=None, bypass_rules=None, suppress_notifications=None): - """CreateWorkItem. - [Preview API] Creates a single work item. - :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item - :param str project: Project ID or project name - :param str type: The work item type of the work item to create - :param bool validate_only: Indicate if you only want to validate the changes without saving the work item - :param bool bypass_rules: Do not enforce the work item type rules on this update - :param bool suppress_notifications: Do not fire any notifications for this change - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if type is not None: - route_values['type'] = self._serialize.url('type', type, 'str') - query_parameters = {} - if validate_only is not None: - query_parameters['validateOnly'] = self._serialize.query('validate_only', validate_only, 'bool') - if bypass_rules is not None: - query_parameters['bypassRules'] = self._serialize.query('bypass_rules', bypass_rules, 'bool') - if suppress_notifications is not None: - query_parameters['suppressNotifications'] = self._serialize.query('suppress_notifications', suppress_notifications, 'bool') - content = self._serialize.body(document, '[JsonPatchOperation]') - response = self._send(http_method='POST', - location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', - version='4.1-preview.2', + version='4.1-preview.3', route_values=route_values, query_parameters=query_parameters, content=content, media_type='application/json-patch+json') return self._deserialize('WorkItem', response) - def get_work_item_template(self, project, type, fields=None, as_of=None, expand=None): - """GetWorkItemTemplate. - [Preview API] Returns a single work item from a template. - :param str project: Project ID or project name - :param str type: The work item type name - :param str fields: Comma-separated list of requested fields - :param datetime as_of: AsOf UTC date time string - :param WorkItemExpand expand: The expand parameters for work item attributes - :rtype: :class:` ` - """ - route_values = {} - if project is not None: - route_values['project'] = self._serialize.url('project', project, 'str') - if type is not None: - route_values['type'] = self._serialize.url('type', type, 'str') - query_parameters = {} - if fields is not None: - query_parameters['fields'] = self._serialize.query('fields', fields, 'str') - if as_of is not None: - query_parameters['asOf'] = self._serialize.query('as_of', as_of, 'iso-8601') - if expand is not None: - query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') - response = self._send(http_method='GET', - location_id='62d3d110-0047-428c-ad3c-4fe872c91c74', - version='4.1-preview.2', - route_values=route_values, - query_parameters=query_parameters) - return self._deserialize('WorkItem', response) - def get_work_item_next_states_on_checkin_action(self, ids, action=None): """GetWorkItemNextStatesOnCheckinAction. [Preview API] Returns the next state on the given work item IDs. @@ -1344,7 +1418,7 @@ def get_work_item_next_states_on_checkin_action(self, ids, action=None): def get_work_item_type_categories(self, project): """GetWorkItemTypeCategories. - [Preview API] Returns a the deltas between work item revisions. + [Preview API] Get all work item type categories. :param str project: Project ID or project name :rtype: [WorkItemTypeCategory] """ @@ -1360,7 +1434,7 @@ def get_work_item_type_categories(self, project): def get_work_item_type_category(self, project, category): """GetWorkItemTypeCategory. - [Preview API] Returns a the deltas between work item revisions. + [Preview API] Get specific work item type category by name. :param str project: Project ID or project name :param str category: The category name :rtype: :class:` ` @@ -1410,13 +1484,38 @@ def get_work_item_types(self, project): returns_collection=True) return self._deserialize('[WorkItemType]', response) - def get_dependent_fields(self, project, type, field): - """GetDependentFields. - [Preview API] Returns the dependent fields for the corresponding workitem type and fieldname. + def get_work_item_type_fields_with_references(self, project, type, expand=None): + """GetWorkItemTypeFieldsWithReferences. + [Preview API] Get a list of fields for a work item type with detailed references. :param str project: Project ID or project name - :param str type: The work item type name + :param str type: Work item type. + :param str expand: Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + :rtype: [WorkItemTypeFieldWithReferences] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='bd293ce5-3d25-4192-8e67-e8092e879efb', + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemTypeFieldWithReferences]', response) + + def get_work_item_type_field_with_references(self, project, type, field, expand=None): + """GetWorkItemTypeFieldWithReferences. + [Preview API] Get a field for a work item type with detailed references. + :param str project: Project ID or project name + :param str type: Work item type. :param str field: - :rtype: :class:` ` + :param str expand: Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + :rtype: :class:` ` """ route_values = {} if project is not None: @@ -1425,11 +1524,15 @@ def get_dependent_fields(self, project, type, field): route_values['type'] = self._serialize.url('type', type, 'str') if field is not None: route_values['field'] = self._serialize.url('field', field, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') response = self._send(http_method='GET', location_id='bd293ce5-3d25-4192-8e67-e8092e879efb', - version='4.1-preview.1', - route_values=route_values) - return self._deserialize('FieldDependentRule', response) + version='4.1-preview.3', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemTypeFieldWithReferences', response) def get_work_item_type_states(self, project, type): """GetWorkItemTypeStates.