diff --git a/vsts/vsts/cloud_load_test/__init__.py b/vsts/vsts/cloud_load_test/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/cloud_load_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/cloud_load_test/v4_1/__init__.py b/vsts/vsts/cloud_load_test/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/cloud_load_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/cloud_load_test/v4_1/cloud_load_test_client.py b/vsts/vsts/cloud_load_test/v4_1/cloud_load_test_client.py new file mode 100644 index 00000000..56b77ad3 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/cloud_load_test_client.py @@ -0,0 +1,438 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 CloudLoadTestClient(VssClient): + """CloudLoadTest + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(CloudLoadTestClient, 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_agent_group(self, group): + """CreateAgentGroup. + :param :class:` ` group: Agent group to be created + :rtype: :class:` ` + """ + content = self._serialize.body(group, 'AgentGroup') + response = self._send(http_method='POST', + location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720', + version='4.1', + content=content) + return self._deserialize('AgentGroup', response) + + def get_agent_groups(self, agent_group_id=None, machine_setup_input=None, machine_access_data=None, outgoing_request_urls=None, agent_group_name=None): + """GetAgentGroups. + :param str agent_group_id: The agent group indentifier + :param bool machine_setup_input: + :param bool machine_access_data: + :param bool outgoing_request_urls: + :param str agent_group_name: Name of the agent group + :rtype: object + """ + route_values = {} + if agent_group_id is not None: + route_values['agentGroupId'] = self._serialize.url('agent_group_id', agent_group_id, 'str') + query_parameters = {} + if machine_setup_input is not None: + query_parameters['machineSetupInput'] = self._serialize.query('machine_setup_input', machine_setup_input, 'bool') + if machine_access_data is not None: + query_parameters['machineAccessData'] = self._serialize.query('machine_access_data', machine_access_data, 'bool') + if outgoing_request_urls is not None: + query_parameters['outgoingRequestUrls'] = self._serialize.query('outgoing_request_urls', outgoing_request_urls, 'bool') + if agent_group_name is not None: + query_parameters['agentGroupName'] = self._serialize.query('agent_group_name', agent_group_name, 'str') + response = self._send(http_method='GET', + location_id='ab8d91c1-12d9-4ec5-874d-1ddb23e17720', + version='4.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def delete_static_agent(self, agent_group_id, agent_name): + """DeleteStaticAgent. + :param str agent_group_id: The agent group identifier + :param str agent_name: Name of the static agent + :rtype: str + """ + route_values = {} + if agent_group_id is not None: + route_values['agentGroupId'] = self._serialize.url('agent_group_id', agent_group_id, 'str') + query_parameters = {} + if agent_name is not None: + query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') + response = self._send(http_method='DELETE', + location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b', + version='4.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('str', response) + + def get_static_agents(self, agent_group_id, agent_name=None): + """GetStaticAgents. + :param str agent_group_id: The agent group identifier + :param str agent_name: Name of the static agent + :rtype: object + """ + route_values = {} + if agent_group_id is not None: + route_values['agentGroupId'] = self._serialize.url('agent_group_id', agent_group_id, 'str') + query_parameters = {} + if agent_name is not None: + query_parameters['agentName'] = self._serialize.query('agent_name', agent_name, 'str') + response = self._send(http_method='GET', + location_id='87e4b63d-7142-4b50-801e-72ba9ff8ee9b', + version='4.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_application(self, application_id): + """GetApplication. + :param str application_id: Filter by APM application identifier. + :rtype: :class:` ` + """ + route_values = {} + if application_id is not None: + route_values['applicationId'] = self._serialize.url('application_id', application_id, 'str') + response = self._send(http_method='GET', + location_id='2c986dce-8e8d-4142-b541-d016d5aff764', + version='4.1', + route_values=route_values) + return self._deserialize('Application', response) + + def get_applications(self, type=None): + """GetApplications. + :param str type: Filters the results based on the plugin type. + :rtype: [Application] + """ + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + response = self._send(http_method='GET', + location_id='2c986dce-8e8d-4142-b541-d016d5aff764', + version='4.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[Application]', response) + + def get_counters(self, test_run_id, group_names, include_summary=None): + """GetCounters. + :param str test_run_id: The test run identifier + :param str group_names: Comma separated names of counter groups, such as 'Application', 'Performance' and 'Throughput' + :param bool include_summary: + :rtype: [TestRunCounterInstance] + """ + route_values = {} + if test_run_id is not None: + route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') + query_parameters = {} + if group_names is not None: + query_parameters['groupNames'] = self._serialize.query('group_names', group_names, 'str') + if include_summary is not None: + query_parameters['includeSummary'] = self._serialize.query('include_summary', include_summary, 'bool') + response = self._send(http_method='GET', + location_id='29265ea4-b5a5-4b2e-b054-47f5f6f00183', + version='4.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestRunCounterInstance]', response) + + def get_application_counters(self, application_id=None, plugintype=None): + """GetApplicationCounters. + :param str application_id: Filter by APM application identifier. + :param str plugintype: Currently ApplicationInsights is the only available plugin type. + :rtype: [ApplicationCounters] + """ + query_parameters = {} + if application_id is not None: + query_parameters['applicationId'] = self._serialize.query('application_id', application_id, 'str') + if plugintype is not None: + query_parameters['plugintype'] = self._serialize.query('plugintype', plugintype, 'str') + response = self._send(http_method='GET', + location_id='c1275ce9-6d26-4bc6-926b-b846502e812d', + version='4.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ApplicationCounters]', response) + + def get_counter_samples(self, counter_sample_query_details, test_run_id): + """GetCounterSamples. + :param :class:` ` counter_sample_query_details: + :param str test_run_id: The test run identifier + :rtype: :class:` ` + """ + route_values = {} + if test_run_id is not None: + route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') + content = self._serialize.body(counter_sample_query_details, 'VssJsonCollectionWrapper') + response = self._send(http_method='POST', + location_id='bad18480-7193-4518-992a-37289c5bb92d', + version='4.1', + route_values=route_values, + content=content) + return self._deserialize('CounterSamplesResult', response) + + def get_load_test_run_errors(self, test_run_id, type=None, sub_type=None, detailed=None): + """GetLoadTestRunErrors. + :param str test_run_id: The test run identifier + :param str type: Filter for the particular type of errors. + :param str sub_type: Filter for a particular subtype of errors. You should not provide error subtype without error type. + :param bool detailed: To include the details of test errors such as messagetext, request, stacktrace, testcasename, scenarioname, and lasterrordate. + :rtype: :class:` ` + """ + route_values = {} + if test_run_id is not None: + route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') + query_parameters = {} + if type is not None: + query_parameters['type'] = self._serialize.query('type', type, 'str') + if sub_type is not None: + query_parameters['subType'] = self._serialize.query('sub_type', sub_type, 'str') + if detailed is not None: + query_parameters['detailed'] = self._serialize.query('detailed', detailed, 'bool') + response = self._send(http_method='GET', + location_id='b52025a7-3fb4-4283-8825-7079e75bd402', + version='4.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('LoadTestErrors', response) + + def get_test_run_messages(self, test_run_id): + """GetTestRunMessages. + :param str test_run_id: Id of the test run + :rtype: [Microsoft.VisualStudio.TestService.WebApiModel.TestRunMessage] + """ + route_values = {} + if test_run_id is not None: + route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') + response = self._send(http_method='GET', + location_id='2e7ba122-f522-4205-845b-2d270e59850a', + version='4.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[Microsoft.VisualStudio.TestService.WebApiModel.TestRunMessage]', response) + + def get_plugin(self, type): + """GetPlugin. + :param str type: Currently ApplicationInsights is the only available plugin type. + :rtype: :class:` ` + """ + route_values = {} + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + response = self._send(http_method='GET', + location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693', + version='4.1', + route_values=route_values) + return self._deserialize('ApplicationType', response) + + def get_plugins(self): + """GetPlugins. + :rtype: [ApplicationType] + """ + response = self._send(http_method='GET', + location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693', + version='4.1', + returns_collection=True) + return self._deserialize('[ApplicationType]', response) + + def get_load_test_result(self, test_run_id): + """GetLoadTestResult. + :param str test_run_id: The test run identifier + :rtype: :class:` ` + """ + route_values = {} + if test_run_id is not None: + route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') + response = self._send(http_method='GET', + location_id='5ed69bd8-4557-4cec-9b75-1ad67d0c257b', + version='4.1', + route_values=route_values) + return self._deserialize('TestResults', response) + + def create_test_definition(self, test_definition): + """CreateTestDefinition. + :param :class:` ` test_definition: Test definition to be created + :rtype: :class:` ` + """ + content = self._serialize.body(test_definition, 'TestDefinition') + response = self._send(http_method='POST', + location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', + version='4.1', + content=content) + return self._deserialize('TestDefinition', response) + + def get_test_definition(self, test_definition_id): + """GetTestDefinition. + :param str test_definition_id: The test definition identifier + :rtype: :class:` ` + """ + route_values = {} + if test_definition_id is not None: + route_values['testDefinitionId'] = self._serialize.url('test_definition_id', test_definition_id, 'str') + response = self._send(http_method='GET', + location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', + version='4.1', + route_values=route_values) + return self._deserialize('TestDefinition', response) + + def get_test_definitions(self, from_date=None, to_date=None, top=None): + """GetTestDefinitions. + :param str from_date: Date after which test definitions were created + :param str to_date: Date before which test definitions were crated + :param int top: + :rtype: [TestDefinitionBasic] + """ + query_parameters = {} + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'str') + if to_date is not None: + query_parameters['toDate'] = self._serialize.query('to_date', to_date, 'str') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + response = self._send(http_method='GET', + location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', + version='4.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[TestDefinitionBasic]', response) + + def update_test_definition(self, test_definition): + """UpdateTestDefinition. + :param :class:` ` test_definition: + :rtype: :class:` ` + """ + content = self._serialize.body(test_definition, 'TestDefinition') + response = self._send(http_method='PUT', + location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8', + version='4.1', + content=content) + return self._deserialize('TestDefinition', response) + + def create_test_drop(self, web_test_drop): + """CreateTestDrop. + :param :class:` ` web_test_drop: Test drop to be created + :rtype: :class:` ` + """ + content = self._serialize.body(web_test_drop, 'Microsoft.VisualStudio.TestService.WebApiModel.TestDrop') + response = self._send(http_method='POST', + location_id='d89d0e08-505c-4357-96f6-9729311ce8ad', + version='4.1', + content=content) + return self._deserialize('Microsoft.VisualStudio.TestService.WebApiModel.TestDrop', response) + + def get_test_drop(self, test_drop_id): + """GetTestDrop. + :param str test_drop_id: The test drop identifier + :rtype: :class:` ` + """ + route_values = {} + if test_drop_id is not None: + route_values['testDropId'] = self._serialize.url('test_drop_id', test_drop_id, 'str') + response = self._send(http_method='GET', + location_id='d89d0e08-505c-4357-96f6-9729311ce8ad', + version='4.1', + route_values=route_values) + return self._deserialize('Microsoft.VisualStudio.TestService.WebApiModel.TestDrop', response) + + def create_test_run(self, web_test_run): + """CreateTestRun. + :param :class:` ` web_test_run: + :rtype: :class:` ` + """ + content = self._serialize.body(web_test_run, 'TestRun') + response = self._send(http_method='POST', + location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', + version='4.1', + content=content) + return self._deserialize('TestRun', response) + + def get_test_run(self, test_run_id): + """GetTestRun. + :param str test_run_id: Unique ID of the test run + :rtype: :class:` ` + """ + route_values = {} + if test_run_id is not None: + route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') + response = self._send(http_method='GET', + location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', + version='4.1', + route_values=route_values) + return self._deserialize('TestRun', response) + + def get_test_runs(self, name=None, requested_by=None, status=None, run_type=None, from_date=None, to_date=None, detailed=None, top=None, runsourceidentifier=None, retention_state=None): + """GetTestRuns. + Returns test runs based on the filter specified. Returns all runs of the tenant if there is no filter. + :param str name: Name for the test run. Names are not unique. Test runs with same name are assigned sequential rolling numbers. + :param str requested_by: Filter by the user who requested the test run. Here requestedBy should be the display name of the user. + :param str status: Filter by the test run status. + :param str run_type: Valid values include: null, one of TestRunType, or "*" + :param str from_date: Filter by the test runs that have been modified after the fromDate timestamp. + :param str to_date: Filter by the test runs that have been modified before the toDate timestamp. + :param bool detailed: Include the detailed test run attributes. + :param int top: The maximum number of test runs to return. + :param str runsourceidentifier: + :param str retention_state: + :rtype: object + """ + query_parameters = {} + if name is not None: + query_parameters['name'] = self._serialize.query('name', name, 'str') + if requested_by is not None: + query_parameters['requestedBy'] = self._serialize.query('requested_by', requested_by, 'str') + if status is not None: + query_parameters['status'] = self._serialize.query('status', status, 'str') + if run_type is not None: + query_parameters['runType'] = self._serialize.query('run_type', run_type, 'str') + if from_date is not None: + query_parameters['fromDate'] = self._serialize.query('from_date', from_date, 'str') + if to_date is not None: + query_parameters['toDate'] = self._serialize.query('to_date', to_date, 'str') + if detailed is not None: + query_parameters['detailed'] = self._serialize.query('detailed', detailed, 'bool') + if top is not None: + query_parameters['top'] = self._serialize.query('top', top, 'int') + if runsourceidentifier is not None: + query_parameters['runsourceidentifier'] = self._serialize.query('runsourceidentifier', runsourceidentifier, 'str') + if retention_state is not None: + query_parameters['retentionState'] = self._serialize.query('retention_state', retention_state, 'str') + response = self._send(http_method='GET', + location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', + version='4.1', + query_parameters=query_parameters) + return self._deserialize('object', response) + + def update_test_run(self, web_test_run, test_run_id): + """UpdateTestRun. + :param :class:` ` web_test_run: + :param str test_run_id: + """ + route_values = {} + if test_run_id is not None: + route_values['testRunId'] = self._serialize.url('test_run_id', test_run_id, 'str') + content = self._serialize.body(web_test_run, 'TestRun') + self._send(http_method='PATCH', + location_id='b41a84ff-ff03-4ac1-b76e-e7ea25c92aba', + version='4.1', + route_values=route_values, + content=content) + diff --git a/vsts/vsts/cloud_load_test/v4_1/models/__init__.py b/vsts/vsts/cloud_load_test/v4_1/models/__init__.py new file mode 100644 index 00000000..b32655dc --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/__init__.py @@ -0,0 +1,107 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project 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_group import AgentGroup +from .agent_group_access_data import AgentGroupAccessData +from .application import Application +from .application_counters import ApplicationCounters +from .application_type import ApplicationType +from .browser_mix import BrowserMix +from .clt_customer_intelligence_data import CltCustomerIntelligenceData +from .counter_group import CounterGroup +from .counter_instance_samples import CounterInstanceSamples +from .counter_sample import CounterSample +from .counter_sample_query_details import CounterSampleQueryDetails +from .counter_samples_result import CounterSamplesResult +from .diagnostics import Diagnostics +from .drop_access_data import DropAccessData +from .error_details import ErrorDetails +from .load_generation_geo_location import LoadGenerationGeoLocation +from .load_test import LoadTest +from .load_test_definition import LoadTestDefinition +from .load_test_errors import LoadTestErrors +from .load_test_run_details import LoadTestRunDetails +from .load_test_run_settings import LoadTestRunSettings +from .overridable_run_settings import OverridableRunSettings +from .page_summary import PageSummary +from .request_summary import RequestSummary +from .scenario_summary import ScenarioSummary +from .static_agent_run_setting import StaticAgentRunSetting +from .sub_type import SubType +from .summary_percentile_data import SummaryPercentileData +from .tenant_details import TenantDetails +from .test_definition import TestDefinition +from .test_definition_basic import TestDefinitionBasic +from .test_drop import TestDrop +from .test_drop_ref import TestDropRef +from .test_results import TestResults +from .test_results_summary import TestResultsSummary +from .test_run import TestRun +from .test_run_abort_message import TestRunAbortMessage +from .test_run_basic import TestRunBasic +from .test_run_counter_instance import TestRunCounterInstance +from .test_run_message import TestRunMessage +from .test_settings import TestSettings +from .test_summary import TestSummary +from .transaction_summary import TransactionSummary +from .web_api_load_test_machine_input import WebApiLoadTestMachineInput +from .web_api_setup_paramaters import WebApiSetupParamaters +from .web_api_test_machine import WebApiTestMachine +from .web_api_user_load_test_machine_input import WebApiUserLoadTestMachineInput +from .web_instance_summary_data import WebInstanceSummaryData + +__all__ = [ + 'AgentGroup', + 'AgentGroupAccessData', + 'Application', + 'ApplicationCounters', + 'ApplicationType', + 'BrowserMix', + 'CltCustomerIntelligenceData', + 'CounterGroup', + 'CounterInstanceSamples', + 'CounterSample', + 'CounterSampleQueryDetails', + 'CounterSamplesResult', + 'Diagnostics', + 'DropAccessData', + 'ErrorDetails', + 'LoadGenerationGeoLocation', + 'LoadTest', + 'LoadTestDefinition', + 'LoadTestErrors', + 'LoadTestRunDetails', + 'LoadTestRunSettings', + 'OverridableRunSettings', + 'PageSummary', + 'RequestSummary', + 'ScenarioSummary', + 'StaticAgentRunSetting', + 'SubType', + 'SummaryPercentileData', + 'TenantDetails', + 'TestDefinition', + 'TestDefinitionBasic', + 'TestDrop', + 'TestDropRef', + 'TestResults', + 'TestResultsSummary', + 'TestRun', + 'TestRunAbortMessage', + 'TestRunBasic', + 'TestRunCounterInstance', + 'TestRunMessage', + 'TestSettings', + 'TestSummary', + 'TransactionSummary', + 'WebApiLoadTestMachineInput', + 'WebApiSetupParamaters', + 'WebApiTestMachine', + 'WebApiUserLoadTestMachineInput', + 'WebInstanceSummaryData', +] diff --git a/vsts/vsts/cloud_load_test/v4_1/models/agent_group.py b/vsts/vsts/cloud_load_test/v4_1/models/agent_group.py new file mode 100644 index 00000000..b008cfbb --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/agent_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 msrest.serialization import Model + + +class AgentGroup(Model): + """AgentGroup. + + :param created_by: + :type created_by: IdentityRef + :param creation_time: + :type creation_time: datetime + :param group_id: + :type group_id: str + :param group_name: + :type group_name: str + :param machine_access_data: + :type machine_access_data: list of :class:`AgentGroupAccessData ` + :param machine_configuration: + :type machine_configuration: :class:`WebApiUserLoadTestMachineInput ` + :param tenant_id: + :type tenant_id: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'machine_access_data': {'key': 'machineAccessData', 'type': '[AgentGroupAccessData]'}, + 'machine_configuration': {'key': 'machineConfiguration', 'type': 'WebApiUserLoadTestMachineInput'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'} + } + + def __init__(self, created_by=None, creation_time=None, group_id=None, group_name=None, machine_access_data=None, machine_configuration=None, tenant_id=None): + super(AgentGroup, self).__init__() + self.created_by = created_by + self.creation_time = creation_time + self.group_id = group_id + self.group_name = group_name + self.machine_access_data = machine_access_data + self.machine_configuration = machine_configuration + self.tenant_id = tenant_id diff --git a/vsts/vsts/cloud_load_test/v4_1/models/agent_group_access_data.py b/vsts/vsts/cloud_load_test/v4_1/models/agent_group_access_data.py new file mode 100644 index 00000000..df47a8a1 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/agent_group_access_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 AgentGroupAccessData(Model): + """AgentGroupAccessData. + + :param details: + :type details: str + :param storage_connection_string: + :type storage_connection_string: str + :param storage_end_point: + :type storage_end_point: str + :param storage_name: + :type storage_name: str + :param storage_type: + :type storage_type: str + """ + + _attribute_map = { + 'details': {'key': 'details', 'type': 'str'}, + 'storage_connection_string': {'key': 'storageConnectionString', 'type': 'str'}, + 'storage_end_point': {'key': 'storageEndPoint', 'type': 'str'}, + 'storage_name': {'key': 'storageName', 'type': 'str'}, + 'storage_type': {'key': 'storageType', 'type': 'str'} + } + + def __init__(self, details=None, storage_connection_string=None, storage_end_point=None, storage_name=None, storage_type=None): + super(AgentGroupAccessData, self).__init__() + self.details = details + self.storage_connection_string = storage_connection_string + self.storage_end_point = storage_end_point + self.storage_name = storage_name + self.storage_type = storage_type diff --git a/vsts/vsts/cloud_load_test/v4_1/models/application.py b/vsts/vsts/cloud_load_test/v4_1/models/application.py new file mode 100644 index 00000000..92393fc1 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/application.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 Application(Model): + """Application. + + :param application_id: + :type application_id: str + :param description: + :type description: str + :param name: + :type name: str + :param path: + :type path: str + :param path_seperator: + :type path_seperator: str + :param type: + :type type: str + :param version: + :type version: str + """ + + _attribute_map = { + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'path_seperator': {'key': 'pathSeperator', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, application_id=None, description=None, name=None, path=None, path_seperator=None, type=None, version=None): + super(Application, self).__init__() + self.application_id = application_id + self.description = description + self.name = name + self.path = path + self.path_seperator = path_seperator + self.type = type + self.version = version diff --git a/vsts/vsts/cloud_load_test/v4_1/models/application_counters.py b/vsts/vsts/cloud_load_test/v4_1/models/application_counters.py new file mode 100644 index 00000000..3db1ab75 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/application_counters.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 ApplicationCounters(Model): + """ApplicationCounters. + + :param application_id: + :type application_id: str + :param description: + :type description: str + :param id: + :type id: str + :param is_default: + :type is_default: bool + :param name: + :type name: str + :param path: + :type path: str + """ + + _attribute_map = { + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, application_id=None, description=None, id=None, is_default=None, name=None, path=None): + super(ApplicationCounters, self).__init__() + self.application_id = application_id + self.description = description + self.id = id + self.is_default = is_default + self.name = name + self.path = path diff --git a/vsts/vsts/cloud_load_test/v4_1/models/application_type.py b/vsts/vsts/cloud_load_test/v4_1/models/application_type.py new file mode 100644 index 00000000..0f61bed2 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/application_type.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 ApplicationType(Model): + """ApplicationType. + + :param action_uri_link: + :type action_uri_link: str + :param aut_portal_link: + :type aut_portal_link: str + :param is_enabled: + :type is_enabled: bool + :param max_components_allowed_for_collection: + :type max_components_allowed_for_collection: int + :param max_counters_allowed: + :type max_counters_allowed: int + :param type: + :type type: str + """ + + _attribute_map = { + 'action_uri_link': {'key': 'actionUriLink', 'type': 'str'}, + 'aut_portal_link': {'key': 'autPortalLink', 'type': 'str'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'max_components_allowed_for_collection': {'key': 'maxComponentsAllowedForCollection', 'type': 'int'}, + 'max_counters_allowed': {'key': 'maxCountersAllowed', 'type': 'int'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, action_uri_link=None, aut_portal_link=None, is_enabled=None, max_components_allowed_for_collection=None, max_counters_allowed=None, type=None): + super(ApplicationType, self).__init__() + self.action_uri_link = action_uri_link + self.aut_portal_link = aut_portal_link + self.is_enabled = is_enabled + self.max_components_allowed_for_collection = max_components_allowed_for_collection + self.max_counters_allowed = max_counters_allowed + self.type = type diff --git a/vsts/vsts/cloud_load_test/v4_1/models/browser_mix.py b/vsts/vsts/cloud_load_test/v4_1/models/browser_mix.py new file mode 100644 index 00000000..e6c39091 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/browser_mix.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class BrowserMix(Model): + """BrowserMix. + + :param browser_name: + :type browser_name: str + :param browser_percentage: + :type browser_percentage: int + """ + + _attribute_map = { + 'browser_name': {'key': 'browserName', 'type': 'str'}, + 'browser_percentage': {'key': 'browserPercentage', 'type': 'int'} + } + + def __init__(self, browser_name=None, browser_percentage=None): + super(BrowserMix, self).__init__() + self.browser_name = browser_name + self.browser_percentage = browser_percentage diff --git a/vsts/vsts/cloud_load_test/v4_1/models/clt_customer_intelligence_data.py b/vsts/vsts/cloud_load_test/v4_1/models/clt_customer_intelligence_data.py new file mode 100644 index 00000000..64971605 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/clt_customer_intelligence_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 CltCustomerIntelligenceData(Model): + """CltCustomerIntelligenceData. + + :param area: + :type area: str + :param feature: + :type feature: str + :param properties: + :type properties: dict + """ + + _attribute_map = { + 'area': {'key': 'area', 'type': 'str'}, + 'feature': {'key': 'feature', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'} + } + + def __init__(self, area=None, feature=None, properties=None): + super(CltCustomerIntelligenceData, self).__init__() + self.area = area + self.feature = feature + self.properties = properties diff --git a/vsts/vsts/cloud_load_test/v4_1/models/counter_group.py b/vsts/vsts/cloud_load_test/v4_1/models/counter_group.py new file mode 100644 index 00000000..4d93bc0d --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/counter_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 CounterGroup(Model): + """CounterGroup. + + :param group_name: + :type group_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'group_name': {'key': 'groupName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, group_name=None, url=None): + super(CounterGroup, self).__init__() + self.group_name = group_name + self.url = url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/counter_instance_samples.py b/vsts/vsts/cloud_load_test/v4_1/models/counter_instance_samples.py new file mode 100644 index 00000000..158193e7 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/counter_instance_samples.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 CounterInstanceSamples(Model): + """CounterInstanceSamples. + + :param count: + :type count: int + :param counter_instance_id: + :type counter_instance_id: str + :param next_refresh_time: + :type next_refresh_time: datetime + :param values: + :type values: list of :class:`CounterSample ` + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'counter_instance_id': {'key': 'counterInstanceId', 'type': 'str'}, + 'next_refresh_time': {'key': 'nextRefreshTime', 'type': 'iso-8601'}, + 'values': {'key': 'values', 'type': '[CounterSample]'} + } + + def __init__(self, count=None, counter_instance_id=None, next_refresh_time=None, values=None): + super(CounterInstanceSamples, self).__init__() + self.count = count + self.counter_instance_id = counter_instance_id + self.next_refresh_time = next_refresh_time + self.values = values diff --git a/vsts/vsts/cloud_load_test/v4_1/models/counter_sample.py b/vsts/vsts/cloud_load_test/v4_1/models/counter_sample.py new file mode 100644 index 00000000..eb2d2cb6 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/counter_sample.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 CounterSample(Model): + """CounterSample. + + :param base_value: + :type base_value: long + :param computed_value: + :type computed_value: int + :param counter_frequency: + :type counter_frequency: long + :param counter_instance_id: + :type counter_instance_id: str + :param counter_type: + :type counter_type: str + :param interval_end_date: + :type interval_end_date: datetime + :param interval_number: + :type interval_number: int + :param raw_value: + :type raw_value: long + :param system_frequency: + :type system_frequency: long + :param time_stamp: + :type time_stamp: long + """ + + _attribute_map = { + 'base_value': {'key': 'baseValue', 'type': 'long'}, + 'computed_value': {'key': 'computedValue', 'type': 'int'}, + 'counter_frequency': {'key': 'counterFrequency', 'type': 'long'}, + 'counter_instance_id': {'key': 'counterInstanceId', 'type': 'str'}, + 'counter_type': {'key': 'counterType', 'type': 'str'}, + 'interval_end_date': {'key': 'intervalEndDate', 'type': 'iso-8601'}, + 'interval_number': {'key': 'intervalNumber', 'type': 'int'}, + 'raw_value': {'key': 'rawValue', 'type': 'long'}, + 'system_frequency': {'key': 'systemFrequency', 'type': 'long'}, + 'time_stamp': {'key': 'timeStamp', 'type': 'long'} + } + + def __init__(self, base_value=None, computed_value=None, counter_frequency=None, counter_instance_id=None, counter_type=None, interval_end_date=None, interval_number=None, raw_value=None, system_frequency=None, time_stamp=None): + super(CounterSample, self).__init__() + self.base_value = base_value + self.computed_value = computed_value + self.counter_frequency = counter_frequency + self.counter_instance_id = counter_instance_id + self.counter_type = counter_type + self.interval_end_date = interval_end_date + self.interval_number = interval_number + self.raw_value = raw_value + self.system_frequency = system_frequency + self.time_stamp = time_stamp diff --git a/vsts/vsts/cloud_load_test/v4_1/models/counter_sample_query_details.py b/vsts/vsts/cloud_load_test/v4_1/models/counter_sample_query_details.py new file mode 100644 index 00000000..d78217a2 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/counter_sample_query_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 CounterSampleQueryDetails(Model): + """CounterSampleQueryDetails. + + :param counter_instance_id: + :type counter_instance_id: str + :param from_interval: + :type from_interval: int + :param to_interval: + :type to_interval: int + """ + + _attribute_map = { + 'counter_instance_id': {'key': 'counterInstanceId', 'type': 'str'}, + 'from_interval': {'key': 'fromInterval', 'type': 'int'}, + 'to_interval': {'key': 'toInterval', 'type': 'int'} + } + + def __init__(self, counter_instance_id=None, from_interval=None, to_interval=None): + super(CounterSampleQueryDetails, self).__init__() + self.counter_instance_id = counter_instance_id + self.from_interval = from_interval + self.to_interval = to_interval diff --git a/vsts/vsts/cloud_load_test/v4_1/models/counter_samples_result.py b/vsts/vsts/cloud_load_test/v4_1/models/counter_samples_result.py new file mode 100644 index 00000000..aeb595c0 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/counter_samples_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 CounterSamplesResult(Model): + """CounterSamplesResult. + + :param count: + :type count: int + :param max_batch_size: + :type max_batch_size: int + :param total_samples_count: + :type total_samples_count: int + :param values: + :type values: list of :class:`CounterInstanceSamples ` + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'max_batch_size': {'key': 'maxBatchSize', 'type': 'int'}, + 'total_samples_count': {'key': 'totalSamplesCount', 'type': 'int'}, + 'values': {'key': 'values', 'type': '[CounterInstanceSamples]'} + } + + def __init__(self, count=None, max_batch_size=None, total_samples_count=None, values=None): + super(CounterSamplesResult, self).__init__() + self.count = count + self.max_batch_size = max_batch_size + self.total_samples_count = total_samples_count + self.values = values diff --git a/vsts/vsts/cloud_load_test/v4_1/models/diagnostics.py b/vsts/vsts/cloud_load_test/v4_1/models/diagnostics.py new file mode 100644 index 00000000..9daaff33 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/diagnostics.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 Diagnostics(Model): + """Diagnostics. + + :param diagnostic_store_connection_string: + :type diagnostic_store_connection_string: str + :param last_modified_time: + :type last_modified_time: datetime + :param relative_path_to_diagnostic_files: + :type relative_path_to_diagnostic_files: str + """ + + _attribute_map = { + 'diagnostic_store_connection_string': {'key': 'diagnosticStoreConnectionString', 'type': 'str'}, + 'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'}, + 'relative_path_to_diagnostic_files': {'key': 'relativePathToDiagnosticFiles', 'type': 'str'} + } + + def __init__(self, diagnostic_store_connection_string=None, last_modified_time=None, relative_path_to_diagnostic_files=None): + super(Diagnostics, self).__init__() + self.diagnostic_store_connection_string = diagnostic_store_connection_string + self.last_modified_time = last_modified_time + self.relative_path_to_diagnostic_files = relative_path_to_diagnostic_files diff --git a/vsts/vsts/cloud_load_test/v4_1/models/drop_access_data.py b/vsts/vsts/cloud_load_test/v4_1/models/drop_access_data.py new file mode 100644 index 00000000..5adf763e --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/drop_access_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 DropAccessData(Model): + """DropAccessData. + + :param drop_container_url: + :type drop_container_url: str + :param sas_key: + :type sas_key: str + """ + + _attribute_map = { + 'drop_container_url': {'key': 'dropContainerUrl', 'type': 'str'}, + 'sas_key': {'key': 'sasKey', 'type': 'str'} + } + + def __init__(self, drop_container_url=None, sas_key=None): + super(DropAccessData, self).__init__() + self.drop_container_url = drop_container_url + self.sas_key = sas_key diff --git a/vsts/vsts/cloud_load_test/v4_1/models/error_details.py b/vsts/vsts/cloud_load_test/v4_1/models/error_details.py new file mode 100644 index 00000000..d0d0edef --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/error_details.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 ErrorDetails(Model): + """ErrorDetails. + + :param last_error_date: + :type last_error_date: datetime + :param message_text: + :type message_text: str + :param occurrences: + :type occurrences: int + :param request: + :type request: str + :param scenario_name: + :type scenario_name: str + :param stack_trace: + :type stack_trace: str + :param test_case_name: + :type test_case_name: str + """ + + _attribute_map = { + 'last_error_date': {'key': 'lastErrorDate', 'type': 'iso-8601'}, + 'message_text': {'key': 'messageText', 'type': 'str'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + 'request': {'key': 'request', 'type': 'str'}, + 'scenario_name': {'key': 'scenarioName', 'type': 'str'}, + 'stack_trace': {'key': 'stackTrace', 'type': 'str'}, + 'test_case_name': {'key': 'testCaseName', 'type': 'str'} + } + + def __init__(self, last_error_date=None, message_text=None, occurrences=None, request=None, scenario_name=None, stack_trace=None, test_case_name=None): + super(ErrorDetails, self).__init__() + self.last_error_date = last_error_date + self.message_text = message_text + self.occurrences = occurrences + self.request = request + self.scenario_name = scenario_name + self.stack_trace = stack_trace + self.test_case_name = test_case_name diff --git a/vsts/vsts/cloud_load_test/v4_1/models/load_generation_geo_location.py b/vsts/vsts/cloud_load_test/v4_1/models/load_generation_geo_location.py new file mode 100644 index 00000000..d1c729f2 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/load_generation_geo_location.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LoadGenerationGeoLocation(Model): + """LoadGenerationGeoLocation. + + :param location: + :type location: str + :param percentage: + :type percentage: int + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'percentage': {'key': 'percentage', 'type': 'int'} + } + + def __init__(self, location=None, percentage=None): + super(LoadGenerationGeoLocation, self).__init__() + self.location = location + self.percentage = percentage diff --git a/vsts/vsts/cloud_load_test/v4_1/models/load_test.py b/vsts/vsts/cloud_load_test/v4_1/models/load_test.py new file mode 100644 index 00000000..6e2fcacc --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/load_test.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 LoadTest(Model): + """LoadTest. + + """ + + _attribute_map = { + } + + def __init__(self): + super(LoadTest, self).__init__() diff --git a/vsts/vsts/cloud_load_test/v4_1/models/load_test_definition.py b/vsts/vsts/cloud_load_test/v4_1/models/load_test_definition.py new file mode 100644 index 00000000..0cf57ce4 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/load_test_definition.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 LoadTestDefinition(Model): + """LoadTestDefinition. + + :param agent_count: + :type agent_count: int + :param browser_mixs: + :type browser_mixs: list of :class:`BrowserMix ` + :param core_count: + :type core_count: int + :param cores_per_agent: + :type cores_per_agent: int + :param load_generation_geo_locations: + :type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation ` + :param load_pattern_name: + :type load_pattern_name: str + :param load_test_name: + :type load_test_name: str + :param max_vusers: + :type max_vusers: int + :param run_duration: + :type run_duration: int + :param sampling_rate: + :type sampling_rate: int + :param think_time: + :type think_time: int + :param urls: + :type urls: list of str + """ + + _attribute_map = { + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'browser_mixs': {'key': 'browserMixs', 'type': '[BrowserMix]'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, + 'cores_per_agent': {'key': 'coresPerAgent', 'type': 'int'}, + 'load_generation_geo_locations': {'key': 'loadGenerationGeoLocations', 'type': '[LoadGenerationGeoLocation]'}, + 'load_pattern_name': {'key': 'loadPatternName', 'type': 'str'}, + 'load_test_name': {'key': 'loadTestName', 'type': 'str'}, + 'max_vusers': {'key': 'maxVusers', 'type': 'int'}, + 'run_duration': {'key': 'runDuration', 'type': 'int'}, + 'sampling_rate': {'key': 'samplingRate', 'type': 'int'}, + 'think_time': {'key': 'thinkTime', 'type': 'int'}, + 'urls': {'key': 'urls', 'type': '[str]'} + } + + def __init__(self, agent_count=None, browser_mixs=None, core_count=None, cores_per_agent=None, load_generation_geo_locations=None, load_pattern_name=None, load_test_name=None, max_vusers=None, run_duration=None, sampling_rate=None, think_time=None, urls=None): + super(LoadTestDefinition, self).__init__() + self.agent_count = agent_count + self.browser_mixs = browser_mixs + self.core_count = core_count + self.cores_per_agent = cores_per_agent + self.load_generation_geo_locations = load_generation_geo_locations + self.load_pattern_name = load_pattern_name + self.load_test_name = load_test_name + self.max_vusers = max_vusers + self.run_duration = run_duration + self.sampling_rate = sampling_rate + self.think_time = think_time + self.urls = urls diff --git a/vsts/vsts/cloud_load_test/v4_1/models/load_test_errors.py b/vsts/vsts/cloud_load_test/v4_1/models/load_test_errors.py new file mode 100644 index 00000000..6be7922f --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/load_test_errors.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 LoadTestErrors(Model): + """LoadTestErrors. + + :param count: + :type count: int + :param occurrences: + :type occurrences: int + :param types: + :type types: list of :class:`object ` + :param url: + :type url: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + 'types': {'key': 'types', 'type': '[object]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, count=None, occurrences=None, types=None, url=None): + super(LoadTestErrors, self).__init__() + self.count = count + self.occurrences = occurrences + self.types = types + self.url = url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/load_test_run_details.py b/vsts/vsts/cloud_load_test/v4_1/models/load_test_run_details.py new file mode 100644 index 00000000..cec05618 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/load_test_run_details.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 .load_test_run_settings import LoadTestRunSettings + + +class LoadTestRunDetails(LoadTestRunSettings): + """LoadTestRunDetails. + + :param agent_count: + :type agent_count: int + :param core_count: + :type core_count: int + :param cores_per_agent: + :type cores_per_agent: int + :param duration: + :type duration: int + :param load_generator_machines_type: + :type load_generator_machines_type: object + :param sampling_interval: + :type sampling_interval: int + :param warm_up_duration: + :type warm_up_duration: int + :param virtual_user_count: + :type virtual_user_count: int + """ + + _attribute_map = { + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, + 'cores_per_agent': {'key': 'coresPerAgent', 'type': 'int'}, + 'duration': {'key': 'duration', 'type': 'int'}, + 'load_generator_machines_type': {'key': 'loadGeneratorMachinesType', 'type': 'object'}, + 'sampling_interval': {'key': 'samplingInterval', 'type': 'int'}, + 'warm_up_duration': {'key': 'warmUpDuration', 'type': 'int'}, + 'virtual_user_count': {'key': 'virtualUserCount', 'type': 'int'} + } + + def __init__(self, agent_count=None, core_count=None, cores_per_agent=None, duration=None, load_generator_machines_type=None, sampling_interval=None, warm_up_duration=None, virtual_user_count=None): + super(LoadTestRunDetails, self).__init__(agent_count=agent_count, core_count=core_count, cores_per_agent=cores_per_agent, duration=duration, load_generator_machines_type=load_generator_machines_type, sampling_interval=sampling_interval, warm_up_duration=warm_up_duration) + self.virtual_user_count = virtual_user_count diff --git a/vsts/vsts/cloud_load_test/v4_1/models/load_test_run_settings.py b/vsts/vsts/cloud_load_test/v4_1/models/load_test_run_settings.py new file mode 100644 index 00000000..b1a283d3 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/load_test_run_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 LoadTestRunSettings(Model): + """LoadTestRunSettings. + + :param agent_count: + :type agent_count: int + :param core_count: + :type core_count: int + :param cores_per_agent: + :type cores_per_agent: int + :param duration: + :type duration: int + :param load_generator_machines_type: + :type load_generator_machines_type: object + :param sampling_interval: + :type sampling_interval: int + :param warm_up_duration: + :type warm_up_duration: int + """ + + _attribute_map = { + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, + 'cores_per_agent': {'key': 'coresPerAgent', 'type': 'int'}, + 'duration': {'key': 'duration', 'type': 'int'}, + 'load_generator_machines_type': {'key': 'loadGeneratorMachinesType', 'type': 'object'}, + 'sampling_interval': {'key': 'samplingInterval', 'type': 'int'}, + 'warm_up_duration': {'key': 'warmUpDuration', 'type': 'int'} + } + + def __init__(self, agent_count=None, core_count=None, cores_per_agent=None, duration=None, load_generator_machines_type=None, sampling_interval=None, warm_up_duration=None): + super(LoadTestRunSettings, self).__init__() + self.agent_count = agent_count + self.core_count = core_count + self.cores_per_agent = cores_per_agent + self.duration = duration + self.load_generator_machines_type = load_generator_machines_type + self.sampling_interval = sampling_interval + self.warm_up_duration = warm_up_duration diff --git a/vsts/vsts/cloud_load_test/v4_1/models/overridable_run_settings.py b/vsts/vsts/cloud_load_test/v4_1/models/overridable_run_settings.py new file mode 100644 index 00000000..ad2589a2 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/overridable_run_settings.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OverridableRunSettings(Model): + """OverridableRunSettings. + + :param load_generator_machines_type: + :type load_generator_machines_type: object + :param static_agent_run_settings: + :type static_agent_run_settings: :class:`StaticAgentRunSetting ` + """ + + _attribute_map = { + 'load_generator_machines_type': {'key': 'loadGeneratorMachinesType', 'type': 'object'}, + 'static_agent_run_settings': {'key': 'staticAgentRunSettings', 'type': 'StaticAgentRunSetting'} + } + + def __init__(self, load_generator_machines_type=None, static_agent_run_settings=None): + super(OverridableRunSettings, self).__init__() + self.load_generator_machines_type = load_generator_machines_type + self.static_agent_run_settings = static_agent_run_settings diff --git a/vsts/vsts/cloud_load_test/v4_1/models/page_summary.py b/vsts/vsts/cloud_load_test/v4_1/models/page_summary.py new file mode 100644 index 00000000..1bee7d5a --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/page_summary.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 PageSummary(Model): + """PageSummary. + + :param average_page_time: + :type average_page_time: float + :param page_url: + :type page_url: str + :param percentage_pages_meeting_goal: + :type percentage_pages_meeting_goal: int + :param percentile_data: + :type percentile_data: list of :class:`SummaryPercentileData ` + :param scenario_name: + :type scenario_name: str + :param test_name: + :type test_name: str + :param total_pages: + :type total_pages: int + """ + + _attribute_map = { + 'average_page_time': {'key': 'averagePageTime', 'type': 'float'}, + 'page_url': {'key': 'pageUrl', 'type': 'str'}, + 'percentage_pages_meeting_goal': {'key': 'percentagePagesMeetingGoal', 'type': 'int'}, + 'percentile_data': {'key': 'percentileData', 'type': '[SummaryPercentileData]'}, + 'scenario_name': {'key': 'scenarioName', 'type': 'str'}, + 'test_name': {'key': 'testName', 'type': 'str'}, + 'total_pages': {'key': 'totalPages', 'type': 'int'} + } + + def __init__(self, average_page_time=None, page_url=None, percentage_pages_meeting_goal=None, percentile_data=None, scenario_name=None, test_name=None, total_pages=None): + super(PageSummary, self).__init__() + self.average_page_time = average_page_time + self.page_url = page_url + self.percentage_pages_meeting_goal = percentage_pages_meeting_goal + self.percentile_data = percentile_data + self.scenario_name = scenario_name + self.test_name = test_name + self.total_pages = total_pages diff --git a/vsts/vsts/cloud_load_test/v4_1/models/request_summary.py b/vsts/vsts/cloud_load_test/v4_1/models/request_summary.py new file mode 100644 index 00000000..0edf9df2 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/request_summary.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 RequestSummary(Model): + """RequestSummary. + + :param average_response_time: + :type average_response_time: float + :param failed_requests: + :type failed_requests: int + :param passed_requests: + :type passed_requests: int + :param percentile_data: + :type percentile_data: list of :class:`SummaryPercentileData ` + :param requests_per_sec: + :type requests_per_sec: float + :param request_url: + :type request_url: str + :param scenario_name: + :type scenario_name: str + :param test_name: + :type test_name: str + :param total_requests: + :type total_requests: int + """ + + _attribute_map = { + 'average_response_time': {'key': 'averageResponseTime', 'type': 'float'}, + 'failed_requests': {'key': 'failedRequests', 'type': 'int'}, + 'passed_requests': {'key': 'passedRequests', 'type': 'int'}, + 'percentile_data': {'key': 'percentileData', 'type': '[SummaryPercentileData]'}, + 'requests_per_sec': {'key': 'requestsPerSec', 'type': 'float'}, + 'request_url': {'key': 'requestUrl', 'type': 'str'}, + 'scenario_name': {'key': 'scenarioName', 'type': 'str'}, + 'test_name': {'key': 'testName', 'type': 'str'}, + 'total_requests': {'key': 'totalRequests', 'type': 'int'} + } + + def __init__(self, average_response_time=None, failed_requests=None, passed_requests=None, percentile_data=None, requests_per_sec=None, request_url=None, scenario_name=None, test_name=None, total_requests=None): + super(RequestSummary, self).__init__() + self.average_response_time = average_response_time + self.failed_requests = failed_requests + self.passed_requests = passed_requests + self.percentile_data = percentile_data + self.requests_per_sec = requests_per_sec + self.request_url = request_url + self.scenario_name = scenario_name + self.test_name = test_name + self.total_requests = total_requests diff --git a/vsts/vsts/cloud_load_test/v4_1/models/scenario_summary.py b/vsts/vsts/cloud_load_test/v4_1/models/scenario_summary.py new file mode 100644 index 00000000..58498ac1 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/scenario_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 ScenarioSummary(Model): + """ScenarioSummary. + + :param max_user_load: + :type max_user_load: int + :param min_user_load: + :type min_user_load: int + :param scenario_name: + :type scenario_name: str + """ + + _attribute_map = { + 'max_user_load': {'key': 'maxUserLoad', 'type': 'int'}, + 'min_user_load': {'key': 'minUserLoad', 'type': 'int'}, + 'scenario_name': {'key': 'scenarioName', 'type': 'str'} + } + + def __init__(self, max_user_load=None, min_user_load=None, scenario_name=None): + super(ScenarioSummary, self).__init__() + self.max_user_load = max_user_load + self.min_user_load = min_user_load + self.scenario_name = scenario_name diff --git a/vsts/vsts/cloud_load_test/v4_1/models/static_agent_run_setting.py b/vsts/vsts/cloud_load_test/v4_1/models/static_agent_run_setting.py new file mode 100644 index 00000000..79d478be --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/static_agent_run_setting.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StaticAgentRunSetting(Model): + """StaticAgentRunSetting. + + :param load_generator_machines_type: + :type load_generator_machines_type: object + :param static_agent_group_name: + :type static_agent_group_name: str + """ + + _attribute_map = { + 'load_generator_machines_type': {'key': 'loadGeneratorMachinesType', 'type': 'object'}, + 'static_agent_group_name': {'key': 'staticAgentGroupName', 'type': 'str'} + } + + def __init__(self, load_generator_machines_type=None, static_agent_group_name=None): + super(StaticAgentRunSetting, self).__init__() + self.load_generator_machines_type = load_generator_machines_type + self.static_agent_group_name = static_agent_group_name diff --git a/vsts/vsts/cloud_load_test/v4_1/models/sub_type.py b/vsts/vsts/cloud_load_test/v4_1/models/sub_type.py new file mode 100644 index 00000000..f20c5644 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/sub_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 SubType(Model): + """SubType. + + :param count: + :type count: int + :param error_detail_list: + :type error_detail_list: list of :class:`ErrorDetails ` + :param occurrences: + :type occurrences: int + :param sub_type_name: + :type sub_type_name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'error_detail_list': {'key': 'errorDetailList', 'type': '[ErrorDetails]'}, + 'occurrences': {'key': 'occurrences', 'type': 'int'}, + 'sub_type_name': {'key': 'subTypeName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, count=None, error_detail_list=None, occurrences=None, sub_type_name=None, url=None): + super(SubType, self).__init__() + self.count = count + self.error_detail_list = error_detail_list + self.occurrences = occurrences + self.sub_type_name = sub_type_name + self.url = url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/summary_percentile_data.py b/vsts/vsts/cloud_load_test/v4_1/models/summary_percentile_data.py new file mode 100644 index 00000000..f6d608ea --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/summary_percentile_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 SummaryPercentileData(Model): + """SummaryPercentileData. + + :param percentile: + :type percentile: int + :param percentile_value: + :type percentile_value: float + """ + + _attribute_map = { + 'percentile': {'key': 'percentile', 'type': 'int'}, + 'percentile_value': {'key': 'percentileValue', 'type': 'float'} + } + + def __init__(self, percentile=None, percentile_value=None): + super(SummaryPercentileData, self).__init__() + self.percentile = percentile + self.percentile_value = percentile_value diff --git a/vsts/vsts/cloud_load_test/v4_1/models/tenant_details.py b/vsts/vsts/cloud_load_test/v4_1/models/tenant_details.py new file mode 100644 index 00000000..8dd29b9c --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/tenant_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 TenantDetails(Model): + """TenantDetails. + + :param access_details: + :type access_details: list of :class:`AgentGroupAccessData ` + :param id: + :type id: str + :param static_machines: + :type static_machines: list of :class:`WebApiTestMachine ` + :param user_load_agent_input: + :type user_load_agent_input: :class:`WebApiUserLoadTestMachineInput ` + :param user_load_agent_resources_uri: + :type user_load_agent_resources_uri: str + :param valid_geo_locations: + :type valid_geo_locations: list of str + """ + + _attribute_map = { + 'access_details': {'key': 'accessDetails', 'type': '[AgentGroupAccessData]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'static_machines': {'key': 'staticMachines', 'type': '[WebApiTestMachine]'}, + 'user_load_agent_input': {'key': 'userLoadAgentInput', 'type': 'WebApiUserLoadTestMachineInput'}, + 'user_load_agent_resources_uri': {'key': 'userLoadAgentResourcesUri', 'type': 'str'}, + 'valid_geo_locations': {'key': 'validGeoLocations', 'type': '[str]'} + } + + def __init__(self, access_details=None, id=None, static_machines=None, user_load_agent_input=None, user_load_agent_resources_uri=None, valid_geo_locations=None): + super(TenantDetails, self).__init__() + self.access_details = access_details + self.id = id + self.static_machines = static_machines + self.user_load_agent_input = user_load_agent_input + self.user_load_agent_resources_uri = user_load_agent_resources_uri + self.valid_geo_locations = valid_geo_locations diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_definition.py b/vsts/vsts/cloud_load_test/v4_1/models/test_definition.py new file mode 100644 index 00000000..07784e8e --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_definition.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 .test_definition_basic import TestDefinitionBasic + + +class TestDefinition(TestDefinitionBasic): + """TestDefinition. + + :param access_data: + :type access_data: :class:`DropAccessData ` + :param created_by: + :type created_by: IdentityRef + :param created_date: + :type created_date: datetime + :param id: + :type id: str + :param last_modified_by: + :type last_modified_by: IdentityRef + :param last_modified_date: + :type last_modified_date: datetime + :param load_test_type: + :type load_test_type: object + :param name: + :type name: str + :param description: + :type description: str + :param load_generation_geo_locations: + :type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation ` + :param load_test_definition_source: + :type load_test_definition_source: str + :param run_settings: + :type run_settings: :class:`LoadTestRunSettings ` + :param static_agent_run_settings: + :type static_agent_run_settings: :class:`StaticAgentRunSetting ` + :param test_details: + :type test_details: :class:`LoadTest ` + """ + + _attribute_map = { + 'access_data': {'key': 'accessData', 'type': 'DropAccessData'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'last_modified_date': {'key': 'lastModifiedDate', 'type': 'iso-8601'}, + 'load_test_type': {'key': 'loadTestType', 'type': 'object'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'load_generation_geo_locations': {'key': 'loadGenerationGeoLocations', 'type': '[LoadGenerationGeoLocation]'}, + 'load_test_definition_source': {'key': 'loadTestDefinitionSource', 'type': 'str'}, + 'run_settings': {'key': 'runSettings', 'type': 'LoadTestRunSettings'}, + 'static_agent_run_settings': {'key': 'staticAgentRunSettings', 'type': 'StaticAgentRunSetting'}, + 'test_details': {'key': 'testDetails', 'type': 'LoadTest'} + } + + def __init__(self, access_data=None, created_by=None, created_date=None, id=None, last_modified_by=None, last_modified_date=None, load_test_type=None, name=None, description=None, load_generation_geo_locations=None, load_test_definition_source=None, run_settings=None, static_agent_run_settings=None, test_details=None): + super(TestDefinition, self).__init__(access_data=access_data, created_by=created_by, created_date=created_date, id=id, last_modified_by=last_modified_by, last_modified_date=last_modified_date, load_test_type=load_test_type, name=name) + self.description = description + self.load_generation_geo_locations = load_generation_geo_locations + self.load_test_definition_source = load_test_definition_source + self.run_settings = run_settings + self.static_agent_run_settings = static_agent_run_settings + self.test_details = test_details diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_definition_basic.py b/vsts/vsts/cloud_load_test/v4_1/models/test_definition_basic.py new file mode 100644 index 00000000..d97a4ff6 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_definition_basic.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 TestDefinitionBasic(Model): + """TestDefinitionBasic. + + :param access_data: + :type access_data: :class:`DropAccessData ` + :param created_by: + :type created_by: IdentityRef + :param created_date: + :type created_date: datetime + :param id: + :type id: str + :param last_modified_by: + :type last_modified_by: IdentityRef + :param last_modified_date: + :type last_modified_date: datetime + :param load_test_type: + :type load_test_type: object + :param name: + :type name: str + """ + + _attribute_map = { + 'access_data': {'key': 'accessData', 'type': 'DropAccessData'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'IdentityRef'}, + 'last_modified_date': {'key': 'lastModifiedDate', 'type': 'iso-8601'}, + 'load_test_type': {'key': 'loadTestType', 'type': 'object'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, access_data=None, created_by=None, created_date=None, id=None, last_modified_by=None, last_modified_date=None, load_test_type=None, name=None): + super(TestDefinitionBasic, self).__init__() + self.access_data = access_data + self.created_by = created_by + self.created_date = created_date + self.id = id + self.last_modified_by = last_modified_by + self.last_modified_date = last_modified_date + self.load_test_type = load_test_type + self.name = name diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_drop.py b/vsts/vsts/cloud_load_test/v4_1/models/test_drop.py new file mode 100644 index 00000000..62814e7b --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_drop.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 TestDrop(Model): + """TestDrop. + + :param access_data: + :type access_data: :class:`DropAccessData ` + :param created_date: + :type created_date: datetime + :param drop_type: + :type drop_type: str + :param id: + :type id: str + :param load_test_definition: + :type load_test_definition: :class:`LoadTestDefinition ` + :param test_run_id: + :type test_run_id: str + """ + + _attribute_map = { + 'access_data': {'key': 'accessData', 'type': 'DropAccessData'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'drop_type': {'key': 'dropType', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'load_test_definition': {'key': 'loadTestDefinition', 'type': 'LoadTestDefinition'}, + 'test_run_id': {'key': 'testRunId', 'type': 'str'} + } + + def __init__(self, access_data=None, created_date=None, drop_type=None, id=None, load_test_definition=None, test_run_id=None): + super(TestDrop, self).__init__() + self.access_data = access_data + self.created_date = created_date + self.drop_type = drop_type + self.id = id + self.load_test_definition = load_test_definition + self.test_run_id = test_run_id diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_drop_ref.py b/vsts/vsts/cloud_load_test/v4_1/models/test_drop_ref.py new file mode 100644 index 00000000..840bd63c --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_drop_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 TestDropRef(Model): + """TestDropRef. + + :param id: + :type id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, url=None): + super(TestDropRef, self).__init__() + self.id = id + self.url = url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_results.py b/vsts/vsts/cloud_load_test/v4_1/models/test_results.py new file mode 100644 index 00000000..dad7cf85 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_results.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 TestResults(Model): + """TestResults. + + :param cloud_load_test_solution_url: + :type cloud_load_test_solution_url: str + :param counter_groups: + :type counter_groups: list of :class:`CounterGroup ` + :param diagnostics: + :type diagnostics: :class:`Diagnostics ` + :param results_url: + :type results_url: str + """ + + _attribute_map = { + 'cloud_load_test_solution_url': {'key': 'cloudLoadTestSolutionUrl', 'type': 'str'}, + 'counter_groups': {'key': 'counterGroups', 'type': '[CounterGroup]'}, + 'diagnostics': {'key': 'diagnostics', 'type': 'Diagnostics'}, + 'results_url': {'key': 'resultsUrl', 'type': 'str'} + } + + def __init__(self, cloud_load_test_solution_url=None, counter_groups=None, diagnostics=None, results_url=None): + super(TestResults, self).__init__() + self.cloud_load_test_solution_url = cloud_load_test_solution_url + self.counter_groups = counter_groups + self.diagnostics = diagnostics + self.results_url = results_url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_results_summary.py b/vsts/vsts/cloud_load_test/v4_1/models/test_results_summary.py new file mode 100644 index 00000000..45870f1c --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_results_summary.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 TestResultsSummary(Model): + """TestResultsSummary. + + :param overall_page_summary: + :type overall_page_summary: :class:`PageSummary ` + :param overall_request_summary: + :type overall_request_summary: :class:`RequestSummary ` + :param overall_scenario_summary: + :type overall_scenario_summary: :class:`ScenarioSummary ` + :param overall_test_summary: + :type overall_test_summary: :class:`TestSummary ` + :param overall_transaction_summary: + :type overall_transaction_summary: :class:`TransactionSummary ` + :param top_slow_pages: + :type top_slow_pages: list of :class:`PageSummary ` + :param top_slow_requests: + :type top_slow_requests: list of :class:`RequestSummary ` + :param top_slow_tests: + :type top_slow_tests: list of :class:`TestSummary ` + :param top_slow_transactions: + :type top_slow_transactions: list of :class:`TransactionSummary ` + """ + + _attribute_map = { + 'overall_page_summary': {'key': 'overallPageSummary', 'type': 'PageSummary'}, + 'overall_request_summary': {'key': 'overallRequestSummary', 'type': 'RequestSummary'}, + 'overall_scenario_summary': {'key': 'overallScenarioSummary', 'type': 'ScenarioSummary'}, + 'overall_test_summary': {'key': 'overallTestSummary', 'type': 'TestSummary'}, + 'overall_transaction_summary': {'key': 'overallTransactionSummary', 'type': 'TransactionSummary'}, + 'top_slow_pages': {'key': 'topSlowPages', 'type': '[PageSummary]'}, + 'top_slow_requests': {'key': 'topSlowRequests', 'type': '[RequestSummary]'}, + 'top_slow_tests': {'key': 'topSlowTests', 'type': '[TestSummary]'}, + 'top_slow_transactions': {'key': 'topSlowTransactions', 'type': '[TransactionSummary]'} + } + + def __init__(self, overall_page_summary=None, overall_request_summary=None, overall_scenario_summary=None, overall_test_summary=None, overall_transaction_summary=None, top_slow_pages=None, top_slow_requests=None, top_slow_tests=None, top_slow_transactions=None): + super(TestResultsSummary, self).__init__() + self.overall_page_summary = overall_page_summary + self.overall_request_summary = overall_request_summary + self.overall_scenario_summary = overall_scenario_summary + self.overall_test_summary = overall_test_summary + self.overall_transaction_summary = overall_transaction_summary + self.top_slow_pages = top_slow_pages + self.top_slow_requests = top_slow_requests + self.top_slow_tests = top_slow_tests + self.top_slow_transactions = top_slow_transactions diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_run.py b/vsts/vsts/cloud_load_test/v4_1/models/test_run.py new file mode 100644 index 00000000..7cddf936 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_run.py @@ -0,0 +1,146 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project 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_run_basic import TestRunBasic + + +class TestRun(TestRunBasic): + """TestRun. + + :param created_by: + :type created_by: IdentityRef + :param created_date: + :type created_date: datetime + :param deleted_by: + :type deleted_by: IdentityRef + :param deleted_date: + :type deleted_date: datetime + :param finished_date: + :type finished_date: datetime + :param id: + :type id: str + :param load_generation_geo_locations: + :type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation ` + :param load_test_file_name: + :type load_test_file_name: str + :param name: + :type name: str + :param run_number: + :type run_number: int + :param run_source: + :type run_source: str + :param run_specific_details: + :type run_specific_details: :class:`LoadTestRunDetails ` + :param run_type: + :type run_type: object + :param state: + :type state: object + :param url: + :type url: str + :param abort_message: + :type abort_message: :class:`TestRunAbortMessage ` + :param aut_initialization_error: + :type aut_initialization_error: bool + :param chargeable: + :type chargeable: bool + :param charged_vUserminutes: + :type charged_vUserminutes: int + :param description: + :type description: str + :param execution_finished_date: + :type execution_finished_date: datetime + :param execution_started_date: + :type execution_started_date: datetime + :param queued_date: + :type queued_date: datetime + :param retention_state: + :type retention_state: object + :param run_source_identifier: + :type run_source_identifier: str + :param run_source_url: + :type run_source_url: str + :param started_by: + :type started_by: IdentityRef + :param started_date: + :type started_date: datetime + :param stopped_by: + :type stopped_by: IdentityRef + :param sub_state: + :type sub_state: object + :param supersede_run_settings: + :type supersede_run_settings: :class:`OverridableRunSettings ` + :param test_drop: + :type test_drop: :class:`TestDropRef ` + :param test_settings: + :type test_settings: :class:`TestSettings ` + :param warm_up_started_date: + :type warm_up_started_date: datetime + :param web_result_url: + :type web_result_url: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'deleted_by': {'key': 'deletedBy', 'type': 'IdentityRef'}, + 'deleted_date': {'key': 'deletedDate', 'type': 'iso-8601'}, + 'finished_date': {'key': 'finishedDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'load_generation_geo_locations': {'key': 'loadGenerationGeoLocations', 'type': '[LoadGenerationGeoLocation]'}, + 'load_test_file_name': {'key': 'loadTestFileName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'run_number': {'key': 'runNumber', 'type': 'int'}, + 'run_source': {'key': 'runSource', 'type': 'str'}, + 'run_specific_details': {'key': 'runSpecificDetails', 'type': 'LoadTestRunDetails'}, + 'run_type': {'key': 'runType', 'type': 'object'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'}, + 'abort_message': {'key': 'abortMessage', 'type': 'TestRunAbortMessage'}, + 'aut_initialization_error': {'key': 'autInitializationError', 'type': 'bool'}, + 'chargeable': {'key': 'chargeable', 'type': 'bool'}, + 'charged_vUserminutes': {'key': 'chargedVUserminutes', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + 'execution_finished_date': {'key': 'executionFinishedDate', 'type': 'iso-8601'}, + 'execution_started_date': {'key': 'executionStartedDate', 'type': 'iso-8601'}, + 'queued_date': {'key': 'queuedDate', 'type': 'iso-8601'}, + 'retention_state': {'key': 'retentionState', 'type': 'object'}, + 'run_source_identifier': {'key': 'runSourceIdentifier', 'type': 'str'}, + 'run_source_url': {'key': 'runSourceUrl', 'type': 'str'}, + 'started_by': {'key': 'startedBy', 'type': 'IdentityRef'}, + 'started_date': {'key': 'startedDate', 'type': 'iso-8601'}, + 'stopped_by': {'key': 'stoppedBy', 'type': 'IdentityRef'}, + 'sub_state': {'key': 'subState', 'type': 'object'}, + 'supersede_run_settings': {'key': 'supersedeRunSettings', 'type': 'OverridableRunSettings'}, + 'test_drop': {'key': 'testDrop', 'type': 'TestDropRef'}, + 'test_settings': {'key': 'testSettings', 'type': 'TestSettings'}, + 'warm_up_started_date': {'key': 'warmUpStartedDate', 'type': 'iso-8601'}, + 'web_result_url': {'key': 'webResultUrl', 'type': 'str'} + } + + def __init__(self, created_by=None, created_date=None, deleted_by=None, deleted_date=None, finished_date=None, id=None, load_generation_geo_locations=None, load_test_file_name=None, name=None, run_number=None, run_source=None, run_specific_details=None, run_type=None, state=None, url=None, abort_message=None, aut_initialization_error=None, chargeable=None, charged_vUserminutes=None, description=None, execution_finished_date=None, execution_started_date=None, queued_date=None, retention_state=None, run_source_identifier=None, run_source_url=None, started_by=None, started_date=None, stopped_by=None, sub_state=None, supersede_run_settings=None, test_drop=None, test_settings=None, warm_up_started_date=None, web_result_url=None): + super(TestRun, self).__init__(created_by=created_by, created_date=created_date, deleted_by=deleted_by, deleted_date=deleted_date, finished_date=finished_date, id=id, load_generation_geo_locations=load_generation_geo_locations, load_test_file_name=load_test_file_name, name=name, run_number=run_number, run_source=run_source, run_specific_details=run_specific_details, run_type=run_type, state=state, url=url) + self.abort_message = abort_message + self.aut_initialization_error = aut_initialization_error + self.chargeable = chargeable + self.charged_vUserminutes = charged_vUserminutes + self.description = description + self.execution_finished_date = execution_finished_date + self.execution_started_date = execution_started_date + self.queued_date = queued_date + self.retention_state = retention_state + self.run_source_identifier = run_source_identifier + self.run_source_url = run_source_url + self.started_by = started_by + self.started_date = started_date + self.stopped_by = stopped_by + self.sub_state = sub_state + self.supersede_run_settings = supersede_run_settings + self.test_drop = test_drop + self.test_settings = test_settings + self.warm_up_started_date = warm_up_started_date + self.web_result_url = web_result_url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_run_abort_message.py b/vsts/vsts/cloud_load_test/v4_1/models/test_run_abort_message.py new file mode 100644 index 00000000..53ceafbc --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_run_abort_message.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 TestRunAbortMessage(Model): + """TestRunAbortMessage. + + :param action: + :type action: str + :param cause: + :type cause: str + :param details: + :type details: list of str + :param logged_date: + :type logged_date: datetime + :param source: + :type source: str + """ + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'cause': {'key': 'cause', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[str]'}, + 'logged_date': {'key': 'loggedDate', 'type': 'iso-8601'}, + 'source': {'key': 'source', 'type': 'str'} + } + + def __init__(self, action=None, cause=None, details=None, logged_date=None, source=None): + super(TestRunAbortMessage, self).__init__() + self.action = action + self.cause = cause + self.details = details + self.logged_date = logged_date + self.source = source diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_run_basic.py b/vsts/vsts/cloud_load_test/v4_1/models/test_run_basic.py new file mode 100644 index 00000000..6e573a51 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_run_basic.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 TestRunBasic(Model): + """TestRunBasic. + + :param created_by: + :type created_by: IdentityRef + :param created_date: + :type created_date: datetime + :param deleted_by: + :type deleted_by: IdentityRef + :param deleted_date: + :type deleted_date: datetime + :param finished_date: + :type finished_date: datetime + :param id: + :type id: str + :param load_generation_geo_locations: + :type load_generation_geo_locations: list of :class:`LoadGenerationGeoLocation ` + :param load_test_file_name: + :type load_test_file_name: str + :param name: + :type name: str + :param run_number: + :type run_number: int + :param run_source: + :type run_source: str + :param run_specific_details: + :type run_specific_details: :class:`LoadTestRunDetails ` + :param run_type: + :type run_type: object + :param state: + :type state: object + :param url: + :type url: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'deleted_by': {'key': 'deletedBy', 'type': 'IdentityRef'}, + 'deleted_date': {'key': 'deletedDate', 'type': 'iso-8601'}, + 'finished_date': {'key': 'finishedDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'load_generation_geo_locations': {'key': 'loadGenerationGeoLocations', 'type': '[LoadGenerationGeoLocation]'}, + 'load_test_file_name': {'key': 'loadTestFileName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'run_number': {'key': 'runNumber', 'type': 'int'}, + 'run_source': {'key': 'runSource', 'type': 'str'}, + 'run_specific_details': {'key': 'runSpecificDetails', 'type': 'LoadTestRunDetails'}, + 'run_type': {'key': 'runType', 'type': 'object'}, + 'state': {'key': 'state', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, created_by=None, created_date=None, deleted_by=None, deleted_date=None, finished_date=None, id=None, load_generation_geo_locations=None, load_test_file_name=None, name=None, run_number=None, run_source=None, run_specific_details=None, run_type=None, state=None, url=None): + super(TestRunBasic, self).__init__() + self.created_by = created_by + self.created_date = created_date + self.deleted_by = deleted_by + self.deleted_date = deleted_date + self.finished_date = finished_date + self.id = id + self.load_generation_geo_locations = load_generation_geo_locations + self.load_test_file_name = load_test_file_name + self.name = name + self.run_number = run_number + self.run_source = run_source + self.run_specific_details = run_specific_details + self.run_type = run_type + self.state = state + self.url = url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_run_counter_instance.py b/vsts/vsts/cloud_load_test/v4_1/models/test_run_counter_instance.py new file mode 100644 index 00000000..0e6e0514 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_run_counter_instance.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 TestRunCounterInstance(Model): + """TestRunCounterInstance. + + :param category_name: + :type category_name: str + :param counter_instance_id: + :type counter_instance_id: str + :param counter_name: + :type counter_name: str + :param counter_units: + :type counter_units: str + :param instance_name: + :type instance_name: str + :param is_preselected_counter: + :type is_preselected_counter: bool + :param machine_name: + :type machine_name: str + :param part_of_counter_groups: + :type part_of_counter_groups: list of str + :param summary_data: + :type summary_data: :class:`WebInstanceSummaryData ` + :param unique_name: + :type unique_name: str + """ + + _attribute_map = { + 'category_name': {'key': 'categoryName', 'type': 'str'}, + 'counter_instance_id': {'key': 'counterInstanceId', 'type': 'str'}, + 'counter_name': {'key': 'counterName', 'type': 'str'}, + 'counter_units': {'key': 'counterUnits', 'type': 'str'}, + 'instance_name': {'key': 'instanceName', 'type': 'str'}, + 'is_preselected_counter': {'key': 'isPreselectedCounter', 'type': 'bool'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'part_of_counter_groups': {'key': 'partOfCounterGroups', 'type': '[str]'}, + 'summary_data': {'key': 'summaryData', 'type': 'WebInstanceSummaryData'}, + 'unique_name': {'key': 'uniqueName', 'type': 'str'} + } + + def __init__(self, category_name=None, counter_instance_id=None, counter_name=None, counter_units=None, instance_name=None, is_preselected_counter=None, machine_name=None, part_of_counter_groups=None, summary_data=None, unique_name=None): + super(TestRunCounterInstance, self).__init__() + self.category_name = category_name + self.counter_instance_id = counter_instance_id + self.counter_name = counter_name + self.counter_units = counter_units + self.instance_name = instance_name + self.is_preselected_counter = is_preselected_counter + self.machine_name = machine_name + self.part_of_counter_groups = part_of_counter_groups + self.summary_data = summary_data + self.unique_name = unique_name diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_run_message.py b/vsts/vsts/cloud_load_test/v4_1/models/test_run_message.py new file mode 100644 index 00000000..ea712bf1 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_run_message.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 TestRunMessage(Model): + """TestRunMessage. + + :param agent_id: + :type agent_id: str + :param error_code: + :type error_code: str + :param logged_date: + :type logged_date: datetime + :param message: + :type message: str + :param message_id: + :type message_id: str + :param message_source: + :type message_source: object + :param message_type: + :type message_type: object + :param test_run_id: + :type test_run_id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'agent_id': {'key': 'agentId', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'logged_date': {'key': 'loggedDate', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'message_id': {'key': 'messageId', 'type': 'str'}, + 'message_source': {'key': 'messageSource', 'type': 'object'}, + 'message_type': {'key': 'messageType', 'type': 'object'}, + 'test_run_id': {'key': 'testRunId', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, agent_id=None, error_code=None, logged_date=None, message=None, message_id=None, message_source=None, message_type=None, test_run_id=None, url=None): + super(TestRunMessage, self).__init__() + self.agent_id = agent_id + self.error_code = error_code + self.logged_date = logged_date + self.message = message + self.message_id = message_id + self.message_source = message_source + self.message_type = message_type + self.test_run_id = test_run_id + self.url = url diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_settings.py b/vsts/vsts/cloud_load_test/v4_1/models/test_settings.py new file mode 100644 index 00000000..85fc8037 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_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 TestSettings(Model): + """TestSettings. + + :param cleanup_command: + :type cleanup_command: str + :param host_process_platform: + :type host_process_platform: object + :param setup_command: + :type setup_command: str + """ + + _attribute_map = { + 'cleanup_command': {'key': 'cleanupCommand', 'type': 'str'}, + 'host_process_platform': {'key': 'hostProcessPlatform', 'type': 'object'}, + 'setup_command': {'key': 'setupCommand', 'type': 'str'} + } + + def __init__(self, cleanup_command=None, host_process_platform=None, setup_command=None): + super(TestSettings, self).__init__() + self.cleanup_command = cleanup_command + self.host_process_platform = host_process_platform + self.setup_command = setup_command diff --git a/vsts/vsts/cloud_load_test/v4_1/models/test_summary.py b/vsts/vsts/cloud_load_test/v4_1/models/test_summary.py new file mode 100644 index 00000000..5ff1ef55 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/test_summary.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 TestSummary(Model): + """TestSummary. + + :param average_test_time: + :type average_test_time: float + :param failed_tests: + :type failed_tests: int + :param passed_tests: + :type passed_tests: int + :param percentile_data: + :type percentile_data: list of :class:`SummaryPercentileData ` + :param scenario_name: + :type scenario_name: str + :param test_name: + :type test_name: str + :param total_tests: + :type total_tests: int + """ + + _attribute_map = { + 'average_test_time': {'key': 'averageTestTime', 'type': 'float'}, + 'failed_tests': {'key': 'failedTests', 'type': 'int'}, + 'passed_tests': {'key': 'passedTests', 'type': 'int'}, + 'percentile_data': {'key': 'percentileData', 'type': '[SummaryPercentileData]'}, + 'scenario_name': {'key': 'scenarioName', 'type': 'str'}, + 'test_name': {'key': 'testName', 'type': 'str'}, + 'total_tests': {'key': 'totalTests', 'type': 'int'} + } + + def __init__(self, average_test_time=None, failed_tests=None, passed_tests=None, percentile_data=None, scenario_name=None, test_name=None, total_tests=None): + super(TestSummary, self).__init__() + self.average_test_time = average_test_time + self.failed_tests = failed_tests + self.passed_tests = passed_tests + self.percentile_data = percentile_data + self.scenario_name = scenario_name + self.test_name = test_name + self.total_tests = total_tests diff --git a/vsts/vsts/cloud_load_test/v4_1/models/transaction_summary.py b/vsts/vsts/cloud_load_test/v4_1/models/transaction_summary.py new file mode 100644 index 00000000..efe417be --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/transaction_summary.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 TransactionSummary(Model): + """TransactionSummary. + + :param average_response_time: + :type average_response_time: float + :param average_transaction_time: + :type average_transaction_time: float + :param percentile_data: + :type percentile_data: list of :class:`SummaryPercentileData ` + :param scenario_name: + :type scenario_name: str + :param test_name: + :type test_name: str + :param total_transactions: + :type total_transactions: int + :param transaction_name: + :type transaction_name: str + """ + + _attribute_map = { + 'average_response_time': {'key': 'averageResponseTime', 'type': 'float'}, + 'average_transaction_time': {'key': 'averageTransactionTime', 'type': 'float'}, + 'percentile_data': {'key': 'percentileData', 'type': '[SummaryPercentileData]'}, + 'scenario_name': {'key': 'scenarioName', 'type': 'str'}, + 'test_name': {'key': 'testName', 'type': 'str'}, + 'total_transactions': {'key': 'totalTransactions', 'type': 'int'}, + 'transaction_name': {'key': 'transactionName', 'type': 'str'} + } + + def __init__(self, average_response_time=None, average_transaction_time=None, percentile_data=None, scenario_name=None, test_name=None, total_transactions=None, transaction_name=None): + super(TransactionSummary, self).__init__() + self.average_response_time = average_response_time + self.average_transaction_time = average_transaction_time + self.percentile_data = percentile_data + self.scenario_name = scenario_name + self.test_name = test_name + self.total_transactions = total_transactions + self.transaction_name = transaction_name diff --git a/vsts/vsts/cloud_load_test/v4_1/models/web_api_load_test_machine_input.py b/vsts/vsts/cloud_load_test/v4_1/models/web_api_load_test_machine_input.py new file mode 100644 index 00000000..50e8c6fe --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/web_api_load_test_machine_input.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 WebApiLoadTestMachineInput(Model): + """WebApiLoadTestMachineInput. + + :param machine_group_id: + :type machine_group_id: str + :param machine_type: + :type machine_type: object + :param setup_configuration: + :type setup_configuration: :class:`WebApiSetupParamaters ` + :param supported_run_types: + :type supported_run_types: list of TestRunType + """ + + _attribute_map = { + 'machine_group_id': {'key': 'machineGroupId', 'type': 'str'}, + 'machine_type': {'key': 'machineType', 'type': 'object'}, + 'setup_configuration': {'key': 'setupConfiguration', 'type': 'WebApiSetupParamaters'}, + 'supported_run_types': {'key': 'supportedRunTypes', 'type': '[TestRunType]'} + } + + def __init__(self, machine_group_id=None, machine_type=None, setup_configuration=None, supported_run_types=None): + super(WebApiLoadTestMachineInput, self).__init__() + self.machine_group_id = machine_group_id + self.machine_type = machine_type + self.setup_configuration = setup_configuration + self.supported_run_types = supported_run_types diff --git a/vsts/vsts/cloud_load_test/v4_1/models/web_api_setup_paramaters.py b/vsts/vsts/cloud_load_test/v4_1/models/web_api_setup_paramaters.py new file mode 100644 index 00000000..94cd5b4e --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/web_api_setup_paramaters.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 WebApiSetupParamaters(Model): + """WebApiSetupParamaters. + + :param configurations: + :type configurations: dict + """ + + _attribute_map = { + 'configurations': {'key': 'configurations', 'type': '{str}'} + } + + def __init__(self, configurations=None): + super(WebApiSetupParamaters, self).__init__() + self.configurations = configurations diff --git a/vsts/vsts/cloud_load_test/v4_1/models/web_api_test_machine.py b/vsts/vsts/cloud_load_test/v4_1/models/web_api_test_machine.py new file mode 100644 index 00000000..87058715 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/web_api_test_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 WebApiTestMachine(Model): + """WebApiTestMachine. + + :param last_heart_beat: + :type last_heart_beat: datetime + :param machine_name: + :type machine_name: str + :param status: + :type status: str + """ + + _attribute_map = { + 'last_heart_beat': {'key': 'lastHeartBeat', 'type': 'iso-8601'}, + 'machine_name': {'key': 'machineName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'} + } + + def __init__(self, last_heart_beat=None, machine_name=None, status=None): + super(WebApiTestMachine, self).__init__() + self.last_heart_beat = last_heart_beat + self.machine_name = machine_name + self.status = status diff --git a/vsts/vsts/cloud_load_test/v4_1/models/web_api_user_load_test_machine_input.py b/vsts/vsts/cloud_load_test/v4_1/models/web_api_user_load_test_machine_input.py new file mode 100644 index 00000000..84bb1cf6 --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/web_api_user_load_test_machine_input.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 .web_api_load_test_machine_input import WebApiLoadTestMachineInput + + +class WebApiUserLoadTestMachineInput(WebApiLoadTestMachineInput): + """WebApiUserLoadTestMachineInput. + + :param machine_group_id: + :type machine_group_id: str + :param machine_type: + :type machine_type: object + :param setup_configuration: + :type setup_configuration: :class:`WebApiSetupParamaters ` + :param supported_run_types: + :type supported_run_types: list of TestRunType + :param agent_group_name: + :type agent_group_name: str + :param tenant_id: + :type tenant_id: str + :param user_load_agent_resources_uri: + :type user_load_agent_resources_uri: str + :param vSTSAccount_uri: + :type vSTSAccount_uri: str + """ + + _attribute_map = { + 'machine_group_id': {'key': 'machineGroupId', 'type': 'str'}, + 'machine_type': {'key': 'machineType', 'type': 'object'}, + 'setup_configuration': {'key': 'setupConfiguration', 'type': 'WebApiSetupParamaters'}, + 'supported_run_types': {'key': 'supportedRunTypes', 'type': '[TestRunType]'}, + 'agent_group_name': {'key': 'agentGroupName', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'user_load_agent_resources_uri': {'key': 'userLoadAgentResourcesUri', 'type': 'str'}, + 'vSTSAccount_uri': {'key': 'vSTSAccountUri', 'type': 'str'} + } + + def __init__(self, machine_group_id=None, machine_type=None, setup_configuration=None, supported_run_types=None, agent_group_name=None, tenant_id=None, user_load_agent_resources_uri=None, vSTSAccount_uri=None): + super(WebApiUserLoadTestMachineInput, self).__init__(machine_group_id=machine_group_id, machine_type=machine_type, setup_configuration=setup_configuration, supported_run_types=supported_run_types) + self.agent_group_name = agent_group_name + self.tenant_id = tenant_id + self.user_load_agent_resources_uri = user_load_agent_resources_uri + self.vSTSAccount_uri = vSTSAccount_uri diff --git a/vsts/vsts/cloud_load_test/v4_1/models/web_instance_summary_data.py b/vsts/vsts/cloud_load_test/v4_1/models/web_instance_summary_data.py new file mode 100644 index 00000000..3381de2b --- /dev/null +++ b/vsts/vsts/cloud_load_test/v4_1/models/web_instance_summary_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 WebInstanceSummaryData(Model): + """WebInstanceSummaryData. + + :param average: + :type average: float + :param max: + :type max: float + :param min: + :type min: float + """ + + _attribute_map = { + 'average': {'key': 'average', 'type': 'float'}, + 'max': {'key': 'max', 'type': 'float'}, + 'min': {'key': 'min', 'type': 'float'} + } + + def __init__(self, average=None, max=None, min=None): + super(WebInstanceSummaryData, self).__init__() + self.average = average + self.max = max + self.min = min diff --git a/vsts/vsts/graph/__init__.py b/vsts/vsts/graph/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/graph/__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/graph/v4_1/__init__.py b/vsts/vsts/graph/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/graph/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/graph/v4_1/graph_client.py b/vsts/vsts/graph/v4_1/graph_client.py new file mode 100644 index 00000000..bb19ba48 --- /dev/null +++ b/vsts/vsts/graph/v4_1/graph_client.py @@ -0,0 +1,294 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 GraphClient(VssClient): + """Graph + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(GraphClient, 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_descriptor(self, storage_key): + """GetDescriptor. + [Preview API] Resolve a storage key to a descriptor + :param str storage_key: Storage key of the subject (user, group, scope, etc.) to resolve + :rtype: :class:` ` + """ + route_values = {} + if storage_key is not None: + route_values['storageKey'] = self._serialize.url('storage_key', storage_key, 'str') + response = self._send(http_method='GET', + location_id='048aee0a-7072-4cde-ab73-7af77b1e0b4e', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('GraphDescriptorResult', response) + + def create_group(self, creation_context, scope_descriptor=None, group_descriptors=None): + """CreateGroup. + [Preview API] Create a new VSTS group or materialize an existing AAD group. + :param :class:` ` creation_context: The subset of the full graph group used to uniquely find the graph subject in an external provider. + :param str scope_descriptor: A descriptor referencing the scope (collection, project) in which the group should be created. If omitted, will be created in the scope of the enclosing account or organization. Valid only for VSTS groups. + :param [str] group_descriptors: A comma separated list of descriptors referencing groups you want the graph group to join + :rtype: :class:` ` + """ + query_parameters = {} + if scope_descriptor is not None: + query_parameters['scopeDescriptor'] = self._serialize.query('scope_descriptor', scope_descriptor, 'str') + if group_descriptors is not None: + group_descriptors = ",".join(group_descriptors) + query_parameters['groupDescriptors'] = self._serialize.query('group_descriptors', group_descriptors, 'str') + content = self._serialize.body(creation_context, 'GraphGroupCreationContext') + response = self._send(http_method='POST', + location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', + version='4.1-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('GraphGroup', response) + + def delete_group(self, group_descriptor): + """DeleteGroup. + [Preview API] Removes a VSTS group from all of its parent groups. + :param str group_descriptor: The descriptor of the group to delete. + """ + route_values = {} + if group_descriptor is not None: + route_values['groupDescriptor'] = self._serialize.url('group_descriptor', group_descriptor, 'str') + self._send(http_method='DELETE', + location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', + version='4.1-preview.1', + route_values=route_values) + + def get_group(self, group_descriptor): + """GetGroup. + [Preview API] Get a group by its descriptor. + :param str group_descriptor: The descriptor of the desired graph group. + :rtype: :class:` ` + """ + route_values = {} + if group_descriptor is not None: + route_values['groupDescriptor'] = self._serialize.url('group_descriptor', group_descriptor, 'str') + response = self._send(http_method='GET', + location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('GraphGroup', response) + + def update_group(self, group_descriptor, patch_document): + """UpdateGroup. + [Preview API] Update the properties of a VSTS group. + :param str group_descriptor: The descriptor of the group to modify. + :param :class:`<[JsonPatchOperation]> ` patch_document: The JSON+Patch document containing the fields to alter. + :rtype: :class:` ` + """ + route_values = {} + if group_descriptor is not None: + route_values['groupDescriptor'] = self._serialize.url('group_descriptor', group_descriptor, 'str') + content = self._serialize.body(patch_document, '[JsonPatchOperation]') + response = self._send(http_method='PATCH', + location_id='ebbe6af8-0b91-4c13-8cf1-777c14858188', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/json-patch+json') + return self._deserialize('GraphGroup', response) + + def add_membership(self, subject_descriptor, container_descriptor): + """AddMembership. + [Preview API] Create a new membership between a container and subject. + :param str subject_descriptor: A descriptor to a group or user that can be the child subject in the relationship. + :param str container_descriptor: A descriptor to a group that can be the container in the relationship. + :rtype: :class:` ` + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + if container_descriptor is not None: + route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') + response = self._send(http_method='PUT', + location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('GraphMembership', response) + + def check_membership_existence(self, subject_descriptor, container_descriptor): + """CheckMembershipExistence. + [Preview API] Check to see if a membership relationship between a container and subject exists. + :param str subject_descriptor: The group or user that is a child subject of the relationship. + :param str container_descriptor: The group that is the container in the relationship. + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + if container_descriptor is not None: + route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') + self._send(http_method='HEAD', + location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', + version='4.1-preview.1', + route_values=route_values) + + def get_membership(self, subject_descriptor, container_descriptor): + """GetMembership. + [Preview API] Get a membership relationship between a container and subject. + :param str subject_descriptor: A descriptor to the child subject in the relationship. + :param str container_descriptor: A descriptor to the container in the relationship. + :rtype: :class:` ` + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + if container_descriptor is not None: + route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') + response = self._send(http_method='GET', + location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('GraphMembership', response) + + def remove_membership(self, subject_descriptor, container_descriptor): + """RemoveMembership. + [Preview API] Deletes a membership between a container and subject. + :param str subject_descriptor: A descriptor to a group or user that is the child subject in the relationship. + :param str container_descriptor: A descriptor to a group that is the container in the relationship. + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + if container_descriptor is not None: + route_values['containerDescriptor'] = self._serialize.url('container_descriptor', container_descriptor, 'str') + self._send(http_method='DELETE', + location_id='3fd2e6ca-fb30-443a-b579-95b19ed0934c', + version='4.1-preview.1', + route_values=route_values) + + def list_memberships(self, subject_descriptor, direction=None, depth=None): + """ListMemberships. + [Preview API] Get all the memberships where this descriptor is a member in the relationship. + :param str subject_descriptor: Fetch all direct memberships of this descriptor. + :param str direction: Defaults to Up. + :param int depth: The maximum number of edges to traverse up or down the membership tree. Currently the only supported value is '1'. + :rtype: [GraphMembership] + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + query_parameters = {} + if direction is not None: + query_parameters['direction'] = self._serialize.query('direction', direction, 'str') + if depth is not None: + query_parameters['depth'] = self._serialize.query('depth', depth, 'int') + response = self._send(http_method='GET', + location_id='e34b6394-6b30-4435-94a9-409a5eef3e31', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[GraphMembership]', response) + + def get_membership_state(self, subject_descriptor): + """GetMembershipState. + [Preview API] Check whether a subject is active or inactive. + :param str subject_descriptor: Descriptor of the subject (user, group, scope, etc.) to check state of + :rtype: :class:` ` + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + response = self._send(http_method='GET', + location_id='1ffe5c94-1144-4191-907b-d0211cad36a8', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('GraphMembershipState', response) + + def get_storage_key(self, subject_descriptor): + """GetStorageKey. + [Preview API] Resolve a descriptor to a storage key. + :param str subject_descriptor: + :rtype: :class:` ` + """ + route_values = {} + if subject_descriptor is not None: + route_values['subjectDescriptor'] = self._serialize.url('subject_descriptor', subject_descriptor, 'str') + response = self._send(http_method='GET', + location_id='eb85f8cc-f0f6-4264-a5b1-ffe2e4d4801f', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('GraphStorageKeyResult', response) + + def lookup_subjects(self, subject_lookup): + """LookupSubjects. + [Preview API] Resolve descriptors to users, groups or scopes (Subjects) in a batch. + :param :class:` ` subject_lookup: A list of descriptors that specifies a subset of subjects to retrieve. Each descriptor uniquely identifies the subject across all instance scopes, but only at a single point in time. + :rtype: {GraphSubject} + """ + content = self._serialize.body(subject_lookup, 'GraphSubjectLookup') + response = self._send(http_method='POST', + location_id='4dd4d168-11f2-48c4-83e8-756fa0de027c', + version='4.1-preview.1', + content=content, + returns_collection=True) + return self._deserialize('{GraphSubject}', response) + + def create_user(self, creation_context, group_descriptors=None): + """CreateUser. + [Preview API] Materialize an existing AAD or MSA user into the VSTS account. + :param :class:` ` creation_context: The subset of the full graph user used to uniquely find the graph subject in an external provider. + :param [str] group_descriptors: A comma separated list of descriptors of groups you want the graph user to join + :rtype: :class:` ` + """ + query_parameters = {} + if group_descriptors is not None: + group_descriptors = ",".join(group_descriptors) + query_parameters['groupDescriptors'] = self._serialize.query('group_descriptors', group_descriptors, 'str') + content = self._serialize.body(creation_context, 'GraphUserCreationContext') + response = self._send(http_method='POST', + location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', + version='4.1-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('GraphUser', response) + + def delete_user(self, user_descriptor): + """DeleteUser. + [Preview API] Disables a user. + :param str user_descriptor: The descriptor of the user to delete. + """ + route_values = {} + if user_descriptor is not None: + route_values['userDescriptor'] = self._serialize.url('user_descriptor', user_descriptor, 'str') + self._send(http_method='DELETE', + location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', + version='4.1-preview.1', + route_values=route_values) + + def get_user(self, user_descriptor): + """GetUser. + [Preview API] Get a user by its descriptor. + :param str user_descriptor: The descriptor of the desired user. + :rtype: :class:` ` + """ + route_values = {} + if user_descriptor is not None: + route_values['userDescriptor'] = self._serialize.url('user_descriptor', user_descriptor, 'str') + response = self._send(http_method='GET', + location_id='005e26ec-6b77-4e4f-a986-b3827bf241f5', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('GraphUser', response) + diff --git a/vsts/vsts/graph/v4_1/models/__init__.py b/vsts/vsts/graph/v4_1/models/__init__.py new file mode 100644 index 00000000..824cbcb1 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/__init__.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 .graph_cache_policies import GraphCachePolicies +from .graph_descriptor_result import GraphDescriptorResult +from .graph_global_extended_property_batch import GraphGlobalExtendedPropertyBatch +from .graph_group import GraphGroup +from .graph_group_creation_context import GraphGroupCreationContext +from .graph_member import GraphMember +from .graph_membership import GraphMembership +from .graph_membership_state import GraphMembershipState +from .graph_membership_traversal import GraphMembershipTraversal +from .graph_scope import GraphScope +from .graph_scope_creation_context import GraphScopeCreationContext +from .graph_storage_key_result import GraphStorageKeyResult +from .graph_subject import GraphSubject +from .graph_subject_base import GraphSubjectBase +from .graph_subject_lookup import GraphSubjectLookup +from .graph_subject_lookup_key import GraphSubjectLookupKey +from .graph_user import GraphUser +from .graph_user_creation_context import GraphUserCreationContext +from .identity_key_map import IdentityKeyMap +from .json_patch_operation import JsonPatchOperation +from .paged_graph_groups import PagedGraphGroups +from .paged_graph_users import PagedGraphUsers +from .reference_links import ReferenceLinks + +__all__ = [ + 'GraphCachePolicies', + 'GraphDescriptorResult', + 'GraphGlobalExtendedPropertyBatch', + 'GraphGroup', + 'GraphGroupCreationContext', + 'GraphMember', + 'GraphMembership', + 'GraphMembershipState', + 'GraphMembershipTraversal', + 'GraphScope', + 'GraphScopeCreationContext', + 'GraphStorageKeyResult', + 'GraphSubject', + 'GraphSubjectBase', + 'GraphSubjectLookup', + 'GraphSubjectLookupKey', + 'GraphUser', + 'GraphUserCreationContext', + 'IdentityKeyMap', + 'JsonPatchOperation', + 'PagedGraphGroups', + 'PagedGraphUsers', + 'ReferenceLinks', +] diff --git a/vsts/vsts/graph/v4_1/models/graph_cache_policies.py b/vsts/vsts/graph/v4_1/models/graph_cache_policies.py new file mode 100644 index 00000000..808f2d65 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_cache_policies.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 GraphCachePolicies(Model): + """GraphCachePolicies. + + :param cache_size: Size of the cache + :type cache_size: int + """ + + _attribute_map = { + 'cache_size': {'key': 'cacheSize', 'type': 'int'} + } + + def __init__(self, cache_size=None): + super(GraphCachePolicies, self).__init__() + self.cache_size = cache_size diff --git a/vsts/vsts/graph/v4_1/models/graph_descriptor_result.py b/vsts/vsts/graph/v4_1/models/graph_descriptor_result.py new file mode 100644 index 00000000..8b1c1830 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_descriptor_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 GraphDescriptorResult(Model): + """GraphDescriptorResult. + + :param _links: This field contains zero or more interesting links about the graph descriptor. These links may be invoked to obtain additional relationships or more detailed information about this graph descriptor. + :type _links: :class:`ReferenceLinks ` + :param value: + :type value: :class:`str ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, _links=None, value=None): + super(GraphDescriptorResult, self).__init__() + self._links = _links + self.value = value diff --git a/vsts/vsts/graph/v4_1/models/graph_global_extended_property_batch.py b/vsts/vsts/graph/v4_1/models/graph_global_extended_property_batch.py new file mode 100644 index 00000000..d1212778 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_global_extended_property_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 GraphGlobalExtendedPropertyBatch(Model): + """GraphGlobalExtendedPropertyBatch. + + :param property_name_filters: + :type property_name_filters: list of str + :param subject_descriptors: + :type subject_descriptors: list of :class:`str ` + """ + + _attribute_map = { + 'property_name_filters': {'key': 'propertyNameFilters', 'type': '[str]'}, + 'subject_descriptors': {'key': 'subjectDescriptors', 'type': '[str]'} + } + + def __init__(self, property_name_filters=None, subject_descriptors=None): + super(GraphGlobalExtendedPropertyBatch, self).__init__() + self.property_name_filters = property_name_filters + self.subject_descriptors = subject_descriptors diff --git a/vsts/vsts/graph/v4_1/models/graph_group.py b/vsts/vsts/graph/v4_1/models/graph_group.py new file mode 100644 index 00000000..c693a34a --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_group.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 .graph_member import GraphMember + + +class GraphGroup(GraphMember): + """GraphGroup. + + :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 legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param cuid: The Consistently Unique Identifier of the subject + :type cuid: str + :param domain: This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + :type domain: str + :param mail_address: The email address of record for a given graph member. This may be different than the principal name. + :type mail_address: str + :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + :type principal_name: str + :param description: A short phrase to help human readers disambiguate groups with similar names + :type description: str + :param is_cross_project: + :type is_cross_project: bool + :param is_deleted: + :type is_deleted: bool + :param is_global_scope: + :type is_global_scope: bool + :param is_restricted_visible: + :type is_restricted_visible: bool + :param local_scope_id: + :type local_scope_id: str + :param scope_id: + :type scope_id: str + :param scope_name: + :type scope_name: str + :param scope_type: + :type scope_type: str + :param securing_host_id: + :type securing_host_id: str + :param special_type: + :type special_type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'cuid': {'key': 'cuid', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'mail_address': {'key': 'mailAddress', 'type': 'str'}, + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'is_cross_project': {'key': 'isCrossProject', 'type': 'bool'}, + 'is_deleted': {'key': 'isDeleted', 'type': 'bool'}, + 'is_global_scope': {'key': 'isGlobalScope', 'type': 'bool'}, + 'is_restricted_visible': {'key': 'isRestrictedVisible', 'type': 'bool'}, + 'local_scope_id': {'key': 'localScopeId', 'type': 'str'}, + 'scope_id': {'key': 'scopeId', 'type': 'str'}, + 'scope_name': {'key': 'scopeName', 'type': 'str'}, + 'scope_type': {'key': 'scopeType', 'type': 'str'}, + 'securing_host_id': {'key': 'securingHostId', 'type': 'str'}, + 'special_type': {'key': 'specialType', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, cuid=None, domain=None, mail_address=None, principal_name=None, description=None, is_cross_project=None, is_deleted=None, is_global_scope=None, is_restricted_visible=None, local_scope_id=None, scope_id=None, scope_name=None, scope_type=None, securing_host_id=None, special_type=None): + super(GraphGroup, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, cuid=cuid, domain=domain, mail_address=mail_address, principal_name=principal_name) + self.description = description + self.is_cross_project = is_cross_project + self.is_deleted = is_deleted + self.is_global_scope = is_global_scope + self.is_restricted_visible = is_restricted_visible + self.local_scope_id = local_scope_id + self.scope_id = scope_id + self.scope_name = scope_name + self.scope_type = scope_type + self.securing_host_id = securing_host_id + self.special_type = special_type diff --git a/vsts/vsts/graph/v4_1/models/graph_group_creation_context.py b/vsts/vsts/graph/v4_1/models/graph_group_creation_context.py new file mode 100644 index 00000000..cc6599ae --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_group_creation_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 GraphGroupCreationContext(Model): + """GraphGroupCreationContext. + + :param storage_key: Optional: If provided, we will use this identifier for the storage key of the created group + :type storage_key: str + """ + + _attribute_map = { + 'storage_key': {'key': 'storageKey', 'type': 'str'} + } + + def __init__(self, storage_key=None): + super(GraphGroupCreationContext, self).__init__() + self.storage_key = storage_key diff --git a/vsts/vsts/graph/v4_1/models/graph_member.py b/vsts/vsts/graph/v4_1/models/graph_member.py new file mode 100644 index 00000000..9d1cbd65 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_member.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 .graph_subject import GraphSubject + + +class GraphMember(GraphSubject): + """GraphMember. + + :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 legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param cuid: The Consistently Unique Identifier of the subject + :type cuid: str + :param domain: This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + :type domain: str + :param mail_address: The email address of record for a given graph member. This may be different than the principal name. + :type mail_address: str + :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + :type principal_name: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'cuid': {'key': 'cuid', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'mail_address': {'key': 'mailAddress', 'type': 'str'}, + 'principal_name': {'key': 'principalName', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, cuid=None, domain=None, mail_address=None, principal_name=None): + super(GraphMember, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind) + self.cuid = cuid + self.domain = domain + self.mail_address = mail_address + self.principal_name = principal_name diff --git a/vsts/vsts/graph/v4_1/models/graph_membership.py b/vsts/vsts/graph/v4_1/models/graph_membership.py new file mode 100644 index 00000000..4b3568f0 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_membership.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 GraphMembership(Model): + """GraphMembership. + + :param _links: This field contains zero or more interesting links about the graph membership. These links may be invoked to obtain additional relationships or more detailed information about this graph membership. + :type _links: :class:`ReferenceLinks ` + :param container_descriptor: + :type container_descriptor: str + :param member_descriptor: + :type member_descriptor: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'container_descriptor': {'key': 'containerDescriptor', 'type': 'str'}, + 'member_descriptor': {'key': 'memberDescriptor', 'type': 'str'} + } + + def __init__(self, _links=None, container_descriptor=None, member_descriptor=None): + super(GraphMembership, self).__init__() + self._links = _links + self.container_descriptor = container_descriptor + self.member_descriptor = member_descriptor diff --git a/vsts/vsts/graph/v4_1/models/graph_membership_state.py b/vsts/vsts/graph/v4_1/models/graph_membership_state.py new file mode 100644 index 00000000..8f90aaf0 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_membership_state.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GraphMembershipState(Model): + """GraphMembershipState. + + :param _links: This field contains zero or more interesting links about the graph membership state. These links may be invoked to obtain additional relationships or more detailed information about this graph membership state. + :type _links: :class:`ReferenceLinks ` + :param active: + :type active: bool + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'active': {'key': 'active', 'type': 'bool'} + } + + def __init__(self, _links=None, active=None): + super(GraphMembershipState, self).__init__() + self._links = _links + self.active = active diff --git a/vsts/vsts/graph/v4_1/models/graph_membership_traversal.py b/vsts/vsts/graph/v4_1/models/graph_membership_traversal.py new file mode 100644 index 00000000..e92bf3a9 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_membership_traversal.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 GraphMembershipTraversal(Model): + """GraphMembershipTraversal. + + :param incompleteness_reason: Reason why the subject could not be traversed completely + :type incompleteness_reason: str + :param is_complete: When true, the subject is traversed completely + :type is_complete: bool + :param subject_descriptor: The traversed subject descriptor + :type subject_descriptor: :class:`str ` + :param traversed_subject_ids: Subject descriptor ids of the traversed members + :type traversed_subject_ids: list of str + :param traversed_subjects: Subject descriptors of the traversed members + :type traversed_subjects: list of :class:`str ` + """ + + _attribute_map = { + 'incompleteness_reason': {'key': 'incompletenessReason', 'type': 'str'}, + 'is_complete': {'key': 'isComplete', 'type': 'bool'}, + 'subject_descriptor': {'key': 'subjectDescriptor', 'type': 'str'}, + 'traversed_subject_ids': {'key': 'traversedSubjectIds', 'type': '[str]'}, + 'traversed_subjects': {'key': 'traversedSubjects', 'type': '[str]'} + } + + def __init__(self, incompleteness_reason=None, is_complete=None, subject_descriptor=None, traversed_subject_ids=None, traversed_subjects=None): + super(GraphMembershipTraversal, self).__init__() + self.incompleteness_reason = incompleteness_reason + self.is_complete = is_complete + self.subject_descriptor = subject_descriptor + self.traversed_subject_ids = traversed_subject_ids + self.traversed_subjects = traversed_subjects diff --git a/vsts/vsts/graph/v4_1/models/graph_scope.py b/vsts/vsts/graph/v4_1/models/graph_scope.py new file mode 100644 index 00000000..1944d6da --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_scope.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 import GraphSubject + + +class GraphScope(GraphSubject): + """GraphScope. + + :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 legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param administrator_descriptor: The subject descriptor that references the administrators group for this scope. Only members of this group can change the contents of this scope or assign other users permissions to access this scope. + :type administrator_descriptor: str + :param is_global: When true, this scope is also a securing host for one or more scopes. + :type is_global: bool + :param parent_descriptor: The subject descriptor for the closest account or organization in the ancestor tree of this scope. + :type parent_descriptor: str + :param scope_type: The type of this scope. Typically ServiceHost or TeamProject. + :type scope_type: object + :param securing_host_descriptor: The subject descriptor for the containing organization in the ancestor tree of this scope. + :type securing_host_descriptor: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'administrator_descriptor': {'key': 'administratorDescriptor', 'type': 'str'}, + 'is_global': {'key': 'isGlobal', 'type': 'bool'}, + 'parent_descriptor': {'key': 'parentDescriptor', 'type': 'str'}, + 'scope_type': {'key': 'scopeType', 'type': 'object'}, + 'securing_host_descriptor': {'key': 'securingHostDescriptor', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, administrator_descriptor=None, is_global=None, parent_descriptor=None, scope_type=None, securing_host_descriptor=None): + super(GraphScope, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind) + self.administrator_descriptor = administrator_descriptor + self.is_global = is_global + self.parent_descriptor = parent_descriptor + self.scope_type = scope_type + self.securing_host_descriptor = securing_host_descriptor diff --git a/vsts/vsts/graph/v4_1/models/graph_scope_creation_context.py b/vsts/vsts/graph/v4_1/models/graph_scope_creation_context.py new file mode 100644 index 00000000..9ce86d32 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_scope_creation_context.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 GraphScopeCreationContext(Model): + """GraphScopeCreationContext. + + :param admin_group_description: Set this field to override the default description of this scope's admin group. + :type admin_group_description: str + :param admin_group_name: All scopes have an Administrator Group that controls access to the contents of the scope. Set this field to use a non-default group name for that administrators group. + :type admin_group_name: str + :param creator_id: Set this optional field if this scope is created on behalf of a user other than the user making the request. This should be the Id of the user that is not the requester. + :type creator_id: str + :param name: The scope must be provided with a unique name within the parent scope. This means the created scope can have a parent or child with the same name, but no siblings with the same name. + :type name: str + :param scope_type: The type of scope being created. + :type scope_type: object + :param storage_key: An optional ID that uniquely represents the scope within it's parent scope. If this parameter is not provided, Vsts will generate on automatically. + :type storage_key: str + """ + + _attribute_map = { + 'admin_group_description': {'key': 'adminGroupDescription', 'type': 'str'}, + 'admin_group_name': {'key': 'adminGroupName', 'type': 'str'}, + 'creator_id': {'key': 'creatorId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'scope_type': {'key': 'scopeType', 'type': 'object'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'} + } + + def __init__(self, admin_group_description=None, admin_group_name=None, creator_id=None, name=None, scope_type=None, storage_key=None): + super(GraphScopeCreationContext, self).__init__() + self.admin_group_description = admin_group_description + self.admin_group_name = admin_group_name + self.creator_id = creator_id + self.name = name + self.scope_type = scope_type + self.storage_key = storage_key diff --git a/vsts/vsts/graph/v4_1/models/graph_storage_key_result.py b/vsts/vsts/graph/v4_1/models/graph_storage_key_result.py new file mode 100644 index 00000000..3710831d --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_storage_key_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 GraphStorageKeyResult(Model): + """GraphStorageKeyResult. + + :param _links: This field contains zero or more interesting links about the graph storage key. These links may be invoked to obtain additional relationships or more detailed information about this graph storage key. + :type _links: :class:`ReferenceLinks ` + :param value: + :type value: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, _links=None, value=None): + super(GraphStorageKeyResult, self).__init__() + self._links = _links + self.value = value diff --git a/vsts/vsts/graph/v4_1/models/graph_subject.py b/vsts/vsts/graph/v4_1/models/graph_subject.py new file mode 100644 index 00000000..76a0c3c6 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_subject.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 .graph_subject_base import GraphSubjectBase + + +class GraphSubject(GraphSubjectBase): + """GraphSubject. + + :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 legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None): + super(GraphSubject, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url) + self.legacy_descriptor = legacy_descriptor + self.origin = origin + self.origin_id = origin_id + self.subject_kind = subject_kind diff --git a/vsts/vsts/graph/v4_1/models/graph_subject_base.py b/vsts/vsts/graph/v4_1/models/graph_subject_base.py new file mode 100644 index 00000000..f009486f --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_subject_base.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 GraphSubjectBase(Model): + """GraphSubjectBase. + + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None): + super(GraphSubjectBase, self).__init__() + self._links = _links + self.descriptor = descriptor + self.display_name = display_name + self.url = url diff --git a/vsts/vsts/graph/v4_1/models/graph_subject_lookup.py b/vsts/vsts/graph/v4_1/models/graph_subject_lookup.py new file mode 100644 index 00000000..4b1816e9 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_subject_lookup.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 GraphSubjectLookup(Model): + """GraphSubjectLookup. + + :param lookup_keys: + :type lookup_keys: list of :class:`GraphSubjectLookupKey ` + """ + + _attribute_map = { + 'lookup_keys': {'key': 'lookupKeys', 'type': '[GraphSubjectLookupKey]'} + } + + def __init__(self, lookup_keys=None): + super(GraphSubjectLookup, self).__init__() + self.lookup_keys = lookup_keys diff --git a/vsts/vsts/graph/v4_1/models/graph_subject_lookup_key.py b/vsts/vsts/graph/v4_1/models/graph_subject_lookup_key.py new file mode 100644 index 00000000..2c444d40 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_subject_lookup_key.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 GraphSubjectLookupKey(Model): + """GraphSubjectLookupKey. + + :param descriptor: + :type descriptor: :class:`str ` + """ + + _attribute_map = { + 'descriptor': {'key': 'descriptor', 'type': 'str'} + } + + def __init__(self, descriptor=None): + super(GraphSubjectLookupKey, self).__init__() + self.descriptor = descriptor diff --git a/vsts/vsts/graph/v4_1/models/graph_user.py b/vsts/vsts/graph/v4_1/models/graph_user.py new file mode 100644 index 00000000..9e4bdd8a --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_user.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 .graph_member import GraphMember + + +class GraphUser(GraphMember): + """GraphUser. + + :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 legacy_descriptor: [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + :type legacy_descriptor: str + :param origin: The type of source provider for the origin identifier (ex:AD, AAD, MSA) + :type origin: str + :param origin_id: The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + :type origin_id: str + :param subject_kind: This field identifies the type of the graph subject (ex: Group, Scope, User). + :type subject_kind: str + :param cuid: The Consistently Unique Identifier of the subject + :type cuid: str + :param domain: This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + :type domain: str + :param mail_address: The email address of record for a given graph member. This may be different than the principal name. + :type mail_address: str + :param principal_name: This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + :type principal_name: str + :param meta_type: The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values. + :type meta_type: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'legacy_descriptor': {'key': 'legacyDescriptor', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'origin_id': {'key': 'originId', 'type': 'str'}, + 'subject_kind': {'key': 'subjectKind', 'type': 'str'}, + 'cuid': {'key': 'cuid', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'mail_address': {'key': 'mailAddress', 'type': 'str'}, + 'principal_name': {'key': 'principalName', 'type': 'str'}, + 'meta_type': {'key': 'metaType', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None, legacy_descriptor=None, origin=None, origin_id=None, subject_kind=None, cuid=None, domain=None, mail_address=None, principal_name=None, meta_type=None): + super(GraphUser, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url, legacy_descriptor=legacy_descriptor, origin=origin, origin_id=origin_id, subject_kind=subject_kind, cuid=cuid, domain=domain, mail_address=mail_address, principal_name=principal_name) + self.meta_type = meta_type diff --git a/vsts/vsts/graph/v4_1/models/graph_user_creation_context.py b/vsts/vsts/graph/v4_1/models/graph_user_creation_context.py new file mode 100644 index 00000000..216655a0 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/graph_user_creation_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 GraphUserCreationContext(Model): + """GraphUserCreationContext. + + :param storage_key: Optional: If provided, we will use this identifier for the storage key of the created user + :type storage_key: str + """ + + _attribute_map = { + 'storage_key': {'key': 'storageKey', 'type': 'str'} + } + + def __init__(self, storage_key=None): + super(GraphUserCreationContext, self).__init__() + self.storage_key = storage_key diff --git a/vsts/vsts/graph/v4_1/models/identity_key_map.py b/vsts/vsts/graph/v4_1/models/identity_key_map.py new file mode 100644 index 00000000..05c08952 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/identity_key_map.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 IdentityKeyMap(Model): + """IdentityKeyMap. + + :param cuid: + :type cuid: str + :param storage_key: + :type storage_key: str + :param subject_type: + :type subject_type: str + """ + + _attribute_map = { + 'cuid': {'key': 'cuid', 'type': 'str'}, + 'storage_key': {'key': 'storageKey', 'type': 'str'}, + 'subject_type': {'key': 'subjectType', 'type': 'str'} + } + + def __init__(self, cuid=None, storage_key=None, subject_type=None): + super(IdentityKeyMap, self).__init__() + self.cuid = cuid + self.storage_key = storage_key + self.subject_type = subject_type diff --git a/vsts/vsts/graph/v4_1/models/json_patch_operation.py b/vsts/vsts/graph/v4_1/models/json_patch_operation.py new file mode 100644 index 00000000..7d45b0f6 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/json_patch_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 JsonPatchOperation(Model): + """JsonPatchOperation. + + :param from_: The path to copy from for the Move/Copy operation. + :type from_: str + :param op: The patch operation + :type op: object + :param path: The path for the operation + :type path: str + :param value: The value for the operation. This is either a primitive or a JToken. + :type value: object + """ + + _attribute_map = { + 'from_': {'key': 'from', 'type': 'str'}, + 'op': {'key': 'op', 'type': 'object'}, + 'path': {'key': 'path', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'object'} + } + + def __init__(self, from_=None, op=None, path=None, value=None): + super(JsonPatchOperation, self).__init__() + self.from_ = from_ + self.op = op + self.path = path + self.value = value diff --git a/vsts/vsts/graph/v4_1/models/paged_graph_groups.py b/vsts/vsts/graph/v4_1/models/paged_graph_groups.py new file mode 100644 index 00000000..da7422e4 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/paged_graph_groups.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedGraphGroups(Model): + """PagedGraphGroups. + + :param continuation_token: This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. + :type continuation_token: list of str + :param graph_groups: The enumerable list of groups found within a page. + :type graph_groups: list of :class:`GraphGroup ` + """ + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': '[str]'}, + 'graph_groups': {'key': 'graphGroups', 'type': '[GraphGroup]'} + } + + def __init__(self, continuation_token=None, graph_groups=None): + super(PagedGraphGroups, self).__init__() + self.continuation_token = continuation_token + self.graph_groups = graph_groups diff --git a/vsts/vsts/graph/v4_1/models/paged_graph_users.py b/vsts/vsts/graph/v4_1/models/paged_graph_users.py new file mode 100644 index 00000000..f7061aa1 --- /dev/null +++ b/vsts/vsts/graph/v4_1/models/paged_graph_users.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class PagedGraphUsers(Model): + """PagedGraphUsers. + + :param continuation_token: This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. + :type continuation_token: list of str + :param graph_users: The enumerable set of users found within a page. + :type graph_users: list of :class:`GraphUser ` + """ + + _attribute_map = { + 'continuation_token': {'key': 'continuationToken', 'type': '[str]'}, + 'graph_users': {'key': 'graphUsers', 'type': '[GraphUser]'} + } + + def __init__(self, continuation_token=None, graph_users=None): + super(PagedGraphUsers, self).__init__() + self.continuation_token = continuation_token + self.graph_users = graph_users diff --git a/vsts/vsts/graph/v4_1/models/reference_links.py b/vsts/vsts/graph/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/graph/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/profile/__init__.py b/vsts/vsts/profile/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/profile/__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/profile/v4_1/__init__.py b/vsts/vsts/profile/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/profile/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/profile/v4_1/models/__init__.py b/vsts/vsts/profile/v4_1/models/__init__.py new file mode 100644 index 00000000..d983592f --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/__init__.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 .attribute_descriptor import AttributeDescriptor +from .attributes_container import AttributesContainer +from .avatar import Avatar +from .core_profile_attribute import CoreProfileAttribute +from .create_profile_context import CreateProfileContext +from .geo_region import GeoRegion +from .profile import Profile +from .profile_attribute import ProfileAttribute +from .profile_attribute_base import ProfileAttributeBase +from .profile_region import ProfileRegion +from .profile_regions import ProfileRegions +from .remote_profile import RemoteProfile + +__all__ = [ + 'AttributeDescriptor', + 'AttributesContainer', + 'Avatar', + 'CoreProfileAttribute', + 'CreateProfileContext', + 'GeoRegion', + 'Profile', + 'ProfileAttribute', + 'ProfileAttributeBase', + 'ProfileRegion', + 'ProfileRegions', + 'RemoteProfile', +] diff --git a/vsts/vsts/profile/v4_1/models/attribute_descriptor.py b/vsts/vsts/profile/v4_1/models/attribute_descriptor.py new file mode 100644 index 00000000..99251036 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/attribute_descriptor.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AttributeDescriptor(Model): + """AttributeDescriptor. + + :param attribute_name: + :type attribute_name: str + :param container_name: + :type container_name: str + """ + + _attribute_map = { + 'attribute_name': {'key': 'attributeName', 'type': 'str'}, + 'container_name': {'key': 'containerName', 'type': 'str'} + } + + def __init__(self, attribute_name=None, container_name=None): + super(AttributeDescriptor, self).__init__() + self.attribute_name = attribute_name + self.container_name = container_name diff --git a/vsts/vsts/profile/v4_1/models/attributes_container.py b/vsts/vsts/profile/v4_1/models/attributes_container.py new file mode 100644 index 00000000..1a13d77f --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/attributes_container.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 AttributesContainer(Model): + """AttributesContainer. + + :param attributes: + :type attributes: dict + :param container_name: + :type container_name: str + :param revision: + :type revision: int + """ + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': '{ProfileAttribute}'}, + 'container_name': {'key': 'containerName', 'type': 'str'}, + 'revision': {'key': 'revision', 'type': 'int'} + } + + def __init__(self, attributes=None, container_name=None, revision=None): + super(AttributesContainer, self).__init__() + self.attributes = attributes + self.container_name = container_name + self.revision = revision diff --git a/vsts/vsts/profile/v4_1/models/avatar.py b/vsts/vsts/profile/v4_1/models/avatar.py new file mode 100644 index 00000000..ffd52989 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/avatar.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 Avatar(Model): + """Avatar. + + :param is_auto_generated: + :type is_auto_generated: bool + :param size: + :type size: object + :param time_stamp: + :type time_stamp: datetime + :param value: + :type value: str + """ + + _attribute_map = { + 'is_auto_generated': {'key': 'isAutoGenerated', 'type': 'bool'}, + 'size': {'key': 'size', 'type': 'object'}, + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, is_auto_generated=None, size=None, time_stamp=None, value=None): + super(Avatar, self).__init__() + self.is_auto_generated = is_auto_generated + self.size = size + self.time_stamp = time_stamp + self.value = value diff --git a/vsts/vsts/profile/v4_1/models/core_profile_attribute.py b/vsts/vsts/profile/v4_1/models/core_profile_attribute.py new file mode 100644 index 00000000..850d7271 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/core_profile_attribute.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 .profile_attribute_base import ProfileAttributeBase + + +class CoreProfileAttribute(ProfileAttributeBase): + """CoreProfileAttribute. + + """ + + _attribute_map = { + } + + def __init__(self): + super(CoreProfileAttribute, self).__init__() diff --git a/vsts/vsts/profile/v4_1/models/create_profile_context.py b/vsts/vsts/profile/v4_1/models/create_profile_context.py new file mode 100644 index 00000000..b9adf7da --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/create_profile_context.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 CreateProfileContext(Model): + """CreateProfileContext. + + :param cIData: + :type cIData: dict + :param contact_with_offers: + :type contact_with_offers: bool + :param country_name: + :type country_name: str + :param display_name: + :type display_name: str + :param email_address: + :type email_address: str + :param has_account: + :type has_account: bool + :param language: + :type language: str + :param phone_number: + :type phone_number: str + :param profile_state: + :type profile_state: object + """ + + _attribute_map = { + 'cIData': {'key': 'cIData', 'type': '{object}'}, + 'contact_with_offers': {'key': 'contactWithOffers', 'type': 'bool'}, + 'country_name': {'key': 'countryName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + 'has_account': {'key': 'hasAccount', 'type': 'bool'}, + 'language': {'key': 'language', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + 'profile_state': {'key': 'profileState', 'type': 'object'} + } + + def __init__(self, cIData=None, contact_with_offers=None, country_name=None, display_name=None, email_address=None, has_account=None, language=None, phone_number=None, profile_state=None): + super(CreateProfileContext, self).__init__() + self.cIData = cIData + self.contact_with_offers = contact_with_offers + self.country_name = country_name + self.display_name = display_name + self.email_address = email_address + self.has_account = has_account + self.language = language + self.phone_number = phone_number + self.profile_state = profile_state diff --git a/vsts/vsts/profile/v4_1/models/geo_region.py b/vsts/vsts/profile/v4_1/models/geo_region.py new file mode 100644 index 00000000..3de7a2f7 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/geo_region.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 GeoRegion(Model): + """GeoRegion. + + :param region_code: + :type region_code: str + """ + + _attribute_map = { + 'region_code': {'key': 'regionCode', 'type': 'str'} + } + + def __init__(self, region_code=None): + super(GeoRegion, self).__init__() + self.region_code = region_code diff --git a/vsts/vsts/profile/v4_1/models/profile.py b/vsts/vsts/profile/v4_1/models/profile.py new file mode 100644 index 00000000..bb3eb861 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/profile.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 Profile(Model): + """Profile. + + :param application_container: + :type application_container: :class:`AttributesContainer ` + :param core_attributes: + :type core_attributes: dict + :param core_revision: + :type core_revision: int + :param id: + :type id: str + :param profile_state: + :type profile_state: object + :param revision: + :type revision: int + :param time_stamp: + :type time_stamp: datetime + """ + + _attribute_map = { + 'application_container': {'key': 'applicationContainer', 'type': 'AttributesContainer'}, + 'core_attributes': {'key': 'coreAttributes', 'type': '{CoreProfileAttribute}'}, + 'core_revision': {'key': 'coreRevision', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'profile_state': {'key': 'profileState', 'type': 'object'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'} + } + + def __init__(self, application_container=None, core_attributes=None, core_revision=None, id=None, profile_state=None, revision=None, time_stamp=None): + super(Profile, self).__init__() + self.application_container = application_container + self.core_attributes = core_attributes + self.core_revision = core_revision + self.id = id + self.profile_state = profile_state + self.revision = revision + self.time_stamp = time_stamp diff --git a/vsts/vsts/profile/v4_1/models/profile_attribute.py b/vsts/vsts/profile/v4_1/models/profile_attribute.py new file mode 100644 index 00000000..f3acaf37 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/profile_attribute.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 .profile_attribute_base import ProfileAttributeBase + + +class ProfileAttribute(ProfileAttributeBase): + """ProfileAttribute. + + """ + + _attribute_map = { + } + + def __init__(self): + super(ProfileAttribute, self).__init__() diff --git a/vsts/vsts/profile/v4_1/models/profile_attribute_base.py b/vsts/vsts/profile/v4_1/models/profile_attribute_base.py new file mode 100644 index 00000000..a424e07b --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/profile_attribute_base.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 ProfileAttributeBase(Model): + """ProfileAttributeBase. + + :param descriptor: + :type descriptor: :class:`AttributeDescriptor ` + :param revision: + :type revision: int + :param time_stamp: + :type time_stamp: datetime + :param value: + :type value: object + """ + + _attribute_map = { + 'descriptor': {'key': 'descriptor', 'type': 'AttributeDescriptor'}, + 'revision': {'key': 'revision', 'type': 'int'}, + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'object'} + } + + def __init__(self, descriptor=None, revision=None, time_stamp=None, value=None): + super(ProfileAttributeBase, self).__init__() + self.descriptor = descriptor + self.revision = revision + self.time_stamp = time_stamp + self.value = value diff --git a/vsts/vsts/profile/v4_1/models/profile_region.py b/vsts/vsts/profile/v4_1/models/profile_region.py new file mode 100644 index 00000000..063a3061 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/profile_region.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProfileRegion(Model): + """ProfileRegion. + + :param code: The two-letter code defined in ISO 3166 for the country/region. + :type code: str + :param name: Localized country/region name + :type name: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, code=None, name=None): + super(ProfileRegion, self).__init__() + self.code = code + self.name = name diff --git a/vsts/vsts/profile/v4_1/models/profile_regions.py b/vsts/vsts/profile/v4_1/models/profile_regions.py new file mode 100644 index 00000000..69e784ff --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/profile_regions.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 ProfileRegions(Model): + """ProfileRegions. + + :param notice_contact_consent_requirement_regions: List of country/region code with contact consent requirement type of notice + :type notice_contact_consent_requirement_regions: list of str + :param opt_out_contact_consent_requirement_regions: List of country/region code with contact consent requirement type of opt-out + :type opt_out_contact_consent_requirement_regions: list of str + :param regions: List of country/regions + :type regions: list of :class:`ProfileRegion ` + """ + + _attribute_map = { + 'notice_contact_consent_requirement_regions': {'key': 'noticeContactConsentRequirementRegions', 'type': '[str]'}, + 'opt_out_contact_consent_requirement_regions': {'key': 'optOutContactConsentRequirementRegions', 'type': '[str]'}, + 'regions': {'key': 'regions', 'type': '[ProfileRegion]'} + } + + def __init__(self, notice_contact_consent_requirement_regions=None, opt_out_contact_consent_requirement_regions=None, regions=None): + super(ProfileRegions, self).__init__() + self.notice_contact_consent_requirement_regions = notice_contact_consent_requirement_regions + self.opt_out_contact_consent_requirement_regions = opt_out_contact_consent_requirement_regions + self.regions = regions diff --git a/vsts/vsts/profile/v4_1/models/remote_profile.py b/vsts/vsts/profile/v4_1/models/remote_profile.py new file mode 100644 index 00000000..330a2186 --- /dev/null +++ b/vsts/vsts/profile/v4_1/models/remote_profile.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 RemoteProfile(Model): + """RemoteProfile. + + :param avatar: + :type avatar: str + :param country_code: + :type country_code: str + :param display_name: + :type display_name: str + :param email_address: Primary contact email from from MSA/AAD + :type email_address: str + """ + + _attribute_map = { + 'avatar': {'key': 'avatar', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'} + } + + def __init__(self, avatar=None, country_code=None, display_name=None, email_address=None): + super(RemoteProfile, self).__init__() + self.avatar = avatar + self.country_code = country_code + self.display_name = display_name + self.email_address = email_address diff --git a/vsts/vsts/profile/v4_1/profile_client.py b/vsts/vsts/profile/v4_1/profile_client.py new file mode 100644 index 00000000..53c28756 --- /dev/null +++ b/vsts/vsts/profile/v4_1/profile_client.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 msrest import Serializer, Deserializer +from ...vss_client import VssClient +from . import models + + +class ProfileClient(VssClient): + """Profile + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ProfileClient, 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_profile(self, id, details=None, with_attributes=None, partition=None, core_attributes=None, force_refresh=None): + """GetProfile. + Get my profile. + :param str id: + :param bool details: + :param bool with_attributes: + :param str partition: + :param str core_attributes: + :param bool force_refresh: + :rtype: :class:` ` + """ + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query('details', details, 'bool') + if with_attributes is not None: + query_parameters['withAttributes'] = self._serialize.query('with_attributes', with_attributes, 'bool') + if partition is not None: + query_parameters['partition'] = self._serialize.query('partition', partition, 'str') + if core_attributes is not None: + query_parameters['coreAttributes'] = self._serialize.query('core_attributes', core_attributes, 'str') + if force_refresh is not None: + query_parameters['forceRefresh'] = self._serialize.query('force_refresh', force_refresh, 'bool') + response = self._send(http_method='GET', + location_id='f83735dc-483f-4238-a291-d45f6080a9af', + version='4.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('Profile', response) + diff --git a/vsts/vsts/service_endpoint/__init__.py b/vsts/vsts/service_endpoint/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/service_endpoint/__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_endpoint/v4_1/__init__.py b/vsts/vsts/service_endpoint/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/__init__.py b/vsts/vsts/service_endpoint/v4_1/models/__init__.py new file mode 100644 index 00000000..47ad6d93 --- /dev/null +++ b/vsts/vsts/service_endpoint/v4_1/models/__init__.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 .authentication_scheme_reference import AuthenticationSchemeReference +from .authorization_header import AuthorizationHeader +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 .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_value import InputValue +from .input_values import InputValues +from .input_values_error import InputValuesError +from .reference_links import ReferenceLinks +from .result_transformation_details import ResultTransformationDetails +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_owner import ServiceEndpointExecutionOwner +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 + +__all__ = [ + 'AuthenticationSchemeReference', + 'AuthorizationHeader', + 'ClientCertificate', + 'DataSource', + 'DataSourceBinding', + 'DataSourceBindingBase', + 'DataSourceDetails', + 'DependencyBinding', + 'DependencyData', + 'DependsOn', + 'EndpointAuthorization', + 'EndpointUrl', + 'GraphSubjectBase', + 'HelpLink', + 'IdentityRef', + 'InputDescriptor', + 'InputValidation', + 'InputValue', + 'InputValues', + 'InputValuesError', + 'ReferenceLinks', + 'ResultTransformationDetails', + 'ServiceEndpoint', + 'ServiceEndpointAuthenticationScheme', + 'ServiceEndpointDetails', + 'ServiceEndpointExecutionData', + 'ServiceEndpointExecutionOwner', + 'ServiceEndpointExecutionRecord', + 'ServiceEndpointExecutionRecordsInput', + 'ServiceEndpointRequest', + 'ServiceEndpointRequestResult', + 'ServiceEndpointType', +] diff --git a/vsts/vsts/service_endpoint/v4_1/models/authentication_scheme_reference.py b/vsts/vsts/service_endpoint/v4_1/models/authentication_scheme_reference.py new file mode 100644 index 00000000..8dbe5a63 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/authorization_header.py b/vsts/vsts/service_endpoint/v4_1/models/authorization_header.py new file mode 100644 index 00000000..3657c7a3 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/client_certificate.py b/vsts/vsts/service_endpoint/v4_1/models/client_certificate.py new file mode 100644 index 00000000..2eebb4c2 --- /dev/null +++ b/vsts/vsts/service_endpoint/v4_1/models/client_certificate.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 ClientCertificate(Model): + """ClientCertificate. + + :param value: Gets or sets the value of client certificate. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, value=None): + super(ClientCertificate, self).__init__() + self.value = value diff --git a/vsts/vsts/service_endpoint/v4_1/models/data_source.py b/vsts/vsts/service_endpoint/v4_1/models/data_source.py new file mode 100644 index 00000000..f63688d7 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/data_source_binding.py b/vsts/vsts/service_endpoint/v4_1/models/data_source_binding.py new file mode 100644 index 00000000..75c33203 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/data_source_binding_base.py b/vsts/vsts/service_endpoint/v4_1/models/data_source_binding_base.py new file mode 100644 index 00000000..04638445 --- /dev/null +++ b/vsts/vsts/service_endpoint/v4_1/models/data_source_binding_base.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 DataSourceBindingBase(Model): + """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/service_endpoint/v4_1/models/data_source_details.py b/vsts/vsts/service_endpoint/v4_1/models/data_source_details.py new file mode 100644 index 00000000..020ed38a --- /dev/null +++ b/vsts/vsts/service_endpoint/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: Gets or sets the data source name. + :type data_source_name: str + :param data_source_url: Gets or sets the data source url. + :type data_source_url: str + :param headers: Gets or sets the request headers. + :type headers: list of :class:`AuthorizationHeader ` + :param parameters: Gets the parameters of data source. + :type parameters: dict + :param resource_url: Gets or sets the resource url of data source. + :type resource_url: str + :param result_selector: Gets or sets the 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/service_endpoint/v4_1/models/dependency_binding.py b/vsts/vsts/service_endpoint/v4_1/models/dependency_binding.py new file mode 100644 index 00000000..e8eb3ac1 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/dependency_data.py b/vsts/vsts/service_endpoint/v4_1/models/dependency_data.py new file mode 100644 index 00000000..3faa1790 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/depends_on.py b/vsts/vsts/service_endpoint/v4_1/models/depends_on.py new file mode 100644 index 00000000..8180b206 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/endpoint_authorization.py b/vsts/vsts/service_endpoint/v4_1/models/endpoint_authorization.py new file mode 100644 index 00000000..6fc33ab8 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/endpoint_url.py b/vsts/vsts/service_endpoint/v4_1/models/endpoint_url.py new file mode 100644 index 00000000..bf46276d --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/graph_subject_base.py b/vsts/vsts/service_endpoint/v4_1/models/graph_subject_base.py new file mode 100644 index 00000000..f8b8d21a --- /dev/null +++ b/vsts/vsts/service_endpoint/v4_1/models/graph_subject_base.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 GraphSubjectBase(Model): + """GraphSubjectBase. + + :param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + :type _links: :class:`ReferenceLinks ` + :param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + :type descriptor: str + :param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + :type display_name: str + :param url: This url is the full route to the source resource of this graph subject. + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'descriptor': {'key': 'descriptor', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, descriptor=None, display_name=None, url=None): + super(GraphSubjectBase, self).__init__() + self._links = _links + self.descriptor = descriptor + self.display_name = display_name + self.url = url diff --git a/vsts/vsts/service_endpoint/v4_1/models/help_link.py b/vsts/vsts/service_endpoint/v4_1/models/help_link.py new file mode 100644 index 00000000..b48e4910 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/identity_ref.py b/vsts/vsts/service_endpoint/v4_1/models/identity_ref.py new file mode 100644 index 00000000..c4c35ad5 --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/input_descriptor.py b/vsts/vsts/service_endpoint/v4_1/models/input_descriptor.py new file mode 100644 index 00000000..da334836 --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/input_validation.py b/vsts/vsts/service_endpoint/v4_1/models/input_validation.py new file mode 100644 index 00000000..f2f1a434 --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/input_value.py b/vsts/vsts/service_endpoint/v4_1/models/input_value.py new file mode 100644 index 00000000..1b13b2e8 --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/input_values.py b/vsts/vsts/service_endpoint/v4_1/models/input_values.py new file mode 100644 index 00000000..69472f8d --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/input_values_error.py b/vsts/vsts/service_endpoint/v4_1/models/input_values_error.py new file mode 100644 index 00000000..e534ff53 --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/reference_links.py b/vsts/vsts/service_endpoint/v4_1/models/reference_links.py new file mode 100644 index 00000000..54f03acd --- /dev/null +++ b/vsts/vsts/service_endpoint/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_endpoint/v4_1/models/result_transformation_details.py b/vsts/vsts/service_endpoint/v4_1/models/result_transformation_details.py new file mode 100644 index 00000000..9464fc3d --- /dev/null +++ b/vsts/vsts/service_endpoint/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: Gets or sets the template for result transformation. + :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/service_endpoint/v4_1/models/service_endpoint.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint.py new file mode 100644 index 00000000..edaa4404 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/service_endpoint_authentication_scheme.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_authentication_scheme.py new file mode 100644 index 00000000..00dec063 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/service_endpoint_details.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_details.py new file mode 100644 index 00000000..9b048d3d --- /dev/null +++ b/vsts/vsts/service_endpoint/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: Gets or sets the authorization of service endpoint. + :type authorization: :class:`EndpointAuthorization ` + :param data: Gets or sets the data of service endpoint. + :type data: dict + :param type: Gets or sets the type of service endpoint. + :type type: str + :param url: Gets or sets the connection url of service endpoint. + :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/service_endpoint/v4_1/models/service_endpoint_execution_data.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_execution_data.py new file mode 100644 index 00000000..d2281025 --- /dev/null +++ b/vsts/vsts/service_endpoint/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:`ServiceEndpointExecutionOwner ` + :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:`ServiceEndpointExecutionOwner ` + :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': 'ServiceEndpointExecutionOwner'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'long'}, + 'owner': {'key': 'owner', 'type': 'ServiceEndpointExecutionOwner'}, + '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/service_endpoint/v4_1/models/service_endpoint_execution_owner.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_execution_owner.py new file mode 100644 index 00000000..f72bd02d --- /dev/null +++ b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_execution_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 ServiceEndpointExecutionOwner(Model): + """ServiceEndpointExecutionOwner. + + :param _links: + :type _links: :class:`ReferenceLinks ` + :param id: Gets or sets the Id of service endpoint execution owner. + :type id: int + :param name: Gets or sets the name of service endpoint execution owner. + :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(ServiceEndpointExecutionOwner, self).__init__() + self._links = _links + self.id = id + self.name = name diff --git a/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_execution_record.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_execution_record.py new file mode 100644 index 00000000..3aae5e95 --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/service_endpoint_execution_records_input.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_execution_records_input.py new file mode 100644 index 00000000..04924f8f --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/models/service_endpoint_request.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_request.py new file mode 100644 index 00000000..457231d0 --- /dev/null +++ b/vsts/vsts/service_endpoint/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: Gets or sets the data source details for the service endpoint request. + :type data_source_details: :class:`DataSourceDetails ` + :param result_transformation_details: Gets or sets the result transformation details for the service endpoint request. + :type result_transformation_details: :class:`ResultTransformationDetails ` + :param service_endpoint_details: Gets or sets the service endpoint details for the service endpoint request. + :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/service_endpoint/v4_1/models/service_endpoint_request_result.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_request_result.py new file mode 100644 index 00000000..2da31abf --- /dev/null +++ b/vsts/vsts/service_endpoint/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: Gets or sets the error message of the service endpoint request result. + :type error_message: str + :param result: Gets or sets the result of service endpoint request. + :type result: :class:`object ` + :param status_code: Gets or sets the status code of the service endpoint request result. + :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/service_endpoint/v4_1/models/service_endpoint_type.py b/vsts/vsts/service_endpoint/v4_1/models/service_endpoint_type.py new file mode 100644 index 00000000..c5fea2fa --- /dev/null +++ b/vsts/vsts/service_endpoint/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/service_endpoint/v4_1/service_endpoint_client.py b/vsts/vsts/service_endpoint/v4_1/service_endpoint_client.py new file mode 100644 index 00000000..c3b7802d --- /dev/null +++ b/vsts/vsts/service_endpoint/v4_1/service_endpoint_client.py @@ -0,0 +1,254 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 ServiceEndpointClient(VssClient): + """ServiceEndpoint + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(ServiceEndpointClient, 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 execute_service_endpoint_request(self, service_endpoint_request, project, endpoint_id): + """ExecuteServiceEndpointRequest. + [Preview API] Proxy for a GET request defined by a service endpoint. + :param :class:` ` service_endpoint_request: Service endpoint request. + :param str project: Project ID or project name + :param str endpoint_id: Id of the service endpoint. + :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='cc63bb57-2a5f-4a7a-b79c-c142d308657e', + version='4.1-preview.1', + 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] Create a service endpoint. + :param :class:` ` endpoint: Service endpoint 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(endpoint, 'ServiceEndpoint') + response = self._send(http_method='POST', + location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ServiceEndpoint', response) + + def delete_service_endpoint(self, project, endpoint_id): + """DeleteServiceEndpoint. + [Preview API] Delete a service endpoint. + :param str project: Project ID or project name + :param str endpoint_id: Id of the service endpoint to delete. + """ + 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='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='4.1-preview.1', + route_values=route_values) + + def get_service_endpoint_details(self, project, endpoint_id): + """GetServiceEndpointDetails. + [Preview API] Get the service endpoint details. + :param str project: Project ID or project name + :param str endpoint_id: Id of the service endpoint. + :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='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='4.1-preview.1', + 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] Get the service endpoints. + :param str project: Project ID or project name + :param str type: Type of the service endpoints. + :param [str] auth_schemes: Authorization schemes used for service endpoints. + :param [str] endpoint_ids: Ids of the service endpoints. + :param bool include_failed: Failed flag for service endpoints. + :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='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ServiceEndpoint]', response) + + def get_service_endpoints_by_names(self, project, endpoint_names, type=None, auth_schemes=None, include_failed=None): + """GetServiceEndpointsByNames. + [Preview API] Get the service endpoints by name. + :param str project: Project ID or project name + :param [str] endpoint_names: Names of the service endpoints. + :param str type: Type of the service endpoints. + :param [str] auth_schemes: Authorization schemes used for service endpoints. + :param bool include_failed: Failed flag for service endpoints. + :rtype: [ServiceEndpoint] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + query_parameters = {} + if endpoint_names is not None: + endpoint_names = ",".join(endpoint_names) + query_parameters['endpointNames'] = self._serialize.query('endpoint_names', endpoint_names, 'str') + 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 include_failed is not None: + query_parameters['includeFailed'] = self._serialize.query('include_failed', include_failed, 'bool') + response = self._send(http_method='GET', + location_id='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='4.1-preview.1', + 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] Update a service endpoint. + :param :class:` ` endpoint: Service endpoint to update. + :param str project: Project ID or project name + :param str endpoint_id: Id of the service endpoint to update. + :param str operation: Operation for the service endpoint. + :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='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='4.1-preview.1', + 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] Update the service endpoints. + :param [ServiceEndpoint] endpoints: Names of the service endpoints to update. + :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='e85f1c62-adfc-4b74-b618-11a150fb195e', + version='4.1-preview.1', + route_values=route_values, + content=content, + returns_collection=True) + return self._deserialize('[ServiceEndpoint]', response) + + def get_service_endpoint_execution_records(self, project, endpoint_id, top=None): + """GetServiceEndpointExecutionRecords. + [Preview API] Get service endpoint execution records. + :param str project: Project ID or project name + :param str endpoint_id: Id of the service endpoint. + :param int top: Number of service endpoint execution records to get. + :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='10a16738-9299-4cd1-9a81-fd23ad6200d0', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ServiceEndpointExecutionRecord]', response) + + def get_service_endpoint_types(self, type=None, scheme=None): + """GetServiceEndpointTypes. + [Preview API] Get service endpoint types. + :param str type: Type of service endpoint. + :param str scheme: Scheme of service endpoint. + :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='5a7938a4-655e-486c-b562-b78c54a7e87b', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ServiceEndpointType]', response) + diff --git a/vsts/vsts/symbol/__init__.py b/vsts/vsts/symbol/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/symbol/__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/symbol/v4_1/__init__.py b/vsts/vsts/symbol/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/symbol/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/symbol/v4_1/models/__init__.py b/vsts/vsts/symbol/v4_1/models/__init__.py new file mode 100644 index 00000000..56b178f9 --- /dev/null +++ b/vsts/vsts/symbol/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 .debug_entry import DebugEntry +from .debug_entry_create_batch import DebugEntryCreateBatch +from .json_blob_block_hash import JsonBlobBlockHash +from .json_blob_identifier import JsonBlobIdentifier +from .json_blob_identifier_with_blocks import JsonBlobIdentifierWithBlocks +from .request import Request +from .resource_base import ResourceBase + +__all__ = [ + 'DebugEntry', + 'DebugEntryCreateBatch', + 'JsonBlobBlockHash', + 'JsonBlobIdentifier', + 'JsonBlobIdentifierWithBlocks', + 'Request', + 'ResourceBase', +] diff --git a/vsts/vsts/symbol/v4_1/models/debug_entry.py b/vsts/vsts/symbol/v4_1/models/debug_entry.py new file mode 100644 index 00000000..777fdf4d --- /dev/null +++ b/vsts/vsts/symbol/v4_1/models/debug_entry.py @@ -0,0 +1,64 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from .resource_base import ResourceBase + + +class DebugEntry(ResourceBase): + """DebugEntry. + + :param created_by: The ID of user who created this item. Optional. + :type created_by: str + :param created_date: The date time when this item is created. Optional. + :type created_date: datetime + :param id: An identifier for this item. Optional. + :type id: str + :param storage_eTag: An opaque ETag used to synchronize with the version stored at server end. Optional. + :type storage_eTag: str + :param url: A URI which can be used to retrieve this item in its raw format. Optional. Note this is distinguished from other URIs that are present in a derived resource. + :type url: str + :param blob_details: + :type blob_details: :class:`JsonBlobIdentifierWithBlocks ` + :param blob_identifier: A blob identifier of the symbol file to upload to this debug entry. This property is mostly used during creation of debug entry (a.k.a. symbol publishing) to allow the server to query the existence of the blob. + :type blob_identifier: :class:`JsonBlobIdentifier ` + :param blob_uri: The URI to get the symbol file. Provided by the server, the URI contains authentication information and is readily accessible by plain HTTP GET request. The client is recommended to retrieve the file as soon as it can since the URI will expire in a short period. + :type blob_uri: str + :param client_key: A key the client (debugger, for example) uses to find the debug entry. Note it is not unique for each different symbol file as it does not distinguish between those which only differ by information level. + :type client_key: str + :param information_level: The information level this debug entry contains. + :type information_level: object + :param request_id: The identifier of symbol request to which this debug entry belongs. + :type request_id: str + :param status: The status of debug entry. + :type status: object + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'storage_eTag': {'key': 'storageETag', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'blob_details': {'key': 'blobDetails', 'type': 'JsonBlobIdentifierWithBlocks'}, + 'blob_identifier': {'key': 'blobIdentifier', 'type': 'JsonBlobIdentifier'}, + 'blob_uri': {'key': 'blobUri', 'type': 'str'}, + 'client_key': {'key': 'clientKey', 'type': 'str'}, + 'information_level': {'key': 'informationLevel', 'type': 'object'}, + 'request_id': {'key': 'requestId', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=None, url=None, blob_details=None, blob_identifier=None, blob_uri=None, client_key=None, information_level=None, request_id=None, status=None): + super(DebugEntry, self).__init__(created_by=created_by, created_date=created_date, id=id, storage_eTag=storage_eTag, url=url) + self.blob_details = blob_details + self.blob_identifier = blob_identifier + self.blob_uri = blob_uri + self.client_key = client_key + self.information_level = information_level + self.request_id = request_id + self.status = status diff --git a/vsts/vsts/symbol/v4_1/models/debug_entry_create_batch.py b/vsts/vsts/symbol/v4_1/models/debug_entry_create_batch.py new file mode 100644 index 00000000..e7b6cfb0 --- /dev/null +++ b/vsts/vsts/symbol/v4_1/models/debug_entry_create_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 DebugEntryCreateBatch(Model): + """DebugEntryCreateBatch. + + :param create_behavior: Defines what to do when a debug entry in the batch already exists. + :type create_behavior: object + :param debug_entries: The debug entries. + :type debug_entries: list of :class:`DebugEntry ` + """ + + _attribute_map = { + 'create_behavior': {'key': 'createBehavior', 'type': 'object'}, + 'debug_entries': {'key': 'debugEntries', 'type': '[DebugEntry]'} + } + + def __init__(self, create_behavior=None, debug_entries=None): + super(DebugEntryCreateBatch, self).__init__() + self.create_behavior = create_behavior + self.debug_entries = debug_entries diff --git a/vsts/vsts/symbol/v4_1/models/json_blob_block_hash.py b/vsts/vsts/symbol/v4_1/models/json_blob_block_hash.py new file mode 100644 index 00000000..8b75829d --- /dev/null +++ b/vsts/vsts/symbol/v4_1/models/json_blob_block_hash.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 JsonBlobBlockHash(Model): + """JsonBlobBlockHash. + + :param hash_bytes: + :type hash_bytes: str + """ + + _attribute_map = { + 'hash_bytes': {'key': 'hashBytes', 'type': 'str'} + } + + def __init__(self, hash_bytes=None): + super(JsonBlobBlockHash, self).__init__() + self.hash_bytes = hash_bytes diff --git a/vsts/vsts/symbol/v4_1/models/json_blob_identifier.py b/vsts/vsts/symbol/v4_1/models/json_blob_identifier.py new file mode 100644 index 00000000..56470141 --- /dev/null +++ b/vsts/vsts/symbol/v4_1/models/json_blob_identifier.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 JsonBlobIdentifier(Model): + """JsonBlobIdentifier. + + :param identifier_value: + :type identifier_value: str + """ + + _attribute_map = { + 'identifier_value': {'key': 'identifierValue', 'type': 'str'} + } + + def __init__(self, identifier_value=None): + super(JsonBlobIdentifier, self).__init__() + self.identifier_value = identifier_value diff --git a/vsts/vsts/symbol/v4_1/models/json_blob_identifier_with_blocks.py b/vsts/vsts/symbol/v4_1/models/json_blob_identifier_with_blocks.py new file mode 100644 index 00000000..a098770a --- /dev/null +++ b/vsts/vsts/symbol/v4_1/models/json_blob_identifier_with_blocks.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class JsonBlobIdentifierWithBlocks(Model): + """JsonBlobIdentifierWithBlocks. + + :param block_hashes: + :type block_hashes: list of :class:`JsonBlobBlockHash ` + :param identifier_value: + :type identifier_value: str + """ + + _attribute_map = { + 'block_hashes': {'key': 'blockHashes', 'type': '[JsonBlobBlockHash]'}, + 'identifier_value': {'key': 'identifierValue', 'type': 'str'} + } + + def __init__(self, block_hashes=None, identifier_value=None): + super(JsonBlobIdentifierWithBlocks, self).__init__() + self.block_hashes = block_hashes + self.identifier_value = identifier_value diff --git a/vsts/vsts/symbol/v4_1/models/request.py b/vsts/vsts/symbol/v4_1/models/request.py new file mode 100644 index 00000000..851ed33b --- /dev/null +++ b/vsts/vsts/symbol/v4_1/models/request.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 .resource_base import ResourceBase + + +class Request(ResourceBase): + """Request. + + :param created_by: The ID of user who created this item. Optional. + :type created_by: str + :param created_date: The date time when this item is created. Optional. + :type created_date: datetime + :param id: An identifier for this item. Optional. + :type id: str + :param storage_eTag: An opaque ETag used to synchronize with the version stored at server end. Optional. + :type storage_eTag: str + :param url: A URI which can be used to retrieve this item in its raw format. Optional. Note this is distinguished from other URIs that are present in a derived resource. + :type url: str + :param description: An optional human-facing description. + :type description: str + :param expiration_date: An optional expiration date for the request. The request will become inaccessible and get deleted after the date, regardless of its status. On an HTTP POST, if expiration date is null/missing, the server will assign a default expiration data (30 days unless overwridden in the registry at the account level). On PATCH, if expiration date is null/missing, the behavior is to not change whatever the request's current expiration date is. + :type expiration_date: datetime + :param name: A human-facing name for the request. Required on POST, ignored on PATCH. + :type name: str + :param status: The status for this request. + :type status: object + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'storage_eTag': {'key': 'storageETag', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'object'} + } + + def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=None, url=None, description=None, expiration_date=None, name=None, status=None): + super(Request, self).__init__(created_by=created_by, created_date=created_date, id=id, storage_eTag=storage_eTag, url=url) + self.description = description + self.expiration_date = expiration_date + self.name = name + self.status = status diff --git a/vsts/vsts/symbol/v4_1/models/resource_base.py b/vsts/vsts/symbol/v4_1/models/resource_base.py new file mode 100644 index 00000000..540382ec --- /dev/null +++ b/vsts/vsts/symbol/v4_1/models/resource_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 ResourceBase(Model): + """ResourceBase. + + :param created_by: The ID of user who created this item. Optional. + :type created_by: str + :param created_date: The date time when this item is created. Optional. + :type created_date: datetime + :param id: An identifier for this item. Optional. + :type id: str + :param storage_eTag: An opaque ETag used to synchronize with the version stored at server end. Optional. + :type storage_eTag: str + :param url: A URI which can be used to retrieve this item in its raw format. Optional. Note this is distinguished from other URIs that are present in a derived resource. + :type url: str + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_date': {'key': 'createdDate', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'storage_eTag': {'key': 'storageETag', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, created_by=None, created_date=None, id=None, storage_eTag=None, url=None): + super(ResourceBase, self).__init__() + self.created_by = created_by + self.created_date = created_date + self.id = id + self.storage_eTag = storage_eTag + self.url = url diff --git a/vsts/vsts/symbol/v4_1/symbol_client.py b/vsts/vsts/symbol/v4_1/symbol_client.py new file mode 100644 index 00000000..81145f71 --- /dev/null +++ b/vsts/vsts/symbol/v4_1/symbol_client.py @@ -0,0 +1,230 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 SymbolClient(VssClient): + """Symbol + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(SymbolClient, 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 check_availability(self): + """CheckAvailability. + [Preview API] Check the availability of symbol service. This includes checking for feature flag, and possibly license in future. Note this is NOT an anonymous endpoint, and the caller will be redirected to authentication before hitting it. + """ + self._send(http_method='GET', + location_id='97c893cc-e861-4ef4-8c43-9bad4a963dee', + version='4.1-preview.1') + + def get_client(self, client_type): + """GetClient. + [Preview API] Get the client package. + :param str client_type: Either "EXE" for a zip file containing a Windows symbol client (a.k.a. symbol.exe) along with dependencies, or "TASK" for a VSTS task that can be run on a VSTS build agent. All the other values are invalid. The parameter is case-insensitive. + :rtype: object + """ + route_values = {} + if client_type is not None: + route_values['clientType'] = self._serialize.url('client_type', client_type, 'str') + response = self._send(http_method='GET', + location_id='79c83865-4de3-460c-8a16-01be238e0818', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def head_client(self): + """HeadClient. + [Preview API] Get client version information. + """ + self._send(http_method='HEAD', + location_id='79c83865-4de3-460c-8a16-01be238e0818', + version='4.1-preview.1') + + def create_requests(self, request_to_create): + """CreateRequests. + [Preview API] Create a new symbol request. + :param :class:` ` request_to_create: The symbol request to create. + :rtype: :class:` ` + """ + content = self._serialize.body(request_to_create, 'Request') + response = self._send(http_method='POST', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + content=content) + return self._deserialize('Request', response) + + def create_requests_request_id_debug_entries(self, batch, request_id, collection): + """CreateRequestsRequestIdDebugEntries. + [Preview API] Create debug entries for a symbol request as specified by its identifier. + :param :class:` ` batch: A batch that contains debug entries to create. + :param str request_id: The symbol request identifier. + :param str collection: A valid debug entry collection name. Must be "debugentries". + :rtype: [DebugEntry] + """ + route_values = {} + if request_id is not None: + route_values['requestId'] = self._serialize.url('request_id', request_id, 'str') + query_parameters = {} + if collection is not None: + query_parameters['collection'] = self._serialize.query('collection', collection, 'str') + content = self._serialize.body(batch, 'DebugEntryCreateBatch') + response = self._send(http_method='POST', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[DebugEntry]', response) + + def create_requests_request_name_debug_entries(self, batch, request_name, collection): + """CreateRequestsRequestNameDebugEntries. + [Preview API] Create debug entries for a symbol request as specified by its name. + :param :class:` ` batch: A batch that contains debug entries to create. + :param str request_name: + :param str collection: A valid debug entry collection name. Must be "debugentries". + :rtype: [DebugEntry] + """ + query_parameters = {} + if request_name is not None: + query_parameters['requestName'] = self._serialize.query('request_name', request_name, 'str') + if collection is not None: + query_parameters['collection'] = self._serialize.query('collection', collection, 'str') + content = self._serialize.body(batch, 'DebugEntryCreateBatch') + response = self._send(http_method='POST', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + query_parameters=query_parameters, + content=content, + returns_collection=True) + return self._deserialize('[DebugEntry]', response) + + def delete_requests_request_id(self, request_id, synchronous=None): + """DeleteRequestsRequestId. + [Preview API] Delete a symbol request by request identifier. + :param str request_id: The symbol request identifier. + :param bool synchronous: If true, delete all the debug entries under this request synchronously in the current session. If false, the deletion will be postponed to a later point and be executed automatically by the system. + """ + route_values = {} + if request_id is not None: + route_values['requestId'] = self._serialize.url('request_id', request_id, 'str') + query_parameters = {} + if synchronous is not None: + query_parameters['synchronous'] = self._serialize.query('synchronous', synchronous, 'bool') + self._send(http_method='DELETE', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + + def delete_requests_request_name(self, request_name, synchronous=None): + """DeleteRequestsRequestName. + [Preview API] Delete a symbol request by request name. + :param str request_name: + :param bool synchronous: If true, delete all the debug entries under this request synchronously in the current session. If false, the deletion will be postponed to a later point and be executed automatically by the system. + """ + query_parameters = {} + if request_name is not None: + query_parameters['requestName'] = self._serialize.query('request_name', request_name, 'str') + if synchronous is not None: + query_parameters['synchronous'] = self._serialize.query('synchronous', synchronous, 'bool') + self._send(http_method='DELETE', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + query_parameters=query_parameters) + + def get_requests_request_id(self, request_id): + """GetRequestsRequestId. + [Preview API] Get a symbol request by request identifier. + :param str request_id: The symbol request identifier. + :rtype: :class:` ` + """ + route_values = {} + if request_id is not None: + route_values['requestId'] = self._serialize.url('request_id', request_id, 'str') + response = self._send(http_method='GET', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('Request', response) + + def get_requests_request_name(self, request_name): + """GetRequestsRequestName. + [Preview API] Get a symbol request by request name. + :param str request_name: + :rtype: :class:` ` + """ + query_parameters = {} + if request_name is not None: + query_parameters['requestName'] = self._serialize.query('request_name', request_name, 'str') + response = self._send(http_method='GET', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + query_parameters=query_parameters) + return self._deserialize('Request', response) + + def update_requests_request_id(self, update_request, request_id): + """UpdateRequestsRequestId. + [Preview API] Update a symbol request by request identifier. + :param :class:` ` update_request: The symbol request. + :param str request_id: The symbol request identifier. + :rtype: :class:` ` + """ + route_values = {} + if request_id is not None: + route_values['requestId'] = self._serialize.url('request_id', request_id, 'str') + content = self._serialize.body(update_request, 'Request') + response = self._send(http_method='PATCH', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Request', response) + + def update_requests_request_name(self, update_request, request_name): + """UpdateRequestsRequestName. + [Preview API] Update a symbol request by request name. + :param :class:` ` update_request: The symbol request. + :param str request_name: + :rtype: :class:` ` + """ + query_parameters = {} + if request_name is not None: + query_parameters['requestName'] = self._serialize.query('request_name', request_name, 'str') + content = self._serialize.body(update_request, 'Request') + response = self._send(http_method='PATCH', + location_id='ebc09fe3-1b20-4667-abc5-f2b60fe8de52', + version='4.1-preview.1', + query_parameters=query_parameters, + content=content) + return self._deserialize('Request', response) + + def get_sym_srv_debug_entry_client_key(self, debug_entry_client_key): + """GetSymSrvDebugEntryClientKey. + [Preview API] Given a client key, returns the best matched debug entry. + :param str debug_entry_client_key: A "client key" used by both ends of Microsoft's symbol protocol to identify a debug entry. The semantics of client key is governed by symsrv and is beyond the scope of this documentation. + """ + route_values = {} + if debug_entry_client_key is not None: + route_values['debugEntryClientKey'] = self._serialize.url('debug_entry_client_key', debug_entry_client_key, 'str') + self._send(http_method='GET', + location_id='9648e256-c9f9-4f16-8a27-630b06396942', + version='4.1-preview.1', + route_values=route_values) + diff --git a/vsts/vsts/wiki/__init__.py b/vsts/vsts/wiki/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/wiki/__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/wiki/v4_0/__init__.py b/vsts/vsts/wiki/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/wiki/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/wiki/v4_0/models/__init__.py b/vsts/vsts/wiki/v4_0/models/__init__.py new file mode 100644 index 00000000..c8bdedff --- /dev/null +++ b/vsts/vsts/wiki/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 .change import Change +from .file_content_metadata import FileContentMetadata +from .git_commit_ref import GitCommitRef +from .git_item import GitItem +from .git_push import GitPush +from .git_push_ref import GitPushRef +from .git_ref_update import GitRefUpdate +from .git_repository import GitRepository +from .git_repository_ref import GitRepositoryRef +from .git_status import GitStatus +from .git_status_context import GitStatusContext +from .git_template import GitTemplate +from .git_user_date import GitUserDate +from .git_version_descriptor import GitVersionDescriptor +from .item_content import ItemContent +from .item_model import ItemModel +from .wiki_attachment import WikiAttachment +from .wiki_attachment_change import WikiAttachmentChange +from .wiki_attachment_response import WikiAttachmentResponse +from .wiki_change import WikiChange +from .wiki_page import WikiPage +from .wiki_page_change import WikiPageChange +from .wiki_repository import WikiRepository +from .wiki_update import WikiUpdate + +__all__ = [ + 'Change', + 'FileContentMetadata', + 'GitCommitRef', + 'GitItem', + 'GitPush', + 'GitPushRef', + 'GitRefUpdate', + 'GitRepository', + 'GitRepositoryRef', + 'GitStatus', + 'GitStatusContext', + 'GitTemplate', + 'GitUserDate', + 'GitVersionDescriptor', + 'ItemContent', + 'ItemModel', + 'WikiAttachment', + 'WikiAttachmentChange', + 'WikiAttachmentResponse', + 'WikiChange', + 'WikiPage', + 'WikiPageChange', + 'WikiRepository', + 'WikiUpdate', +] diff --git a/vsts/vsts/wiki/v4_0/models/change.py b/vsts/vsts/wiki/v4_0/models/change.py new file mode 100644 index 00000000..576fb635 --- /dev/null +++ b/vsts/vsts/wiki/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: :class:`GitItem ` + :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': 'GitItem'}, + '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/wiki/v4_0/models/file_content_metadata.py b/vsts/vsts/wiki/v4_0/models/file_content_metadata.py new file mode 100644 index 00000000..d2d6667d --- /dev/null +++ b/vsts/vsts/wiki/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/wiki/v4_0/models/git_commit_ref.py b/vsts/vsts/wiki/v4_0/models/git_commit_ref.py new file mode 100644 index 00000000..21d8ab03 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_commit_ref.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 GitCommitRef(Model): + """GitCommitRef. + + :param _links: + :type _links: ReferenceLinks + :param author: + :type author: :class:`GitUserDate ` + :param change_counts: + :type change_counts: dict + :param changes: + :type changes: list of :class:`object ` + :param comment: + :type comment: str + :param comment_truncated: + :type comment_truncated: bool + :param commit_id: + :type commit_id: str + :param committer: + :type committer: :class:`GitUserDate ` + :param parents: + :type parents: list of str + :param remote_url: + :type remote_url: str + :param statuses: + :type statuses: list of :class:`GitStatus ` + :param url: + :type url: str + :param work_items: + :type work_items: list of ResourceRef + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'author': {'key': 'author', 'type': 'GitUserDate'}, + 'change_counts': {'key': 'changeCounts', 'type': '{int}'}, + 'changes': {'key': 'changes', 'type': '[object]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'}, + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'committer': {'key': 'committer', 'type': 'GitUserDate'}, + 'parents': {'key': 'parents', 'type': '[str]'}, + 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, + 'statuses': {'key': 'statuses', 'type': '[GitStatus]'}, + 'url': {'key': 'url', 'type': 'str'}, + 'work_items': {'key': 'workItems', 'type': '[ResourceRef]'} + } + + def __init__(self, _links=None, author=None, change_counts=None, changes=None, comment=None, comment_truncated=None, commit_id=None, committer=None, parents=None, remote_url=None, statuses=None, url=None, work_items=None): + super(GitCommitRef, self).__init__() + self._links = _links + self.author = author + self.change_counts = change_counts + self.changes = changes + self.comment = comment + self.comment_truncated = comment_truncated + self.commit_id = commit_id + self.committer = committer + self.parents = parents + self.remote_url = remote_url + self.statuses = statuses + self.url = url + self.work_items = work_items diff --git a/vsts/vsts/wiki/v4_0/models/git_item.py b/vsts/vsts/wiki/v4_0/models/git_item.py new file mode 100644 index 00000000..e4b8086d --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_item.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 .item_model import ItemModel + + +class GitItem(ItemModel): + """GitItem. + + :param _links: + :type _links: 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 commit_id: SHA1 of commit item was fetched at + :type commit_id: str + :param git_object_type: Type of object (Commit, Tree, Blob, Tag, ...) + :type git_object_type: object + :param latest_processed_change: Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached + :type latest_processed_change: :class:`GitCommitRef ` + :param object_id: Git object id + :type object_id: str + :param original_object_id: Git object id + :type original_object_id: 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'}, + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'git_object_type': {'key': 'gitObjectType', 'type': 'object'}, + 'latest_processed_change': {'key': 'latestProcessedChange', 'type': 'GitCommitRef'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + '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) + self.commit_id = commit_id + self.git_object_type = git_object_type + self.latest_processed_change = latest_processed_change + self.object_id = object_id + self.original_object_id = original_object_id diff --git a/vsts/vsts/wiki/v4_0/models/git_push.py b/vsts/vsts/wiki/v4_0/models/git_push.py new file mode 100644 index 00000000..f0015a6d --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_push.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 .git_push_ref import GitPushRef + + +class GitPush(GitPushRef): + """GitPush. + + :param _links: + :type _links: ReferenceLinks + :param date: + :type date: datetime + :param push_correlation_id: + :type push_correlation_id: str + :param pushed_by: + :type pushed_by: IdentityRef + :param push_id: + :type push_id: int + :param url: + :type url: str + :param commits: + :type commits: list of :class:`GitCommitRef ` + :param ref_updates: + :type ref_updates: list of :class:`GitRefUpdate ` + :param repository: + :type repository: :class:`GitRepository ` + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'date': {'key': 'date', 'type': 'iso-8601'}, + 'push_correlation_id': {'key': 'pushCorrelationId', 'type': 'str'}, + 'pushed_by': {'key': 'pushedBy', 'type': 'IdentityRef'}, + 'push_id': {'key': 'pushId', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'}, + 'commits': {'key': 'commits', 'type': '[GitCommitRef]'}, + 'ref_updates': {'key': 'refUpdates', 'type': '[GitRefUpdate]'}, + 'repository': {'key': 'repository', 'type': 'GitRepository'} + } + + def __init__(self, _links=None, date=None, push_correlation_id=None, pushed_by=None, push_id=None, url=None, commits=None, ref_updates=None, repository=None): + super(GitPush, self).__init__(_links=_links, date=date, push_correlation_id=push_correlation_id, pushed_by=pushed_by, push_id=push_id, url=url) + self.commits = commits + self.ref_updates = ref_updates + self.repository = repository diff --git a/vsts/vsts/wiki/v4_0/models/git_push_ref.py b/vsts/vsts/wiki/v4_0/models/git_push_ref.py new file mode 100644 index 00000000..9376eaf8 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_push_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 GitPushRef(Model): + """GitPushRef. + + :param _links: + :type _links: ReferenceLinks + :param date: + :type date: datetime + :param push_correlation_id: + :type push_correlation_id: str + :param pushed_by: + :type pushed_by: IdentityRef + :param push_id: + :type push_id: int + :param url: + :type url: str + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'date': {'key': 'date', 'type': 'iso-8601'}, + 'push_correlation_id': {'key': 'pushCorrelationId', 'type': 'str'}, + 'pushed_by': {'key': 'pushedBy', 'type': 'IdentityRef'}, + 'push_id': {'key': 'pushId', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, _links=None, date=None, push_correlation_id=None, pushed_by=None, push_id=None, url=None): + super(GitPushRef, self).__init__() + self._links = _links + self.date = date + self.push_correlation_id = push_correlation_id + self.pushed_by = pushed_by + self.push_id = push_id + self.url = url diff --git a/vsts/vsts/wiki/v4_0/models/git_ref_update.py b/vsts/vsts/wiki/v4_0/models/git_ref_update.py new file mode 100644 index 00000000..6c10c600 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_ref_update.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 GitRefUpdate(Model): + """GitRefUpdate. + + :param is_locked: + :type is_locked: bool + :param name: + :type name: str + :param new_object_id: + :type new_object_id: str + :param old_object_id: + :type old_object_id: str + :param repository_id: + :type repository_id: str + """ + + _attribute_map = { + 'is_locked': {'key': 'isLocked', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'new_object_id': {'key': 'newObjectId', 'type': 'str'}, + 'old_object_id': {'key': 'oldObjectId', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'} + } + + def __init__(self, is_locked=None, name=None, new_object_id=None, old_object_id=None, repository_id=None): + super(GitRefUpdate, self).__init__() + self.is_locked = is_locked + self.name = name + self.new_object_id = new_object_id + self.old_object_id = old_object_id + self.repository_id = repository_id diff --git a/vsts/vsts/wiki/v4_0/models/git_repository.py b/vsts/vsts/wiki/v4_0/models/git_repository.py new file mode 100644 index 00000000..cc72d987 --- /dev/null +++ b/vsts/vsts/wiki/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: 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: 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/wiki/v4_0/models/git_repository_ref.py b/vsts/vsts/wiki/v4_0/models/git_repository_ref.py new file mode 100644 index 00000000..e733805a --- /dev/null +++ b/vsts/vsts/wiki/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: TeamProjectCollectionReference + :param id: + :type id: str + :param name: + :type name: str + :param project: + :type project: 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/wiki/v4_0/models/git_status.py b/vsts/vsts/wiki/v4_0/models/git_status.py new file mode 100644 index 00000000..8b80e0e0 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_status.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 GitStatus(Model): + """GitStatus. + + :param _links: Reference links. + :type _links: ReferenceLinks + :param context: Context of the status. + :type context: :class:`GitStatusContext ` + :param created_by: Identity that created the status. + :type created_by: IdentityRef + :param creation_date: Creation date and time of the status. + :type creation_date: datetime + :param description: Status description. Typically describes current state of the status. + :type description: str + :param id: Status identifier. + :type id: int + :param state: State of the status. + :type state: object + :param target_url: URL with status details. + :type target_url: str + :param updated_date: Last update date and time of the status. + :type updated_date: datetime + """ + + _attribute_map = { + '_links': {'key': '_links', 'type': 'ReferenceLinks'}, + 'context': {'key': 'context', 'type': 'GitStatusContext'}, + 'created_by': {'key': 'createdBy', 'type': 'IdentityRef'}, + 'creation_date': {'key': 'creationDate', 'type': 'iso-8601'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'state': {'key': 'state', 'type': 'object'}, + 'target_url': {'key': 'targetUrl', 'type': 'str'}, + 'updated_date': {'key': 'updatedDate', 'type': 'iso-8601'} + } + + def __init__(self, _links=None, context=None, created_by=None, creation_date=None, description=None, id=None, state=None, target_url=None, updated_date=None): + super(GitStatus, self).__init__() + self._links = _links + self.context = context + self.created_by = created_by + self.creation_date = creation_date + self.description = description + self.id = id + self.state = state + self.target_url = target_url + self.updated_date = updated_date diff --git a/vsts/vsts/wiki/v4_0/models/git_status_context.py b/vsts/vsts/wiki/v4_0/models/git_status_context.py new file mode 100644 index 00000000..cf40205f --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_status_context.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GitStatusContext(Model): + """GitStatusContext. + + :param genre: Genre of the status. Typically name of the service/tool generating the status, can be empty. + :type genre: str + :param name: Name identifier of the status, cannot be null or empty. + :type name: str + """ + + _attribute_map = { + 'genre': {'key': 'genre', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, genre=None, name=None): + super(GitStatusContext, self).__init__() + self.genre = genre + self.name = name diff --git a/vsts/vsts/wiki/v4_0/models/git_template.py b/vsts/vsts/wiki/v4_0/models/git_template.py new file mode 100644 index 00000000..fbe26c8a --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_template.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class GitTemplate(Model): + """GitTemplate. + + :param name: Name of the Template + :type name: str + :param type: Type of the Template + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'} + } + + def __init__(self, name=None, type=None): + super(GitTemplate, self).__init__() + self.name = name + self.type = type diff --git a/vsts/vsts/wiki/v4_0/models/git_user_date.py b/vsts/vsts/wiki/v4_0/models/git_user_date.py new file mode 100644 index 00000000..9199afd0 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_user_date.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 GitUserDate(Model): + """GitUserDate. + + :param date: + :type date: datetime + :param email: + :type email: str + :param name: + :type name: str + """ + + _attribute_map = { + 'date': {'key': 'date', 'type': 'iso-8601'}, + 'email': {'key': 'email', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, date=None, email=None, name=None): + super(GitUserDate, self).__init__() + self.date = date + self.email = email + self.name = name diff --git a/vsts/vsts/wiki/v4_0/models/git_version_descriptor.py b/vsts/vsts/wiki/v4_0/models/git_version_descriptor.py new file mode 100644 index 00000000..919fc237 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/git_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 GitVersionDescriptor(Model): + """GitVersionDescriptor. + + :param version: Version string identifier (name of tag/branch, SHA1 of commit) + :type version: str + :param version_options: Version options - Specify additional modifiers to version (e.g Previous) + :type version_options: object + :param version_type: Version type (branch, tag, or commit). Determines how Id is interpreted + :type version_type: object + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'version_options': {'key': 'versionOptions', 'type': 'object'}, + 'version_type': {'key': 'versionType', 'type': 'object'} + } + + def __init__(self, version=None, version_options=None, version_type=None): + super(GitVersionDescriptor, self).__init__() + self.version = version + self.version_options = version_options + self.version_type = version_type diff --git a/vsts/vsts/wiki/v4_0/models/item_content.py b/vsts/vsts/wiki/v4_0/models/item_content.py new file mode 100644 index 00000000..f5cfaef1 --- /dev/null +++ b/vsts/vsts/wiki/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/wiki/v4_0/models/item_model.py b/vsts/vsts/wiki/v4_0/models/item_model.py new file mode 100644 index 00000000..49e0c98e --- /dev/null +++ b/vsts/vsts/wiki/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: 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/wiki/v4_0/models/wiki_attachment.py b/vsts/vsts/wiki/v4_0/models/wiki_attachment.py new file mode 100644 index 00000000..2a1c03dc --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_attachment.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 WikiAttachment(Model): + """WikiAttachment. + + :param name: Name of the wiki attachment file. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, name=None): + super(WikiAttachment, self).__init__() + self.name = name diff --git a/vsts/vsts/wiki/v4_0/models/wiki_attachment_change.py b/vsts/vsts/wiki/v4_0/models/wiki_attachment_change.py new file mode 100644 index 00000000..1f1975e1 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_attachment_change.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 .wiki_change import WikiChange + + +class WikiAttachmentChange(WikiChange): + """WikiAttachmentChange. + + :param overwrite_content_if_existing: Defines whether the content of an existing attachment is to be overwriten or not. If true, the content of the attachment is overwritten on an existing attachment. If attachment non-existing, new attachment is created. If false, exception is thrown if an attachment with same name exists. + :type overwrite_content_if_existing: bool + """ + + _attribute_map = { + 'overwrite_content_if_existing': {'key': 'overwriteContentIfExisting', 'type': 'bool'} + } + + def __init__(self, overwrite_content_if_existing=None): + super(WikiAttachmentChange, self).__init__() + self.overwrite_content_if_existing = overwrite_content_if_existing diff --git a/vsts/vsts/wiki/v4_0/models/wiki_attachment_response.py b/vsts/vsts/wiki/v4_0/models/wiki_attachment_response.py new file mode 100644 index 00000000..b8c805ea --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_attachment_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 WikiAttachmentResponse(Model): + """WikiAttachmentResponse. + + :param attachment: Defines properties for wiki attachment file. + :type attachment: :class:`WikiAttachment ` + :param eTag: Contains the list of ETag values from the response header of the attachments API call. The first item in the list contains the head commit of wiki repository after the corresponding attachments API call. + :type eTag: list of str + """ + + _attribute_map = { + 'attachment': {'key': 'attachment', 'type': 'WikiAttachment'}, + 'eTag': {'key': 'eTag', 'type': '[str]'} + } + + def __init__(self, attachment=None, eTag=None): + super(WikiAttachmentResponse, self).__init__() + self.attachment = attachment + self.eTag = eTag diff --git a/vsts/vsts/wiki/v4_0/models/wiki_change.py b/vsts/vsts/wiki/v4_0/models/wiki_change.py new file mode 100644 index 00000000..64311489 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_change.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 WikiChange(Model): + """WikiChange. + + :param change_type: ChangeType associated with the item in this change. + :type change_type: object + :param content: New content of the item. + :type content: str + :param item: Item that is subject to this change. + :type item: object + """ + + _attribute_map = { + 'change_type': {'key': 'changeType', 'type': 'object'}, + 'content': {'key': 'content', 'type': 'str'}, + 'item': {'key': 'item', 'type': 'object'} + } + + def __init__(self, change_type=None, content=None, item=None): + super(WikiChange, self).__init__() + self.change_type = change_type + self.content = content + self.item = item diff --git a/vsts/vsts/wiki/v4_0/models/wiki_page.py b/vsts/vsts/wiki/v4_0/models/wiki_page.py new file mode 100644 index 00000000..232e92f1 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_page.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 WikiPage(Model): + """WikiPage. + + :param depth: The depth in terms of level in the hierarchy. + :type depth: int + :param git_item_path: The path of the item corresponding to the wiki page stored in the backing Git repository. This is populated only in the response of the wiki pages GET API. + :type git_item_path: str + :param is_non_conformant: Flag to denote if a page is non-conforming, i.e. 1) if the name doesn't match our norms. 2) if the page does not have a valid entry in the appropriate order file. + :type is_non_conformant: bool + :param is_parent_page: Returns true if this page has child pages under its path. + :type is_parent_page: bool + :param order: Order associated with the page with respect to other pages in the same hierarchy level. + :type order: int + :param path: Path of the wiki page. + :type path: str + """ + + _attribute_map = { + 'depth': {'key': 'depth', 'type': 'int'}, + 'git_item_path': {'key': 'gitItemPath', 'type': 'str'}, + 'is_non_conformant': {'key': 'isNonConformant', 'type': 'bool'}, + 'is_parent_page': {'key': 'isParentPage', 'type': 'bool'}, + 'order': {'key': 'order', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, depth=None, git_item_path=None, is_non_conformant=None, is_parent_page=None, order=None, path=None): + super(WikiPage, self).__init__() + self.depth = depth + self.git_item_path = git_item_path + self.is_non_conformant = is_non_conformant + self.is_parent_page = is_parent_page + self.order = order + self.path = path diff --git a/vsts/vsts/wiki/v4_0/models/wiki_page_change.py b/vsts/vsts/wiki/v4_0/models/wiki_page_change.py new file mode 100644 index 00000000..2e67ce59 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_page_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 .wiki_change import WikiChange + + +class WikiPageChange(WikiChange): + """WikiPageChange. + + :param original_order: Original order of the page to be provided in case of reorder or rename. + :type original_order: int + :param original_path: Original path of the page to be provided in case of rename. + :type original_path: str + """ + + _attribute_map = { + 'original_order': {'key': 'originalOrder', 'type': 'int'}, + 'original_path': {'key': 'originalPath', 'type': 'str'} + } + + def __init__(self, original_order=None, original_path=None): + super(WikiPageChange, self).__init__() + self.original_order = original_order + self.original_path = original_path diff --git a/vsts/vsts/wiki/v4_0/models/wiki_repository.py b/vsts/vsts/wiki/v4_0/models/wiki_repository.py new file mode 100644 index 00000000..e97b4c37 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_repository.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 WikiRepository(Model): + """WikiRepository. + + :param head_commit: The head commit associated with the git repository backing up the wiki. + :type head_commit: str + :param id: The ID of the wiki which is same as the ID of the Git repository that it is backed by. + :type id: str + :param repository: The git repository that backs up the wiki. + :type repository: :class:`GitRepository ` + """ + + _attribute_map = { + 'head_commit': {'key': 'headCommit', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'repository': {'key': 'repository', 'type': 'GitRepository'} + } + + def __init__(self, head_commit=None, id=None, repository=None): + super(WikiRepository, self).__init__() + self.head_commit = head_commit + self.id = id + self.repository = repository diff --git a/vsts/vsts/wiki/v4_0/models/wiki_update.py b/vsts/vsts/wiki/v4_0/models/wiki_update.py new file mode 100644 index 00000000..65af35cf --- /dev/null +++ b/vsts/vsts/wiki/v4_0/models/wiki_update.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 WikiUpdate(Model): + """WikiUpdate. + + :param associated_git_push: Git push object associated with this wiki update object. This is populated only in the response of the wiki updates POST API. + :type associated_git_push: :class:`GitPush ` + :param attachment_changes: List of attachment change objects that is to be associated with this update. + :type attachment_changes: list of :class:`WikiAttachmentChange ` + :param comment: Comment to be associated with this update. + :type comment: str + :param head_commit: Headcommit of the of the repository. + :type head_commit: str + :param page_change: Page change object associated with this update. + :type page_change: :class:`WikiPageChange ` + """ + + _attribute_map = { + 'associated_git_push': {'key': 'associatedGitPush', 'type': 'GitPush'}, + 'attachment_changes': {'key': 'attachmentChanges', 'type': '[WikiAttachmentChange]'}, + 'comment': {'key': 'comment', 'type': 'str'}, + 'head_commit': {'key': 'headCommit', 'type': 'str'}, + 'page_change': {'key': 'pageChange', 'type': 'WikiPageChange'} + } + + def __init__(self, associated_git_push=None, attachment_changes=None, comment=None, head_commit=None, page_change=None): + super(WikiUpdate, self).__init__() + self.associated_git_push = associated_git_push + self.attachment_changes = attachment_changes + self.comment = comment + self.head_commit = head_commit + self.page_change = page_change diff --git a/vsts/vsts/wiki/v4_0/wiki_client.py b/vsts/vsts/wiki/v4_0/wiki_client.py new file mode 100644 index 00000000..966e9244 --- /dev/null +++ b/vsts/vsts/wiki/v4_0/wiki_client.py @@ -0,0 +1,195 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WikiClient(VssClient): + """Wiki + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(WikiClient, 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_pages(self, project, wiki_id, path=None, recursion_level=None, version_descriptor=None): + """GetPages. + [Preview API] Gets metadata or content of the wiki pages under the provided page path. + :param str project: Project ID or project name + :param str wiki_id: ID of the wiki from which the page is to be retrieved. + :param str path: Path from which the pages are to retrieved. + :param str recursion_level: Recursion level for the page retrieval. Defaults to None (Optional). + :param :class:` ` version_descriptor: Version descriptor for the page. Defaults to default branch (Optional). + :rtype: [WikiPage] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_id is not None: + route_values['wikiId'] = self._serialize.url('wiki_id', wiki_id, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + response = self._send(http_method='GET', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WikiPage]', response) + + def get_page_text(self, project, wiki_id, path=None, recursion_level=None, version_descriptor=None): + """GetPageText. + [Preview API] Gets metadata or content of the wiki pages under the provided page path. + :param str project: Project ID or project name + :param str wiki_id: ID of the wiki from which the page is to be retrieved. + :param str path: Path from which the pages are to retrieved. + :param str recursion_level: Recursion level for the page retrieval. Defaults to None (Optional). + :param :class:` ` version_descriptor: Version descriptor for the page. Defaults to default branch (Optional). + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_id is not None: + route_values['wikiId'] = self._serialize.url('wiki_id', wiki_id, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + response = self._send(http_method='GET', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_page_zip(self, project, wiki_id, path=None, recursion_level=None, version_descriptor=None): + """GetPageZip. + [Preview API] Gets metadata or content of the wiki pages under the provided page path. + :param str project: Project ID or project name + :param str wiki_id: ID of the wiki from which the page is to be retrieved. + :param str path: Path from which the pages are to retrieved. + :param str recursion_level: Recursion level for the page retrieval. Defaults to None (Optional). + :param :class:` ` version_descriptor: Version descriptor for the page. Defaults to default branch (Optional). + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_id is not None: + route_values['wikiId'] = self._serialize.url('wiki_id', wiki_id, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + response = self._send(http_method='GET', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def create_update(self, update, project, wiki_id, version_descriptor=None): + """CreateUpdate. + [Preview API] Use this API to create, edit, delete and reorder a wiki page and also to add attachments to a wiki page. For every successful wiki update creation a Git push is made to the backing Git repository. The data corresponding to that Git push is added in the response of this API. + :param :class:` ` update: + :param str project: Project ID or project name + :param str wiki_id: ID of the wiki in which the update is to be made. + :param :class:` ` version_descriptor: Version descriptor for the version on which the update is to be made. Defaults to default branch (Optional). + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_id is not None: + route_values['wikiId'] = self._serialize.url('wiki_id', wiki_id, 'str') + query_parameters = {} + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + content = self._serialize.body(update, 'WikiUpdate') + response = self._send(http_method='POST', + location_id='d015d701-8038-4e7b-8623-3d5ca6813a6c', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('WikiUpdate', response) + + def create_wiki(self, wiki_to_create, project=None): + """CreateWiki. + [Preview API] Creates a backing git repository and does the intialization of the wiki for the given project. + :param :class:` ` wiki_to_create: Object containing name of the wiki to be created and the ID of the project in which the wiki is to be created. The provided name will also be used in the name of the backing git repository. If this is empty, the name will be auto generated. + :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(wiki_to_create, 'GitRepository') + response = self._send(http_method='POST', + location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WikiRepository', response) + + def get_wikis(self, project=None): + """GetWikis. + [Preview API] Retrieves wiki repositories in a project or collection. + :param str project: Project ID or project name + :rtype: [WikiRepository] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WikiRepository]', response) + diff --git a/vsts/vsts/wiki/v4_1/__init__.py b/vsts/vsts/wiki/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/wiki/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/wiki/v4_1/models/__init__.py b/vsts/vsts/wiki/v4_1/models/__init__.py new file mode 100644 index 00000000..577cd9f5 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/__init__.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 .git_repository import GitRepository +from .git_repository_ref import GitRepositoryRef +from .git_version_descriptor import GitVersionDescriptor +from .wiki_attachment import WikiAttachment +from .wiki_attachment_response import WikiAttachmentResponse +from .wiki_create_base_parameters import WikiCreateBaseParameters +from .wiki_create_parameters_v2 import WikiCreateParametersV2 +from .wiki_page import WikiPage +from .wiki_page_create_or_update_parameters import WikiPageCreateOrUpdateParameters +from .wiki_page_move import WikiPageMove +from .wiki_page_move_parameters import WikiPageMoveParameters +from .wiki_page_move_response import WikiPageMoveResponse +from .wiki_page_response import WikiPageResponse +from .wiki_page_view_stats import WikiPageViewStats +from .wiki_update_parameters import WikiUpdateParameters +from .wiki_v2 import WikiV2 + +__all__ = [ + 'GitRepository', + 'GitRepositoryRef', + 'GitVersionDescriptor', + 'WikiAttachment', + 'WikiAttachmentResponse', + 'WikiCreateBaseParameters', + 'WikiCreateParametersV2', + 'WikiPage', + 'WikiPageCreateOrUpdateParameters', + 'WikiPageMove', + 'WikiPageMoveParameters', + 'WikiPageMoveResponse', + 'WikiPageResponse', + 'WikiPageViewStats', + 'WikiUpdateParameters', + 'WikiV2', +] diff --git a/vsts/vsts/wiki/v4_1/models/git_repository.py b/vsts/vsts/wiki/v4_1/models/git_repository.py new file mode 100644 index 00000000..34eacb65 --- /dev/null +++ b/vsts/vsts/wiki/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: 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: 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/wiki/v4_1/models/git_repository_ref.py b/vsts/vsts/wiki/v4_1/models/git_repository_ref.py new file mode 100644 index 00000000..7d099cfb --- /dev/null +++ b/vsts/vsts/wiki/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: 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: 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/wiki/v4_1/models/git_version_descriptor.py b/vsts/vsts/wiki/v4_1/models/git_version_descriptor.py new file mode 100644 index 00000000..919fc237 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/git_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 GitVersionDescriptor(Model): + """GitVersionDescriptor. + + :param version: Version string identifier (name of tag/branch, SHA1 of commit) + :type version: str + :param version_options: Version options - Specify additional modifiers to version (e.g Previous) + :type version_options: object + :param version_type: Version type (branch, tag, or commit). Determines how Id is interpreted + :type version_type: object + """ + + _attribute_map = { + 'version': {'key': 'version', 'type': 'str'}, + 'version_options': {'key': 'versionOptions', 'type': 'object'}, + 'version_type': {'key': 'versionType', 'type': 'object'} + } + + def __init__(self, version=None, version_options=None, version_type=None): + super(GitVersionDescriptor, self).__init__() + self.version = version + self.version_options = version_options + self.version_type = version_type diff --git a/vsts/vsts/wiki/v4_1/models/wiki_attachment.py b/vsts/vsts/wiki/v4_1/models/wiki_attachment.py new file mode 100644 index 00000000..3107c280 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_attachment.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class WikiAttachment(Model): + """WikiAttachment. + + :param name: Name of the wiki attachment file. + :type name: str + :param path: Path of the wiki attachment file. + :type path: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, name=None, path=None): + super(WikiAttachment, self).__init__() + self.name = name + self.path = path diff --git a/vsts/vsts/wiki/v4_1/models/wiki_attachment_response.py b/vsts/vsts/wiki/v4_1/models/wiki_attachment_response.py new file mode 100644 index 00000000..a227df6a --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_attachment_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 WikiAttachmentResponse(Model): + """WikiAttachmentResponse. + + :param attachment: Defines properties for wiki attachment file. + :type attachment: :class:`WikiAttachment ` + :param eTag: Contains the list of ETag values from the response header of the attachments API call. The first item in the list contains the version of the wiki attachment. + :type eTag: list of str + """ + + _attribute_map = { + 'attachment': {'key': 'attachment', 'type': 'WikiAttachment'}, + 'eTag': {'key': 'eTag', 'type': '[str]'} + } + + def __init__(self, attachment=None, eTag=None): + super(WikiAttachmentResponse, self).__init__() + self.attachment = attachment + self.eTag = eTag diff --git a/vsts/vsts/wiki/v4_1/models/wiki_create_base_parameters.py b/vsts/vsts/wiki/v4_1/models/wiki_create_base_parameters.py new file mode 100644 index 00000000..7aa99870 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_create_base_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 WikiCreateBaseParameters(Model): + """WikiCreateBaseParameters. + + :param mapped_path: Folder path inside repository which is shown as Wiki. Not required for ProjectWiki type. + :type mapped_path: str + :param name: Wiki name. + :type name: str + :param project_id: ID of the project in which the wiki is to be created. + :type project_id: str + :param repository_id: ID of the git repository that backs up the wiki. Not required for ProjectWiki type. + :type repository_id: str + :param type: Type of the wiki. + :type type: object + """ + + _attribute_map = { + 'mapped_path': {'key': 'mappedPath', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'} + } + + def __init__(self, mapped_path=None, name=None, project_id=None, repository_id=None, type=None): + super(WikiCreateBaseParameters, self).__init__() + self.mapped_path = mapped_path + self.name = name + self.project_id = project_id + self.repository_id = repository_id + self.type = type diff --git a/vsts/vsts/wiki/v4_1/models/wiki_create_parameters_v2.py b/vsts/vsts/wiki/v4_1/models/wiki_create_parameters_v2.py new file mode 100644 index 00000000..776f09e0 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_create_parameters_v2.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 .wiki_create_base_parameters import WikiCreateBaseParameters + + +class WikiCreateParametersV2(WikiCreateBaseParameters): + """WikiCreateParametersV2. + + :param mapped_path: Folder path inside repository which is shown as Wiki. Not required for ProjectWiki type. + :type mapped_path: str + :param name: Wiki name. + :type name: str + :param project_id: ID of the project in which the wiki is to be created. + :type project_id: str + :param repository_id: ID of the git repository that backs up the wiki. Not required for ProjectWiki type. + :type repository_id: str + :param type: Type of the wiki. + :type type: object + :param version: Version of the wiki. Not required for ProjectWiki type. + :type version: :class:`GitVersionDescriptor ` + """ + + _attribute_map = { + 'mapped_path': {'key': 'mappedPath', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'}, + 'version': {'key': 'version', 'type': 'GitVersionDescriptor'} + } + + def __init__(self, mapped_path=None, name=None, project_id=None, repository_id=None, type=None, version=None): + super(WikiCreateParametersV2, self).__init__(mapped_path=mapped_path, name=name, project_id=project_id, repository_id=repository_id, type=type) + self.version = version diff --git a/vsts/vsts/wiki/v4_1/models/wiki_page.py b/vsts/vsts/wiki/v4_1/models/wiki_page.py new file mode 100644 index 00000000..ae2d58d9 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_page.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 .wiki_page_create_or_update_parameters import WikiPageCreateOrUpdateParameters + + +class WikiPage(WikiPageCreateOrUpdateParameters): + """WikiPage. + + :param content: Content of the wiki page. + :type content: str + :param git_item_path: Path of the git item corresponding to the wiki page stored in the backing Git repository. + :type git_item_path: str + :param is_non_conformant: True if a page is non-conforming, i.e. 1) if the name doesn't match page naming standards. 2) if the page does not have a valid entry in the appropriate order file. + :type is_non_conformant: bool + :param is_parent_page: True if this page has subpages under its path. + :type is_parent_page: bool + :param order: Order of the wiki page, relative to other pages in the same hierarchy level. + :type order: int + :param path: Path of the wiki page. + :type path: str + :param remote_url: Remote web url to the wiki page. + :type remote_url: str + :param sub_pages: List of subpages of the current page. + :type sub_pages: list of :class:`WikiPage ` + :param url: REST url for this wiki page. + :type url: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'git_item_path': {'key': 'gitItemPath', 'type': 'str'}, + 'is_non_conformant': {'key': 'isNonConformant', 'type': 'bool'}, + 'is_parent_page': {'key': 'isParentPage', 'type': 'bool'}, + 'order': {'key': 'order', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, + 'sub_pages': {'key': 'subPages', 'type': '[WikiPage]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, content=None, git_item_path=None, is_non_conformant=None, is_parent_page=None, order=None, path=None, remote_url=None, sub_pages=None, url=None): + super(WikiPage, self).__init__(content=content) + self.git_item_path = git_item_path + self.is_non_conformant = is_non_conformant + self.is_parent_page = is_parent_page + self.order = order + self.path = path + self.remote_url = remote_url + self.sub_pages = sub_pages + self.url = url diff --git a/vsts/vsts/wiki/v4_1/models/wiki_page_create_or_update_parameters.py b/vsts/vsts/wiki/v4_1/models/wiki_page_create_or_update_parameters.py new file mode 100644 index 00000000..25dd0ae7 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_page_create_or_update_parameters.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 WikiPageCreateOrUpdateParameters(Model): + """WikiPageCreateOrUpdateParameters. + + :param content: Content of the wiki page. + :type content: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'} + } + + def __init__(self, content=None): + super(WikiPageCreateOrUpdateParameters, self).__init__() + self.content = content diff --git a/vsts/vsts/wiki/v4_1/models/wiki_page_move.py b/vsts/vsts/wiki/v4_1/models/wiki_page_move.py new file mode 100644 index 00000000..25f98288 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_page_move.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 .wiki_page_move_parameters import WikiPageMoveParameters + + +class WikiPageMove(WikiPageMoveParameters): + """WikiPageMove. + + :param new_order: New order of the wiki page. + :type new_order: int + :param new_path: New path of the wiki page. + :type new_path: str + :param path: Current path of the wiki page. + :type path: str + :param page: Resultant page of this page move operation. + :type page: :class:`WikiPage ` + """ + + _attribute_map = { + 'new_order': {'key': 'newOrder', 'type': 'int'}, + 'new_path': {'key': 'newPath', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'page': {'key': 'page', 'type': 'WikiPage'} + } + + def __init__(self, new_order=None, new_path=None, path=None, page=None): + super(WikiPageMove, self).__init__(new_order=new_order, new_path=new_path, path=path) + self.page = page diff --git a/vsts/vsts/wiki/v4_1/models/wiki_page_move_parameters.py b/vsts/vsts/wiki/v4_1/models/wiki_page_move_parameters.py new file mode 100644 index 00000000..bd705fc4 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_page_move_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 WikiPageMoveParameters(Model): + """WikiPageMoveParameters. + + :param new_order: New order of the wiki page. + :type new_order: int + :param new_path: New path of the wiki page. + :type new_path: str + :param path: Current path of the wiki page. + :type path: str + """ + + _attribute_map = { + 'new_order': {'key': 'newOrder', 'type': 'int'}, + 'new_path': {'key': 'newPath', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, new_order=None, new_path=None, path=None): + super(WikiPageMoveParameters, self).__init__() + self.new_order = new_order + self.new_path = new_path + self.path = path diff --git a/vsts/vsts/wiki/v4_1/models/wiki_page_move_response.py b/vsts/vsts/wiki/v4_1/models/wiki_page_move_response.py new file mode 100644 index 00000000..fc7e472f --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_page_move_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 WikiPageMoveResponse(Model): + """WikiPageMoveResponse. + + :param eTag: Contains the list of ETag values from the response header of the page move API call. The first item in the list contains the version of the wiki page subject to page move. + :type eTag: list of str + :param page_move: Defines properties for wiki page move. + :type page_move: :class:`WikiPageMove ` + """ + + _attribute_map = { + 'eTag': {'key': 'eTag', 'type': '[str]'}, + 'page_move': {'key': 'pageMove', 'type': 'WikiPageMove'} + } + + def __init__(self, eTag=None, page_move=None): + super(WikiPageMoveResponse, self).__init__() + self.eTag = eTag + self.page_move = page_move diff --git a/vsts/vsts/wiki/v4_1/models/wiki_page_response.py b/vsts/vsts/wiki/v4_1/models/wiki_page_response.py new file mode 100644 index 00000000..73c9fec2 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_page_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 WikiPageResponse(Model): + """WikiPageResponse. + + :param eTag: Contains the list of ETag values from the response header of the pages API call. The first item in the list contains the version of the wiki page. + :type eTag: list of str + :param page: Defines properties for wiki page. + :type page: :class:`WikiPage ` + """ + + _attribute_map = { + 'eTag': {'key': 'eTag', 'type': '[str]'}, + 'page': {'key': 'page', 'type': 'WikiPage'} + } + + def __init__(self, eTag=None, page=None): + super(WikiPageResponse, self).__init__() + self.eTag = eTag + self.page = page diff --git a/vsts/vsts/wiki/v4_1/models/wiki_page_view_stats.py b/vsts/vsts/wiki/v4_1/models/wiki_page_view_stats.py new file mode 100644 index 00000000..c8903b4f --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_page_view_stats.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 WikiPageViewStats(Model): + """WikiPageViewStats. + + :param count: Wiki page view count. + :type count: int + :param last_viewed_time: Wiki page last viewed time. + :type last_viewed_time: datetime + :param path: Wiki page path. + :type path: str + """ + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'last_viewed_time': {'key': 'lastViewedTime', 'type': 'iso-8601'}, + 'path': {'key': 'path', 'type': 'str'} + } + + def __init__(self, count=None, last_viewed_time=None, path=None): + super(WikiPageViewStats, self).__init__() + self.count = count + self.last_viewed_time = last_viewed_time + self.path = path diff --git a/vsts/vsts/wiki/v4_1/models/wiki_update_parameters.py b/vsts/vsts/wiki/v4_1/models/wiki_update_parameters.py new file mode 100644 index 00000000..fbd4b5d4 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_update_parameters.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 WikiUpdateParameters(Model): + """WikiUpdateParameters. + + :param versions: Versions of the wiki. + :type versions: list of :class:`GitVersionDescriptor ` + """ + + _attribute_map = { + 'versions': {'key': 'versions', 'type': '[GitVersionDescriptor]'} + } + + def __init__(self, versions=None): + super(WikiUpdateParameters, self).__init__() + self.versions = versions diff --git a/vsts/vsts/wiki/v4_1/models/wiki_v2.py b/vsts/vsts/wiki/v4_1/models/wiki_v2.py new file mode 100644 index 00000000..8c6c1db9 --- /dev/null +++ b/vsts/vsts/wiki/v4_1/models/wiki_v2.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 .wiki_create_base_parameters import WikiCreateBaseParameters + + +class WikiV2(WikiCreateBaseParameters): + """WikiV2. + + :param mapped_path: Folder path inside repository which is shown as Wiki. Not required for ProjectWiki type. + :type mapped_path: str + :param name: Wiki name. + :type name: str + :param project_id: ID of the project in which the wiki is to be created. + :type project_id: str + :param repository_id: ID of the git repository that backs up the wiki. Not required for ProjectWiki type. + :type repository_id: str + :param type: Type of the wiki. + :type type: object + :param id: ID of the wiki. + :type id: str + :param properties: Properties of the wiki. + :type properties: dict + :param remote_url: Remote web url to the wiki. + :type remote_url: str + :param url: REST url for this wiki. + :type url: str + :param versions: Versions of the wiki. + :type versions: list of :class:`GitVersionDescriptor ` + """ + + _attribute_map = { + 'mapped_path': {'key': 'mappedPath', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'project_id': {'key': 'projectId', 'type': 'str'}, + 'repository_id': {'key': 'repositoryId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'}, + 'id': {'key': 'id', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'remote_url': {'key': 'remoteUrl', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'versions': {'key': 'versions', 'type': '[GitVersionDescriptor]'} + } + + def __init__(self, mapped_path=None, name=None, project_id=None, repository_id=None, type=None, id=None, properties=None, remote_url=None, url=None, versions=None): + super(WikiV2, self).__init__(mapped_path=mapped_path, name=name, project_id=project_id, repository_id=repository_id, type=type) + self.id = id + self.properties = properties + self.remote_url = remote_url + self.url = url + self.versions = versions diff --git a/vsts/vsts/wiki/v4_1/wiki_client.py b/vsts/vsts/wiki/v4_1/wiki_client.py new file mode 100644 index 00000000..8c1583bc --- /dev/null +++ b/vsts/vsts/wiki/v4_1/wiki_client.py @@ -0,0 +1,192 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WikiClient(VssClient): + """Wiki + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(WikiClient, 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_page_text(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None): + """GetPageText. + Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + :param str project: Project ID or project name + :param str wiki_identifier: Wiki Id or name. + :param str path: Wiki page path. + :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_identifier is not None: + route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') + response = self._send(http_method='GET', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='4.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def get_page_zip(self, project, wiki_identifier, path=None, recursion_level=None, version_descriptor=None, include_content=None): + """GetPageZip. + Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + :param str project: Project ID or project name + :param str wiki_identifier: Wiki Id or name. + :param str path: Wiki page path. + :param str recursion_level: Recursion level for subpages retrieval. Defaults to `None` (Optional). + :param :class:` ` version_descriptor: GitVersionDescriptor for the page. Defaults to the default branch (Optional). + :param bool include_content: True to include the content of the page in the response for Json content type. Defaults to false (Optional) + :rtype: object + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if wiki_identifier is not None: + route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + query_parameters = {} + if path is not None: + query_parameters['path'] = self._serialize.query('path', path, 'str') + if recursion_level is not None: + query_parameters['recursionLevel'] = self._serialize.query('recursion_level', recursion_level, 'str') + if version_descriptor is not None: + if version_descriptor.version_type is not None: + query_parameters['versionDescriptor.VersionType'] = version_descriptor.version_type + if version_descriptor.version is not None: + query_parameters['versionDescriptor.Version'] = version_descriptor.version + if version_descriptor.version_options is not None: + query_parameters['versionDescriptor.VersionOptions'] = version_descriptor.version_options + if include_content is not None: + query_parameters['includeContent'] = self._serialize.query('include_content', include_content, 'bool') + response = self._send(http_method='GET', + location_id='25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b', + version='4.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def create_wiki(self, wiki_create_params, project=None): + """CreateWiki. + Creates the wiki resource. + :param :class:` ` wiki_create_params: Parameters for the wiki creation. + :param 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(wiki_create_params, 'WikiCreateParametersV2') + response = self._send(http_method='POST', + location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', + version='4.1', + route_values=route_values, + content=content) + return self._deserialize('WikiV2', response) + + def delete_wiki(self, wiki_identifier, project=None): + """DeleteWiki. + Deletes the wiki corresponding to the wiki name or Id provided. + :param str wiki_identifier: Wiki name or Id. + :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 wiki_identifier is not None: + route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + response = self._send(http_method='DELETE', + location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', + version='4.1', + route_values=route_values) + return self._deserialize('WikiV2', response) + + def get_all_wikis(self, project=None): + """GetAllWikis. + Gets all wikis in a project or collection. + :param str project: Project ID or project name + :rtype: [WikiV2] + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + response = self._send(http_method='GET', + location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', + version='4.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WikiV2]', response) + + def get_wiki(self, wiki_identifier, project=None): + """GetWiki. + Gets the wiki corresponding to the wiki name or Id provided. + :param str wiki_identifier: Wiki name or id. + :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 wiki_identifier is not None: + route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + response = self._send(http_method='GET', + location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', + version='4.1', + route_values=route_values) + return self._deserialize('WikiV2', response) + + def update_wiki(self, update_parameters, wiki_identifier, project=None): + """UpdateWiki. + Updates the wiki corresponding to the wiki Id or name provided using the update parameters. + :param :class:` ` update_parameters: Update parameters. + :param str wiki_identifier: Wiki name or Id. + :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 wiki_identifier is not None: + route_values['wikiIdentifier'] = self._serialize.url('wiki_identifier', wiki_identifier, 'str') + content = self._serialize.body(update_parameters, 'WikiUpdateParameters') + response = self._send(http_method='PATCH', + location_id='288d122c-dbd4-451d-aa5f-7dbbba070728', + version='4.1', + route_values=route_values, + content=content) + return self._deserialize('WikiV2', response) + diff --git a/vsts/vsts/work_item_tracking_process/__init__.py b/vsts/vsts/work_item_tracking_process/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/__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_item_tracking_process/v4_0/__init__.py b/vsts/vsts/work_item_tracking_process/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/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_item_tracking_process/v4_0/models/__init__.py b/vsts/vsts/work_item_tracking_process/v4_0/models/__init__.py new file mode 100644 index 00000000..7c228e9f --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/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 .control import Control +from .create_process_model import CreateProcessModel +from .extension import Extension +from .field_model import FieldModel +from .field_rule_model import FieldRuleModel +from .form_layout import FormLayout +from .group import Group +from .page import Page +from .process_model import ProcessModel +from .process_properties import ProcessProperties +from .project_reference import ProjectReference +from .rule_action_model import RuleActionModel +from .rule_condition_model import RuleConditionModel +from .section import Section +from .update_process_model import UpdateProcessModel +from .wit_contribution import WitContribution +from .work_item_behavior import WorkItemBehavior +from .work_item_behavior_field import WorkItemBehaviorField +from .work_item_behavior_reference import WorkItemBehaviorReference +from .work_item_state_result_model import WorkItemStateResultModel +from .work_item_type_behavior import WorkItemTypeBehavior +from .work_item_type_model import WorkItemTypeModel + +__all__ = [ + 'Control', + 'CreateProcessModel', + 'Extension', + 'FieldModel', + 'FieldRuleModel', + 'FormLayout', + 'Group', + 'Page', + 'ProcessModel', + 'ProcessProperties', + 'ProjectReference', + 'RuleActionModel', + 'RuleConditionModel', + 'Section', + 'UpdateProcessModel', + 'WitContribution', + 'WorkItemBehavior', + 'WorkItemBehaviorField', + 'WorkItemBehaviorReference', + 'WorkItemStateResultModel', + 'WorkItemTypeBehavior', + 'WorkItemTypeModel', +] diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/control.py b/vsts/vsts/work_item_tracking_process/v4_0/models/control.py new file mode 100644 index 00000000..ee7eb2a4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/control.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 Control(Model): + """Control. + + :param contribution: Contribution for the control. + :type contribution: :class:`WitContribution ` + :param control_type: Type of the control. + :type control_type: str + :param height: Height of the control, for html controls. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution or not. + :type is_contribution: bool + :param label: Label for the field + :type label: str + :param metadata: Inner text of the control. + :type metadata: str + :param order: + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param read_only: A value indicating if the control is readonly. + :type read_only: bool + :param visible: A value indicating if the control should be hidden or not. + :type visible: bool + :param watermark: Watermark text for the textbox. + :type watermark: str + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'control_type': {'key': 'controlType', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'watermark': {'key': 'watermark', 'type': 'str'} + } + + def __init__(self, contribution=None, control_type=None, height=None, id=None, inherited=None, is_contribution=None, label=None, metadata=None, order=None, overridden=None, read_only=None, visible=None, watermark=None): + super(Control, self).__init__() + self.contribution = contribution + self.control_type = control_type + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.metadata = metadata + self.order = order + self.overridden = overridden + self.read_only = read_only + self.visible = visible + self.watermark = watermark diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/create_process_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/create_process_model.py new file mode 100644 index 00000000..d3b132eb --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/create_process_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 CreateProcessModel(Model): + """CreateProcessModel. + + :param description: + :type description: str + :param name: + :type name: str + :param parent_process_type_id: + :type parent_process_type_id: str + :param reference_name: + :type reference_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_process_type_id': {'key': 'parentProcessTypeId', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'} + } + + def __init__(self, description=None, name=None, parent_process_type_id=None, reference_name=None): + super(CreateProcessModel, self).__init__() + self.description = description + self.name = name + self.parent_process_type_id = parent_process_type_id + self.reference_name = reference_name diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/extension.py b/vsts/vsts/work_item_tracking_process/v4_0/models/extension.py new file mode 100644 index 00000000..7bab24e6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/extension.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 Extension(Model): + """Extension. + + :param id: + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, id=None): + super(Extension, self).__init__() + self.id = id diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/field_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/field_model.py new file mode 100644 index 00000000..c744fe2f --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/field_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 FieldModel(Model): + """FieldModel. + + :param description: + :type description: str + :param id: + :type id: str + :param is_identity: + :type is_identity: bool + :param name: + :type name: str + :param type: + :type type: object + :param url: + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_identity': {'key': 'isIdentity', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, is_identity=None, name=None, type=None, url=None): + super(FieldModel, self).__init__() + self.description = description + self.id = id + self.is_identity = is_identity + self.name = name + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/field_rule_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/field_rule_model.py new file mode 100644 index 00000000..d368bb61 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/field_rule_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 FieldRuleModel(Model): + """FieldRuleModel. + + :param actions: + :type actions: list of :class:`RuleActionModel ` + :param conditions: + :type conditions: list of :class:`RuleConditionModel ` + :param friendly_name: + :type friendly_name: str + :param id: + :type id: str + :param is_disabled: + :type is_disabled: bool + :param is_system: + :type is_system: bool + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[RuleActionModel]'}, + 'conditions': {'key': 'conditions', 'type': '[RuleConditionModel]'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_system': {'key': 'isSystem', 'type': 'bool'} + } + + def __init__(self, actions=None, conditions=None, friendly_name=None, id=None, is_disabled=None, is_system=None): + super(FieldRuleModel, self).__init__() + self.actions = actions + self.conditions = conditions + self.friendly_name = friendly_name + self.id = id + self.is_disabled = is_disabled + self.is_system = is_system diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/form_layout.py b/vsts/vsts/work_item_tracking_process/v4_0/models/form_layout.py new file mode 100644 index 00000000..755e5cde --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/form_layout.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 FormLayout(Model): + """FormLayout. + + :param extensions: Gets and sets extensions list + :type extensions: list of :class:`Extension ` + :param pages: Top level tabs of the layout. + :type pages: list of :class:`Page ` + :param system_controls: Headers controls of the layout. + :type system_controls: list of :class:`Control ` + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[Extension]'}, + 'pages': {'key': 'pages', 'type': '[Page]'}, + 'system_controls': {'key': 'systemControls', 'type': '[Control]'} + } + + def __init__(self, extensions=None, pages=None, system_controls=None): + super(FormLayout, self).__init__() + self.extensions = extensions + self.pages = pages + self.system_controls = system_controls diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/group.py b/vsts/vsts/work_item_tracking_process/v4_0/models/group.py new file mode 100644 index 00000000..72b75d16 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/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 Group(Model): + """Group. + + :param contribution: Contribution for the group. + :type contribution: :class:`WitContribution ` + :param controls: Controls to be put in the group. + :type controls: list of :class:`Control ` + :param height: The height for the contribution. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: Label for the group. + :type label: str + :param order: Order in which the group should appear in the section. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param visible: A value indicating if the group should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'controls': {'key': 'controls', 'type': '[Control]'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, controls=None, height=None, id=None, inherited=None, is_contribution=None, label=None, order=None, overridden=None, visible=None): + super(Group, self).__init__() + self.contribution = contribution + self.controls = controls + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.order = order + self.overridden = overridden + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/page.py b/vsts/vsts/work_item_tracking_process/v4_0/models/page.py new file mode 100644 index 00000000..0939a8a4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/page.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 Page(Model): + """Page. + + :param contribution: Contribution for the page. + :type contribution: :class:`WitContribution ` + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: The label for the page. + :type label: str + :param locked: A value indicating whether any user operations are permitted on this page and the contents of this page + :type locked: bool + :param order: Order in which the page should appear in the layout. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param page_type: The icon for the page. + :type page_type: object + :param sections: The sections of the page. + :type sections: list of :class:`Section ` + :param visible: A value indicating if the page should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'locked': {'key': 'locked', 'type': 'bool'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'page_type': {'key': 'pageType', 'type': 'object'}, + 'sections': {'key': 'sections', 'type': '[Section]'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, id=None, inherited=None, is_contribution=None, label=None, locked=None, order=None, overridden=None, page_type=None, sections=None, visible=None): + super(Page, self).__init__() + self.contribution = contribution + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.locked = locked + self.order = order + self.overridden = overridden + self.page_type = page_type + self.sections = sections + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/process_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/process_model.py new file mode 100644 index 00000000..07cee5ea --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/process_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 ProcessModel(Model): + """ProcessModel. + + :param description: + :type description: str + :param name: + :type name: str + :param projects: + :type projects: list of :class:`ProjectReference ` + :param properties: + :type properties: :class:`ProcessProperties ` + :param reference_name: + :type reference_name: str + :param type_id: + :type type_id: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'projects': {'key': 'projects', 'type': '[ProjectReference]'}, + 'properties': {'key': 'properties', 'type': 'ProcessProperties'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'str'} + } + + def __init__(self, description=None, name=None, projects=None, properties=None, reference_name=None, type_id=None): + super(ProcessModel, self).__init__() + self.description = description + self.name = name + self.projects = projects + self.properties = properties + self.reference_name = reference_name + self.type_id = type_id diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/process_properties.py b/vsts/vsts/work_item_tracking_process/v4_0/models/process_properties.py new file mode 100644 index 00000000..deb736dc --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/process_properties.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 ProcessProperties(Model): + """ProcessProperties. + + :param class_: + :type class_: object + :param is_default: + :type is_default: bool + :param is_enabled: + :type is_enabled: bool + :param parent_process_type_id: + :type parent_process_type_id: str + :param version: + :type version: str + """ + + _attribute_map = { + 'class_': {'key': 'class', 'type': 'object'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'parent_process_type_id': {'key': 'parentProcessTypeId', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, class_=None, is_default=None, is_enabled=None, parent_process_type_id=None, version=None): + super(ProcessProperties, self).__init__() + self.class_ = class_ + self.is_default = is_default + self.is_enabled = is_enabled + self.parent_process_type_id = parent_process_type_id + self.version = version diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/project_reference.py b/vsts/vsts/work_item_tracking_process/v4_0/models/project_reference.py new file mode 100644 index 00000000..11749e0a --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/project_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 ProjectReference(Model): + """ProjectReference. + + :param description: + :type description: str + :param id: + :type id: str + :param name: + :type name: str + :param url: + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, name=None, url=None): + super(ProjectReference, self).__init__() + self.description = description + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/rule_action_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/rule_action_model.py new file mode 100644 index 00000000..7096b198 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/rule_action_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 RuleActionModel(Model): + """RuleActionModel. + + :param action_type: + :type action_type: str + :param target_field: + :type target_field: str + :param value: + :type value: str + """ + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'target_field': {'key': 'targetField', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, action_type=None, target_field=None, value=None): + super(RuleActionModel, self).__init__() + self.action_type = action_type + self.target_field = target_field + self.value = value diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/rule_condition_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/rule_condition_model.py new file mode 100644 index 00000000..6006a69b --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/rule_condition_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 RuleConditionModel(Model): + """RuleConditionModel. + + :param condition_type: + :type condition_type: str + :param field: + :type field: str + :param value: + :type value: str + """ + + _attribute_map = { + 'condition_type': {'key': 'conditionType', 'type': 'str'}, + 'field': {'key': 'field', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, condition_type=None, field=None, value=None): + super(RuleConditionModel, self).__init__() + self.condition_type = condition_type + self.field = field + self.value = value diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/section.py b/vsts/vsts/work_item_tracking_process/v4_0/models/section.py new file mode 100644 index 00000000..28a1c008 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/section.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 Section(Model): + """Section. + + :param groups: + :type groups: list of :class:`Group ` + :param id: The id for the layout node. + :type id: str + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + """ + + _attribute_map = { + 'groups': {'key': 'groups', 'type': '[Group]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'overridden': {'key': 'overridden', 'type': 'bool'} + } + + def __init__(self, groups=None, id=None, overridden=None): + super(Section, self).__init__() + self.groups = groups + self.id = id + self.overridden = overridden diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/update_process_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/update_process_model.py new file mode 100644 index 00000000..74650ef8 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/update_process_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 UpdateProcessModel(Model): + """UpdateProcessModel. + + :param description: + :type description: str + :param is_default: + :type is_default: bool + :param is_enabled: + :type is_enabled: bool + :param name: + :type name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, description=None, is_default=None, is_enabled=None, name=None): + super(UpdateProcessModel, self).__init__() + self.description = description + self.is_default = is_default + self.is_enabled = is_enabled + self.name = name diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/wit_contribution.py b/vsts/vsts/work_item_tracking_process/v4_0/models/wit_contribution.py new file mode 100644 index 00000000..ca76fd0a --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/wit_contribution.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 WitContribution(Model): + """WitContribution. + + :param contribution_id: The id for the contribution. + :type contribution_id: str + :param height: The height for the contribution. + :type height: int + :param inputs: A dictionary holding key value pairs for contribution inputs. + :type inputs: dict + :param show_on_deleted_work_item: A value indicating if the contribution should be show on deleted workItem. + :type show_on_deleted_work_item: bool + """ + + _attribute_map = { + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + 'show_on_deleted_work_item': {'key': 'showOnDeletedWorkItem', 'type': 'bool'} + } + + def __init__(self, contribution_id=None, height=None, inputs=None, show_on_deleted_work_item=None): + super(WitContribution, self).__init__() + self.contribution_id = contribution_id + self.height = height + self.inputs = inputs + self.show_on_deleted_work_item = show_on_deleted_work_item diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior.py b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior.py new file mode 100644 index 00000000..c0dae1f4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior.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 WorkItemBehavior(Model): + """WorkItemBehavior. + + :param abstract: + :type abstract: bool + :param color: + :type color: str + :param description: + :type description: str + :param fields: + :type fields: list of :class:`WorkItemBehaviorField ` + :param id: + :type id: str + :param inherits: + :type inherits: :class:`WorkItemBehaviorReference ` + :param name: + :type name: str + :param overriden: + :type overriden: bool + :param rank: + :type rank: int + :param url: + :type url: str + """ + + _attribute_map = { + 'abstract': {'key': 'abstract', 'type': 'bool'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'fields': {'key': 'fields', 'type': '[WorkItemBehaviorField]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'WorkItemBehaviorReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'overriden': {'key': 'overriden', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, abstract=None, color=None, description=None, fields=None, id=None, inherits=None, name=None, overriden=None, rank=None, url=None): + super(WorkItemBehavior, self).__init__() + self.abstract = abstract + self.color = color + self.description = description + self.fields = fields + self.id = id + self.inherits = inherits + self.name = name + self.overriden = overriden + self.rank = rank + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior_field.py b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior_field.py new file mode 100644 index 00000000..4e7804fe --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior_field.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 WorkItemBehaviorField(Model): + """WorkItemBehaviorField. + + :param behavior_field_id: + :type behavior_field_id: str + :param id: + :type id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'behavior_field_id': {'key': 'behaviorFieldId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behavior_field_id=None, id=None, url=None): + super(WorkItemBehaviorField, self).__init__() + self.behavior_field_id = behavior_field_id + self.id = id + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior_reference.py b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior_reference.py new file mode 100644 index 00000000..7c35db76 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_behavior_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 WorkItemBehaviorReference(Model): + """WorkItemBehaviorReference. + + :param id: + :type id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, url=None): + super(WorkItemBehaviorReference, self).__init__() + self.id = id + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_state_result_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_state_result_model.py new file mode 100644 index 00000000..8021cf25 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_state_result_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 WorkItemStateResultModel(Model): + """WorkItemStateResultModel. + + :param color: + :type color: str + :param hidden: + :type hidden: bool + :param id: + :type id: str + :param name: + :type name: str + :param order: + :type order: int + :param state_category: + :type state_category: str + :param url: + :type url: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'hidden': {'key': 'hidden', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'state_category': {'key': 'stateCategory', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, color=None, hidden=None, id=None, name=None, order=None, state_category=None, url=None): + super(WorkItemStateResultModel, self).__init__() + self.color = color + self.hidden = hidden + self.id = id + self.name = name + self.order = order + self.state_category = state_category + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_type_behavior.py b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_type_behavior.py new file mode 100644 index 00000000..1dd481a0 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_type_behavior.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 WorkItemTypeBehavior(Model): + """WorkItemTypeBehavior. + + :param behavior: + :type behavior: :class:`WorkItemBehaviorReference ` + :param is_default: + :type is_default: bool + :param url: + :type url: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'WorkItemBehaviorReference'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behavior=None, is_default=None, url=None): + super(WorkItemTypeBehavior, self).__init__() + self.behavior = behavior + self.is_default = is_default + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_type_model.py b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_type_model.py new file mode 100644 index 00000000..7146e6c4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/models/work_item_type_model.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 WorkItemTypeModel(Model): + """WorkItemTypeModel. + + :param behaviors: + :type behaviors: list of :class:`WorkItemTypeBehavior ` + :param class_: + :type class_: object + :param color: + :type color: str + :param description: + :type description: str + :param icon: + :type icon: str + :param id: + :type id: str + :param inherits: Parent WIT Id/Internal ReferenceName that it inherits from + :type inherits: str + :param is_disabled: + :type is_disabled: bool + :param layout: + :type layout: :class:`FormLayout ` + :param name: + :type name: str + :param states: + :type states: list of :class:`WorkItemStateResultModel ` + :param url: + :type url: str + """ + + _attribute_map = { + 'behaviors': {'key': 'behaviors', 'type': '[WorkItemTypeBehavior]'}, + 'class_': {'key': 'class', 'type': 'object'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'layout': {'key': 'layout', 'type': 'FormLayout'}, + 'name': {'key': 'name', 'type': 'str'}, + 'states': {'key': 'states', 'type': '[WorkItemStateResultModel]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behaviors=None, class_=None, color=None, description=None, icon=None, id=None, inherits=None, is_disabled=None, layout=None, name=None, states=None, url=None): + super(WorkItemTypeModel, self).__init__() + self.behaviors = behaviors + self.class_ = class_ + self.color = color + self.description = description + self.icon = icon + self.id = id + self.inherits = inherits + self.is_disabled = is_disabled + self.layout = layout + self.name = name + self.states = states + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_0/work_item_tracking_process_client.py b/vsts/vsts/work_item_tracking_process/v4_0/work_item_tracking_process_client.py new file mode 100644 index 00000000..967f0eaa --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_0/work_item_tracking_process_client.py @@ -0,0 +1,374 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WorkItemTrackingClient(VssClient): + """WorkItemTracking + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + 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) + + resource_area_identifier = None + + def get_behavior(self, process_id, behavior_ref_name, expand=None): + """GetBehavior. + [Preview API] + :param str process_id: + :param str behavior_ref_name: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_ref_name is not None: + route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, '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='d1800200-f184-4e75-a5f2-ad0b04b4373e', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemBehavior', response) + + def get_behaviors(self, process_id, expand=None): + """GetBehaviors. + [Preview API] + :param str process_id: + :param str expand: + :rtype: [WorkItemBehavior] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemBehavior]', response) + + def get_fields(self, process_id): + """GetFields. + [Preview API] + :param str process_id: + :rtype: [FieldModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + response = self._send(http_method='GET', + location_id='7a0e7a1a-0b34-4ae0-9744-0aaffb7d0ed1', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[FieldModel]', response) + + def get_work_item_type_fields(self, process_id, wit_ref_name): + """GetWorkItemTypeFields. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :rtype: [FieldModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[FieldModel]', response) + + def create_process(self, create_request): + """CreateProcess. + [Preview API] + :param :class:` ` create_request: + :rtype: :class:` ` + """ + content = self._serialize.body(create_request, 'CreateProcessModel') + response = self._send(http_method='POST', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.0-preview.1', + content=content) + return self._deserialize('ProcessModel', response) + + def delete_process(self, process_type_id): + """DeleteProcess. + [Preview API] + :param str process_type_id: + """ + route_values = {} + if process_type_id is not None: + route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') + self._send(http_method='DELETE', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.0-preview.1', + route_values=route_values) + + def get_process_by_id(self, process_type_id, expand=None): + """GetProcessById. + [Preview API] + :param str process_type_id: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_type_id is not None: + route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProcessModel', response) + + def get_processes(self, expand=None): + """GetProcesses. + [Preview API] + :param str expand: + :rtype: [ProcessModel] + """ + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.0-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ProcessModel]', response) + + def update_process(self, update_request, process_type_id): + """UpdateProcess. + [Preview API] + :param :class:` ` update_request: + :param str process_type_id: + :rtype: :class:` ` + """ + route_values = {} + if process_type_id is not None: + route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') + content = self._serialize.body(update_request, 'UpdateProcessModel') + response = self._send(http_method='PATCH', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ProcessModel', response) + + def add_work_item_type_rule(self, field_rule, process_id, wit_ref_name): + """AddWorkItemTypeRule. + [Preview API] + :param :class:` ` field_rule: + :param str process_id: + :param str wit_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(field_rule, 'FieldRuleModel') + response = self._send(http_method='POST', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldRuleModel', response) + + def delete_work_item_type_rule(self, process_id, wit_ref_name, rule_id): + """DeleteWorkItemTypeRule. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str rule_id: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if rule_id is not None: + route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') + self._send(http_method='DELETE', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.0-preview.1', + route_values=route_values) + + def get_work_item_type_rule(self, process_id, wit_ref_name, rule_id): + """GetWorkItemTypeRule. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str rule_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if rule_id is not None: + route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') + response = self._send(http_method='GET', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('FieldRuleModel', response) + + def get_work_item_type_rules(self, process_id, wit_ref_name): + """GetWorkItemTypeRules. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :rtype: [FieldRuleModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[FieldRuleModel]', response) + + def update_work_item_type_rule(self, field_rule, process_id, wit_ref_name, rule_id): + """UpdateWorkItemTypeRule. + [Preview API] + :param :class:` ` field_rule: + :param str process_id: + :param str wit_ref_name: + :param str rule_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if rule_id is not None: + route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') + content = self._serialize.body(field_rule, 'FieldRuleModel') + response = self._send(http_method='PUT', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldRuleModel', response) + + def get_state_definition(self, process_id, wit_ref_name, state_id): + """GetStateDefinition. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str state_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + response = self._send(http_method='GET', + location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('WorkItemStateResultModel', response) + + def get_state_definitions(self, process_id, wit_ref_name): + """GetStateDefinitions. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :rtype: [WorkItemStateResultModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemStateResultModel]', response) + + def get_work_item_type(self, process_id, wit_ref_name, expand=None): + """GetWorkItemType. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, '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='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemTypeModel', response) + + def get_work_item_types(self, process_id, expand=None): + """GetWorkItemTypes. + [Preview API] + :param str process_id: + :param str expand: + :rtype: [WorkItemTypeModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemTypeModel]', response) + diff --git a/vsts/vsts/work_item_tracking_process/v4_1/__init__.py b/vsts/vsts/work_item_tracking_process/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/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_item_tracking_process/v4_1/models/__init__.py b/vsts/vsts/work_item_tracking_process/v4_1/models/__init__.py new file mode 100644 index 00000000..7c228e9f --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/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 .control import Control +from .create_process_model import CreateProcessModel +from .extension import Extension +from .field_model import FieldModel +from .field_rule_model import FieldRuleModel +from .form_layout import FormLayout +from .group import Group +from .page import Page +from .process_model import ProcessModel +from .process_properties import ProcessProperties +from .project_reference import ProjectReference +from .rule_action_model import RuleActionModel +from .rule_condition_model import RuleConditionModel +from .section import Section +from .update_process_model import UpdateProcessModel +from .wit_contribution import WitContribution +from .work_item_behavior import WorkItemBehavior +from .work_item_behavior_field import WorkItemBehaviorField +from .work_item_behavior_reference import WorkItemBehaviorReference +from .work_item_state_result_model import WorkItemStateResultModel +from .work_item_type_behavior import WorkItemTypeBehavior +from .work_item_type_model import WorkItemTypeModel + +__all__ = [ + 'Control', + 'CreateProcessModel', + 'Extension', + 'FieldModel', + 'FieldRuleModel', + 'FormLayout', + 'Group', + 'Page', + 'ProcessModel', + 'ProcessProperties', + 'ProjectReference', + 'RuleActionModel', + 'RuleConditionModel', + 'Section', + 'UpdateProcessModel', + 'WitContribution', + 'WorkItemBehavior', + 'WorkItemBehaviorField', + 'WorkItemBehaviorReference', + 'WorkItemStateResultModel', + 'WorkItemTypeBehavior', + 'WorkItemTypeModel', +] diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/control.py b/vsts/vsts/work_item_tracking_process/v4_1/models/control.py new file mode 100644 index 00000000..491ca1ad --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/control.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 Control(Model): + """Control. + + :param contribution: Contribution for the control. + :type contribution: :class:`WitContribution ` + :param control_type: Type of the control. + :type control_type: str + :param height: Height of the control, for html controls. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution or not. + :type is_contribution: bool + :param label: Label for the field + :type label: str + :param metadata: Inner text of the control. + :type metadata: str + :param order: + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param read_only: A value indicating if the control is readonly. + :type read_only: bool + :param visible: A value indicating if the control should be hidden or not. + :type visible: bool + :param watermark: Watermark text for the textbox. + :type watermark: str + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'control_type': {'key': 'controlType', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'watermark': {'key': 'watermark', 'type': 'str'} + } + + def __init__(self, contribution=None, control_type=None, height=None, id=None, inherited=None, is_contribution=None, label=None, metadata=None, order=None, overridden=None, read_only=None, visible=None, watermark=None): + super(Control, self).__init__() + self.contribution = contribution + self.control_type = control_type + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.metadata = metadata + self.order = order + self.overridden = overridden + self.read_only = read_only + self.visible = visible + self.watermark = watermark diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/create_process_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/create_process_model.py new file mode 100644 index 00000000..4c2424c5 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/create_process_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 CreateProcessModel(Model): + """CreateProcessModel. + + :param description: Description of the process + :type description: str + :param name: Name of the process + :type name: str + :param parent_process_type_id: The ID of the parent process + :type parent_process_type_id: str + :param reference_name: Reference name of the process + :type reference_name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parent_process_type_id': {'key': 'parentProcessTypeId', 'type': 'str'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'} + } + + def __init__(self, description=None, name=None, parent_process_type_id=None, reference_name=None): + super(CreateProcessModel, self).__init__() + self.description = description + self.name = name + self.parent_process_type_id = parent_process_type_id + self.reference_name = reference_name diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/extension.py b/vsts/vsts/work_item_tracking_process/v4_1/models/extension.py new file mode 100644 index 00000000..7bab24e6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/extension.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 Extension(Model): + """Extension. + + :param id: + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, id=None): + super(Extension, self).__init__() + self.id = id diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/field_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/field_model.py new file mode 100644 index 00000000..c744fe2f --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/field_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 FieldModel(Model): + """FieldModel. + + :param description: + :type description: str + :param id: + :type id: str + :param is_identity: + :type is_identity: bool + :param name: + :type name: str + :param type: + :type type: object + :param url: + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_identity': {'key': 'isIdentity', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, is_identity=None, name=None, type=None, url=None): + super(FieldModel, self).__init__() + self.description = description + self.id = id + self.is_identity = is_identity + self.name = name + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/field_rule_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/field_rule_model.py new file mode 100644 index 00000000..c3e7e366 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/field_rule_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 FieldRuleModel(Model): + """FieldRuleModel. + + :param actions: + :type actions: list of :class:`RuleActionModel ` + :param conditions: + :type conditions: list of :class:`RuleConditionModel ` + :param friendly_name: + :type friendly_name: str + :param id: + :type id: str + :param is_disabled: + :type is_disabled: bool + :param is_system: + :type is_system: bool + """ + + _attribute_map = { + 'actions': {'key': 'actions', 'type': '[RuleActionModel]'}, + 'conditions': {'key': 'conditions', 'type': '[RuleConditionModel]'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'is_system': {'key': 'isSystem', 'type': 'bool'} + } + + def __init__(self, actions=None, conditions=None, friendly_name=None, id=None, is_disabled=None, is_system=None): + super(FieldRuleModel, self).__init__() + self.actions = actions + self.conditions = conditions + self.friendly_name = friendly_name + self.id = id + self.is_disabled = is_disabled + self.is_system = is_system diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/form_layout.py b/vsts/vsts/work_item_tracking_process/v4_1/models/form_layout.py new file mode 100644 index 00000000..14c97ff8 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/form_layout.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 FormLayout(Model): + """FormLayout. + + :param extensions: Gets and sets extensions list + :type extensions: list of :class:`Extension ` + :param pages: Top level tabs of the layout. + :type pages: list of :class:`Page ` + :param system_controls: Headers controls of the layout. + :type system_controls: list of :class:`Control ` + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[Extension]'}, + 'pages': {'key': 'pages', 'type': '[Page]'}, + 'system_controls': {'key': 'systemControls', 'type': '[Control]'} + } + + def __init__(self, extensions=None, pages=None, system_controls=None): + super(FormLayout, self).__init__() + self.extensions = extensions + self.pages = pages + self.system_controls = system_controls diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/group.py b/vsts/vsts/work_item_tracking_process/v4_1/models/group.py new file mode 100644 index 00000000..5cb7fbdd --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/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 Group(Model): + """Group. + + :param contribution: Contribution for the group. + :type contribution: :class:`WitContribution ` + :param controls: Controls to be put in the group. + :type controls: list of :class:`Control ` + :param height: The height for the contribution. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: Label for the group. + :type label: str + :param order: Order in which the group should appear in the section. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param visible: A value indicating if the group should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'controls': {'key': 'controls', 'type': '[Control]'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, controls=None, height=None, id=None, inherited=None, is_contribution=None, label=None, order=None, overridden=None, visible=None): + super(Group, self).__init__() + self.contribution = contribution + self.controls = controls + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.order = order + self.overridden = overridden + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/page.py b/vsts/vsts/work_item_tracking_process/v4_1/models/page.py new file mode 100644 index 00000000..010972ca --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/page.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 Page(Model): + """Page. + + :param contribution: Contribution for the page. + :type contribution: :class:`WitContribution ` + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: The label for the page. + :type label: str + :param locked: A value indicating whether any user operations are permitted on this page and the contents of this page + :type locked: bool + :param order: Order in which the page should appear in the layout. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param page_type: The icon for the page. + :type page_type: object + :param sections: The sections of the page. + :type sections: list of :class:`Section ` + :param visible: A value indicating if the page should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'locked': {'key': 'locked', 'type': 'bool'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'page_type': {'key': 'pageType', 'type': 'object'}, + 'sections': {'key': 'sections', 'type': '[Section]'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, id=None, inherited=None, is_contribution=None, label=None, locked=None, order=None, overridden=None, page_type=None, sections=None, visible=None): + super(Page, self).__init__() + self.contribution = contribution + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.locked = locked + self.order = order + self.overridden = overridden + self.page_type = page_type + self.sections = sections + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/process_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/process_model.py new file mode 100644 index 00000000..477269c6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/process_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 ProcessModel(Model): + """ProcessModel. + + :param description: Description of the process + :type description: str + :param name: Name of the process + :type name: str + :param projects: Projects in this process + :type projects: list of :class:`ProjectReference ` + :param properties: Properties of the process + :type properties: :class:`ProcessProperties ` + :param reference_name: Reference name of the process + :type reference_name: str + :param type_id: The ID of the process + :type type_id: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'projects': {'key': 'projects', 'type': '[ProjectReference]'}, + 'properties': {'key': 'properties', 'type': 'ProcessProperties'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'type_id': {'key': 'typeId', 'type': 'str'} + } + + def __init__(self, description=None, name=None, projects=None, properties=None, reference_name=None, type_id=None): + super(ProcessModel, self).__init__() + self.description = description + self.name = name + self.projects = projects + self.properties = properties + self.reference_name = reference_name + self.type_id = type_id diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/process_properties.py b/vsts/vsts/work_item_tracking_process/v4_1/models/process_properties.py new file mode 100644 index 00000000..d7831766 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/process_properties.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 ProcessProperties(Model): + """ProcessProperties. + + :param class_: Class of the process + :type class_: object + :param is_default: Is the process default process + :type is_default: bool + :param is_enabled: Is the process enabled + :type is_enabled: bool + :param parent_process_type_id: ID of the parent process + :type parent_process_type_id: str + :param version: Version of the process + :type version: str + """ + + _attribute_map = { + 'class_': {'key': 'class', 'type': 'object'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'parent_process_type_id': {'key': 'parentProcessTypeId', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'} + } + + def __init__(self, class_=None, is_default=None, is_enabled=None, parent_process_type_id=None, version=None): + super(ProcessProperties, self).__init__() + self.class_ = class_ + self.is_default = is_default + self.is_enabled = is_enabled + self.parent_process_type_id = parent_process_type_id + self.version = version diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/project_reference.py b/vsts/vsts/work_item_tracking_process/v4_1/models/project_reference.py new file mode 100644 index 00000000..a0956259 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/project_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 ProjectReference(Model): + """ProjectReference. + + :param description: Description of the project + :type description: str + :param id: The ID of the project + :type id: str + :param name: Name of the project + :type name: str + :param url: Url of the project + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, name=None, url=None): + super(ProjectReference, self).__init__() + self.description = description + self.id = id + self.name = name + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/rule_action_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/rule_action_model.py new file mode 100644 index 00000000..7096b198 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/rule_action_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 RuleActionModel(Model): + """RuleActionModel. + + :param action_type: + :type action_type: str + :param target_field: + :type target_field: str + :param value: + :type value: str + """ + + _attribute_map = { + 'action_type': {'key': 'actionType', 'type': 'str'}, + 'target_field': {'key': 'targetField', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, action_type=None, target_field=None, value=None): + super(RuleActionModel, self).__init__() + self.action_type = action_type + self.target_field = target_field + self.value = value diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/rule_condition_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/rule_condition_model.py new file mode 100644 index 00000000..6006a69b --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/rule_condition_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 RuleConditionModel(Model): + """RuleConditionModel. + + :param condition_type: + :type condition_type: str + :param field: + :type field: str + :param value: + :type value: str + """ + + _attribute_map = { + 'condition_type': {'key': 'conditionType', 'type': 'str'}, + 'field': {'key': 'field', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, condition_type=None, field=None, value=None): + super(RuleConditionModel, self).__init__() + self.condition_type = condition_type + self.field = field + self.value = value diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/section.py b/vsts/vsts/work_item_tracking_process/v4_1/models/section.py new file mode 100644 index 00000000..42424062 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/section.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 Section(Model): + """Section. + + :param groups: + :type groups: list of :class:`Group ` + :param id: The id for the layout node. + :type id: str + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + """ + + _attribute_map = { + 'groups': {'key': 'groups', 'type': '[Group]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'overridden': {'key': 'overridden', 'type': 'bool'} + } + + def __init__(self, groups=None, id=None, overridden=None): + super(Section, self).__init__() + self.groups = groups + self.id = id + self.overridden = overridden diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/update_process_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/update_process_model.py new file mode 100644 index 00000000..74650ef8 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/update_process_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 UpdateProcessModel(Model): + """UpdateProcessModel. + + :param description: + :type description: str + :param is_default: + :type is_default: bool + :param is_enabled: + :type is_enabled: bool + :param name: + :type name: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, description=None, is_default=None, is_enabled=None, name=None): + super(UpdateProcessModel, self).__init__() + self.description = description + self.is_default = is_default + self.is_enabled = is_enabled + self.name = name diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/wit_contribution.py b/vsts/vsts/work_item_tracking_process/v4_1/models/wit_contribution.py new file mode 100644 index 00000000..ca76fd0a --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/wit_contribution.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 WitContribution(Model): + """WitContribution. + + :param contribution_id: The id for the contribution. + :type contribution_id: str + :param height: The height for the contribution. + :type height: int + :param inputs: A dictionary holding key value pairs for contribution inputs. + :type inputs: dict + :param show_on_deleted_work_item: A value indicating if the contribution should be show on deleted workItem. + :type show_on_deleted_work_item: bool + """ + + _attribute_map = { + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + 'show_on_deleted_work_item': {'key': 'showOnDeletedWorkItem', 'type': 'bool'} + } + + def __init__(self, contribution_id=None, height=None, inputs=None, show_on_deleted_work_item=None): + super(WitContribution, self).__init__() + self.contribution_id = contribution_id + self.height = height + self.inputs = inputs + self.show_on_deleted_work_item = show_on_deleted_work_item diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior.py b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior.py new file mode 100644 index 00000000..d38833f6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior.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 WorkItemBehavior(Model): + """WorkItemBehavior. + + :param abstract: + :type abstract: bool + :param color: + :type color: str + :param description: + :type description: str + :param fields: + :type fields: list of :class:`WorkItemBehaviorField ` + :param id: + :type id: str + :param inherits: + :type inherits: :class:`WorkItemBehaviorReference ` + :param name: + :type name: str + :param overriden: + :type overriden: bool + :param rank: + :type rank: int + :param url: + :type url: str + """ + + _attribute_map = { + 'abstract': {'key': 'abstract', 'type': 'bool'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'fields': {'key': 'fields', 'type': '[WorkItemBehaviorField]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'WorkItemBehaviorReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'overriden': {'key': 'overriden', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, abstract=None, color=None, description=None, fields=None, id=None, inherits=None, name=None, overriden=None, rank=None, url=None): + super(WorkItemBehavior, self).__init__() + self.abstract = abstract + self.color = color + self.description = description + self.fields = fields + self.id = id + self.inherits = inherits + self.name = name + self.overriden = overriden + self.rank = rank + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior_field.py b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior_field.py new file mode 100644 index 00000000..4e7804fe --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior_field.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 WorkItemBehaviorField(Model): + """WorkItemBehaviorField. + + :param behavior_field_id: + :type behavior_field_id: str + :param id: + :type id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'behavior_field_id': {'key': 'behaviorFieldId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behavior_field_id=None, id=None, url=None): + super(WorkItemBehaviorField, self).__init__() + self.behavior_field_id = behavior_field_id + self.id = id + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior_reference.py b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior_reference.py new file mode 100644 index 00000000..7c35db76 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_behavior_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 WorkItemBehaviorReference(Model): + """WorkItemBehaviorReference. + + :param id: + :type id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, url=None): + super(WorkItemBehaviorReference, self).__init__() + self.id = id + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_state_result_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_state_result_model.py new file mode 100644 index 00000000..8021cf25 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_state_result_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 WorkItemStateResultModel(Model): + """WorkItemStateResultModel. + + :param color: + :type color: str + :param hidden: + :type hidden: bool + :param id: + :type id: str + :param name: + :type name: str + :param order: + :type order: int + :param state_category: + :type state_category: str + :param url: + :type url: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'hidden': {'key': 'hidden', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'state_category': {'key': 'stateCategory', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, color=None, hidden=None, id=None, name=None, order=None, state_category=None, url=None): + super(WorkItemStateResultModel, self).__init__() + self.color = color + self.hidden = hidden + self.id = id + self.name = name + self.order = order + self.state_category = state_category + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_type_behavior.py b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_type_behavior.py new file mode 100644 index 00000000..769c34bc --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_type_behavior.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 WorkItemTypeBehavior(Model): + """WorkItemTypeBehavior. + + :param behavior: + :type behavior: :class:`WorkItemBehaviorReference ` + :param is_default: + :type is_default: bool + :param url: + :type url: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'WorkItemBehaviorReference'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behavior=None, is_default=None, url=None): + super(WorkItemTypeBehavior, self).__init__() + self.behavior = behavior + self.is_default = is_default + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_type_model.py b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_type_model.py new file mode 100644 index 00000000..d70f8632 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/models/work_item_type_model.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 WorkItemTypeModel(Model): + """WorkItemTypeModel. + + :param behaviors: + :type behaviors: list of :class:`WorkItemTypeBehavior ` + :param class_: + :type class_: object + :param color: + :type color: str + :param description: + :type description: str + :param icon: + :type icon: str + :param id: + :type id: str + :param inherits: Parent WIT Id/Internal ReferenceName that it inherits from + :type inherits: str + :param is_disabled: + :type is_disabled: bool + :param layout: + :type layout: :class:`FormLayout ` + :param name: + :type name: str + :param states: + :type states: list of :class:`WorkItemStateResultModel ` + :param url: + :type url: str + """ + + _attribute_map = { + 'behaviors': {'key': 'behaviors', 'type': '[WorkItemTypeBehavior]'}, + 'class_': {'key': 'class', 'type': 'object'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'layout': {'key': 'layout', 'type': 'FormLayout'}, + 'name': {'key': 'name', 'type': 'str'}, + 'states': {'key': 'states', 'type': '[WorkItemStateResultModel]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behaviors=None, class_=None, color=None, description=None, icon=None, id=None, inherits=None, is_disabled=None, layout=None, name=None, states=None, url=None): + super(WorkItemTypeModel, self).__init__() + self.behaviors = behaviors + self.class_ = class_ + self.color = color + self.description = description + self.icon = icon + self.id = id + self.inherits = inherits + self.is_disabled = is_disabled + self.layout = layout + self.name = name + self.states = states + self.url = url diff --git a/vsts/vsts/work_item_tracking_process/v4_1/work_item_tracking_process_client.py b/vsts/vsts/work_item_tracking_process/v4_1/work_item_tracking_process_client.py new file mode 100644 index 00000000..1983879f --- /dev/null +++ b/vsts/vsts/work_item_tracking_process/v4_1/work_item_tracking_process_client.py @@ -0,0 +1,374 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WorkItemTrackingClient(VssClient): + """WorkItemTracking + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + 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) + + resource_area_identifier = None + + def get_behavior(self, process_id, behavior_ref_name, expand=None): + """GetBehavior. + [Preview API] Returns a behavior of the process. + :param str process_id: The ID of the process + :param str behavior_ref_name: Reference name of the behavior + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_ref_name is not None: + route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, '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='d1800200-f184-4e75-a5f2-ad0b04b4373e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemBehavior', response) + + def get_behaviors(self, process_id, expand=None): + """GetBehaviors. + [Preview API] Returns a list of all behaviors in the process. + :param str process_id: The ID of the process + :param str expand: + :rtype: [WorkItemBehavior] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='d1800200-f184-4e75-a5f2-ad0b04b4373e', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemBehavior]', response) + + def get_fields(self, process_id): + """GetFields. + [Preview API] Returns a list of all fields in a process. + :param str process_id: The ID of the process + :rtype: [FieldModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + response = self._send(http_method='GET', + location_id='7a0e7a1a-0b34-4ae0-9744-0aaffb7d0ed1', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[FieldModel]', response) + + def get_work_item_type_fields(self, process_id, wit_ref_name): + """GetWorkItemTypeFields. + [Preview API] Returns a list of all fields in a work item type. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: [FieldModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='bc0ad8dc-e3f3-46b0-b06c-5bf861793196', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[FieldModel]', response) + + def create_process(self, create_request): + """CreateProcess. + [Preview API] Creates a process. + :param :class:` ` create_request: + :rtype: :class:` ` + """ + content = self._serialize.body(create_request, 'CreateProcessModel') + response = self._send(http_method='POST', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.1-preview.1', + content=content) + return self._deserialize('ProcessModel', response) + + def delete_process(self, process_type_id): + """DeleteProcess. + [Preview API] Removes a process of a specific ID. + :param str process_type_id: + """ + route_values = {} + if process_type_id is not None: + route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') + self._send(http_method='DELETE', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.1-preview.1', + route_values=route_values) + + def get_process_by_id(self, process_type_id, expand=None): + """GetProcessById. + [Preview API] Returns a single process of a specified ID. + :param str process_type_id: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_type_id is not None: + route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProcessModel', response) + + def get_processes(self, expand=None): + """GetProcesses. + [Preview API] Returns a list of all processes. + :param str expand: + :rtype: [ProcessModel] + """ + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.1-preview.1', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[ProcessModel]', response) + + def update_process(self, update_request, process_type_id): + """UpdateProcess. + [Preview API] Updates a process of a specific ID. + :param :class:` ` update_request: + :param str process_type_id: + :rtype: :class:` ` + """ + route_values = {} + if process_type_id is not None: + route_values['processTypeId'] = self._serialize.url('process_type_id', process_type_id, 'str') + content = self._serialize.body(update_request, 'UpdateProcessModel') + response = self._send(http_method='PATCH', + location_id='02cc6a73-5cfb-427d-8c8e-b49fb086e8af', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('ProcessModel', response) + + def add_work_item_type_rule(self, field_rule, process_id, wit_ref_name): + """AddWorkItemTypeRule. + [Preview API] Adds a rule to work item type in the process. + :param :class:` ` field_rule: + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(field_rule, 'FieldRuleModel') + response = self._send(http_method='POST', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldRuleModel', response) + + def delete_work_item_type_rule(self, process_id, wit_ref_name, rule_id): + """DeleteWorkItemTypeRule. + [Preview API] Removes a rule from the work item type in the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str rule_id: The ID of the rule + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if rule_id is not None: + route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') + self._send(http_method='DELETE', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.1-preview.1', + route_values=route_values) + + def get_work_item_type_rule(self, process_id, wit_ref_name, rule_id): + """GetWorkItemTypeRule. + [Preview API] Returns a single rule in the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str rule_id: The ID of the rule + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if rule_id is not None: + route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') + response = self._send(http_method='GET', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('FieldRuleModel', response) + + def get_work_item_type_rules(self, process_id, wit_ref_name): + """GetWorkItemTypeRules. + [Preview API] Returns a list of all rules in the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: [FieldRuleModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[FieldRuleModel]', response) + + def update_work_item_type_rule(self, field_rule, process_id, wit_ref_name, rule_id): + """UpdateWorkItemTypeRule. + [Preview API] Updates a rule in the work item type of the process. + :param :class:` ` field_rule: + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str rule_id: The ID of the rule + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if rule_id is not None: + route_values['ruleId'] = self._serialize.url('rule_id', rule_id, 'str') + content = self._serialize.body(field_rule, 'FieldRuleModel') + response = self._send(http_method='PUT', + location_id='76fe3432-d825-479d-a5f6-983bbb78b4f3', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldRuleModel', response) + + def get_state_definition(self, process_id, wit_ref_name, state_id): + """GetStateDefinition. + [Preview API] Returns a single state definition in a work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str state_id: The ID of the state + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + response = self._send(http_method='GET', + location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('WorkItemStateResultModel', response) + + def get_state_definitions(self, process_id, wit_ref_name): + """GetStateDefinitions. + [Preview API] Returns a list of all state definitions in a work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: [WorkItemStateResultModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='31015d57-2dff-4a46-adb3-2fb4ee3dcec9', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemStateResultModel]', response) + + def get_work_item_type(self, process_id, wit_ref_name, expand=None): + """GetWorkItemType. + [Preview API] Returns a single work item type in a process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, '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='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemTypeModel', response) + + def get_work_item_types(self, process_id, expand=None): + """GetWorkItemTypes. + [Preview API] Returns a list of all work item types in a process. + :param str process_id: The ID of the process + :param str expand: + :rtype: [WorkItemTypeModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='e2e9d1a6-432d-4062-8870-bfcb8c324ad7', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemTypeModel]', response) + diff --git a/vsts/vsts/work_item_tracking_process_definitions/__init__.py b/vsts/vsts/work_item_tracking_process_definitions/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/__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_item_tracking_process_definitions/v4_0/__init__.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/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_item_tracking_process_definitions/v4_0/models/__init__.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/__init__.py new file mode 100644 index 00000000..a15d4f6e --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/__init__.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 .behavior_create_model import BehaviorCreateModel +from .behavior_model import BehaviorModel +from .behavior_replace_model import BehaviorReplaceModel +from .control import Control +from .extension import Extension +from .field_model import FieldModel +from .field_update import FieldUpdate +from .form_layout import FormLayout +from .group import Group +from .hide_state_model import HideStateModel +from .page import Page +from .pick_list_item_model import PickListItemModel +from .pick_list_metadata_model import PickListMetadataModel +from .pick_list_model import PickListModel +from .section import Section +from .wit_contribution import WitContribution +from .work_item_behavior_reference import WorkItemBehaviorReference +from .work_item_state_input_model import WorkItemStateInputModel +from .work_item_state_result_model import WorkItemStateResultModel +from .work_item_type_behavior import WorkItemTypeBehavior +from .work_item_type_field_model import WorkItemTypeFieldModel +from .work_item_type_model import WorkItemTypeModel +from .work_item_type_update_model import WorkItemTypeUpdateModel + +__all__ = [ + 'BehaviorCreateModel', + 'BehaviorModel', + 'BehaviorReplaceModel', + 'Control', + 'Extension', + 'FieldModel', + 'FieldUpdate', + 'FormLayout', + 'Group', + 'HideStateModel', + 'Page', + 'PickListItemModel', + 'PickListMetadataModel', + 'PickListModel', + 'Section', + 'WitContribution', + 'WorkItemBehaviorReference', + 'WorkItemStateInputModel', + 'WorkItemStateResultModel', + 'WorkItemTypeBehavior', + 'WorkItemTypeFieldModel', + 'WorkItemTypeModel', + 'WorkItemTypeUpdateModel', +] diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_create_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_create_model.py new file mode 100644 index 00000000..03bd7bd1 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_create_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 BehaviorCreateModel(Model): + """BehaviorCreateModel. + + :param color: Color + :type color: str + :param inherits: Parent behavior id + :type inherits: str + :param name: Name of the behavior + :type name: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, color=None, inherits=None, name=None): + super(BehaviorCreateModel, self).__init__() + self.color = color + self.inherits = inherits + self.name = name diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_model.py new file mode 100644 index 00000000..b6649a46 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_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 BehaviorModel(Model): + """BehaviorModel. + + :param abstract: Is the behavior abstract (i.e. can not be associated with any work item type) + :type abstract: bool + :param color: Color + :type color: str + :param description: Description + :type description: str + :param id: Behavior Id + :type id: str + :param inherits: Parent behavior reference + :type inherits: :class:`WorkItemBehaviorReference ` + :param name: Behavior Name + :type name: str + :param overridden: Is the behavior overrides a behavior from system process + :type overridden: bool + :param rank: Rank + :type rank: int + :param url: + :type url: str + """ + + _attribute_map = { + 'abstract': {'key': 'abstract', 'type': 'bool'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'WorkItemBehaviorReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, abstract=None, color=None, description=None, id=None, inherits=None, name=None, overridden=None, rank=None, url=None): + super(BehaviorModel, self).__init__() + self.abstract = abstract + self.color = color + self.description = description + self.id = id + self.inherits = inherits + self.name = name + self.overridden = overridden + self.rank = rank + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_replace_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_replace_model.py new file mode 100644 index 00000000..2f788288 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/behavior_replace_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 BehaviorReplaceModel(Model): + """BehaviorReplaceModel. + + :param color: Color + :type color: str + :param name: Behavior Name + :type name: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, color=None, name=None): + super(BehaviorReplaceModel, self).__init__() + self.color = color + self.name = name diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/control.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/control.py new file mode 100644 index 00000000..ee7eb2a4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/control.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 Control(Model): + """Control. + + :param contribution: Contribution for the control. + :type contribution: :class:`WitContribution ` + :param control_type: Type of the control. + :type control_type: str + :param height: Height of the control, for html controls. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution or not. + :type is_contribution: bool + :param label: Label for the field + :type label: str + :param metadata: Inner text of the control. + :type metadata: str + :param order: + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param read_only: A value indicating if the control is readonly. + :type read_only: bool + :param visible: A value indicating if the control should be hidden or not. + :type visible: bool + :param watermark: Watermark text for the textbox. + :type watermark: str + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'control_type': {'key': 'controlType', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'watermark': {'key': 'watermark', 'type': 'str'} + } + + def __init__(self, contribution=None, control_type=None, height=None, id=None, inherited=None, is_contribution=None, label=None, metadata=None, order=None, overridden=None, read_only=None, visible=None, watermark=None): + super(Control, self).__init__() + self.contribution = contribution + self.control_type = control_type + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.metadata = metadata + self.order = order + self.overridden = overridden + self.read_only = read_only + self.visible = visible + self.watermark = watermark diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/extension.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/extension.py new file mode 100644 index 00000000..7bab24e6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/extension.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 Extension(Model): + """Extension. + + :param id: + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, id=None): + super(Extension, self).__init__() + self.id = id diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/field_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/field_model.py new file mode 100644 index 00000000..19410826 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/field_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 FieldModel(Model): + """FieldModel. + + :param description: + :type description: str + :param id: + :type id: str + :param name: + :type name: str + :param pick_list: + :type pick_list: :class:`PickListMetadataModel ` + :param type: + :type type: object + :param url: + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pick_list': {'key': 'pickList', 'type': 'PickListMetadataModel'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, name=None, pick_list=None, type=None, url=None): + super(FieldModel, self).__init__() + self.description = description + self.id = id + self.name = name + self.pick_list = pick_list + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/field_update.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/field_update.py new file mode 100644 index 00000000..fee524e6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/field_update.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FieldUpdate(Model): + """FieldUpdate. + + :param description: + :type description: str + :param id: + :type id: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, description=None, id=None): + super(FieldUpdate, self).__init__() + self.description = description + self.id = id diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/form_layout.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/form_layout.py new file mode 100644 index 00000000..755e5cde --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/form_layout.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 FormLayout(Model): + """FormLayout. + + :param extensions: Gets and sets extensions list + :type extensions: list of :class:`Extension ` + :param pages: Top level tabs of the layout. + :type pages: list of :class:`Page ` + :param system_controls: Headers controls of the layout. + :type system_controls: list of :class:`Control ` + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[Extension]'}, + 'pages': {'key': 'pages', 'type': '[Page]'}, + 'system_controls': {'key': 'systemControls', 'type': '[Control]'} + } + + def __init__(self, extensions=None, pages=None, system_controls=None): + super(FormLayout, self).__init__() + self.extensions = extensions + self.pages = pages + self.system_controls = system_controls diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/group.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/group.py new file mode 100644 index 00000000..72b75d16 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/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 Group(Model): + """Group. + + :param contribution: Contribution for the group. + :type contribution: :class:`WitContribution ` + :param controls: Controls to be put in the group. + :type controls: list of :class:`Control ` + :param height: The height for the contribution. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: Label for the group. + :type label: str + :param order: Order in which the group should appear in the section. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param visible: A value indicating if the group should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'controls': {'key': 'controls', 'type': '[Control]'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, controls=None, height=None, id=None, inherited=None, is_contribution=None, label=None, order=None, overridden=None, visible=None): + super(Group, self).__init__() + self.contribution = contribution + self.controls = controls + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.order = order + self.overridden = overridden + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/hide_state_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/hide_state_model.py new file mode 100644 index 00000000..46dfa638 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/hide_state_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 HideStateModel(Model): + """HideStateModel. + + :param hidden: + :type hidden: bool + """ + + _attribute_map = { + 'hidden': {'key': 'hidden', 'type': 'bool'} + } + + def __init__(self, hidden=None): + super(HideStateModel, self).__init__() + self.hidden = hidden diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/page.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/page.py new file mode 100644 index 00000000..0939a8a4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/page.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 Page(Model): + """Page. + + :param contribution: Contribution for the page. + :type contribution: :class:`WitContribution ` + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: The label for the page. + :type label: str + :param locked: A value indicating whether any user operations are permitted on this page and the contents of this page + :type locked: bool + :param order: Order in which the page should appear in the layout. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param page_type: The icon for the page. + :type page_type: object + :param sections: The sections of the page. + :type sections: list of :class:`Section ` + :param visible: A value indicating if the page should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'locked': {'key': 'locked', 'type': 'bool'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'page_type': {'key': 'pageType', 'type': 'object'}, + 'sections': {'key': 'sections', 'type': '[Section]'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, id=None, inherited=None, is_contribution=None, label=None, locked=None, order=None, overridden=None, page_type=None, sections=None, visible=None): + super(Page, self).__init__() + self.contribution = contribution + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.locked = locked + self.order = order + self.overridden = overridden + self.page_type = page_type + self.sections = sections + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_item_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_item_model.py new file mode 100644 index 00000000..3d2384ac --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_item_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 PickListItemModel(Model): + """PickListItemModel. + + :param id: + :type id: str + :param value: + :type value: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, id=None, value=None): + super(PickListItemModel, self).__init__() + self.id = id + self.value = value diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_metadata_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_metadata_model.py new file mode 100644 index 00000000..aa47088c --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_metadata_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 PickListMetadataModel(Model): + """PickListMetadataModel. + + :param id: + :type id: str + :param is_suggested: + :type is_suggested: bool + :param name: + :type name: str + :param type: + :type type: str + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_suggested': {'key': 'isSuggested', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, is_suggested=None, name=None, type=None, url=None): + super(PickListMetadataModel, self).__init__() + self.id = id + self.is_suggested = is_suggested + self.name = name + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_model.py new file mode 100644 index 00000000..ddf10446 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/pick_list_model.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 .pick_list_metadata_model import PickListMetadataModel + + +class PickListModel(PickListMetadataModel): + """PickListModel. + + :param id: + :type id: str + :param is_suggested: + :type is_suggested: bool + :param name: + :type name: str + :param type: + :type type: str + :param url: + :type url: str + :param items: + :type items: list of :class:`PickListItemModel ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_suggested': {'key': 'isSuggested', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[PickListItemModel]'} + } + + def __init__(self, id=None, is_suggested=None, name=None, type=None, url=None, items=None): + super(PickListModel, self).__init__(id=id, is_suggested=is_suggested, name=name, type=type, url=url) + self.items = items diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/section.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/section.py new file mode 100644 index 00000000..28a1c008 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/section.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 Section(Model): + """Section. + + :param groups: + :type groups: list of :class:`Group ` + :param id: The id for the layout node. + :type id: str + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + """ + + _attribute_map = { + 'groups': {'key': 'groups', 'type': '[Group]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'overridden': {'key': 'overridden', 'type': 'bool'} + } + + def __init__(self, groups=None, id=None, overridden=None): + super(Section, self).__init__() + self.groups = groups + self.id = id + self.overridden = overridden diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/wit_contribution.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/wit_contribution.py new file mode 100644 index 00000000..ca76fd0a --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/wit_contribution.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 WitContribution(Model): + """WitContribution. + + :param contribution_id: The id for the contribution. + :type contribution_id: str + :param height: The height for the contribution. + :type height: int + :param inputs: A dictionary holding key value pairs for contribution inputs. + :type inputs: dict + :param show_on_deleted_work_item: A value indicating if the contribution should be show on deleted workItem. + :type show_on_deleted_work_item: bool + """ + + _attribute_map = { + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + 'show_on_deleted_work_item': {'key': 'showOnDeletedWorkItem', 'type': 'bool'} + } + + def __init__(self, contribution_id=None, height=None, inputs=None, show_on_deleted_work_item=None): + super(WitContribution, self).__init__() + self.contribution_id = contribution_id + self.height = height + self.inputs = inputs + self.show_on_deleted_work_item = show_on_deleted_work_item diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_behavior_reference.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_behavior_reference.py new file mode 100644 index 00000000..7c35db76 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_behavior_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 WorkItemBehaviorReference(Model): + """WorkItemBehaviorReference. + + :param id: + :type id: str + :param url: + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, url=None): + super(WorkItemBehaviorReference, self).__init__() + self.id = id + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_state_input_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_state_input_model.py new file mode 100644 index 00000000..6a92e6b2 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_state_input_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 WorkItemStateInputModel(Model): + """WorkItemStateInputModel. + + :param color: + :type color: str + :param name: + :type name: str + :param order: + :type order: int + :param state_category: + :type state_category: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'state_category': {'key': 'stateCategory', 'type': 'str'} + } + + def __init__(self, color=None, name=None, order=None, state_category=None): + super(WorkItemStateInputModel, self).__init__() + self.color = color + self.name = name + self.order = order + self.state_category = state_category diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_state_result_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_state_result_model.py new file mode 100644 index 00000000..8021cf25 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_state_result_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 WorkItemStateResultModel(Model): + """WorkItemStateResultModel. + + :param color: + :type color: str + :param hidden: + :type hidden: bool + :param id: + :type id: str + :param name: + :type name: str + :param order: + :type order: int + :param state_category: + :type state_category: str + :param url: + :type url: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'hidden': {'key': 'hidden', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'state_category': {'key': 'stateCategory', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, color=None, hidden=None, id=None, name=None, order=None, state_category=None, url=None): + super(WorkItemStateResultModel, self).__init__() + self.color = color + self.hidden = hidden + self.id = id + self.name = name + self.order = order + self.state_category = state_category + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_behavior.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_behavior.py new file mode 100644 index 00000000..1dd481a0 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_behavior.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 WorkItemTypeBehavior(Model): + """WorkItemTypeBehavior. + + :param behavior: + :type behavior: :class:`WorkItemBehaviorReference ` + :param is_default: + :type is_default: bool + :param url: + :type url: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'WorkItemBehaviorReference'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behavior=None, is_default=None, url=None): + super(WorkItemTypeBehavior, self).__init__() + self.behavior = behavior + self.is_default = is_default + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_field_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_field_model.py new file mode 100644 index 00000000..c2da1b17 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_field_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 WorkItemTypeFieldModel(Model): + """WorkItemTypeFieldModel. + + :param allow_groups: + :type allow_groups: bool + :param default_value: + :type default_value: str + :param name: + :type name: str + :param pick_list: + :type pick_list: :class:`PickListMetadataModel ` + :param read_only: + :type read_only: bool + :param reference_name: + :type reference_name: str + :param required: + :type required: bool + :param type: + :type type: object + :param url: + :type url: str + """ + + _attribute_map = { + 'allow_groups': {'key': 'allowGroups', 'type': 'bool'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pick_list': {'key': 'pickList', 'type': 'PickListMetadataModel'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, allow_groups=None, default_value=None, name=None, pick_list=None, read_only=None, reference_name=None, required=None, type=None, url=None): + super(WorkItemTypeFieldModel, self).__init__() + self.allow_groups = allow_groups + self.default_value = default_value + self.name = name + self.pick_list = pick_list + self.read_only = read_only + self.reference_name = reference_name + self.required = required + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_model.py new file mode 100644 index 00000000..7146e6c4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_model.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 WorkItemTypeModel(Model): + """WorkItemTypeModel. + + :param behaviors: + :type behaviors: list of :class:`WorkItemTypeBehavior ` + :param class_: + :type class_: object + :param color: + :type color: str + :param description: + :type description: str + :param icon: + :type icon: str + :param id: + :type id: str + :param inherits: Parent WIT Id/Internal ReferenceName that it inherits from + :type inherits: str + :param is_disabled: + :type is_disabled: bool + :param layout: + :type layout: :class:`FormLayout ` + :param name: + :type name: str + :param states: + :type states: list of :class:`WorkItemStateResultModel ` + :param url: + :type url: str + """ + + _attribute_map = { + 'behaviors': {'key': 'behaviors', 'type': '[WorkItemTypeBehavior]'}, + 'class_': {'key': 'class', 'type': 'object'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'layout': {'key': 'layout', 'type': 'FormLayout'}, + 'name': {'key': 'name', 'type': 'str'}, + 'states': {'key': 'states', 'type': '[WorkItemStateResultModel]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behaviors=None, class_=None, color=None, description=None, icon=None, id=None, inherits=None, is_disabled=None, layout=None, name=None, states=None, url=None): + super(WorkItemTypeModel, self).__init__() + self.behaviors = behaviors + self.class_ = class_ + self.color = color + self.description = description + self.icon = icon + self.id = id + self.inherits = inherits + self.is_disabled = is_disabled + self.layout = layout + self.name = name + self.states = states + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_update_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_update_model.py new file mode 100644 index 00000000..6b8be2f4 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/models/work_item_type_update_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 WorkItemTypeUpdateModel(Model): + """WorkItemTypeUpdateModel. + + :param color: + :type color: str + :param description: + :type description: str + :param icon: + :type icon: str + :param is_disabled: + :type is_disabled: bool + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'} + } + + def __init__(self, color=None, description=None, icon=None, is_disabled=None): + super(WorkItemTypeUpdateModel, self).__init__() + self.color = color + self.description = description + self.icon = icon + self.is_disabled = is_disabled diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_0/work_item_tracking_process_definitions_client.py b/vsts/vsts/work_item_tracking_process_definitions/v4_0/work_item_tracking_process_definitions_client.py new file mode 100644 index 00000000..b7903655 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_0/work_item_tracking_process_definitions_client.py @@ -0,0 +1,969 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WorkItemTrackingClient(VssClient): + """WorkItemTracking + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + 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) + + resource_area_identifier = None + + def create_behavior(self, behavior, process_id): + """CreateBehavior. + [Preview API] + :param :class:` ` behavior: + :param str process_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(behavior, 'BehaviorCreateModel') + response = self._send(http_method='POST', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BehaviorModel', response) + + def delete_behavior(self, process_id, behavior_id): + """DeleteBehavior. + [Preview API] + :param str process_id: + :param str behavior_id: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_id is not None: + route_values['behaviorId'] = self._serialize.url('behavior_id', behavior_id, 'str') + self._send(http_method='DELETE', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.0-preview.1', + route_values=route_values) + + def get_behavior(self, process_id, behavior_id): + """GetBehavior. + [Preview API] + :param str process_id: + :param str behavior_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_id is not None: + route_values['behaviorId'] = self._serialize.url('behavior_id', behavior_id, 'str') + response = self._send(http_method='GET', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('BehaviorModel', response) + + def get_behaviors(self, process_id): + """GetBehaviors. + [Preview API] + :param str process_id: + :rtype: [BehaviorModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + response = self._send(http_method='GET', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BehaviorModel]', response) + + def replace_behavior(self, behavior_data, process_id, behavior_id): + """ReplaceBehavior. + [Preview API] + :param :class:` ` behavior_data: + :param str process_id: + :param str behavior_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_id is not None: + route_values['behaviorId'] = self._serialize.url('behavior_id', behavior_id, 'str') + content = self._serialize.body(behavior_data, 'BehaviorReplaceModel') + response = self._send(http_method='PUT', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BehaviorModel', response) + + def add_control_to_group(self, control, process_id, wit_ref_name, group_id): + """AddControlToGroup. + [Preview API] Creates a control, giving it an id, and adds it to the group. So far, the only controls that don't know how to generate their own ids are control extensions. + :param :class:` ` control: + :param str process_id: + :param str wit_ref_name: + :param str group_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + content = self._serialize.body(control, 'Control') + response = self._send(http_method='POST', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Control', response) + + def edit_control(self, control, process_id, wit_ref_name, group_id, control_id): + """EditControl. + [Preview API] + :param :class:` ` control: + :param str process_id: + :param str wit_ref_name: + :param str group_id: + :param str control_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + if control_id is not None: + route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') + content = self._serialize.body(control, 'Control') + response = self._send(http_method='PATCH', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Control', response) + + def remove_control_from_group(self, process_id, wit_ref_name, group_id, control_id): + """RemoveControlFromGroup. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str group_id: + :param str control_id: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + if control_id is not None: + route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') + self._send(http_method='DELETE', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.0-preview.1', + route_values=route_values) + + def set_control_in_group(self, control, process_id, wit_ref_name, group_id, control_id, remove_from_group_id=None): + """SetControlInGroup. + [Preview API] Puts a control withan id into a group. Controls backed by fields can generate their own id. + :param :class:` ` control: + :param str process_id: + :param str wit_ref_name: + :param str group_id: + :param str control_id: + :param str remove_from_group_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + if control_id is not None: + route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') + query_parameters = {} + if remove_from_group_id is not None: + query_parameters['removeFromGroupId'] = self._serialize.query('remove_from_group_id', remove_from_group_id, 'str') + content = self._serialize.body(control, 'Control') + response = self._send(http_method='PUT', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Control', response) + + def create_field(self, field, process_id): + """CreateField. + [Preview API] + :param :class:` ` field: + :param str process_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(field, 'FieldModel') + response = self._send(http_method='POST', + location_id='f36c66c7-911d-4163-8938-d3c5d0d7f5aa', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldModel', response) + + def update_field(self, field, process_id): + """UpdateField. + [Preview API] + :param :class:` ` field: + :param str process_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(field, 'FieldUpdate') + response = self._send(http_method='PATCH', + location_id='f36c66c7-911d-4163-8938-d3c5d0d7f5aa', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldModel', response) + + def add_group(self, group, process_id, wit_ref_name, page_id, section_id): + """AddGroup. + [Preview API] + :param :class:` ` group: + :param str process_id: + :param str wit_ref_name: + :param str page_id: + :param str section_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='POST', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Group', response) + + def edit_group(self, group, process_id, wit_ref_name, page_id, section_id, group_id): + """EditGroup. + [Preview API] + :param :class:` ` group: + :param str process_id: + :param str wit_ref_name: + :param str page_id: + :param str section_id: + :param str group_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='PATCH', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Group', response) + + def remove_group(self, process_id, wit_ref_name, page_id, section_id, group_id): + """RemoveGroup. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str page_id: + :param str section_id: + :param str group_id: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + self._send(http_method='DELETE', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.0-preview.1', + route_values=route_values) + + def set_group_in_page(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_page_id, remove_from_section_id): + """SetGroupInPage. + [Preview API] + :param :class:` ` group: + :param str process_id: + :param str wit_ref_name: + :param str page_id: + :param str section_id: + :param str group_id: + :param str remove_from_page_id: + :param str remove_from_section_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + query_parameters = {} + if remove_from_page_id is not None: + query_parameters['removeFromPageId'] = self._serialize.query('remove_from_page_id', remove_from_page_id, 'str') + if remove_from_section_id is not None: + query_parameters['removeFromSectionId'] = self._serialize.query('remove_from_section_id', remove_from_section_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='PUT', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Group', response) + + def set_group_in_section(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_section_id): + """SetGroupInSection. + [Preview API] + :param :class:` ` group: + :param str process_id: + :param str wit_ref_name: + :param str page_id: + :param str section_id: + :param str group_id: + :param str remove_from_section_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + query_parameters = {} + if remove_from_section_id is not None: + query_parameters['removeFromSectionId'] = self._serialize.query('remove_from_section_id', remove_from_section_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='PUT', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Group', response) + + def get_form_layout(self, process_id, wit_ref_name): + """GetFormLayout. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='3eacc80a-ddca-4404-857a-6331aac99063', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('FormLayout', response) + + def get_lists_metadata(self): + """GetListsMetadata. + [Preview API] + :rtype: [PickListMetadataModel] + """ + response = self._send(http_method='GET', + location_id='b45cc931-98e3-44a1-b1cd-2e8e9c6dc1c6', + version='4.0-preview.1', + returns_collection=True) + return self._deserialize('[PickListMetadataModel]', response) + + def create_list(self, picklist): + """CreateList. + [Preview API] + :param :class:` ` picklist: + :rtype: :class:` ` + """ + content = self._serialize.body(picklist, 'PickListModel') + response = self._send(http_method='POST', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.0-preview.1', + content=content) + return self._deserialize('PickListModel', response) + + def delete_list(self, list_id): + """DeleteList. + [Preview API] + :param str list_id: + """ + route_values = {} + if list_id is not None: + route_values['listId'] = self._serialize.url('list_id', list_id, 'str') + self._send(http_method='DELETE', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.0-preview.1', + route_values=route_values) + + def get_list(self, list_id): + """GetList. + [Preview API] + :param str list_id: + :rtype: :class:` ` + """ + route_values = {} + if list_id is not None: + route_values['listId'] = self._serialize.url('list_id', list_id, 'str') + response = self._send(http_method='GET', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('PickListModel', response) + + def update_list(self, picklist, list_id): + """UpdateList. + [Preview API] + :param :class:` ` picklist: + :param str list_id: + :rtype: :class:` ` + """ + route_values = {} + if list_id is not None: + route_values['listId'] = self._serialize.url('list_id', list_id, 'str') + content = self._serialize.body(picklist, 'PickListModel') + response = self._send(http_method='PUT', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('PickListModel', response) + + def add_page(self, page, process_id, wit_ref_name): + """AddPage. + [Preview API] + :param :class:` ` page: + :param str process_id: + :param str wit_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(page, 'Page') + response = self._send(http_method='POST', + location_id='1b4ac126-59b2-4f37-b4df-0a48ba807edb', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Page', response) + + def edit_page(self, page, process_id, wit_ref_name): + """EditPage. + [Preview API] + :param :class:` ` page: + :param str process_id: + :param str wit_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(page, 'Page') + response = self._send(http_method='PATCH', + location_id='1b4ac126-59b2-4f37-b4df-0a48ba807edb', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Page', response) + + def remove_page(self, process_id, wit_ref_name, page_id): + """RemovePage. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str page_id: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + self._send(http_method='DELETE', + location_id='1b4ac126-59b2-4f37-b4df-0a48ba807edb', + version='4.0-preview.1', + route_values=route_values) + + def create_state_definition(self, state_model, process_id, wit_ref_name): + """CreateStateDefinition. + [Preview API] + :param :class:` ` state_model: + :param str process_id: + :param str wit_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(state_model, 'WorkItemStateInputModel') + response = self._send(http_method='POST', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemStateResultModel', response) + + def delete_state_definition(self, process_id, wit_ref_name, state_id): + """DeleteStateDefinition. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str state_id: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + self._send(http_method='DELETE', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.0-preview.1', + route_values=route_values) + + def get_state_definition(self, process_id, wit_ref_name, state_id): + """GetStateDefinition. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str state_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + response = self._send(http_method='GET', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('WorkItemStateResultModel', response) + + def get_state_definitions(self, process_id, wit_ref_name): + """GetStateDefinitions. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :rtype: [WorkItemStateResultModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemStateResultModel]', response) + + def hide_state_definition(self, hide_state_model, process_id, wit_ref_name, state_id): + """HideStateDefinition. + [Preview API] + :param :class:` ` hide_state_model: + :param str process_id: + :param str wit_ref_name: + :param str state_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + content = self._serialize.body(hide_state_model, 'HideStateModel') + response = self._send(http_method='PUT', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemStateResultModel', response) + + def update_state_definition(self, state_model, process_id, wit_ref_name, state_id): + """UpdateStateDefinition. + [Preview API] + :param :class:` ` state_model: + :param str process_id: + :param str wit_ref_name: + :param str state_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + content = self._serialize.body(state_model, 'WorkItemStateInputModel') + response = self._send(http_method='PATCH', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemStateResultModel', response) + + def add_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): + """AddBehaviorToWorkItemType. + [Preview API] + :param :class:` ` behavior: + :param str process_id: + :param str wit_ref_name_for_behaviors: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + content = self._serialize.body(behavior, 'WorkItemTypeBehavior') + response = self._send(http_method='POST', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeBehavior', response) + + def get_behavior_for_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): + """GetBehaviorForWorkItemType. + [Preview API] + :param str process_id: + :param str wit_ref_name_for_behaviors: + :param str behavior_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + if behavior_ref_name is not None: + route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') + response = self._send(http_method='GET', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('WorkItemTypeBehavior', response) + + def get_behaviors_for_work_item_type(self, process_id, wit_ref_name_for_behaviors): + """GetBehaviorsForWorkItemType. + [Preview API] + :param str process_id: + :param str wit_ref_name_for_behaviors: + :rtype: [WorkItemTypeBehavior] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + response = self._send(http_method='GET', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemTypeBehavior]', response) + + def remove_behavior_from_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): + """RemoveBehaviorFromWorkItemType. + [Preview API] + :param str process_id: + :param str wit_ref_name_for_behaviors: + :param str behavior_ref_name: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + if behavior_ref_name is not None: + route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') + self._send(http_method='DELETE', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.0-preview.1', + route_values=route_values) + + def update_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): + """UpdateBehaviorToWorkItemType. + [Preview API] + :param :class:` ` behavior: + :param str process_id: + :param str wit_ref_name_for_behaviors: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + content = self._serialize.body(behavior, 'WorkItemTypeBehavior') + response = self._send(http_method='PATCH', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeBehavior', response) + + def create_work_item_type(self, work_item_type, process_id): + """CreateWorkItemType. + [Preview API] + :param :class:` ` work_item_type: + :param str process_id: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(work_item_type, 'WorkItemTypeModel') + response = self._send(http_method='POST', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeModel', response) + + def delete_work_item_type(self, process_id, wit_ref_name): + """DeleteWorkItemType. + [Preview API] + :param str process_id: + :param str wit_ref_name: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + self._send(http_method='DELETE', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.0-preview.1', + route_values=route_values) + + def get_work_item_type(self, process_id, wit_ref_name, expand=None): + """GetWorkItemType. + [Preview API] + :param str process_id: + :param str wit_ref_name: + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, '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='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemTypeModel', response) + + def get_work_item_types(self, process_id, expand=None): + """GetWorkItemTypes. + [Preview API] + :param str process_id: + :param str expand: + :rtype: [WorkItemTypeModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemTypeModel]', response) + + def update_work_item_type(self, work_item_type_update, process_id, wit_ref_name): + """UpdateWorkItemType. + [Preview API] + :param :class:` ` work_item_type_update: + :param str process_id: + :param str wit_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(work_item_type_update, 'WorkItemTypeUpdateModel') + response = self._send(http_method='PATCH', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeModel', response) + + def add_field_to_work_item_type(self, field, process_id, wit_ref_name_for_fields): + """AddFieldToWorkItemType. + [Preview API] + :param :class:` ` field: + :param str process_id: + :param str wit_ref_name_for_fields: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + content = self._serialize.body(field, 'WorkItemTypeFieldModel') + response = self._send(http_method='POST', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.0-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeFieldModel', response) + + def get_work_item_type_field(self, process_id, wit_ref_name_for_fields, field_ref_name): + """GetWorkItemTypeField. + [Preview API] + :param str process_id: + :param str wit_ref_name_for_fields: + :param str field_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + if field_ref_name is not None: + route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') + response = self._send(http_method='GET', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.0-preview.1', + route_values=route_values) + return self._deserialize('WorkItemTypeFieldModel', response) + + def get_work_item_type_fields(self, process_id, wit_ref_name_for_fields): + """GetWorkItemTypeFields. + [Preview API] + :param str process_id: + :param str wit_ref_name_for_fields: + :rtype: [WorkItemTypeFieldModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + response = self._send(http_method='GET', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemTypeFieldModel]', response) + + def remove_field_from_work_item_type(self, process_id, wit_ref_name_for_fields, field_ref_name): + """RemoveFieldFromWorkItemType. + [Preview API] + :param str process_id: + :param str wit_ref_name_for_fields: + :param str field_ref_name: + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + if field_ref_name is not None: + route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') + self._send(http_method='DELETE', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.0-preview.1', + route_values=route_values) + diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/__init__.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/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_item_tracking_process_definitions/v4_1/models/__init__.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/__init__.py new file mode 100644 index 00000000..a15d4f6e --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/__init__.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 .behavior_create_model import BehaviorCreateModel +from .behavior_model import BehaviorModel +from .behavior_replace_model import BehaviorReplaceModel +from .control import Control +from .extension import Extension +from .field_model import FieldModel +from .field_update import FieldUpdate +from .form_layout import FormLayout +from .group import Group +from .hide_state_model import HideStateModel +from .page import Page +from .pick_list_item_model import PickListItemModel +from .pick_list_metadata_model import PickListMetadataModel +from .pick_list_model import PickListModel +from .section import Section +from .wit_contribution import WitContribution +from .work_item_behavior_reference import WorkItemBehaviorReference +from .work_item_state_input_model import WorkItemStateInputModel +from .work_item_state_result_model import WorkItemStateResultModel +from .work_item_type_behavior import WorkItemTypeBehavior +from .work_item_type_field_model import WorkItemTypeFieldModel +from .work_item_type_model import WorkItemTypeModel +from .work_item_type_update_model import WorkItemTypeUpdateModel + +__all__ = [ + 'BehaviorCreateModel', + 'BehaviorModel', + 'BehaviorReplaceModel', + 'Control', + 'Extension', + 'FieldModel', + 'FieldUpdate', + 'FormLayout', + 'Group', + 'HideStateModel', + 'Page', + 'PickListItemModel', + 'PickListMetadataModel', + 'PickListModel', + 'Section', + 'WitContribution', + 'WorkItemBehaviorReference', + 'WorkItemStateInputModel', + 'WorkItemStateResultModel', + 'WorkItemTypeBehavior', + 'WorkItemTypeFieldModel', + 'WorkItemTypeModel', + 'WorkItemTypeUpdateModel', +] diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_create_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_create_model.py new file mode 100644 index 00000000..03bd7bd1 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_create_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 BehaviorCreateModel(Model): + """BehaviorCreateModel. + + :param color: Color + :type color: str + :param inherits: Parent behavior id + :type inherits: str + :param name: Name of the behavior + :type name: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, color=None, inherits=None, name=None): + super(BehaviorCreateModel, self).__init__() + self.color = color + self.inherits = inherits + self.name = name diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_model.py new file mode 100644 index 00000000..6221f0b5 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_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 BehaviorModel(Model): + """BehaviorModel. + + :param abstract: Is the behavior abstract (i.e. can not be associated with any work item type) + :type abstract: bool + :param color: Color + :type color: str + :param description: Description + :type description: str + :param id: Behavior Id + :type id: str + :param inherits: Parent behavior reference + :type inherits: :class:`WorkItemBehaviorReference ` + :param name: Behavior Name + :type name: str + :param overridden: Is the behavior overrides a behavior from system process + :type overridden: bool + :param rank: Rank + :type rank: int + :param url: Url of the behavior + :type url: str + """ + + _attribute_map = { + 'abstract': {'key': 'abstract', 'type': 'bool'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'WorkItemBehaviorReference'}, + 'name': {'key': 'name', 'type': 'str'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, abstract=None, color=None, description=None, id=None, inherits=None, name=None, overridden=None, rank=None, url=None): + super(BehaviorModel, self).__init__() + self.abstract = abstract + self.color = color + self.description = description + self.id = id + self.inherits = inherits + self.name = name + self.overridden = overridden + self.rank = rank + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_replace_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_replace_model.py new file mode 100644 index 00000000..2f788288 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/behavior_replace_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 BehaviorReplaceModel(Model): + """BehaviorReplaceModel. + + :param color: Color + :type color: str + :param name: Behavior Name + :type name: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, color=None, name=None): + super(BehaviorReplaceModel, self).__init__() + self.color = color + self.name = name diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/control.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/control.py new file mode 100644 index 00000000..491ca1ad --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/control.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 Control(Model): + """Control. + + :param contribution: Contribution for the control. + :type contribution: :class:`WitContribution ` + :param control_type: Type of the control. + :type control_type: str + :param height: Height of the control, for html controls. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution or not. + :type is_contribution: bool + :param label: Label for the field + :type label: str + :param metadata: Inner text of the control. + :type metadata: str + :param order: + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param read_only: A value indicating if the control is readonly. + :type read_only: bool + :param visible: A value indicating if the control should be hidden or not. + :type visible: bool + :param watermark: Watermark text for the textbox. + :type watermark: str + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'control_type': {'key': 'controlType', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'watermark': {'key': 'watermark', 'type': 'str'} + } + + def __init__(self, contribution=None, control_type=None, height=None, id=None, inherited=None, is_contribution=None, label=None, metadata=None, order=None, overridden=None, read_only=None, visible=None, watermark=None): + super(Control, self).__init__() + self.contribution = contribution + self.control_type = control_type + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.metadata = metadata + self.order = order + self.overridden = overridden + self.read_only = read_only + self.visible = visible + self.watermark = watermark diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/extension.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/extension.py new file mode 100644 index 00000000..7bab24e6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/extension.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 Extension(Model): + """Extension. + + :param id: + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, id=None): + super(Extension, self).__init__() + self.id = id diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/field_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/field_model.py new file mode 100644 index 00000000..20fc4505 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/field_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 FieldModel(Model): + """FieldModel. + + :param description: Description about field + :type description: str + :param id: ID of the field + :type id: str + :param name: Name of the field + :type name: str + :param pick_list: Reference to picklist in this field + :type pick_list: :class:`PickListMetadataModel ` + :param type: Type of field + :type type: object + :param url: Url to the field + :type url: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pick_list': {'key': 'pickList', 'type': 'PickListMetadataModel'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, description=None, id=None, name=None, pick_list=None, type=None, url=None): + super(FieldModel, self).__init__() + self.description = description + self.id = id + self.name = name + self.pick_list = pick_list + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/field_update.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/field_update.py new file mode 100644 index 00000000..fee524e6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/field_update.py @@ -0,0 +1,29 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- +# Generated file, DO NOT EDIT +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class FieldUpdate(Model): + """FieldUpdate. + + :param description: + :type description: str + :param id: + :type id: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'} + } + + def __init__(self, description=None, id=None): + super(FieldUpdate, self).__init__() + self.description = description + self.id = id diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/form_layout.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/form_layout.py new file mode 100644 index 00000000..14c97ff8 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/form_layout.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 FormLayout(Model): + """FormLayout. + + :param extensions: Gets and sets extensions list + :type extensions: list of :class:`Extension ` + :param pages: Top level tabs of the layout. + :type pages: list of :class:`Page ` + :param system_controls: Headers controls of the layout. + :type system_controls: list of :class:`Control ` + """ + + _attribute_map = { + 'extensions': {'key': 'extensions', 'type': '[Extension]'}, + 'pages': {'key': 'pages', 'type': '[Page]'}, + 'system_controls': {'key': 'systemControls', 'type': '[Control]'} + } + + def __init__(self, extensions=None, pages=None, system_controls=None): + super(FormLayout, self).__init__() + self.extensions = extensions + self.pages = pages + self.system_controls = system_controls diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/group.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/group.py new file mode 100644 index 00000000..5cb7fbdd --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/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 Group(Model): + """Group. + + :param contribution: Contribution for the group. + :type contribution: :class:`WitContribution ` + :param controls: Controls to be put in the group. + :type controls: list of :class:`Control ` + :param height: The height for the contribution. + :type height: int + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: Label for the group. + :type label: str + :param order: Order in which the group should appear in the section. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param visible: A value indicating if the group should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'controls': {'key': 'controls', 'type': '[Control]'}, + 'height': {'key': 'height', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, controls=None, height=None, id=None, inherited=None, is_contribution=None, label=None, order=None, overridden=None, visible=None): + super(Group, self).__init__() + self.contribution = contribution + self.controls = controls + self.height = height + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.order = order + self.overridden = overridden + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/hide_state_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/hide_state_model.py new file mode 100644 index 00000000..46dfa638 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/hide_state_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 HideStateModel(Model): + """HideStateModel. + + :param hidden: + :type hidden: bool + """ + + _attribute_map = { + 'hidden': {'key': 'hidden', 'type': 'bool'} + } + + def __init__(self, hidden=None): + super(HideStateModel, self).__init__() + self.hidden = hidden diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/page.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/page.py new file mode 100644 index 00000000..010972ca --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/page.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 Page(Model): + """Page. + + :param contribution: Contribution for the page. + :type contribution: :class:`WitContribution ` + :param id: The id for the layout node. + :type id: str + :param inherited: A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + :type inherited: bool + :param is_contribution: A value indicating if the layout node is contribution are not. + :type is_contribution: bool + :param label: The label for the page. + :type label: str + :param locked: A value indicating whether any user operations are permitted on this page and the contents of this page + :type locked: bool + :param order: Order in which the page should appear in the layout. + :type order: int + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + :param page_type: The icon for the page. + :type page_type: object + :param sections: The sections of the page. + :type sections: list of :class:`Section ` + :param visible: A value indicating if the page should be hidden or not. + :type visible: bool + """ + + _attribute_map = { + 'contribution': {'key': 'contribution', 'type': 'WitContribution'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherited': {'key': 'inherited', 'type': 'bool'}, + 'is_contribution': {'key': 'isContribution', 'type': 'bool'}, + 'label': {'key': 'label', 'type': 'str'}, + 'locked': {'key': 'locked', 'type': 'bool'}, + 'order': {'key': 'order', 'type': 'int'}, + 'overridden': {'key': 'overridden', 'type': 'bool'}, + 'page_type': {'key': 'pageType', 'type': 'object'}, + 'sections': {'key': 'sections', 'type': '[Section]'}, + 'visible': {'key': 'visible', 'type': 'bool'} + } + + def __init__(self, contribution=None, id=None, inherited=None, is_contribution=None, label=None, locked=None, order=None, overridden=None, page_type=None, sections=None, visible=None): + super(Page, self).__init__() + self.contribution = contribution + self.id = id + self.inherited = inherited + self.is_contribution = is_contribution + self.label = label + self.locked = locked + self.order = order + self.overridden = overridden + self.page_type = page_type + self.sections = sections + self.visible = visible diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_item_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_item_model.py new file mode 100644 index 00000000..3d2384ac --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_item_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 PickListItemModel(Model): + """PickListItemModel. + + :param id: + :type id: str + :param value: + :type value: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'} + } + + def __init__(self, id=None, value=None): + super(PickListItemModel, self).__init__() + self.id = id + self.value = value diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_metadata_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_metadata_model.py new file mode 100644 index 00000000..9d7a3df7 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_metadata_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 PickListMetadataModel(Model): + """PickListMetadataModel. + + :param id: ID of the picklist + :type id: str + :param is_suggested: Is input values by user only limited to suggested values + :type is_suggested: bool + :param name: Name of the picklist + :type name: str + :param type: Type of picklist + :type type: str + :param url: Url of the picklist + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_suggested': {'key': 'isSuggested', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, is_suggested=None, name=None, type=None, url=None): + super(PickListMetadataModel, self).__init__() + self.id = id + self.is_suggested = is_suggested + self.name = name + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_model.py new file mode 100644 index 00000000..6bdccb78 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/pick_list_model.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 .pick_list_metadata_model import PickListMetadataModel + + +class PickListModel(PickListMetadataModel): + """PickListModel. + + :param id: ID of the picklist + :type id: str + :param is_suggested: Is input values by user only limited to suggested values + :type is_suggested: bool + :param name: Name of the picklist + :type name: str + :param type: Type of picklist + :type type: str + :param url: Url of the picklist + :type url: str + :param items: A list of PicklistItemModel + :type items: list of :class:`PickListItemModel ` + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'is_suggested': {'key': 'isSuggested', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[PickListItemModel]'} + } + + def __init__(self, id=None, is_suggested=None, name=None, type=None, url=None, items=None): + super(PickListModel, self).__init__(id=id, is_suggested=is_suggested, name=name, type=type, url=url) + self.items = items diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/section.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/section.py new file mode 100644 index 00000000..42424062 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/section.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 Section(Model): + """Section. + + :param groups: + :type groups: list of :class:`Group ` + :param id: The id for the layout node. + :type id: str + :param overridden: A value indicating whether this layout node has been overridden by a child layout. + :type overridden: bool + """ + + _attribute_map = { + 'groups': {'key': 'groups', 'type': '[Group]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'overridden': {'key': 'overridden', 'type': 'bool'} + } + + def __init__(self, groups=None, id=None, overridden=None): + super(Section, self).__init__() + self.groups = groups + self.id = id + self.overridden = overridden diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/wit_contribution.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/wit_contribution.py new file mode 100644 index 00000000..ca76fd0a --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/wit_contribution.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 WitContribution(Model): + """WitContribution. + + :param contribution_id: The id for the contribution. + :type contribution_id: str + :param height: The height for the contribution. + :type height: int + :param inputs: A dictionary holding key value pairs for contribution inputs. + :type inputs: dict + :param show_on_deleted_work_item: A value indicating if the contribution should be show on deleted workItem. + :type show_on_deleted_work_item: bool + """ + + _attribute_map = { + 'contribution_id': {'key': 'contributionId', 'type': 'str'}, + 'height': {'key': 'height', 'type': 'int'}, + 'inputs': {'key': 'inputs', 'type': '{object}'}, + 'show_on_deleted_work_item': {'key': 'showOnDeletedWorkItem', 'type': 'bool'} + } + + def __init__(self, contribution_id=None, height=None, inputs=None, show_on_deleted_work_item=None): + super(WitContribution, self).__init__() + self.contribution_id = contribution_id + self.height = height + self.inputs = inputs + self.show_on_deleted_work_item = show_on_deleted_work_item diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_behavior_reference.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_behavior_reference.py new file mode 100644 index 00000000..1425c7ac --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_behavior_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 WorkItemBehaviorReference(Model): + """WorkItemBehaviorReference. + + :param id: The ID of the reference behavior + :type id: str + :param url: The url of the reference behavior + :type url: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, id=None, url=None): + super(WorkItemBehaviorReference, self).__init__() + self.id = id + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_state_input_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_state_input_model.py new file mode 100644 index 00000000..a6d0b07a --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_state_input_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 WorkItemStateInputModel(Model): + """WorkItemStateInputModel. + + :param color: Color of the state + :type color: str + :param name: Name of the state + :type name: str + :param order: Order in which state should appear + :type order: int + :param state_category: Category of the state + :type state_category: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'state_category': {'key': 'stateCategory', 'type': 'str'} + } + + def __init__(self, color=None, name=None, order=None, state_category=None): + super(WorkItemStateInputModel, self).__init__() + self.color = color + self.name = name + self.order = order + self.state_category = state_category diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_state_result_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_state_result_model.py new file mode 100644 index 00000000..9d4adb9e --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_state_result_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 WorkItemStateResultModel(Model): + """WorkItemStateResultModel. + + :param color: Color of the state + :type color: str + :param hidden: Is the state hidden + :type hidden: bool + :param id: The ID of the State + :type id: str + :param name: Name of the state + :type name: str + :param order: Order in which state should appear + :type order: int + :param state_category: Category of the state + :type state_category: str + :param url: Url of the state + :type url: str + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'hidden': {'key': 'hidden', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'int'}, + 'state_category': {'key': 'stateCategory', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, color=None, hidden=None, id=None, name=None, order=None, state_category=None, url=None): + super(WorkItemStateResultModel, self).__init__() + self.color = color + self.hidden = hidden + self.id = id + self.name = name + self.order = order + self.state_category = state_category + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_behavior.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_behavior.py new file mode 100644 index 00000000..769c34bc --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_behavior.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 WorkItemTypeBehavior(Model): + """WorkItemTypeBehavior. + + :param behavior: + :type behavior: :class:`WorkItemBehaviorReference ` + :param is_default: + :type is_default: bool + :param url: + :type url: str + """ + + _attribute_map = { + 'behavior': {'key': 'behavior', 'type': 'WorkItemBehaviorReference'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behavior=None, is_default=None, url=None): + super(WorkItemTypeBehavior, self).__init__() + self.behavior = behavior + self.is_default = is_default + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_field_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_field_model.py new file mode 100644 index 00000000..3f9aa388 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_field_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 WorkItemTypeFieldModel(Model): + """WorkItemTypeFieldModel. + + :param allow_groups: + :type allow_groups: bool + :param default_value: + :type default_value: str + :param name: + :type name: str + :param pick_list: + :type pick_list: :class:`PickListMetadataModel ` + :param read_only: + :type read_only: bool + :param reference_name: + :type reference_name: str + :param required: + :type required: bool + :param type: + :type type: object + :param url: + :type url: str + """ + + _attribute_map = { + 'allow_groups': {'key': 'allowGroups', 'type': 'bool'}, + 'default_value': {'key': 'defaultValue', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'pick_list': {'key': 'pickList', 'type': 'PickListMetadataModel'}, + 'read_only': {'key': 'readOnly', 'type': 'bool'}, + 'reference_name': {'key': 'referenceName', 'type': 'str'}, + 'required': {'key': 'required', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'object'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, allow_groups=None, default_value=None, name=None, pick_list=None, read_only=None, reference_name=None, required=None, type=None, url=None): + super(WorkItemTypeFieldModel, self).__init__() + self.allow_groups = allow_groups + self.default_value = default_value + self.name = name + self.pick_list = pick_list + self.read_only = read_only + self.reference_name = reference_name + self.required = required + self.type = type + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_model.py new file mode 100644 index 00000000..c7c7fa17 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_model.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 WorkItemTypeModel(Model): + """WorkItemTypeModel. + + :param behaviors: Behaviors of the work item type + :type behaviors: list of :class:`WorkItemTypeBehavior ` + :param class_: Class of the work item type + :type class_: object + :param color: Color of the work item type + :type color: str + :param description: Description of the work item type + :type description: str + :param icon: Icon of the work item type + :type icon: str + :param id: The ID of the work item type + :type id: str + :param inherits: Parent WIT Id/Internal ReferenceName that it inherits from + :type inherits: str + :param is_disabled: Is work item type disabled + :type is_disabled: bool + :param layout: Layout of the work item type + :type layout: :class:`FormLayout ` + :param name: Name of the work item type + :type name: str + :param states: States of the work item type + :type states: list of :class:`WorkItemStateResultModel ` + :param url: Url of the work item type + :type url: str + """ + + _attribute_map = { + 'behaviors': {'key': 'behaviors', 'type': '[WorkItemTypeBehavior]'}, + 'class_': {'key': 'class', 'type': 'object'}, + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'}, + 'layout': {'key': 'layout', 'type': 'FormLayout'}, + 'name': {'key': 'name', 'type': 'str'}, + 'states': {'key': 'states', 'type': '[WorkItemStateResultModel]'}, + 'url': {'key': 'url', 'type': 'str'} + } + + def __init__(self, behaviors=None, class_=None, color=None, description=None, icon=None, id=None, inherits=None, is_disabled=None, layout=None, name=None, states=None, url=None): + super(WorkItemTypeModel, self).__init__() + self.behaviors = behaviors + self.class_ = class_ + self.color = color + self.description = description + self.icon = icon + self.id = id + self.inherits = inherits + self.is_disabled = is_disabled + self.layout = layout + self.name = name + self.states = states + self.url = url diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_update_model.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_update_model.py new file mode 100644 index 00000000..858af78d --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/models/work_item_type_update_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 WorkItemTypeUpdateModel(Model): + """WorkItemTypeUpdateModel. + + :param color: Color of the work item type + :type color: str + :param description: Description of the work item type + :type description: str + :param icon: Icon of the work item type + :type icon: str + :param is_disabled: Is the workitem type to be disabled + :type is_disabled: bool + """ + + _attribute_map = { + 'color': {'key': 'color', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'icon': {'key': 'icon', 'type': 'str'}, + 'is_disabled': {'key': 'isDisabled', 'type': 'bool'} + } + + def __init__(self, color=None, description=None, icon=None, is_disabled=None): + super(WorkItemTypeUpdateModel, self).__init__() + self.color = color + self.description = description + self.icon = icon + self.is_disabled = is_disabled diff --git a/vsts/vsts/work_item_tracking_process_definitions/v4_1/work_item_tracking_process_definitions_client.py b/vsts/vsts/work_item_tracking_process_definitions/v4_1/work_item_tracking_process_definitions_client.py new file mode 100644 index 00000000..d104d8ac --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_definitions/v4_1/work_item_tracking_process_definitions_client.py @@ -0,0 +1,969 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WorkItemTrackingClient(VssClient): + """WorkItemTracking + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + 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) + + resource_area_identifier = None + + def create_behavior(self, behavior, process_id): + """CreateBehavior. + [Preview API] Creates a single behavior in the given process. + :param :class:` ` behavior: + :param str process_id: The ID of the process + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(behavior, 'BehaviorCreateModel') + response = self._send(http_method='POST', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BehaviorModel', response) + + def delete_behavior(self, process_id, behavior_id): + """DeleteBehavior. + [Preview API] Removes a behavior in the process. + :param str process_id: The ID of the process + :param str behavior_id: The ID of the behavior + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_id is not None: + route_values['behaviorId'] = self._serialize.url('behavior_id', behavior_id, 'str') + self._send(http_method='DELETE', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.1-preview.1', + route_values=route_values) + + def get_behavior(self, process_id, behavior_id): + """GetBehavior. + [Preview API] Returns a single behavior in the process. + :param str process_id: The ID of the process + :param str behavior_id: The ID of the behavior + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_id is not None: + route_values['behaviorId'] = self._serialize.url('behavior_id', behavior_id, 'str') + response = self._send(http_method='GET', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('BehaviorModel', response) + + def get_behaviors(self, process_id): + """GetBehaviors. + [Preview API] Returns a list of all behaviors in the process. + :param str process_id: The ID of the process + :rtype: [BehaviorModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + response = self._send(http_method='GET', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[BehaviorModel]', response) + + def replace_behavior(self, behavior_data, process_id, behavior_id): + """ReplaceBehavior. + [Preview API] Replaces a behavior in the process. + :param :class:` ` behavior_data: + :param str process_id: The ID of the process + :param str behavior_id: The ID of the behavior + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if behavior_id is not None: + route_values['behaviorId'] = self._serialize.url('behavior_id', behavior_id, 'str') + content = self._serialize.body(behavior_data, 'BehaviorReplaceModel') + response = self._send(http_method='PUT', + location_id='47a651f4-fb70-43bf-b96b-7c0ba947142b', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('BehaviorModel', response) + + def add_control_to_group(self, control, process_id, wit_ref_name, group_id): + """AddControlToGroup. + [Preview API] Creates a control in a group + :param :class:` ` control: The control + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str group_id: The ID of the group to add the control to + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + content = self._serialize.body(control, 'Control') + response = self._send(http_method='POST', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Control', response) + + def edit_control(self, control, process_id, wit_ref_name, group_id, control_id): + """EditControl. + [Preview API] Updates a control on the work item form + :param :class:` ` control: The updated control + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str group_id: The ID of the group + :param str control_id: The ID of the control + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + if control_id is not None: + route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') + content = self._serialize.body(control, 'Control') + response = self._send(http_method='PATCH', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Control', response) + + def remove_control_from_group(self, process_id, wit_ref_name, group_id, control_id): + """RemoveControlFromGroup. + [Preview API] Removes a control from the work item form + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str group_id: The ID of the group + :param str control_id: The ID of the control to remove + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + if control_id is not None: + route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') + self._send(http_method='DELETE', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.1-preview.1', + route_values=route_values) + + def set_control_in_group(self, control, process_id, wit_ref_name, group_id, control_id, remove_from_group_id=None): + """SetControlInGroup. + [Preview API] Moves a control to a new group + :param :class:` ` control: The control + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str group_id: The ID of the group to move the control to + :param str control_id: The id of the control + :param str remove_from_group_id: The group to remove the control from + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + if control_id is not None: + route_values['controlId'] = self._serialize.url('control_id', control_id, 'str') + query_parameters = {} + if remove_from_group_id is not None: + query_parameters['removeFromGroupId'] = self._serialize.query('remove_from_group_id', remove_from_group_id, 'str') + content = self._serialize.body(control, 'Control') + response = self._send(http_method='PUT', + location_id='e2e3166a-627a-4e9b-85b2-d6a097bbd731', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Control', response) + + def create_field(self, field, process_id): + """CreateField. + [Preview API] Creates a single field in the process. + :param :class:` ` field: + :param str process_id: The ID of the process + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(field, 'FieldModel') + response = self._send(http_method='POST', + location_id='f36c66c7-911d-4163-8938-d3c5d0d7f5aa', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldModel', response) + + def update_field(self, field, process_id): + """UpdateField. + [Preview API] Updates a given field in the process. + :param :class:` ` field: + :param str process_id: The ID of the process + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(field, 'FieldUpdate') + response = self._send(http_method='PATCH', + location_id='f36c66c7-911d-4163-8938-d3c5d0d7f5aa', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('FieldModel', response) + + def add_group(self, group, process_id, wit_ref_name, page_id, section_id): + """AddGroup. + [Preview API] Adds a group to the work item form + :param :class:` ` group: The group + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str page_id: The ID of the page to add the group to + :param str section_id: The ID of the section to add the group to + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='POST', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Group', response) + + def edit_group(self, group, process_id, wit_ref_name, page_id, section_id, group_id): + """EditGroup. + [Preview API] Updates a group in the work item form + :param :class:` ` group: The updated group + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str page_id: The ID of the page the group is in + :param str section_id: The ID of the section the group is in + :param str group_id: The ID of the group + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='PATCH', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Group', response) + + def remove_group(self, process_id, wit_ref_name, page_id, section_id, group_id): + """RemoveGroup. + [Preview API] Removes a group from the work item form + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str page_id: The ID of the page the group is in + :param str section_id: The ID of the section to the group is in + :param str group_id: The ID of the group + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + self._send(http_method='DELETE', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.1-preview.1', + route_values=route_values) + + def set_group_in_page(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_page_id, remove_from_section_id): + """SetGroupInPage. + [Preview API] Moves a group to a different page and section + :param :class:` ` group: The updated group + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str page_id: The ID of the page the group is in + :param str section_id: The ID of the section the group is in + :param str group_id: The ID of the group + :param str remove_from_page_id: ID of the page to remove the group from + :param str remove_from_section_id: ID of the section to remove the group from + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + query_parameters = {} + if remove_from_page_id is not None: + query_parameters['removeFromPageId'] = self._serialize.query('remove_from_page_id', remove_from_page_id, 'str') + if remove_from_section_id is not None: + query_parameters['removeFromSectionId'] = self._serialize.query('remove_from_section_id', remove_from_section_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='PUT', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Group', response) + + def set_group_in_section(self, group, process_id, wit_ref_name, page_id, section_id, group_id, remove_from_section_id): + """SetGroupInSection. + [Preview API] Moves a group to a different section + :param :class:` ` group: The updated group + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str page_id: The ID of the page the group is in + :param str section_id: The ID of the section the group is in + :param str group_id: The ID of the group + :param str remove_from_section_id: ID of the section to remove the group from + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + if section_id is not None: + route_values['sectionId'] = self._serialize.url('section_id', section_id, 'str') + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') + query_parameters = {} + if remove_from_section_id is not None: + query_parameters['removeFromSectionId'] = self._serialize.query('remove_from_section_id', remove_from_section_id, 'str') + content = self._serialize.body(group, 'Group') + response = self._send(http_method='PUT', + location_id='2617828b-e850-4375-a92a-04855704d4c3', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content) + return self._deserialize('Group', response) + + def get_form_layout(self, process_id, wit_ref_name): + """GetFormLayout. + [Preview API] Gets the form layout + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='3eacc80a-ddca-4404-857a-6331aac99063', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('FormLayout', response) + + def get_lists_metadata(self): + """GetListsMetadata. + [Preview API] Returns meta data of the picklist. + :rtype: [PickListMetadataModel] + """ + response = self._send(http_method='GET', + location_id='b45cc931-98e3-44a1-b1cd-2e8e9c6dc1c6', + version='4.1-preview.1', + returns_collection=True) + return self._deserialize('[PickListMetadataModel]', response) + + def create_list(self, picklist): + """CreateList. + [Preview API] Creates a picklist. + :param :class:` ` picklist: + :rtype: :class:` ` + """ + content = self._serialize.body(picklist, 'PickListModel') + response = self._send(http_method='POST', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.1-preview.1', + content=content) + return self._deserialize('PickListModel', response) + + def delete_list(self, list_id): + """DeleteList. + [Preview API] Removes a picklist. + :param str list_id: The ID of the list + """ + route_values = {} + if list_id is not None: + route_values['listId'] = self._serialize.url('list_id', list_id, 'str') + self._send(http_method='DELETE', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.1-preview.1', + route_values=route_values) + + def get_list(self, list_id): + """GetList. + [Preview API] Returns a picklist. + :param str list_id: The ID of the list + :rtype: :class:` ` + """ + route_values = {} + if list_id is not None: + route_values['listId'] = self._serialize.url('list_id', list_id, 'str') + response = self._send(http_method='GET', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('PickListModel', response) + + def update_list(self, picklist, list_id): + """UpdateList. + [Preview API] Updates a list. + :param :class:` ` picklist: + :param str list_id: The ID of the list + :rtype: :class:` ` + """ + route_values = {} + if list_id is not None: + route_values['listId'] = self._serialize.url('list_id', list_id, 'str') + content = self._serialize.body(picklist, 'PickListModel') + response = self._send(http_method='PUT', + location_id='0b6179e2-23ce-46b2-b094-2ffa5ee70286', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('PickListModel', response) + + def add_page(self, page, process_id, wit_ref_name): + """AddPage. + [Preview API] Adds a page to the work item form + :param :class:` ` page: The page + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(page, 'Page') + response = self._send(http_method='POST', + location_id='1b4ac126-59b2-4f37-b4df-0a48ba807edb', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Page', response) + + def edit_page(self, page, process_id, wit_ref_name): + """EditPage. + [Preview API] Updates a page on the work item form + :param :class:` ` page: The page + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(page, 'Page') + response = self._send(http_method='PATCH', + location_id='1b4ac126-59b2-4f37-b4df-0a48ba807edb', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('Page', response) + + def remove_page(self, process_id, wit_ref_name, page_id): + """RemovePage. + [Preview API] Removes a page from the work item form + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str page_id: The ID of the page + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if page_id is not None: + route_values['pageId'] = self._serialize.url('page_id', page_id, 'str') + self._send(http_method='DELETE', + location_id='1b4ac126-59b2-4f37-b4df-0a48ba807edb', + version='4.1-preview.1', + route_values=route_values) + + def create_state_definition(self, state_model, process_id, wit_ref_name): + """CreateStateDefinition. + [Preview API] Creates a state definition in the work item type of the process. + :param :class:` ` state_model: + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(state_model, 'WorkItemStateInputModel') + response = self._send(http_method='POST', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemStateResultModel', response) + + def delete_state_definition(self, process_id, wit_ref_name, state_id): + """DeleteStateDefinition. + [Preview API] Removes a state definition in the work item type of the process. + :param str process_id: ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str state_id: ID of the state + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + self._send(http_method='DELETE', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.1-preview.1', + route_values=route_values) + + def get_state_definition(self, process_id, wit_ref_name, state_id): + """GetStateDefinition. + [Preview API] Returns a state definition in the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str state_id: The ID of the state + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + response = self._send(http_method='GET', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('WorkItemStateResultModel', response) + + def get_state_definitions(self, process_id, wit_ref_name): + """GetStateDefinitions. + [Preview API] Returns a list of all state definitions in the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: [WorkItemStateResultModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + response = self._send(http_method='GET', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemStateResultModel]', response) + + def hide_state_definition(self, hide_state_model, process_id, wit_ref_name, state_id): + """HideStateDefinition. + [Preview API] Hides a state definition in the work item type of the process. + :param :class:` ` hide_state_model: + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str state_id: The ID of the state + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + content = self._serialize.body(hide_state_model, 'HideStateModel') + response = self._send(http_method='PUT', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemStateResultModel', response) + + def update_state_definition(self, state_model, process_id, wit_ref_name, state_id): + """UpdateStateDefinition. + [Preview API] Updates a given state definition in the work item type of the process. + :param :class:` ` state_model: + :param str process_id: ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str state_id: ID of the state + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + if state_id is not None: + route_values['stateId'] = self._serialize.url('state_id', state_id, 'str') + content = self._serialize.body(state_model, 'WorkItemStateInputModel') + response = self._send(http_method='PATCH', + location_id='4303625d-08f4-4461-b14b-32c65bba5599', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemStateResultModel', response) + + def add_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): + """AddBehaviorToWorkItemType. + [Preview API] Adds a behavior to the work item type of the process. + :param :class:` ` behavior: + :param str process_id: The ID of the process + :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + content = self._serialize.body(behavior, 'WorkItemTypeBehavior') + response = self._send(http_method='POST', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeBehavior', response) + + def get_behavior_for_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): + """GetBehaviorForWorkItemType. + [Preview API] Returns a behavior for the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior + :param str behavior_ref_name: The reference name of the behavior + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + if behavior_ref_name is not None: + route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') + response = self._send(http_method='GET', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('WorkItemTypeBehavior', response) + + def get_behaviors_for_work_item_type(self, process_id, wit_ref_name_for_behaviors): + """GetBehaviorsForWorkItemType. + [Preview API] Returns a list of all behaviors for the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior + :rtype: [WorkItemTypeBehavior] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + response = self._send(http_method='GET', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemTypeBehavior]', response) + + def remove_behavior_from_work_item_type(self, process_id, wit_ref_name_for_behaviors, behavior_ref_name): + """RemoveBehaviorFromWorkItemType. + [Preview API] Removes a behavior for the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior + :param str behavior_ref_name: The reference name of the behavior + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + if behavior_ref_name is not None: + route_values['behaviorRefName'] = self._serialize.url('behavior_ref_name', behavior_ref_name, 'str') + self._send(http_method='DELETE', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.1-preview.1', + route_values=route_values) + + def update_behavior_to_work_item_type(self, behavior, process_id, wit_ref_name_for_behaviors): + """UpdateBehaviorToWorkItemType. + [Preview API] Updates a behavior for the work item type of the process. + :param :class:` ` behavior: + :param str process_id: The ID of the process + :param str wit_ref_name_for_behaviors: Work item type reference name for the behavior + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_behaviors is not None: + route_values['witRefNameForBehaviors'] = self._serialize.url('wit_ref_name_for_behaviors', wit_ref_name_for_behaviors, 'str') + content = self._serialize.body(behavior, 'WorkItemTypeBehavior') + response = self._send(http_method='PATCH', + location_id='921dfb88-ef57-4c69-94e5-dd7da2d7031d', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeBehavior', response) + + def create_work_item_type(self, work_item_type, process_id): + """CreateWorkItemType. + [Preview API] Creates a work item type in the process. + :param :class:` ` work_item_type: + :param str process_id: The ID of the process + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + content = self._serialize.body(work_item_type, 'WorkItemTypeModel') + response = self._send(http_method='POST', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeModel', response) + + def delete_work_item_type(self, process_id, wit_ref_name): + """DeleteWorkItemType. + [Preview API] Removes a work itewm type in the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + self._send(http_method='DELETE', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.1-preview.1', + route_values=route_values) + + def get_work_item_type(self, process_id, wit_ref_name, expand=None): + """GetWorkItemType. + [Preview API] Returns a work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :param str expand: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, '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='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('WorkItemTypeModel', response) + + def get_work_item_types(self, process_id, expand=None): + """GetWorkItemTypes. + [Preview API] Returns a list of all work item types in the process. + :param str process_id: The ID of the process + :param str expand: + :rtype: [WorkItemTypeModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query('expand', expand, 'str') + response = self._send(http_method='GET', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WorkItemTypeModel]', response) + + def update_work_item_type(self, work_item_type_update, process_id, wit_ref_name): + """UpdateWorkItemType. + [Preview API] Updates a work item type of the process. + :param :class:` ` work_item_type_update: + :param str process_id: The ID of the process + :param str wit_ref_name: The reference name of the work item type + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name is not None: + route_values['witRefName'] = self._serialize.url('wit_ref_name', wit_ref_name, 'str') + content = self._serialize.body(work_item_type_update, 'WorkItemTypeUpdateModel') + response = self._send(http_method='PATCH', + location_id='1ce0acad-4638-49c3-969c-04aa65ba6bea', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeModel', response) + + def add_field_to_work_item_type(self, field, process_id, wit_ref_name_for_fields): + """AddFieldToWorkItemType. + [Preview API] Adds a field to the work item type in the process. + :param :class:` ` field: + :param str process_id: The ID of the process + :param str wit_ref_name_for_fields: Work item type reference name for the field + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + content = self._serialize.body(field, 'WorkItemTypeFieldModel') + response = self._send(http_method='POST', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.1-preview.1', + route_values=route_values, + content=content) + return self._deserialize('WorkItemTypeFieldModel', response) + + def get_work_item_type_field(self, process_id, wit_ref_name_for_fields, field_ref_name): + """GetWorkItemTypeField. + [Preview API] Retuens a single field in the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name_for_fields: Work item type reference name for fields + :param str field_ref_name: The reference name of the field + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + if field_ref_name is not None: + route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') + response = self._send(http_method='GET', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('WorkItemTypeFieldModel', response) + + def get_work_item_type_fields(self, process_id, wit_ref_name_for_fields): + """GetWorkItemTypeFields. + [Preview API] Returns a list of all fields in the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name_for_fields: Work item type reference name for fields + :rtype: [WorkItemTypeFieldModel] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + response = self._send(http_method='GET', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[WorkItemTypeFieldModel]', response) + + def remove_field_from_work_item_type(self, process_id, wit_ref_name_for_fields, field_ref_name): + """RemoveFieldFromWorkItemType. + [Preview API] Removes a field in the work item type of the process. + :param str process_id: The ID of the process + :param str wit_ref_name_for_fields: Work item type reference name for fields + :param str field_ref_name: The reference name of the field + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + if wit_ref_name_for_fields is not None: + route_values['witRefNameForFields'] = self._serialize.url('wit_ref_name_for_fields', wit_ref_name_for_fields, 'str') + if field_ref_name is not None: + route_values['fieldRefName'] = self._serialize.url('field_ref_name', field_ref_name, 'str') + self._send(http_method='DELETE', + location_id='976713b4-a62e-499e-94dc-eeb869ea9126', + version='4.1-preview.1', + route_values=route_values) + diff --git a/vsts/vsts/work_item_tracking_process_template/__init__.py b/vsts/vsts/work_item_tracking_process_template/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/__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_item_tracking_process_template/v4_0/__init__.py b/vsts/vsts/work_item_tracking_process_template/v4_0/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/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_item_tracking_process_template/v4_0/models/__init__.py b/vsts/vsts/work_item_tracking_process_template/v4_0/models/__init__.py new file mode 100644 index 00000000..81330e29 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/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 .admin_behavior import AdminBehavior +from .admin_behavior_field import AdminBehaviorField +from .check_template_existence_result import CheckTemplateExistenceResult +from .process_import_result import ProcessImportResult +from .process_promote_status import ProcessPromoteStatus +from .validation_issue import ValidationIssue + +__all__ = [ + 'AdminBehavior', + 'AdminBehaviorField', + 'CheckTemplateExistenceResult', + 'ProcessImportResult', + 'ProcessPromoteStatus', + 'ValidationIssue', +] diff --git a/vsts/vsts/work_item_tracking_process_template/v4_0/models/admin_behavior.py b/vsts/vsts/work_item_tracking_process_template/v4_0/models/admin_behavior.py new file mode 100644 index 00000000..a0312319 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_0/models/admin_behavior.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 AdminBehavior(Model): + """AdminBehavior. + + :param abstract: + :type abstract: bool + :param color: + :type color: str + :param custom: + :type custom: bool + :param description: + :type description: str + :param fields: + :type fields: list of :class:`AdminBehaviorField ` + :param id: + :type id: str + :param inherits: + :type inherits: str + :param name: + :type name: str + :param overriden: + :type overriden: bool + :param rank: + :type rank: int + """ + + _attribute_map = { + 'abstract': {'key': 'abstract', 'type': 'bool'}, + 'color': {'key': 'color', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'fields': {'key': 'fields', 'type': '[AdminBehaviorField]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'overriden': {'key': 'overriden', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'} + } + + def __init__(self, abstract=None, color=None, custom=None, description=None, fields=None, id=None, inherits=None, name=None, overriden=None, rank=None): + super(AdminBehavior, self).__init__() + self.abstract = abstract + self.color = color + self.custom = custom + self.description = description + self.fields = fields + self.id = id + self.inherits = inherits + self.name = name + self.overriden = overriden + self.rank = rank diff --git a/vsts/vsts/work_item_tracking_process_template/v4_0/models/admin_behavior_field.py b/vsts/vsts/work_item_tracking_process_template/v4_0/models/admin_behavior_field.py new file mode 100644 index 00000000..628c388f --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_0/models/admin_behavior_field.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 AdminBehaviorField(Model): + """AdminBehaviorField. + + :param behavior_field_id: + :type behavior_field_id: str + :param id: + :type id: str + :param name: + :type name: str + """ + + _attribute_map = { + 'behavior_field_id': {'key': 'behaviorFieldId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, behavior_field_id=None, id=None, name=None): + super(AdminBehaviorField, self).__init__() + self.behavior_field_id = behavior_field_id + self.id = id + self.name = name diff --git a/vsts/vsts/work_item_tracking_process_template/v4_0/models/check_template_existence_result.py b/vsts/vsts/work_item_tracking_process_template/v4_0/models/check_template_existence_result.py new file mode 100644 index 00000000..a40cedd5 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_0/models/check_template_existence_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 CheckTemplateExistenceResult(Model): + """CheckTemplateExistenceResult. + + :param does_template_exist: + :type does_template_exist: bool + :param existing_template_name: + :type existing_template_name: str + :param existing_template_type_id: + :type existing_template_type_id: str + :param requested_template_name: + :type requested_template_name: str + """ + + _attribute_map = { + 'does_template_exist': {'key': 'doesTemplateExist', 'type': 'bool'}, + 'existing_template_name': {'key': 'existingTemplateName', 'type': 'str'}, + 'existing_template_type_id': {'key': 'existingTemplateTypeId', 'type': 'str'}, + 'requested_template_name': {'key': 'requestedTemplateName', 'type': 'str'} + } + + def __init__(self, does_template_exist=None, existing_template_name=None, existing_template_type_id=None, requested_template_name=None): + super(CheckTemplateExistenceResult, self).__init__() + self.does_template_exist = does_template_exist + self.existing_template_name = existing_template_name + self.existing_template_type_id = existing_template_type_id + self.requested_template_name = requested_template_name diff --git a/vsts/vsts/work_item_tracking_process_template/v4_0/models/process_import_result.py b/vsts/vsts/work_item_tracking_process_template/v4_0/models/process_import_result.py new file mode 100644 index 00000000..189dfa21 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_0/models/process_import_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 ProcessImportResult(Model): + """ProcessImportResult. + + :param help_url: + :type help_url: str + :param id: + :type id: str + :param promote_job_id: + :type promote_job_id: str + :param validation_results: + :type validation_results: list of :class:`ValidationIssue ` + """ + + _attribute_map = { + 'help_url': {'key': 'helpUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'promote_job_id': {'key': 'promoteJobId', 'type': 'str'}, + 'validation_results': {'key': 'validationResults', 'type': '[ValidationIssue]'} + } + + def __init__(self, help_url=None, id=None, promote_job_id=None, validation_results=None): + super(ProcessImportResult, self).__init__() + self.help_url = help_url + self.id = id + self.promote_job_id = promote_job_id + self.validation_results = validation_results diff --git a/vsts/vsts/work_item_tracking_process_template/v4_0/models/process_promote_status.py b/vsts/vsts/work_item_tracking_process_template/v4_0/models/process_promote_status.py new file mode 100644 index 00000000..bf64aa29 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_0/models/process_promote_status.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 ProcessPromoteStatus(Model): + """ProcessPromoteStatus. + + :param complete: + :type complete: int + :param id: + :type id: str + :param message: + :type message: str + :param pending: + :type pending: int + :param remaining_retries: + :type remaining_retries: int + :param successful: + :type successful: bool + """ + + _attribute_map = { + 'complete': {'key': 'complete', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'pending': {'key': 'pending', 'type': 'int'}, + 'remaining_retries': {'key': 'remainingRetries', 'type': 'int'}, + 'successful': {'key': 'successful', 'type': 'bool'} + } + + def __init__(self, complete=None, id=None, message=None, pending=None, remaining_retries=None, successful=None): + super(ProcessPromoteStatus, self).__init__() + self.complete = complete + self.id = id + self.message = message + self.pending = pending + self.remaining_retries = remaining_retries + self.successful = successful diff --git a/vsts/vsts/work_item_tracking_process_template/v4_0/models/validation_issue.py b/vsts/vsts/work_item_tracking_process_template/v4_0/models/validation_issue.py new file mode 100644 index 00000000..db8df249 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_0/models/validation_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 ValidationIssue(Model): + """ValidationIssue. + + :param description: + :type description: str + :param file: + :type file: str + :param help_link: + :type help_link: str + :param issue_type: + :type issue_type: object + :param line: + :type line: int + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + 'help_link': {'key': 'helpLink', 'type': 'str'}, + 'issue_type': {'key': 'issueType', 'type': 'object'}, + 'line': {'key': 'line', 'type': 'int'} + } + + def __init__(self, description=None, file=None, help_link=None, issue_type=None, line=None): + super(ValidationIssue, self).__init__() + self.description = description + self.file = file + self.help_link = help_link + self.issue_type = issue_type + self.line = line diff --git a/vsts/vsts/work_item_tracking_process_template/v4_0/work_item_tracking_process_template_client.py b/vsts/vsts/work_item_tracking_process_template/v4_0/work_item_tracking_process_template_client.py new file mode 100644 index 00000000..7c2bc48b --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_0/work_item_tracking_process_template_client.py @@ -0,0 +1,138 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WorkItemTrackingProcessTemplateClient(VssClient): + """WorkItemTrackingProcessTemplate + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(WorkItemTrackingProcessTemplateClient, 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_behavior(self, process_id, behavior_ref_name): + """GetBehavior. + [Preview API] + :param str process_id: + :param str behavior_ref_name: + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if behavior_ref_name is not None: + query_parameters['behaviorRefName'] = self._serialize.query('behavior_ref_name', behavior_ref_name, 'str') + response = self._send(http_method='GET', + location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AdminBehavior', response) + + def get_behaviors(self, process_id): + """GetBehaviors. + [Preview API] + :param str process_id: + :rtype: [AdminBehavior] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + response = self._send(http_method='GET', + location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', + version='4.0-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[AdminBehavior]', response) + + def check_template_existence(self, upload_stream): + """CheckTemplateExistence. + [Preview API] Check if process template exists + :param object upload_stream: Stream to upload + :rtype: :class:` ` + """ + route_values = {} + route_values['action'] = 'CheckTemplateExistence' + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.0-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('CheckTemplateExistenceResult', response) + + def export_process_template(self, id): + """ExportProcessTemplate. + [Preview API] Returns requested process template + :param str id: + :rtype: object + """ + route_values = {} + route_values['action'] = 'Export' + query_parameters = {} + if id is not None: + query_parameters['id'] = self._serialize.query('id', id, 'str') + response = self._send(http_method='GET', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('object', response) + + def import_process_template(self, upload_stream, ignore_warnings=None): + """ImportProcessTemplate. + [Preview API] + :param object upload_stream: Stream to upload + :param bool ignore_warnings: + :rtype: :class:` ` + """ + route_values = {} + route_values['action'] = 'Import' + query_parameters = {} + if ignore_warnings is not None: + query_parameters['ignoreWarnings'] = self._serialize.query('ignore_warnings', ignore_warnings, 'bool') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + media_type='application/octet-stream') + return self._deserialize('ProcessImportResult', response) + + def import_process_template_status(self, id): + """ImportProcessTemplateStatus. + [Preview API] Whether promote has completed for the specified promote job id + :param str id: + :rtype: :class:` ` + """ + route_values = {} + route_values['action'] = 'Status' + query_parameters = {} + if id is not None: + query_parameters['id'] = self._serialize.query('id', id, 'str') + response = self._send(http_method='GET', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.0-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('ProcessPromoteStatus', response) + diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/__init__.py b/vsts/vsts/work_item_tracking_process_template/v4_1/__init__.py new file mode 100644 index 00000000..b19525a6 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/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_item_tracking_process_template/v4_1/models/__init__.py b/vsts/vsts/work_item_tracking_process_template/v4_1/models/__init__.py new file mode 100644 index 00000000..81330e29 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/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 .admin_behavior import AdminBehavior +from .admin_behavior_field import AdminBehaviorField +from .check_template_existence_result import CheckTemplateExistenceResult +from .process_import_result import ProcessImportResult +from .process_promote_status import ProcessPromoteStatus +from .validation_issue import ValidationIssue + +__all__ = [ + 'AdminBehavior', + 'AdminBehaviorField', + 'CheckTemplateExistenceResult', + 'ProcessImportResult', + 'ProcessPromoteStatus', + 'ValidationIssue', +] diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/models/admin_behavior.py b/vsts/vsts/work_item_tracking_process_template/v4_1/models/admin_behavior.py new file mode 100644 index 00000000..aad238df --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_1/models/admin_behavior.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 AdminBehavior(Model): + """AdminBehavior. + + :param abstract: Is the behavior abstract (i.e. can not be associated with any work item type). + :type abstract: bool + :param color: The color associated with the behavior. + :type color: str + :param custom: Indicates if the behavior is custom. + :type custom: bool + :param description: The description of the behavior. + :type description: str + :param fields: List of behavior fields. + :type fields: list of :class:`AdminBehaviorField ` + :param id: Behavior ID. + :type id: str + :param inherits: Parent behavior reference. + :type inherits: str + :param name: The behavior name. + :type name: str + :param overriden: Is the behavior overrides a behavior from system process. + :type overriden: bool + :param rank: The rank. + :type rank: int + """ + + _attribute_map = { + 'abstract': {'key': 'abstract', 'type': 'bool'}, + 'color': {'key': 'color', 'type': 'str'}, + 'custom': {'key': 'custom', 'type': 'bool'}, + 'description': {'key': 'description', 'type': 'str'}, + 'fields': {'key': 'fields', 'type': '[AdminBehaviorField]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'inherits': {'key': 'inherits', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'overriden': {'key': 'overriden', 'type': 'bool'}, + 'rank': {'key': 'rank', 'type': 'int'} + } + + def __init__(self, abstract=None, color=None, custom=None, description=None, fields=None, id=None, inherits=None, name=None, overriden=None, rank=None): + super(AdminBehavior, self).__init__() + self.abstract = abstract + self.color = color + self.custom = custom + self.description = description + self.fields = fields + self.id = id + self.inherits = inherits + self.name = name + self.overriden = overriden + self.rank = rank diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/models/admin_behavior_field.py b/vsts/vsts/work_item_tracking_process_template/v4_1/models/admin_behavior_field.py new file mode 100644 index 00000000..8cea2e2e --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_1/models/admin_behavior_field.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 AdminBehaviorField(Model): + """AdminBehaviorField. + + :param behavior_field_id: The behavior field identifier. + :type behavior_field_id: str + :param id: The behavior ID. + :type id: str + :param name: The behavior name. + :type name: str + """ + + _attribute_map = { + 'behavior_field_id': {'key': 'behaviorFieldId', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'} + } + + def __init__(self, behavior_field_id=None, id=None, name=None): + super(AdminBehaviorField, self).__init__() + self.behavior_field_id = behavior_field_id + self.id = id + self.name = name diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/models/check_template_existence_result.py b/vsts/vsts/work_item_tracking_process_template/v4_1/models/check_template_existence_result.py new file mode 100644 index 00000000..b489ede0 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_1/models/check_template_existence_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 CheckTemplateExistenceResult(Model): + """CheckTemplateExistenceResult. + + :param does_template_exist: Indicates whether a template exists. + :type does_template_exist: bool + :param existing_template_name: The name of the existing template. + :type existing_template_name: str + :param existing_template_type_id: The existing template type identifier. + :type existing_template_type_id: str + :param requested_template_name: The name of the requested template. + :type requested_template_name: str + """ + + _attribute_map = { + 'does_template_exist': {'key': 'doesTemplateExist', 'type': 'bool'}, + 'existing_template_name': {'key': 'existingTemplateName', 'type': 'str'}, + 'existing_template_type_id': {'key': 'existingTemplateTypeId', 'type': 'str'}, + 'requested_template_name': {'key': 'requestedTemplateName', 'type': 'str'} + } + + def __init__(self, does_template_exist=None, existing_template_name=None, existing_template_type_id=None, requested_template_name=None): + super(CheckTemplateExistenceResult, self).__init__() + self.does_template_exist = does_template_exist + self.existing_template_name = existing_template_name + self.existing_template_type_id = existing_template_type_id + self.requested_template_name = requested_template_name diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/models/process_import_result.py b/vsts/vsts/work_item_tracking_process_template/v4_1/models/process_import_result.py new file mode 100644 index 00000000..ae9d911e --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_1/models/process_import_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 ProcessImportResult(Model): + """ProcessImportResult. + + :param help_url: Help URL. + :type help_url: str + :param id: ID of the import operation. + :type id: str + :param is_new: Whether this imported process is new. + :type is_new: bool + :param promote_job_id: The promote job identifier. + :type promote_job_id: str + :param validation_results: The list of validation results. + :type validation_results: list of :class:`ValidationIssue ` + """ + + _attribute_map = { + 'help_url': {'key': 'helpUrl', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'is_new': {'key': 'isNew', 'type': 'bool'}, + 'promote_job_id': {'key': 'promoteJobId', 'type': 'str'}, + 'validation_results': {'key': 'validationResults', 'type': '[ValidationIssue]'} + } + + def __init__(self, help_url=None, id=None, is_new=None, promote_job_id=None, validation_results=None): + super(ProcessImportResult, self).__init__() + self.help_url = help_url + self.id = id + self.is_new = is_new + self.promote_job_id = promote_job_id + self.validation_results = validation_results diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/models/process_promote_status.py b/vsts/vsts/work_item_tracking_process_template/v4_1/models/process_promote_status.py new file mode 100644 index 00000000..8810ad85 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_1/models/process_promote_status.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 ProcessPromoteStatus(Model): + """ProcessPromoteStatus. + + :param complete: Number of projects for which promote is complete. + :type complete: int + :param id: ID of the promote operation. + :type id: str + :param message: The error message assoicated with the promote operation. The string will be empty if there are no errors. + :type message: str + :param pending: Number of projects for which promote is pending. + :type pending: int + :param remaining_retries: The remaining retries. + :type remaining_retries: int + :param successful: True if promote finished all the projects successfully. False if still inprogress or any project promote failed. + :type successful: bool + """ + + _attribute_map = { + 'complete': {'key': 'complete', 'type': 'int'}, + 'id': {'key': 'id', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'pending': {'key': 'pending', 'type': 'int'}, + 'remaining_retries': {'key': 'remainingRetries', 'type': 'int'}, + 'successful': {'key': 'successful', 'type': 'bool'} + } + + def __init__(self, complete=None, id=None, message=None, pending=None, remaining_retries=None, successful=None): + super(ProcessPromoteStatus, self).__init__() + self.complete = complete + self.id = id + self.message = message + self.pending = pending + self.remaining_retries = remaining_retries + self.successful = successful diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/models/validation_issue.py b/vsts/vsts/work_item_tracking_process_template/v4_1/models/validation_issue.py new file mode 100644 index 00000000..db8df249 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_1/models/validation_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 ValidationIssue(Model): + """ValidationIssue. + + :param description: + :type description: str + :param file: + :type file: str + :param help_link: + :type help_link: str + :param issue_type: + :type issue_type: object + :param line: + :type line: int + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'file': {'key': 'file', 'type': 'str'}, + 'help_link': {'key': 'helpLink', 'type': 'str'}, + 'issue_type': {'key': 'issueType', 'type': 'object'}, + 'line': {'key': 'line', 'type': 'int'} + } + + def __init__(self, description=None, file=None, help_link=None, issue_type=None, line=None): + super(ValidationIssue, self).__init__() + self.description = description + self.file = file + self.help_link = help_link + self.issue_type = issue_type + self.line = line diff --git a/vsts/vsts/work_item_tracking_process_template/v4_1/work_item_tracking_process_template_client.py b/vsts/vsts/work_item_tracking_process_template/v4_1/work_item_tracking_process_template_client.py new file mode 100644 index 00000000..efefa0d9 --- /dev/null +++ b/vsts/vsts/work_item_tracking_process_template/v4_1/work_item_tracking_process_template_client.py @@ -0,0 +1,134 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root 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 WorkItemTrackingProcessTemplateClient(VssClient): + """WorkItemTrackingProcessTemplate + :param str base_url: Service URL + :param Authentication creds: Authenticated credentials. + """ + + def __init__(self, base_url=None, creds=None): + super(WorkItemTrackingProcessTemplateClient, 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_behavior(self, process_id, behavior_ref_name): + """GetBehavior. + [Preview API] Returns a behavior for the process. + :param str process_id: The ID of the process + :param str behavior_ref_name: The reference name of the behavior + :rtype: :class:` ` + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + query_parameters = {} + if behavior_ref_name is not None: + query_parameters['behaviorRefName'] = self._serialize.query('behavior_ref_name', behavior_ref_name, 'str') + response = self._send(http_method='GET', + location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters) + return self._deserialize('AdminBehavior', response) + + def get_behaviors(self, process_id): + """GetBehaviors. + [Preview API] Returns a list of behaviors for the process. + :param str process_id: The ID of the process + :rtype: [AdminBehavior] + """ + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') + response = self._send(http_method='GET', + location_id='90bf9317-3571-487b-bc8c-a523ba0e05d7', + version='4.1-preview.1', + route_values=route_values, + returns_collection=True) + return self._deserialize('[AdminBehavior]', response) + + def check_template_existence(self, upload_stream): + """CheckTemplateExistence. + [Preview API] Check if process template exists. + :param object upload_stream: Stream to upload + :rtype: :class:` ` + """ + route_values = {} + route_values['action'] = 'CheckTemplateExistence' + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.1-preview.1', + route_values=route_values, + content=content, + media_type='application/octet-stream') + return self._deserialize('CheckTemplateExistenceResult', response) + + def export_process_template(self, id): + """ExportProcessTemplate. + [Preview API] Returns requested process template. + :param str id: The ID of the process + :rtype: object + """ + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + route_values['action'] = 'Export' + response = self._send(http_method='GET', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('object', response) + + def import_process_template(self, upload_stream, ignore_warnings=None): + """ImportProcessTemplate. + [Preview API] Imports a process from zip file. + :param object upload_stream: Stream to upload + :param bool ignore_warnings: Default value is false + :rtype: :class:` ` + """ + route_values = {} + route_values['action'] = 'Import' + query_parameters = {} + if ignore_warnings is not None: + query_parameters['ignoreWarnings'] = self._serialize.query('ignore_warnings', ignore_warnings, 'bool') + content = self._serialize.body(upload_stream, 'object') + response = self._send(http_method='POST', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.1-preview.1', + route_values=route_values, + query_parameters=query_parameters, + content=content, + media_type='application/octet-stream') + return self._deserialize('ProcessImportResult', response) + + def import_process_template_status(self, id): + """ImportProcessTemplateStatus. + [Preview API] Tells whether promote has completed for the specified promote job ID. + :param str id: The ID of the promote job operation + :rtype: :class:` ` + """ + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') + route_values['action'] = 'Status' + response = self._send(http_method='GET', + location_id='29e1f38d-9e9c-4358-86a5-cdf9896a5759', + version='4.1-preview.1', + route_values=route_values) + return self._deserialize('ProcessPromoteStatus', response) +