diff --git a/vsts/vsts/build/v4_0/build_client.py b/vsts/vsts/build/v4_0/build_client.py index 5c579399..b28c3597 100644 --- a/vsts/vsts/build/v4_0/build_client.py +++ b/vsts/vsts/build/v4_0/build_client.py @@ -28,15 +28,16 @@ def __init__(self, base_url=None, creds=None): def create_artifact(self, artifact, build_id, project=None): """CreateArtifact. Associates an artifact with a build - :param :class:` ` artifact: + :param :class:` ` artifact: :param int build_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(artifact, 'BuildArtifact') response = self._send(http_method='POST', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', @@ -51,12 +52,13 @@ def get_artifact(self, build_id, artifact_name, project=None): :param int build_id: :param str artifact_name: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if artifact_name is not None: query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') @@ -75,10 +77,11 @@ def get_artifact_content_zip(self, build_id, artifact_name, project=None): :param str project: Project ID or project name :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if artifact_name is not None: query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') @@ -96,10 +99,11 @@ def get_artifacts(self, build_id, project=None): :param str project: Project ID or project name :rtype: [BuildArtifact] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', version='4.0', @@ -114,10 +118,11 @@ def get_badge(self, project, definition_id, branch_name=None): :param str branch_name: :rtype: str """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if branch_name is not None: query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') @@ -135,12 +140,13 @@ def get_build_badge(self, project, repo_type, repo_id=None, branch_name=None): :param str repo_type: :param str repo_id: :param str branch_name: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repoType': self._serialize.url('repo_type', repo_type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repo_type is not None: + route_values['repoType'] = self._serialize.url('repo_type', repo_type, 'str') query_parameters = {} if repo_id is not None: query_parameters['repoId'] = self._serialize.query('repo_id', repo_id, 'str') @@ -162,10 +168,11 @@ def get_build_badge_data(self, project, repo_type, repo_id=None, branch_name=Non :param str branch_name: :rtype: str """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repoType': self._serialize.url('repo_type', repo_type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repo_type is not None: + route_values['repoType'] = self._serialize.url('repo_type', repo_type, 'str') query_parameters = {} if repo_id is not None: query_parameters['repoId'] = self._serialize.query('repo_id', repo_id, 'str') @@ -184,10 +191,11 @@ def delete_build(self, build_id, project=None): :param int build_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') self._send(http_method='DELETE', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='4.0', @@ -199,12 +207,13 @@ def get_build(self, build_id, project=None, property_filters=None): :param int build_id: :param str project: Project ID or project name :param str property_filters: A comma-delimited list of properties to include in the results - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if property_filters is not None: query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') @@ -241,9 +250,9 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N :param str repository_type: :rtype: [Build] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if definitions is not None: definitions = ",".join(map(str, definitions)) @@ -301,15 +310,15 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N def queue_build(self, build, project=None, ignore_warnings=None, check_in_ticket=None): """QueueBuild. Queues a build - :param :class:` ` build: + :param :class:` ` build: :param str project: Project ID or project name :param bool ignore_warnings: :param str check_in_ticket: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if ignore_warnings is not None: query_parameters['ignoreWarnings'] = self._serialize.query('ignore_warnings', ignore_warnings, 'bool') @@ -327,15 +336,16 @@ def queue_build(self, build, project=None, ignore_warnings=None, check_in_ticket def update_build(self, build, build_id, project=None): """UpdateBuild. Updates a build - :param :class:` ` build: + :param :class:` ` build: :param int build_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(build, 'Build') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', @@ -351,9 +361,9 @@ def update_builds(self, builds, project=None): :param str project: Project ID or project name :rtype: [Build] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(builds, '[Build]') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', @@ -373,10 +383,11 @@ def get_build_changes(self, project, build_id, continuation_token=None, top=None :param bool include_source_change: :rtype: [Change] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') @@ -401,9 +412,9 @@ def get_changes_between_builds(self, project, from_build_id=None, to_build_id=No :param int top: The maximum number of changes to return :rtype: [Change] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if from_build_id is not None: query_parameters['fromBuildId'] = self._serialize.query('from_build_id', from_build_id, 'int') @@ -423,11 +434,11 @@ def get_build_controller(self, controller_id): """GetBuildController. Gets a controller :param int controller_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'controllerId': self._serialize.url('controller_id', controller_id, 'int') - } + route_values = {} + if controller_id is not None: + route_values['controllerId'] = self._serialize.url('controller_id', controller_id, 'int') response = self._send(http_method='GET', location_id='fcac1932-2ee1-437f-9b6f-7f696be858f6', version='4.0', @@ -453,15 +464,15 @@ def get_build_controllers(self, name=None): def create_definition(self, definition, project=None, definition_to_clone_id=None, definition_to_clone_revision=None): """CreateDefinition. Creates a new definition - :param :class:` ` definition: + :param :class:` ` definition: :param str project: Project ID or project name :param int definition_to_clone_id: :param int definition_to_clone_revision: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if definition_to_clone_id is not None: query_parameters['definitionToCloneId'] = self._serialize.query('definition_to_clone_id', definition_to_clone_id, 'int') @@ -482,10 +493,11 @@ def delete_definition(self, definition_id, project=None): :param int definition_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') self._send(http_method='DELETE', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='4.0', @@ -500,12 +512,13 @@ def get_definition(self, definition_id, project=None, revision=None, min_metrics :param datetime min_metrics_time: :param [str] property_filters: :param bool include_latest_builds: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if revision is not None: query_parameters['revision'] = self._serialize.query('revision', revision, 'int') @@ -543,9 +556,9 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor :param str task_id_filter: :rtype: [BuildDefinitionReference] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if name is not None: query_parameters['name'] = self._serialize.query('name', name, 'str') @@ -587,17 +600,18 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor def update_definition(self, definition, definition_id, project=None, secrets_source_definition_id=None, secrets_source_definition_revision=None): """UpdateDefinition. Updates an existing definition - :param :class:` ` definition: + :param :class:` ` definition: :param int definition_id: :param str project: Project ID or project name :param int secrets_source_definition_id: :param int secrets_source_definition_revision: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if secrets_source_definition_id is not None: query_parameters['secretsSourceDefinitionId'] = self._serialize.query('secrets_source_definition_id', secrets_source_definition_id, 'int') @@ -615,15 +629,16 @@ def update_definition(self, definition, definition_id, project=None, secrets_sou def create_folder(self, folder, project, path): """CreateFolder. [Preview API] Creates a new folder - :param :class:` ` folder: + :param :class:` ` folder: :param str project: Project ID or project name :param str path: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(folder, 'Folder') response = self._send(http_method='PUT', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', @@ -638,10 +653,11 @@ def delete_folder(self, project, path): :param str project: Project ID or project name :param str path: """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') self._send(http_method='DELETE', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', version='4.0-preview.1', @@ -655,10 +671,11 @@ def get_folders(self, project, path=None, query_order=None): :param FolderQueryOrder query_order: :rtype: [Folder] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if query_order is not None: query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'FolderQueryOrder') @@ -673,15 +690,16 @@ def get_folders(self, project, path=None, query_order=None): def update_folder(self, folder, project, path): """UpdateFolder. [Preview API] Updates an existing folder at given existing path - :param :class:` ` folder: + :param :class:` ` folder: :param str project: Project ID or project name :param str path: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(folder, 'Folder') response = self._send(http_method='POST', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', @@ -700,11 +718,13 @@ def get_build_log(self, project, build_id, log_id, start_line=None, end_line=Non :param long end_line: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'logId': self._serialize.url('log_id', log_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') @@ -727,11 +747,13 @@ def get_build_log_lines(self, project, build_id, log_id, start_line=None, end_li :param long end_line: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'logId': self._serialize.url('log_id', log_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') @@ -752,10 +774,11 @@ def get_build_logs(self, project, build_id): :param int build_id: :rtype: [BuildLog] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='4.0', @@ -770,10 +793,11 @@ def get_build_logs_zip(self, project, build_id): :param int build_id: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='4.0', @@ -788,10 +812,11 @@ def get_project_metrics(self, project, metric_aggregation_type=None, min_metrics :param datetime min_metrics_time: :rtype: [BuildMetric] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'metricAggregationType': self._serialize.url('metric_aggregation_type', metric_aggregation_type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if metric_aggregation_type is not None: + route_values['metricAggregationType'] = self._serialize.url('metric_aggregation_type', metric_aggregation_type, 'str') query_parameters = {} if min_metrics_time is not None: query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'datetime') @@ -811,10 +836,11 @@ def get_definition_metrics(self, project, definition_id, min_metrics_time=None): :param datetime min_metrics_time: :rtype: [BuildMetric] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if min_metrics_time is not None: query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'datetime') @@ -832,9 +858,9 @@ def get_build_option_definitions(self, project=None): :param str project: Project ID or project name :rtype: [BuildOptionDefinition] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='591cb5a4-2d46-4f3a-a697-5cd42b6bd332', version='4.0', @@ -848,12 +874,13 @@ def get_build_properties(self, project, build_id, filter=None): :param str project: Project ID or project name :param int build_id: The build id. :param [str] filter: Filter to specific properties. Defaults to all properties. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if filter is not None: filter = ",".join(filter) @@ -868,15 +895,16 @@ def get_build_properties(self, project, build_id, filter=None): def update_build_properties(self, document, project, build_id): """UpdateBuildProperties. [Preview API] Updates properties for a build. - :param :class:`<[JsonPatchOperation]> ` document: + :param :class:`<[JsonPatchOperation]> ` document: :param str project: Project ID or project name :param int build_id: The build id. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='0a6312e9-0627-49b7-8083-7d74a64849c9', @@ -892,12 +920,13 @@ def get_definition_properties(self, project, definition_id, filter=None): :param str project: Project ID or project name :param int definition_id: The definition id. :param [str] filter: Filter to specific properties. Defaults to all properties. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if filter is not None: filter = ",".join(filter) @@ -912,15 +941,16 @@ def get_definition_properties(self, project, definition_id, filter=None): def update_definition_properties(self, document, project, definition_id): """UpdateDefinitionProperties. [Preview API] Updates properties for a definition. - :param :class:`<[JsonPatchOperation]> ` document: + :param :class:`<[JsonPatchOperation]> ` document: :param str project: Project ID or project name :param int definition_id: The definition id. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='d9826ad7-2a68-46a9-a6e9-677698777895', @@ -936,12 +966,13 @@ def get_build_report(self, project, build_id, type=None): :param str project: Project ID or project name :param int build_id: :param str type: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if type is not None: query_parameters['type'] = self._serialize.query('type', type, 'str') @@ -960,10 +991,11 @@ def get_build_report_html_content(self, project, build_id, type=None): :param str type: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if type is not None: query_parameters['type'] = self._serialize.query('type', type, 'str') @@ -977,7 +1009,7 @@ def get_build_report_html_content(self, project, build_id, type=None): def get_resource_usage(self): """GetResourceUsage. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='3813d06c-9e36-4ea1-aac3-61a485d60e3d', @@ -991,10 +1023,11 @@ def get_definition_revisions(self, project, definition_id): :param int definition_id: :rtype: [BuildDefinitionRevision] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') response = self._send(http_method='GET', location_id='7c116775-52e5-453e-8c5d-914d9762d8c4', version='4.0', @@ -1005,7 +1038,7 @@ def get_definition_revisions(self, project, definition_id): def get_build_settings(self): """GetBuildSettings. Gets the build settings - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d', @@ -1015,8 +1048,8 @@ def get_build_settings(self): def update_build_settings(self, settings): """UpdateBuildSettings. Updates the build settings - :param :class:` ` settings: - :rtype: :class:` ` + :param :class:` ` settings: + :rtype: :class:` ` """ content = self._serialize.body(settings, 'BuildSettings') response = self._send(http_method='PATCH', @@ -1033,11 +1066,13 @@ def add_build_tag(self, project, build_id, tag): :param str tag: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='PUT', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='4.0', @@ -1053,10 +1088,11 @@ def add_build_tags(self, tags, project, build_id): :param int build_id: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(tags, '[str]') response = self._send(http_method='POST', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', @@ -1074,11 +1110,13 @@ def delete_build_tag(self, project, build_id, tag): :param str tag: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='4.0', @@ -1093,10 +1131,11 @@ def get_build_tags(self, project, build_id): :param int build_id: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='4.0', @@ -1110,9 +1149,9 @@ def get_tags(self, project): :param str project: Project ID or project name :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', version='4.0', @@ -1128,11 +1167,13 @@ def add_definition_tag(self, project, definition_id, tag): :param str tag: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='PUT', location_id='cb894432-134a-4d31-a839-83beceaace4b', version='4.0-preview.2', @@ -1148,10 +1189,11 @@ def add_definition_tags(self, tags, project, definition_id): :param int definition_id: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') content = self._serialize.body(tags, '[str]') response = self._send(http_method='POST', location_id='cb894432-134a-4d31-a839-83beceaace4b', @@ -1169,11 +1211,13 @@ def delete_definition_tag(self, project, definition_id, tag): :param str tag: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='cb894432-134a-4d31-a839-83beceaace4b', version='4.0-preview.2', @@ -1189,10 +1233,11 @@ def get_definition_tags(self, project, definition_id, revision=None): :param int revision: :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if revision is not None: query_parameters['revision'] = self._serialize.query('revision', revision, 'int') @@ -1210,10 +1255,11 @@ def delete_template(self, project, template_id): :param str project: Project ID or project name :param str template_id: """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') self._send(http_method='DELETE', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='4.0', @@ -1224,12 +1270,13 @@ def get_template(self, project, template_id): Gets definition template filtered by id :param str project: Project ID or project name :param str template_id: Id of the requested template. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='4.0', @@ -1242,9 +1289,9 @@ def get_templates(self, project): :param str project: Project ID or project name :rtype: [BuildDefinitionTemplate] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='4.0', @@ -1255,15 +1302,16 @@ def get_templates(self, project): def save_template(self, template, project, template_id): """SaveTemplate. Saves a definition template - :param :class:` ` template: + :param :class:` ` template: :param str project: Project ID or project name :param str template_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') content = self._serialize.body(template, 'BuildDefinitionTemplate') response = self._send(http_method='PUT', location_id='e884571e-7f92-4d6a-9274-3f5649900835', @@ -1280,13 +1328,15 @@ def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None :param str timeline_id: :param int change_id: :param str plan_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'timelineId': self._serialize.url('timeline_id', timeline_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') query_parameters = {} if change_id is not None: query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') @@ -1307,10 +1357,11 @@ def get_build_work_items_refs(self, project, build_id, top=None): :param int top: The maximum number of workitems to return :rtype: [ResourceRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -1331,10 +1382,11 @@ def get_build_work_items_refs_from_commits(self, commit_ids, project, build_id, :param int top: The maximum number of workitems to return, also number of commits to consider if commitids are not sent :rtype: [ResourceRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -1357,9 +1409,9 @@ def get_work_items_between_builds(self, project, from_build_id, to_build_id, top :param int top: The maximum number of workitems to return :rtype: [ResourceRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if from_build_id is not None: query_parameters['fromBuildId'] = self._serialize.query('from_build_id', from_build_id, 'int') diff --git a/vsts/vsts/build/v4_0/models/agent_pool_queue.py b/vsts/vsts/build/v4_0/models/agent_pool_queue.py index 903c207c..2b27ddfa 100644 --- a/vsts/vsts/build/v4_0/models/agent_pool_queue.py +++ b/vsts/vsts/build/v4_0/models/agent_pool_queue.py @@ -13,13 +13,13 @@ class AgentPoolQueue(Model): """AgentPoolQueue. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: Id of the resource :type id: int :param name: Name of the linked resource (definition name, controller name, etc.) :type name: str :param pool: The pool used by this queue. - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param url: Full http link to the resource :type url: str """ diff --git a/vsts/vsts/build/v4_0/models/artifact_resource.py b/vsts/vsts/build/v4_0/models/artifact_resource.py index b7a2a6d6..f51d3b19 100644 --- a/vsts/vsts/build/v4_0/models/artifact_resource.py +++ b/vsts/vsts/build/v4_0/models/artifact_resource.py @@ -13,7 +13,7 @@ class ArtifactResource(Model): """ArtifactResource. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param data: The type-specific resource data. For example, "#/10002/5/drop", "$/drops/5", "\\myshare\myfolder\mydrops\5" :type data: str :param download_url: Link to the resource. This might include things like query parameters to download as a zip file diff --git a/vsts/vsts/build/v4_0/models/build.py b/vsts/vsts/build/v4_0/models/build.py index 333d07fb..d53da81f 100644 --- a/vsts/vsts/build/v4_0/models/build.py +++ b/vsts/vsts/build/v4_0/models/build.py @@ -13,25 +13,25 @@ class Build(Model): """Build. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param build_number: Build number/name of the build :type build_number: str :param build_number_revision: Build number revision :type build_number_revision: int :param controller: The build controller. This should only be set if the definition type is Xaml. - :type controller: :class:`BuildController ` + :type controller: :class:`BuildController ` :param definition: The definition associated with the build - :type definition: :class:`DefinitionReference ` + :type definition: :class:`DefinitionReference ` :param deleted: Indicates whether the build has been deleted. :type deleted: bool :param deleted_by: Process or person that deleted the build - :type deleted_by: :class:`IdentityRef ` + :type deleted_by: :class:`IdentityRef ` :param deleted_date: Date the build was deleted :type deleted_date: datetime :param deleted_reason: Description of how the build was deleted :type deleted_reason: str :param demands: Demands - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param finish_time: Time that the build was completed :type finish_time: datetime :param id: Id of the build @@ -39,27 +39,27 @@ class Build(Model): :param keep_forever: :type keep_forever: bool :param last_changed_by: Process or person that last changed the build - :type last_changed_by: :class:`IdentityRef ` + :type last_changed_by: :class:`IdentityRef ` :param last_changed_date: Date the build was last changed :type last_changed_date: datetime :param logs: Log location of the build - :type logs: :class:`BuildLogReference ` + :type logs: :class:`BuildLogReference ` :param orchestration_plan: Orchestration plan for the build - :type orchestration_plan: :class:`TaskOrchestrationPlanReference ` + :type orchestration_plan: :class:`TaskOrchestrationPlanReference ` :param parameters: Parameters for the build :type parameters: str :param plans: Orchestration plans associated with the build (build, cleanup) - :type plans: list of :class:`TaskOrchestrationPlanReference ` + :type plans: list of :class:`TaskOrchestrationPlanReference ` :param priority: The build's priority :type priority: object :param project: The team project - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param quality: Quality of the xaml build (good, bad, etc.) :type quality: str :param queue: The queue. This should only be set if the definition type is Build. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param queue_options: Queue option of the build. :type queue_options: object :param queue_position: The current position of the build in the queue @@ -69,11 +69,11 @@ class Build(Model): :param reason: Reason that the build was created :type reason: object :param repository: The repository - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param requested_by: The identity that queued the build - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param requested_for: The identity on whose behalf the build was queued - :type requested_for: :class:`IdentityRef ` + :type requested_for: :class:`IdentityRef ` :param result: The build result :type result: object :param retained_by_release: Specifies if Build should be retained by Release @@ -95,7 +95,7 @@ class Build(Model): :param url: REST url of the build :type url: str :param validation_results: - :type validation_results: list of :class:`BuildRequestValidationResult ` + :type validation_results: list of :class:`BuildRequestValidationResult ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/build_artifact.py b/vsts/vsts/build/v4_0/models/build_artifact.py index f84823b2..75e3e0f1 100644 --- a/vsts/vsts/build/v4_0/models/build_artifact.py +++ b/vsts/vsts/build/v4_0/models/build_artifact.py @@ -17,7 +17,7 @@ class BuildArtifact(Model): :param name: The name of the artifact :type name: str :param resource: The actual resource - :type resource: :class:`ArtifactResource ` + :type resource: :class:`ArtifactResource ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/build_controller.py b/vsts/vsts/build/v4_0/models/build_controller.py index 2b5003ec..5d5d2b83 100644 --- a/vsts/vsts/build/v4_0/models/build_controller.py +++ b/vsts/vsts/build/v4_0/models/build_controller.py @@ -19,7 +19,7 @@ class BuildController(XamlBuildControllerReference): :param url: Full http link to the resource :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_date: The date the controller was created. :type created_date: datetime :param description: The description of the controller. diff --git a/vsts/vsts/build/v4_0/models/build_definition.py b/vsts/vsts/build/v4_0/models/build_definition.py index 5145fb76..423f0ef5 100644 --- a/vsts/vsts/build/v4_0/models/build_definition.py +++ b/vsts/vsts/build/v4_0/models/build_definition.py @@ -21,7 +21,7 @@ class BuildDefinition(BuildDefinitionReference): :param path: The path this definitions belongs to :type path: str :param project: The project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: If builds can be queued from this definition :type queue_status: object :param revision: The definition revision number. @@ -33,17 +33,17 @@ class BuildDefinition(BuildDefinitionReference): :param url: Full http link to the resource :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: If this is a draft definition, it might have a parent - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue which should be used for requests. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param badge_enabled: Indicates whether badges are enabled for this definition :type badge_enabled: bool :param build_number_format: The build number format @@ -51,7 +51,7 @@ class BuildDefinition(BuildDefinitionReference): :param comment: The comment entered when saving the definition :type comment: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param description: The description :type description: str :param drop_location: The drop location for the definition @@ -63,27 +63,27 @@ class BuildDefinition(BuildDefinitionReference): :param job_timeout_in_minutes: Gets or sets the job execution timeout in minutes for builds which are queued against this definition :type job_timeout_in_minutes: int :param latest_build: - :type latest_build: :class:`Build ` + :type latest_build: :class:`Build ` :param latest_completed_build: - :type latest_completed_build: :class:`Build ` + :type latest_completed_build: :class:`Build ` :param options: - :type options: list of :class:`BuildOption ` + :type options: list of :class:`BuildOption ` :param process: The build process. - :type process: :class:`BuildProcess ` + :type process: :class:`BuildProcess ` :param process_parameters: Process Parameters - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param repository: The repository - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param retention_rules: - :type retention_rules: list of :class:`RetentionPolicy ` + :type retention_rules: list of :class:`RetentionPolicy ` :param tags: :type tags: list of str :param triggers: - :type triggers: list of :class:`BuildTrigger ` + :type triggers: list of :class:`BuildTrigger ` :param variable_groups: - :type variable_groups: list of :class:`VariableGroup ` + :type variable_groups: list of :class:`VariableGroup ` :param variables: :type variables: dict """ diff --git a/vsts/vsts/build/v4_0/models/build_definition3_2.py b/vsts/vsts/build/v4_0/models/build_definition3_2.py index bf297a75..9e66a81a 100644 --- a/vsts/vsts/build/v4_0/models/build_definition3_2.py +++ b/vsts/vsts/build/v4_0/models/build_definition3_2.py @@ -21,7 +21,7 @@ class BuildDefinition3_2(BuildDefinitionReference): :param path: The path this definitions belongs to :type path: str :param project: The project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: If builds can be queued from this definition :type queue_status: object :param revision: The definition revision number. @@ -33,27 +33,27 @@ class BuildDefinition3_2(BuildDefinitionReference): :param url: Full http link to the resource :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: If this is a draft definition, it might have a parent - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue which should be used for requests. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param badge_enabled: Indicates whether badges are enabled for this definition :type badge_enabled: bool :param build: - :type build: list of :class:`BuildDefinitionStep ` + :type build: list of :class:`BuildDefinitionStep ` :param build_number_format: The build number format :type build_number_format: str :param comment: The comment entered when saving the definition :type comment: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param description: The description :type description: str :param drop_location: The drop location for the definition @@ -65,23 +65,23 @@ class BuildDefinition3_2(BuildDefinitionReference): :param job_timeout_in_minutes: Gets or sets the job execution timeout in minutes for builds which are queued against this definition :type job_timeout_in_minutes: int :param latest_build: - :type latest_build: :class:`Build ` + :type latest_build: :class:`Build ` :param latest_completed_build: - :type latest_completed_build: :class:`Build ` + :type latest_completed_build: :class:`Build ` :param options: - :type options: list of :class:`BuildOption ` + :type options: list of :class:`BuildOption ` :param process_parameters: Process Parameters - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param repository: The repository - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param retention_rules: - :type retention_rules: list of :class:`RetentionPolicy ` + :type retention_rules: list of :class:`RetentionPolicy ` :param tags: :type tags: list of str :param triggers: - :type triggers: list of :class:`BuildTrigger ` + :type triggers: list of :class:`BuildTrigger ` :param variables: :type variables: dict """ diff --git a/vsts/vsts/build/v4_0/models/build_definition_reference.py b/vsts/vsts/build/v4_0/models/build_definition_reference.py index 111490e3..6720e46d 100644 --- a/vsts/vsts/build/v4_0/models/build_definition_reference.py +++ b/vsts/vsts/build/v4_0/models/build_definition_reference.py @@ -21,7 +21,7 @@ class BuildDefinitionReference(DefinitionReference): :param path: The path this definitions belongs to :type path: str :param project: The project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: If builds can be queued from this definition :type queue_status: object :param revision: The definition revision number. @@ -33,17 +33,17 @@ class BuildDefinitionReference(DefinitionReference): :param url: Full http link to the resource :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: If this is a draft definition, it might have a parent - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue which should be used for requests. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/build_definition_revision.py b/vsts/vsts/build/v4_0/models/build_definition_revision.py index 405e147e..f981fc05 100644 --- a/vsts/vsts/build/v4_0/models/build_definition_revision.py +++ b/vsts/vsts/build/v4_0/models/build_definition_revision.py @@ -13,7 +13,7 @@ class BuildDefinitionRevision(Model): """BuildDefinitionRevision. :param changed_by: - :type changed_by: :class:`IdentityRef ` + :type changed_by: :class:`IdentityRef ` :param changed_date: :type changed_date: datetime :param change_type: diff --git a/vsts/vsts/build/v4_0/models/build_definition_step.py b/vsts/vsts/build/v4_0/models/build_definition_step.py index bf901909..0b60623c 100644 --- a/vsts/vsts/build/v4_0/models/build_definition_step.py +++ b/vsts/vsts/build/v4_0/models/build_definition_step.py @@ -29,7 +29,7 @@ class BuildDefinitionStep(Model): :param ref_name: :type ref_name: str :param task: - :type task: :class:`TaskDefinitionReference ` + :type task: :class:`TaskDefinitionReference ` :param timeout_in_minutes: :type timeout_in_minutes: int """ diff --git a/vsts/vsts/build/v4_0/models/build_definition_template.py b/vsts/vsts/build/v4_0/models/build_definition_template.py index 214605f2..0cfa0171 100644 --- a/vsts/vsts/build/v4_0/models/build_definition_template.py +++ b/vsts/vsts/build/v4_0/models/build_definition_template.py @@ -27,7 +27,7 @@ class BuildDefinitionTemplate(Model): :param name: :type name: str :param template: - :type template: :class:`BuildDefinition ` + :type template: :class:`BuildDefinition ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/build_definition_template3_2.py b/vsts/vsts/build/v4_0/models/build_definition_template3_2.py index d9d19696..65c8f131 100644 --- a/vsts/vsts/build/v4_0/models/build_definition_template3_2.py +++ b/vsts/vsts/build/v4_0/models/build_definition_template3_2.py @@ -27,7 +27,7 @@ class BuildDefinitionTemplate3_2(Model): :param name: :type name: str :param template: - :type template: :class:`BuildDefinition3_2 ` + :type template: :class:`BuildDefinition3_2 ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/build_option.py b/vsts/vsts/build/v4_0/models/build_option.py index 31166e44..0a1c813d 100644 --- a/vsts/vsts/build/v4_0/models/build_option.py +++ b/vsts/vsts/build/v4_0/models/build_option.py @@ -13,7 +13,7 @@ class BuildOption(Model): """BuildOption. :param definition: - :type definition: :class:`BuildOptionDefinitionReference ` + :type definition: :class:`BuildOptionDefinitionReference ` :param enabled: :type enabled: bool :param inputs: diff --git a/vsts/vsts/build/v4_0/models/build_option_definition.py b/vsts/vsts/build/v4_0/models/build_option_definition.py index 8f8a6df0..b22e348a 100644 --- a/vsts/vsts/build/v4_0/models/build_option_definition.py +++ b/vsts/vsts/build/v4_0/models/build_option_definition.py @@ -17,9 +17,9 @@ class BuildOptionDefinition(BuildOptionDefinitionReference): :param description: :type description: str :param groups: - :type groups: list of :class:`BuildOptionGroupDefinition ` + :type groups: list of :class:`BuildOptionGroupDefinition ` :param inputs: - :type inputs: list of :class:`BuildOptionInputDefinition ` + :type inputs: list of :class:`BuildOptionInputDefinition ` :param name: :type name: str :param ordinal: diff --git a/vsts/vsts/build/v4_0/models/build_settings.py b/vsts/vsts/build/v4_0/models/build_settings.py index 3cd0fe32..999e4a51 100644 --- a/vsts/vsts/build/v4_0/models/build_settings.py +++ b/vsts/vsts/build/v4_0/models/build_settings.py @@ -15,9 +15,9 @@ class BuildSettings(Model): :param days_to_keep_deleted_builds_before_destroy: :type days_to_keep_deleted_builds_before_destroy: int :param default_retention_policy: - :type default_retention_policy: :class:`RetentionPolicy ` + :type default_retention_policy: :class:`RetentionPolicy ` :param maximum_retention_policy: - :type maximum_retention_policy: :class:`RetentionPolicy ` + :type maximum_retention_policy: :class:`RetentionPolicy ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/change.py b/vsts/vsts/build/v4_0/models/change.py index 9a1b250c..018dadad 100644 --- a/vsts/vsts/build/v4_0/models/change.py +++ b/vsts/vsts/build/v4_0/models/change.py @@ -13,7 +13,7 @@ class Change(Model): """Change. :param author: The author of the change. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param display_uri: The location of a user-friendly representation of the resource. :type display_uri: str :param id: Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. diff --git a/vsts/vsts/build/v4_0/models/definition_reference.py b/vsts/vsts/build/v4_0/models/definition_reference.py index 9783d7f1..05f4cf68 100644 --- a/vsts/vsts/build/v4_0/models/definition_reference.py +++ b/vsts/vsts/build/v4_0/models/definition_reference.py @@ -21,7 +21,7 @@ class DefinitionReference(Model): :param path: The path this definitions belongs to :type path: str :param project: The project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: If builds can be queued from this definition :type queue_status: object :param revision: The definition revision number. diff --git a/vsts/vsts/build/v4_0/models/folder.py b/vsts/vsts/build/v4_0/models/folder.py index 636be456..64b2cbe2 100644 --- a/vsts/vsts/build/v4_0/models/folder.py +++ b/vsts/vsts/build/v4_0/models/folder.py @@ -13,19 +13,19 @@ class Folder(Model): """Folder. :param created_by: Process or person who created the folder - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: Creation date of the folder :type created_on: datetime :param description: The description of the folder :type description: str :param last_changed_by: Process or person that last changed the folder - :type last_changed_by: :class:`IdentityRef ` + :type last_changed_by: :class:`IdentityRef ` :param last_changed_date: Date the folder was last changed :type last_changed_date: datetime :param path: The path of the folder :type path: str :param project: The project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/process_parameters.py b/vsts/vsts/build/v4_0/models/process_parameters.py index ebd8bde6..f6903143 100644 --- a/vsts/vsts/build/v4_0/models/process_parameters.py +++ b/vsts/vsts/build/v4_0/models/process_parameters.py @@ -13,11 +13,11 @@ class ProcessParameters(Model): """ProcessParameters. :param data_source_bindings: - :type data_source_bindings: list of :class:`DataSourceBindingBase ` + :type data_source_bindings: list of :class:`DataSourceBindingBase ` :param inputs: - :type inputs: list of :class:`TaskInputDefinitionBase ` + :type inputs: list of :class:`TaskInputDefinitionBase ` :param source_definitions: - :type source_definitions: list of :class:`TaskSourceDefinitionBase ` + :type source_definitions: list of :class:`TaskSourceDefinitionBase ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/task_input_definition_base.py b/vsts/vsts/build/v4_0/models/task_input_definition_base.py index aacc2426..1f33183e 100644 --- a/vsts/vsts/build/v4_0/models/task_input_definition_base.py +++ b/vsts/vsts/build/v4_0/models/task_input_definition_base.py @@ -31,7 +31,7 @@ class TaskInputDefinitionBase(Model): :param type: :type type: str :param validation: - :type validation: :class:`TaskInputValidation ` + :type validation: :class:`TaskInputValidation ` :param visible_rule: :type visible_rule: str """ diff --git a/vsts/vsts/build/v4_0/models/timeline.py b/vsts/vsts/build/v4_0/models/timeline.py index ff7ceef6..02e0d15b 100644 --- a/vsts/vsts/build/v4_0/models/timeline.py +++ b/vsts/vsts/build/v4_0/models/timeline.py @@ -23,7 +23,7 @@ class Timeline(TimelineReference): :param last_changed_on: :type last_changed_on: datetime :param records: - :type records: list of :class:`TimelineRecord ` + :type records: list of :class:`TimelineRecord ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_0/models/timeline_record.py b/vsts/vsts/build/v4_0/models/timeline_record.py index e0c322d7..b02e7921 100644 --- a/vsts/vsts/build/v4_0/models/timeline_record.py +++ b/vsts/vsts/build/v4_0/models/timeline_record.py @@ -13,13 +13,13 @@ class TimelineRecord(Model): """TimelineRecord. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param change_id: :type change_id: int :param current_operation: :type current_operation: str :param details: - :type details: :class:`TimelineReference ` + :type details: :class:`TimelineReference ` :param error_count: :type error_count: int :param finish_time: @@ -27,11 +27,11 @@ class TimelineRecord(Model): :param id: :type id: str :param issues: - :type issues: list of :class:`Issue ` + :type issues: list of :class:`Issue ` :param last_modified: :type last_modified: datetime :param log: - :type log: :class:`BuildLogReference ` + :type log: :class:`BuildLogReference ` :param name: :type name: str :param order: @@ -49,7 +49,7 @@ class TimelineRecord(Model): :param state: :type state: object :param task: - :type task: :class:`TaskReference ` + :type task: :class:`TaskReference ` :param type: :type type: str :param url: diff --git a/vsts/vsts/build/v4_1/build_client.py b/vsts/vsts/build/v4_1/build_client.py index df9959ef..e30435c5 100644 --- a/vsts/vsts/build/v4_1/build_client.py +++ b/vsts/vsts/build/v4_1/build_client.py @@ -28,15 +28,16 @@ def __init__(self, base_url=None, creds=None): def create_artifact(self, artifact, build_id, project=None): """CreateArtifact. [Preview API] Associates an artifact with a build. - :param :class:` ` artifact: The artifact. + :param :class:` ` artifact: The artifact. :param int build_id: The ID of the build. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(artifact, 'BuildArtifact') response = self._send(http_method='POST', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', @@ -51,12 +52,13 @@ def get_artifact(self, build_id, artifact_name, project=None): :param int build_id: The ID of the build. :param str artifact_name: The name of the artifact. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if artifact_name is not None: query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') @@ -75,10 +77,11 @@ def get_artifact_content_zip(self, build_id, artifact_name, project=None): :param str project: Project ID or project name :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if artifact_name is not None: query_parameters['artifactName'] = self._serialize.query('artifact_name', artifact_name, 'str') @@ -96,10 +99,11 @@ def get_artifacts(self, build_id, project=None): :param str project: Project ID or project name :rtype: [BuildArtifact] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='1db06c96-014e-44e1-ac91-90b2d4b3e984', version='4.1-preview.3', @@ -115,10 +119,11 @@ def get_badge(self, project, definition_id, branch_name=None): :param str branch_name: The name of the branch. :rtype: str """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if branch_name is not None: query_parameters['branchName'] = self._serialize.query('branch_name', branch_name, 'str') @@ -136,12 +141,13 @@ def get_build_badge(self, project, repo_type, repo_id=None, branch_name=None): :param str repo_type: The repository type. :param str repo_id: The repository ID. :param str branch_name: The branch name. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repoType': self._serialize.url('repo_type', repo_type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repo_type is not None: + route_values['repoType'] = self._serialize.url('repo_type', repo_type, 'str') query_parameters = {} if repo_id is not None: query_parameters['repoId'] = self._serialize.query('repo_id', repo_id, 'str') @@ -163,10 +169,11 @@ def get_build_badge_data(self, project, repo_type, repo_id=None, branch_name=Non :param str branch_name: The branch name. :rtype: str """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repoType': self._serialize.url('repo_type', repo_type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repo_type is not None: + route_values['repoType'] = self._serialize.url('repo_type', repo_type, 'str') query_parameters = {} if repo_id is not None: query_parameters['repoId'] = self._serialize.query('repo_id', repo_id, 'str') @@ -185,10 +192,11 @@ def delete_build(self, build_id, project=None): :param int build_id: The ID of the build. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') self._send(http_method='DELETE', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', version='4.1-preview.3', @@ -200,12 +208,13 @@ def get_build(self, build_id, project=None, property_filters=None): :param int build_id: The ID of the build. :param str project: Project ID or project name :param str property_filters: A comma-delimited list of properties to include in the results. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if property_filters is not None: query_parameters['propertyFilters'] = self._serialize.query('property_filters', property_filters, 'str') @@ -242,9 +251,9 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N :param str repository_type: If specified, filters to builds that built from repositories of this type. :rtype: [Build] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if definitions is not None: definitions = ",".join(map(str, definitions)) @@ -302,15 +311,15 @@ def get_builds(self, project=None, definitions=None, queues=None, build_number=N def queue_build(self, build, project=None, ignore_warnings=None, check_in_ticket=None): """QueueBuild. [Preview API] Queues a build - :param :class:` ` build: + :param :class:` ` build: :param str project: Project ID or project name :param bool ignore_warnings: :param str check_in_ticket: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if ignore_warnings is not None: query_parameters['ignoreWarnings'] = self._serialize.query('ignore_warnings', ignore_warnings, 'bool') @@ -328,15 +337,16 @@ def queue_build(self, build, project=None, ignore_warnings=None, check_in_ticket def update_build(self, build, build_id, project=None): """UpdateBuild. [Preview API] Updates a build. - :param :class:` ` build: The build. + :param :class:` ` build: The build. :param int build_id: The ID of the build. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(build, 'Build') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', @@ -352,9 +362,9 @@ def update_builds(self, builds, project=None): :param str project: Project ID or project name :rtype: [Build] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(builds, '[Build]') response = self._send(http_method='PATCH', location_id='0cd358e1-9217-4d94-8269-1c1ee6f93dcf', @@ -374,10 +384,11 @@ def get_build_changes(self, project, build_id, continuation_token=None, top=None :param bool include_source_change: :rtype: [Change] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') @@ -402,9 +413,9 @@ def get_changes_between_builds(self, project, from_build_id=None, to_build_id=No :param int top: The maximum number of changes to return. :rtype: [Change] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if from_build_id is not None: query_parameters['fromBuildId'] = self._serialize.query('from_build_id', from_build_id, 'int') @@ -424,11 +435,11 @@ def get_build_controller(self, controller_id): """GetBuildController. [Preview API] Gets a controller :param int controller_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'controllerId': self._serialize.url('controller_id', controller_id, 'int') - } + route_values = {} + if controller_id is not None: + route_values['controllerId'] = self._serialize.url('controller_id', controller_id, 'int') response = self._send(http_method='GET', location_id='fcac1932-2ee1-437f-9b6f-7f696be858f6', version='4.1-preview.2', @@ -454,15 +465,15 @@ def get_build_controllers(self, name=None): def create_definition(self, definition, project=None, definition_to_clone_id=None, definition_to_clone_revision=None): """CreateDefinition. [Preview API] Creates a new definition. - :param :class:` ` definition: The definition. + :param :class:` ` definition: The definition. :param str project: Project ID or project name :param int definition_to_clone_id: :param int definition_to_clone_revision: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if definition_to_clone_id is not None: query_parameters['definitionToCloneId'] = self._serialize.query('definition_to_clone_id', definition_to_clone_id, 'int') @@ -483,10 +494,11 @@ def delete_definition(self, definition_id, project=None): :param int definition_id: The ID of the definition. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') self._send(http_method='DELETE', location_id='dbeaf647-6167-421a-bda9-c9327b25e2e6', version='4.1-preview.6', @@ -501,12 +513,13 @@ def get_definition(self, definition_id, project=None, revision=None, min_metrics :param datetime min_metrics_time: If specified, indicates the date from which metrics should be included. :param [str] property_filters: A comma-delimited list of properties to include in the results. :param bool include_latest_builds: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if revision is not None: query_parameters['revision'] = self._serialize.query('revision', revision, 'int') @@ -544,9 +557,9 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor :param str task_id_filter: If specified, filters to definitions that use the specified task. :rtype: [BuildDefinitionReference] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if name is not None: query_parameters['name'] = self._serialize.query('name', name, 'str') @@ -588,17 +601,18 @@ def get_definitions(self, project=None, name=None, repository_id=None, repositor def update_definition(self, definition, definition_id, project=None, secrets_source_definition_id=None, secrets_source_definition_revision=None): """UpdateDefinition. [Preview API] Updates an existing definition. - :param :class:` ` definition: The new version of the defintion. + :param :class:` ` definition: The new version of the defintion. :param int definition_id: The ID of the definition. :param str project: Project ID or project name :param int secrets_source_definition_id: :param int secrets_source_definition_revision: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if secrets_source_definition_id is not None: query_parameters['secretsSourceDefinitionId'] = self._serialize.query('secrets_source_definition_id', secrets_source_definition_id, 'int') @@ -616,15 +630,16 @@ def update_definition(self, definition, definition_id, project=None, secrets_sou def create_folder(self, folder, project, path): """CreateFolder. [Preview API] Creates a new folder. - :param :class:` ` folder: The folder. + :param :class:` ` folder: The folder. :param str project: Project ID or project name :param str path: The full path of the folder. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(folder, 'Folder') response = self._send(http_method='PUT', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', @@ -639,10 +654,11 @@ def delete_folder(self, project, path): :param str project: Project ID or project name :param str path: The full path to the folder. """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') self._send(http_method='DELETE', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', version='4.1-preview.1', @@ -656,10 +672,11 @@ def get_folders(self, project, path=None, query_order=None): :param FolderQueryOrder query_order: The order in which folders should be returned. :rtype: [Folder] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if query_order is not None: query_parameters['queryOrder'] = self._serialize.query('query_order', query_order, 'FolderQueryOrder') @@ -674,15 +691,16 @@ def get_folders(self, project, path=None, query_order=None): def update_folder(self, folder, project, path): """UpdateFolder. [Preview API] Updates an existing folder at given existing path - :param :class:` ` folder: The new version of the folder. + :param :class:` ` folder: The new version of the folder. :param str project: Project ID or project name :param str path: The full path to the folder. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(folder, 'Folder') response = self._send(http_method='POST', location_id='a906531b-d2da-4f55-bda7-f3e676cc50d9', @@ -701,11 +719,13 @@ def get_build_log(self, project, build_id, log_id, start_line=None, end_line=Non :param long end_line: The end line. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'logId': self._serialize.url('log_id', log_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') @@ -728,11 +748,13 @@ def get_build_log_lines(self, project, build_id, log_id, start_line=None, end_li :param long end_line: The end line. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'logId': self._serialize.url('log_id', log_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if log_id is not None: + route_values['logId'] = self._serialize.url('log_id', log_id, 'int') query_parameters = {} if start_line is not None: query_parameters['startLine'] = self._serialize.query('start_line', start_line, 'long') @@ -753,10 +775,11 @@ def get_build_logs(self, project, build_id): :param int build_id: The ID of the build. :rtype: [BuildLog] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='4.1-preview.2', @@ -771,10 +794,11 @@ def get_build_logs_zip(self, project, build_id): :param int build_id: The ID of the build. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='35a80daf-7f30-45fc-86e8-6b813d9c90df', version='4.1-preview.2', @@ -789,10 +813,11 @@ def get_project_metrics(self, project, metric_aggregation_type=None, min_metrics :param datetime min_metrics_time: The date from which to calculate metrics. :rtype: [BuildMetric] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'metricAggregationType': self._serialize.url('metric_aggregation_type', metric_aggregation_type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if metric_aggregation_type is not None: + route_values['metricAggregationType'] = self._serialize.url('metric_aggregation_type', metric_aggregation_type, 'str') query_parameters = {} if min_metrics_time is not None: query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'datetime') @@ -812,10 +837,11 @@ def get_definition_metrics(self, project, definition_id, min_metrics_time=None): :param datetime min_metrics_time: The date from which to calculate metrics. :rtype: [BuildMetric] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if min_metrics_time is not None: query_parameters['minMetricsTime'] = self._serialize.query('min_metrics_time', min_metrics_time, 'datetime') @@ -833,9 +859,9 @@ def get_build_option_definitions(self, project=None): :param str project: Project ID or project name :rtype: [BuildOptionDefinition] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='591cb5a4-2d46-4f3a-a697-5cd42b6bd332', version='4.1-preview.2', @@ -849,12 +875,13 @@ def get_build_properties(self, project, build_id, filter=None): :param str project: Project ID or project name :param int build_id: The ID of the build. :param [str] filter: A comma-delimited list of properties. If specified, filters to these specific properties. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if filter is not None: filter = ",".join(filter) @@ -869,15 +896,16 @@ def get_build_properties(self, project, build_id, filter=None): def update_build_properties(self, document, project, build_id): """UpdateBuildProperties. [Preview API] Updates properties for a build. - :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. + :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. :param str project: Project ID or project name :param int build_id: The ID of the build. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='0a6312e9-0627-49b7-8083-7d74a64849c9', @@ -893,12 +921,13 @@ def get_definition_properties(self, project, definition_id, filter=None): :param str project: Project ID or project name :param int definition_id: The ID of the definition. :param [str] filter: A comma-delimited list of properties. If specified, filters to these specific properties. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if filter is not None: filter = ",".join(filter) @@ -913,15 +942,16 @@ def get_definition_properties(self, project, definition_id, filter=None): def update_definition_properties(self, document, project, definition_id): """UpdateDefinitionProperties. [Preview API] Updates properties for a definition. - :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. + :param :class:`<[JsonPatchOperation]> ` document: A json-patch document describing the properties to update. :param str project: Project ID or project name :param int definition_id: The ID of the definition. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') content = self._serialize.body(document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='d9826ad7-2a68-46a9-a6e9-677698777895', @@ -937,12 +967,13 @@ def get_build_report(self, project, build_id, type=None): :param str project: Project ID or project name :param int build_id: The ID of the build. :param str type: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if type is not None: query_parameters['type'] = self._serialize.query('type', type, 'str') @@ -961,10 +992,11 @@ def get_build_report_html_content(self, project, build_id, type=None): :param str type: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if type is not None: query_parameters['type'] = self._serialize.query('type', type, 'str') @@ -978,7 +1010,7 @@ def get_build_report_html_content(self, project, build_id, type=None): def get_resource_usage(self): """GetResourceUsage. [Preview API] Gets information about build resources in the system. - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='3813d06c-9e36-4ea1-aac3-61a485d60e3d', @@ -992,10 +1024,11 @@ def get_definition_revisions(self, project, definition_id): :param int definition_id: The ID of the definition. :rtype: [BuildDefinitionRevision] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') response = self._send(http_method='GET', location_id='7c116775-52e5-453e-8c5d-914d9762d8c4', version='4.1-preview.2', @@ -1006,7 +1039,7 @@ def get_definition_revisions(self, project, definition_id): def get_build_settings(self): """GetBuildSettings. [Preview API] Gets the build settings. - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d', @@ -1016,8 +1049,8 @@ def get_build_settings(self): def update_build_settings(self, settings): """UpdateBuildSettings. [Preview API] Updates the build settings. - :param :class:` ` settings: The new settings. - :rtype: :class:` ` + :param :class:` ` settings: The new settings. + :rtype: :class:` ` """ content = self._serialize.body(settings, 'BuildSettings') response = self._send(http_method='PATCH', @@ -1034,11 +1067,13 @@ def add_build_tag(self, project, build_id, tag): :param str tag: The tag to add. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='PUT', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='4.1-preview.2', @@ -1054,10 +1089,11 @@ def add_build_tags(self, tags, project, build_id): :param int build_id: The ID of the build. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') content = self._serialize.body(tags, '[str]') response = self._send(http_method='POST', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', @@ -1075,11 +1111,13 @@ def delete_build_tag(self, project, build_id, tag): :param str tag: The tag to remove. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='4.1-preview.2', @@ -1094,10 +1132,11 @@ def get_build_tags(self, project, build_id): :param int build_id: The ID of the build. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') response = self._send(http_method='GET', location_id='6e6114b2-8161-44c8-8f6c-c5505782427f', version='4.1-preview.2', @@ -1113,11 +1152,13 @@ def add_definition_tag(self, project, definition_id, tag): :param str tag: The tag to add. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='PUT', location_id='cb894432-134a-4d31-a839-83beceaace4b', version='4.1-preview.2', @@ -1133,10 +1174,11 @@ def add_definition_tags(self, tags, project, definition_id): :param int definition_id: The ID of the definition. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') content = self._serialize.body(tags, '[str]') response = self._send(http_method='POST', location_id='cb894432-134a-4d31-a839-83beceaace4b', @@ -1154,11 +1196,13 @@ def delete_definition_tag(self, project, definition_id, tag): :param str tag: The tag to remove. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int'), - 'tag': self._serialize.url('tag', tag, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') + if tag is not None: + route_values['tag'] = self._serialize.url('tag', tag, 'str') response = self._send(http_method='DELETE', location_id='cb894432-134a-4d31-a839-83beceaace4b', version='4.1-preview.2', @@ -1174,10 +1218,11 @@ def get_definition_tags(self, project, definition_id, revision=None): :param int revision: The definition revision number. If not specified, uses the latest revision of the definition. :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'definitionId': self._serialize.url('definition_id', definition_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if definition_id is not None: + route_values['definitionId'] = self._serialize.url('definition_id', definition_id, 'int') query_parameters = {} if revision is not None: query_parameters['revision'] = self._serialize.query('revision', revision, 'int') @@ -1195,9 +1240,9 @@ def get_tags(self, project): :param str project: Project ID or project name :rtype: [str] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='d84ac5c6-edc7-43d5-adc9-1b34be5dea09', version='4.1-preview.2', @@ -1211,10 +1256,11 @@ def delete_template(self, project, template_id): :param str project: Project ID or project name :param str template_id: The ID of the template. """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') self._send(http_method='DELETE', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='4.1-preview.3', @@ -1225,12 +1271,13 @@ def get_template(self, project, template_id): [Preview API] Gets a specific build definition template. :param str project: Project ID or project name :param str template_id: The ID of the requested template. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='4.1-preview.3', @@ -1243,9 +1290,9 @@ def get_templates(self, project): :param str project: Project ID or project name :rtype: [BuildDefinitionTemplate] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='e884571e-7f92-4d6a-9274-3f5649900835', version='4.1-preview.3', @@ -1256,15 +1303,16 @@ def get_templates(self, project): def save_template(self, template, project, template_id): """SaveTemplate. [Preview API] Updates an existing build definition template. - :param :class:` ` template: The new version of the template. + :param :class:` ` template: The new version of the template. :param str project: Project ID or project name :param str template_id: The ID of the template. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') content = self._serialize.body(template, 'BuildDefinitionTemplate') response = self._send(http_method='PUT', location_id='e884571e-7f92-4d6a-9274-3f5649900835', @@ -1281,13 +1329,15 @@ def get_build_timeline(self, project, build_id, timeline_id=None, change_id=None :param str timeline_id: The ID of the timeline. If not specified, uses the main timeline for the plan. :param int change_id: :param str plan_id: The ID of the plan. If not specified, uses the primary plan for the build. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int'), - 'timelineId': self._serialize.url('timeline_id', timeline_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') + if timeline_id is not None: + route_values['timelineId'] = self._serialize.url('timeline_id', timeline_id, 'str') query_parameters = {} if change_id is not None: query_parameters['changeId'] = self._serialize.query('change_id', change_id, 'int') @@ -1308,10 +1358,11 @@ def get_build_work_items_refs(self, project, build_id, top=None): :param int top: The maximum number of work items to return. :rtype: [ResourceRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -1332,10 +1383,11 @@ def get_build_work_items_refs_from_commits(self, commit_ids, project, build_id, :param int top: The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified. :rtype: [ResourceRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'buildId': self._serialize.url('build_id', build_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if build_id is not None: + route_values['buildId'] = self._serialize.url('build_id', build_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -1358,9 +1410,9 @@ def get_work_items_between_builds(self, project, from_build_id, to_build_id, top :param int top: The maximum number of work items to return. :rtype: [ResourceRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if from_build_id is not None: query_parameters['fromBuildId'] = self._serialize.query('from_build_id', from_build_id, 'int') diff --git a/vsts/vsts/build/v4_1/models/agent_pool_queue.py b/vsts/vsts/build/v4_1/models/agent_pool_queue.py index 29bc03d2..67b3db03 100644 --- a/vsts/vsts/build/v4_1/models/agent_pool_queue.py +++ b/vsts/vsts/build/v4_1/models/agent_pool_queue.py @@ -13,13 +13,13 @@ class AgentPoolQueue(Model): """AgentPoolQueue. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: The ID of the queue. :type id: int :param name: The name of the queue. :type name: str :param pool: The pool used by this queue. - :type pool: :class:`TaskAgentPoolReference ` + :type pool: :class:`TaskAgentPoolReference ` :param url: The full http link to the resource. :type url: str """ diff --git a/vsts/vsts/build/v4_1/models/artifact_resource.py b/vsts/vsts/build/v4_1/models/artifact_resource.py index 17ac06e4..49e52950 100644 --- a/vsts/vsts/build/v4_1/models/artifact_resource.py +++ b/vsts/vsts/build/v4_1/models/artifact_resource.py @@ -13,7 +13,7 @@ class ArtifactResource(Model): """ArtifactResource. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param data: Type-specific data about the artifact. :type data: str :param download_url: A link to download the resource. diff --git a/vsts/vsts/build/v4_1/models/build.py b/vsts/vsts/build/v4_1/models/build.py index 361c9345..f7eada17 100644 --- a/vsts/vsts/build/v4_1/models/build.py +++ b/vsts/vsts/build/v4_1/models/build.py @@ -13,25 +13,25 @@ class Build(Model): """Build. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param build_number: The build number/name of the build. :type build_number: str :param build_number_revision: The build number revision. :type build_number_revision: int :param controller: The build controller. This is only set if the definition type is Xaml. - :type controller: :class:`BuildController ` + :type controller: :class:`BuildController ` :param definition: The definition associated with the build. - :type definition: :class:`DefinitionReference ` + :type definition: :class:`DefinitionReference ` :param deleted: Indicates whether the build has been deleted. :type deleted: bool :param deleted_by: The identity of the process or person that deleted the build. - :type deleted_by: :class:`IdentityRef ` + :type deleted_by: :class:`IdentityRef ` :param deleted_date: The date the build was deleted. :type deleted_date: datetime :param deleted_reason: The description of how the build was deleted. :type deleted_reason: str :param demands: A list of demands that represents the agent capabilities required by this build. - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param finish_time: The time that the build was completed. :type finish_time: datetime :param id: The ID of the build. @@ -39,27 +39,27 @@ class Build(Model): :param keep_forever: Indicates whether the build should be skipped by retention policies. :type keep_forever: bool :param last_changed_by: The identity representing the process or person that last changed the build. - :type last_changed_by: :class:`IdentityRef ` + :type last_changed_by: :class:`IdentityRef ` :param last_changed_date: The date the build was last changed. :type last_changed_date: datetime :param logs: Information about the build logs. - :type logs: :class:`BuildLogReference ` + :type logs: :class:`BuildLogReference ` :param orchestration_plan: The orchestration plan for the build. - :type orchestration_plan: :class:`TaskOrchestrationPlanReference ` + :type orchestration_plan: :class:`TaskOrchestrationPlanReference ` :param parameters: The parameters for the build. :type parameters: str :param plans: Orchestration plans associated with the build (build, cleanup) - :type plans: list of :class:`TaskOrchestrationPlanReference ` + :type plans: list of :class:`TaskOrchestrationPlanReference ` :param priority: The build's priority. :type priority: object :param project: The team project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param quality: The quality of the xaml build (good, bad, etc.) :type quality: str :param queue: The queue. This is only set if the definition type is Build. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param queue_options: Additional options for queueing the build. :type queue_options: object :param queue_position: The current position of the build in the queue. @@ -69,11 +69,11 @@ class Build(Model): :param reason: The reason that the build was created. :type reason: object :param repository: The repository. - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param requested_by: The identity that queued the build. - :type requested_by: :class:`IdentityRef ` + :type requested_by: :class:`IdentityRef ` :param requested_for: The identity on whose behalf the build was queued. - :type requested_for: :class:`IdentityRef ` + :type requested_for: :class:`IdentityRef ` :param result: The build result. :type result: object :param retained_by_release: Indicates whether the build is retained by a release. @@ -95,7 +95,7 @@ class Build(Model): :param url: The REST URL of the build. :type url: str :param validation_results: - :type validation_results: list of :class:`BuildRequestValidationResult ` + :type validation_results: list of :class:`BuildRequestValidationResult ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/build_artifact.py b/vsts/vsts/build/v4_1/models/build_artifact.py index 5cec0a33..29a3276d 100644 --- a/vsts/vsts/build/v4_1/models/build_artifact.py +++ b/vsts/vsts/build/v4_1/models/build_artifact.py @@ -17,7 +17,7 @@ class BuildArtifact(Model): :param name: The name of the artifact. :type name: str :param resource: The actual resource. - :type resource: :class:`ArtifactResource ` + :type resource: :class:`ArtifactResource ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/build_controller.py b/vsts/vsts/build/v4_1/models/build_controller.py index 2b5003ec..4628f94f 100644 --- a/vsts/vsts/build/v4_1/models/build_controller.py +++ b/vsts/vsts/build/v4_1/models/build_controller.py @@ -19,7 +19,7 @@ class BuildController(XamlBuildControllerReference): :param url: Full http link to the resource :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_date: The date the controller was created. :type created_date: datetime :param description: The description of the controller. diff --git a/vsts/vsts/build/v4_1/models/build_definition.py b/vsts/vsts/build/v4_1/models/build_definition.py index d0137ac1..5b5b89b1 100644 --- a/vsts/vsts/build/v4_1/models/build_definition.py +++ b/vsts/vsts/build/v4_1/models/build_definition.py @@ -21,7 +21,7 @@ class BuildDefinition(BuildDefinitionReference): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -33,19 +33,19 @@ class BuildDefinition(BuildDefinitionReference): :param url: The REST URL of the definition. :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. - :type drafts: list of :class:`DefinitionReference ` + :type drafts: list of :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue for builds run against this definition. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param badge_enabled: Indicates whether badges are enabled for this definition. :type badge_enabled: bool :param build_number_format: The build number format. @@ -53,7 +53,7 @@ class BuildDefinition(BuildDefinitionReference): :param comment: A save-time comment for the definition. :type comment: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param description: The description. :type description: str :param drop_location: The drop location for the definition. @@ -65,27 +65,27 @@ class BuildDefinition(BuildDefinitionReference): :param job_timeout_in_minutes: The job execution timeout (in minutes) for builds queued against this definition. :type job_timeout_in_minutes: int :param latest_build: - :type latest_build: :class:`Build ` + :type latest_build: :class:`Build ` :param latest_completed_build: - :type latest_completed_build: :class:`Build ` + :type latest_completed_build: :class:`Build ` :param options: - :type options: list of :class:`BuildOption ` + :type options: list of :class:`BuildOption ` :param process: The build process. - :type process: :class:`BuildProcess ` + :type process: :class:`BuildProcess ` :param process_parameters: The process parameters for this definition. - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param repository: The repository. - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param retention_rules: - :type retention_rules: list of :class:`RetentionPolicy ` + :type retention_rules: list of :class:`RetentionPolicy ` :param tags: :type tags: list of str :param triggers: - :type triggers: list of :class:`BuildTrigger ` + :type triggers: list of :class:`BuildTrigger ` :param variable_groups: - :type variable_groups: list of :class:`VariableGroup ` + :type variable_groups: list of :class:`VariableGroup ` :param variables: :type variables: dict """ diff --git a/vsts/vsts/build/v4_1/models/build_definition3_2.py b/vsts/vsts/build/v4_1/models/build_definition3_2.py index 7fad6642..e356d7c0 100644 --- a/vsts/vsts/build/v4_1/models/build_definition3_2.py +++ b/vsts/vsts/build/v4_1/models/build_definition3_2.py @@ -21,7 +21,7 @@ class BuildDefinition3_2(BuildDefinitionReference): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -33,29 +33,29 @@ class BuildDefinition3_2(BuildDefinitionReference): :param url: The REST URL of the definition. :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. - :type drafts: list of :class:`DefinitionReference ` + :type drafts: list of :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue for builds run against this definition. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` :param badge_enabled: Indicates whether badges are enabled for this definition :type badge_enabled: bool :param build: - :type build: list of :class:`BuildDefinitionStep ` + :type build: list of :class:`BuildDefinitionStep ` :param build_number_format: The build number format :type build_number_format: str :param comment: The comment entered when saving the definition :type comment: str :param demands: - :type demands: list of :class:`object ` + :type demands: list of :class:`object ` :param description: The description :type description: str :param drop_location: The drop location for the definition @@ -67,23 +67,23 @@ class BuildDefinition3_2(BuildDefinitionReference): :param job_timeout_in_minutes: The job execution timeout in minutes for builds which are queued against this definition :type job_timeout_in_minutes: int :param latest_build: - :type latest_build: :class:`Build ` + :type latest_build: :class:`Build ` :param latest_completed_build: - :type latest_completed_build: :class:`Build ` + :type latest_completed_build: :class:`Build ` :param options: - :type options: list of :class:`BuildOption ` + :type options: list of :class:`BuildOption ` :param process_parameters: Process Parameters - :type process_parameters: :class:`ProcessParameters ` + :type process_parameters: :class:`ProcessParameters ` :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param repository: The repository - :type repository: :class:`BuildRepository ` + :type repository: :class:`BuildRepository ` :param retention_rules: - :type retention_rules: list of :class:`RetentionPolicy ` + :type retention_rules: list of :class:`RetentionPolicy ` :param tags: :type tags: list of str :param triggers: - :type triggers: list of :class:`BuildTrigger ` + :type triggers: list of :class:`BuildTrigger ` :param variables: :type variables: dict """ diff --git a/vsts/vsts/build/v4_1/models/build_definition_reference.py b/vsts/vsts/build/v4_1/models/build_definition_reference.py index 8a8f3eba..64264ea2 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_reference.py +++ b/vsts/vsts/build/v4_1/models/build_definition_reference.py @@ -21,7 +21,7 @@ class BuildDefinitionReference(DefinitionReference): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. @@ -33,19 +33,19 @@ class BuildDefinitionReference(DefinitionReference): :param url: The REST URL of the definition. :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param authored_by: The author of the definition. - :type authored_by: :class:`IdentityRef ` + :type authored_by: :class:`IdentityRef ` :param draft_of: A reference to the definition that this definition is a draft of, if this is a draft definition. - :type draft_of: :class:`DefinitionReference ` + :type draft_of: :class:`DefinitionReference ` :param drafts: The list of drafts associated with this definition, if this is not a draft definition. - :type drafts: list of :class:`DefinitionReference ` + :type drafts: list of :class:`DefinitionReference ` :param metrics: - :type metrics: list of :class:`BuildMetric ` + :type metrics: list of :class:`BuildMetric ` :param quality: The quality of the definition document (draft, etc.) :type quality: object :param queue: The default queue for builds run against this definition. - :type queue: :class:`AgentPoolQueue ` + :type queue: :class:`AgentPoolQueue ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/build_definition_revision.py b/vsts/vsts/build/v4_1/models/build_definition_revision.py index 1413680f..77d2b57d 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_revision.py +++ b/vsts/vsts/build/v4_1/models/build_definition_revision.py @@ -13,7 +13,7 @@ class BuildDefinitionRevision(Model): """BuildDefinitionRevision. :param changed_by: The identity of the person or process that changed the definition. - :type changed_by: :class:`IdentityRef ` + :type changed_by: :class:`IdentityRef ` :param changed_date: The date and time that the definition was changed. :type changed_date: datetime :param change_type: The change type (add, edit, delete). diff --git a/vsts/vsts/build/v4_1/models/build_definition_step.py b/vsts/vsts/build/v4_1/models/build_definition_step.py index 43e62c18..2b2a0a63 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_step.py +++ b/vsts/vsts/build/v4_1/models/build_definition_step.py @@ -29,7 +29,7 @@ class BuildDefinitionStep(Model): :param ref_name: The reference name for this step. :type ref_name: str :param task: The task associated with this step. - :type task: :class:`TaskDefinitionReference ` + :type task: :class:`TaskDefinitionReference ` :param timeout_in_minutes: The time, in minutes, that this step is allowed to run. :type timeout_in_minutes: int """ diff --git a/vsts/vsts/build/v4_1/models/build_definition_template.py b/vsts/vsts/build/v4_1/models/build_definition_template.py index ec113df2..bcd59370 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_template.py +++ b/vsts/vsts/build/v4_1/models/build_definition_template.py @@ -27,7 +27,7 @@ class BuildDefinitionTemplate(Model): :param name: The name of the template. :type name: str :param template: The actual template. - :type template: :class:`BuildDefinition ` + :type template: :class:`BuildDefinition ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/build_definition_template3_2.py b/vsts/vsts/build/v4_1/models/build_definition_template3_2.py index d9d19696..8bd0c687 100644 --- a/vsts/vsts/build/v4_1/models/build_definition_template3_2.py +++ b/vsts/vsts/build/v4_1/models/build_definition_template3_2.py @@ -27,7 +27,7 @@ class BuildDefinitionTemplate3_2(Model): :param name: :type name: str :param template: - :type template: :class:`BuildDefinition3_2 ` + :type template: :class:`BuildDefinition3_2 ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/build_option.py b/vsts/vsts/build/v4_1/models/build_option.py index c9dc6f89..bc4ab6ff 100644 --- a/vsts/vsts/build/v4_1/models/build_option.py +++ b/vsts/vsts/build/v4_1/models/build_option.py @@ -13,7 +13,7 @@ class BuildOption(Model): """BuildOption. :param definition: A reference to the build option. - :type definition: :class:`BuildOptionDefinitionReference ` + :type definition: :class:`BuildOptionDefinitionReference ` :param enabled: Indicates whether the behavior is enabled. :type enabled: bool :param inputs: diff --git a/vsts/vsts/build/v4_1/models/build_option_definition.py b/vsts/vsts/build/v4_1/models/build_option_definition.py index 4b24227b..26bfc3bb 100644 --- a/vsts/vsts/build/v4_1/models/build_option_definition.py +++ b/vsts/vsts/build/v4_1/models/build_option_definition.py @@ -17,9 +17,9 @@ class BuildOptionDefinition(BuildOptionDefinitionReference): :param description: The description. :type description: str :param groups: The list of input groups defined for the build option. - :type groups: list of :class:`BuildOptionGroupDefinition ` + :type groups: list of :class:`BuildOptionGroupDefinition ` :param inputs: The list of inputs defined for the build option. - :type inputs: list of :class:`BuildOptionInputDefinition ` + :type inputs: list of :class:`BuildOptionInputDefinition ` :param name: The name of the build option. :type name: str :param ordinal: A value that indicates the relative order in which the behavior should be applied. diff --git a/vsts/vsts/build/v4_1/models/build_settings.py b/vsts/vsts/build/v4_1/models/build_settings.py index 717e3a20..a36007ba 100644 --- a/vsts/vsts/build/v4_1/models/build_settings.py +++ b/vsts/vsts/build/v4_1/models/build_settings.py @@ -15,9 +15,9 @@ class BuildSettings(Model): :param days_to_keep_deleted_builds_before_destroy: The number of days to keep records of deleted builds. :type days_to_keep_deleted_builds_before_destroy: int :param default_retention_policy: The default retention policy. - :type default_retention_policy: :class:`RetentionPolicy ` + :type default_retention_policy: :class:`RetentionPolicy ` :param maximum_retention_policy: The maximum retention policy. - :type maximum_retention_policy: :class:`RetentionPolicy ` + :type maximum_retention_policy: :class:`RetentionPolicy ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/change.py b/vsts/vsts/build/v4_1/models/change.py index 6709df20..5d1d81a8 100644 --- a/vsts/vsts/build/v4_1/models/change.py +++ b/vsts/vsts/build/v4_1/models/change.py @@ -13,7 +13,7 @@ class Change(Model): """Change. :param author: The author of the change. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param display_uri: The location of a user-friendly representation of the resource. :type display_uri: str :param id: The identifier for the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset ID. @@ -24,6 +24,8 @@ class Change(Model): :type message: str :param message_truncated: Indicates whether the message was truncated. :type message_truncated: bool + :param pusher: The person or process that pushed the change. + :type pusher: str :param timestamp: The timestamp for the change. :type timestamp: datetime :param type: The type of change. "commit", "changeset", etc. @@ -37,11 +39,12 @@ class Change(Model): 'location': {'key': 'location', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'message_truncated': {'key': 'messageTruncated', 'type': 'bool'}, + 'pusher': {'key': 'pusher', 'type': 'str'}, 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, 'type': {'key': 'type', 'type': 'str'} } - def __init__(self, author=None, display_uri=None, id=None, location=None, message=None, message_truncated=None, timestamp=None, type=None): + def __init__(self, author=None, display_uri=None, id=None, location=None, message=None, message_truncated=None, pusher=None, timestamp=None, type=None): super(Change, self).__init__() self.author = author self.display_uri = display_uri @@ -49,5 +52,6 @@ def __init__(self, author=None, display_uri=None, id=None, location=None, messag self.location = location self.message = message self.message_truncated = message_truncated + self.pusher = pusher self.timestamp = timestamp self.type = type diff --git a/vsts/vsts/build/v4_1/models/data_source_binding_base.py b/vsts/vsts/build/v4_1/models/data_source_binding_base.py index 187f382f..fe92a446 100644 --- a/vsts/vsts/build/v4_1/models/data_source_binding_base.py +++ b/vsts/vsts/build/v4_1/models/data_source_binding_base.py @@ -19,7 +19,7 @@ class DataSourceBindingBase(Model): :param endpoint_url: :type endpoint_url: str :param headers: - :type headers: list of :class:`AuthorizationHeader ` + :type headers: list of :class:`AuthorizationHeader ` :param parameters: :type parameters: dict :param result_selector: diff --git a/vsts/vsts/build/v4_1/models/definition_reference.py b/vsts/vsts/build/v4_1/models/definition_reference.py index 897c8080..5b5acbdb 100644 --- a/vsts/vsts/build/v4_1/models/definition_reference.py +++ b/vsts/vsts/build/v4_1/models/definition_reference.py @@ -21,7 +21,7 @@ class DefinitionReference(Model): :param path: The folder path of the definition. :type path: str :param project: A reference to the project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param queue_status: A value that indicates whether builds can be queued against this definition. :type queue_status: object :param revision: The definition revision number. diff --git a/vsts/vsts/build/v4_1/models/folder.py b/vsts/vsts/build/v4_1/models/folder.py index 8fc0aa8f..b43e6a4d 100644 --- a/vsts/vsts/build/v4_1/models/folder.py +++ b/vsts/vsts/build/v4_1/models/folder.py @@ -13,19 +13,19 @@ class Folder(Model): """Folder. :param created_by: The process or person who created the folder. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_on: The date the folder was created. :type created_on: datetime :param description: The description. :type description: str :param last_changed_by: The process or person that last changed the folder. - :type last_changed_by: :class:`IdentityRef ` + :type last_changed_by: :class:`IdentityRef ` :param last_changed_date: The date the folder was last changed. :type last_changed_date: datetime :param path: The full path. :type path: str :param project: The project. - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/process_parameters.py b/vsts/vsts/build/v4_1/models/process_parameters.py index ebd8bde6..657d9485 100644 --- a/vsts/vsts/build/v4_1/models/process_parameters.py +++ b/vsts/vsts/build/v4_1/models/process_parameters.py @@ -13,11 +13,11 @@ class ProcessParameters(Model): """ProcessParameters. :param data_source_bindings: - :type data_source_bindings: list of :class:`DataSourceBindingBase ` + :type data_source_bindings: list of :class:`DataSourceBindingBase ` :param inputs: - :type inputs: list of :class:`TaskInputDefinitionBase ` + :type inputs: list of :class:`TaskInputDefinitionBase ` :param source_definitions: - :type source_definitions: list of :class:`TaskSourceDefinitionBase ` + :type source_definitions: list of :class:`TaskSourceDefinitionBase ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/task_input_definition_base.py b/vsts/vsts/build/v4_1/models/task_input_definition_base.py index 064cebae..1b4e68ff 100644 --- a/vsts/vsts/build/v4_1/models/task_input_definition_base.py +++ b/vsts/vsts/build/v4_1/models/task_input_definition_base.py @@ -33,7 +33,7 @@ class TaskInputDefinitionBase(Model): :param type: :type type: str :param validation: - :type validation: :class:`TaskInputValidation ` + :type validation: :class:`TaskInputValidation ` :param visible_rule: :type visible_rule: str """ diff --git a/vsts/vsts/build/v4_1/models/timeline.py b/vsts/vsts/build/v4_1/models/timeline.py index 29bc8e80..a4622a6e 100644 --- a/vsts/vsts/build/v4_1/models/timeline.py +++ b/vsts/vsts/build/v4_1/models/timeline.py @@ -23,7 +23,7 @@ class Timeline(TimelineReference): :param last_changed_on: The time the timeline was last changed. :type last_changed_on: datetime :param records: - :type records: list of :class:`TimelineRecord ` + :type records: list of :class:`TimelineRecord ` """ _attribute_map = { diff --git a/vsts/vsts/build/v4_1/models/timeline_record.py b/vsts/vsts/build/v4_1/models/timeline_record.py index c64a2d7c..4c4d6a1b 100644 --- a/vsts/vsts/build/v4_1/models/timeline_record.py +++ b/vsts/vsts/build/v4_1/models/timeline_record.py @@ -13,13 +13,13 @@ class TimelineRecord(Model): """TimelineRecord. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param change_id: The change ID. :type change_id: int :param current_operation: A string that indicates the current operation. :type current_operation: str :param details: A reference to a sub-timeline. - :type details: :class:`TimelineReference ` + :type details: :class:`TimelineReference ` :param error_count: The number of errors produced by this operation. :type error_count: int :param finish_time: The finish time. @@ -27,11 +27,11 @@ class TimelineRecord(Model): :param id: The ID of the record. :type id: str :param issues: - :type issues: list of :class:`Issue ` + :type issues: list of :class:`Issue ` :param last_modified: The time the record was last modified. :type last_modified: datetime :param log: A reference to the log produced by this operation. - :type log: :class:`BuildLogReference ` + :type log: :class:`BuildLogReference ` :param name: The name. :type name: str :param order: An ordinal value relative to other records. @@ -49,7 +49,7 @@ class TimelineRecord(Model): :param state: The state of the record. :type state: object :param task: A reference to the task represented by this timeline record. - :type task: :class:`TaskReference ` + :type task: :class:`TaskReference ` :param type: The type of the record. :type type: str :param url: The REST URL of the timeline record. diff --git a/vsts/vsts/core/v4_0/core_client.py b/vsts/vsts/core/v4_0/core_client.py index 3cfb5f2a..ae75f9cd 100644 --- a/vsts/vsts/core/v4_0/core_client.py +++ b/vsts/vsts/core/v4_0/core_client.py @@ -28,13 +28,13 @@ def __init__(self, base_url=None, creds=None): def create_connected_service(self, connected_service_creation_data, project_id): """CreateConnectedService. [Preview API] - :param :class:` ` connected_service_creation_data: + :param :class:` ` connected_service_creation_data: :param str project_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(connected_service_creation_data, 'WebApiConnectedServiceDetails') response = self._send(http_method='POST', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', @@ -48,12 +48,13 @@ def get_connected_service_details(self, project_id, name): [Preview API] :param str project_id: :param str name: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'name': self._serialize.url('name', name, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', version='4.0-preview.1', @@ -67,9 +68,9 @@ def get_connected_services(self, project_id, kind=None): :param ConnectedServiceKind kind: :rtype: [WebApiConnectedService] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if kind is not None: query_parameters['kind'] = self._serialize.query('kind', kind, 'ConnectedServiceKind') @@ -84,12 +85,12 @@ def get_connected_services(self, project_id, kind=None): def create_identity_mru(self, mru_data, mru_name): """CreateIdentityMru. [Preview API] - :param :class:` ` mru_data: + :param :class:` ` mru_data: :param str mru_name: """ - route_values = { - 'mruName': self._serialize.url('mru_name', mru_name, 'str') - } + route_values = {} + if mru_name is not None: + route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') content = self._serialize.body(mru_data, 'IdentityData') self._send(http_method='POST', location_id='5ead0b70-2572-4697-97e9-f341069a783a', @@ -103,9 +104,9 @@ def get_identity_mru(self, mru_name): :param str mru_name: :rtype: [IdentityRef] """ - route_values = { - 'mruName': self._serialize.url('mru_name', mru_name, 'str') - } + route_values = {} + if mru_name is not None: + route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') response = self._send(http_method='GET', location_id='5ead0b70-2572-4697-97e9-f341069a783a', version='4.0-preview.1', @@ -116,12 +117,12 @@ def get_identity_mru(self, mru_name): def update_identity_mru(self, mru_data, mru_name): """UpdateIdentityMru. [Preview API] - :param :class:` ` mru_data: + :param :class:` ` mru_data: :param str mru_name: """ - route_values = { - 'mruName': self._serialize.url('mru_name', mru_name, 'str') - } + route_values = {} + if mru_name is not None: + route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') content = self._serialize.body(mru_data, 'IdentityData') self._send(http_method='PATCH', location_id='5ead0b70-2572-4697-97e9-f341069a783a', @@ -137,10 +138,11 @@ def get_team_members(self, project_id, team_id, top=None, skip=None): :param int skip: :rtype: [IdentityRef] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -158,11 +160,11 @@ def get_process_by_id(self, process_id): """GetProcessById. Retrieve process by id :param str process_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'processId': self._serialize.url('process_id', process_id, 'str') - } + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') response = self._send(http_method='GET', location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8', version='4.0', @@ -184,11 +186,11 @@ def get_project_collection(self, collection_id): """GetProjectCollection. Get project collection with the specified id or name. :param str collection_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'collectionId': self._serialize.url('collection_id', collection_id, 'str') - } + route_values = {} + if collection_id is not None: + route_values['collectionId'] = self._serialize.url('collection_id', collection_id, 'str') response = self._send(http_method='GET', location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf', version='4.0', @@ -236,11 +238,11 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non :param str project_id: :param bool include_capabilities: Include capabilities (such as source control) in the team project result (default: false). :param bool include_history: Search within renamed projects (that had such name in the past). - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if include_capabilities is not None: query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') @@ -281,8 +283,8 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke def queue_create_project(self, project_to_create): """QueueCreateProject. Queue a project creation. - :param :class:` ` project_to_create: The project to create. - :rtype: :class:` ` + :param :class:` ` project_to_create: The project to create. + :rtype: :class:` ` """ content = self._serialize.body(project_to_create, 'TeamProject') response = self._send(http_method='POST', @@ -295,11 +297,11 @@ def queue_delete_project(self, project_id): """QueueDeleteProject. Queue a project deletion. :param str project_id: The project id of the project to delete. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') response = self._send(http_method='DELETE', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', version='4.0', @@ -309,13 +311,13 @@ def queue_delete_project(self, project_id): def update_project(self, project_update, project_id): """UpdateProject. Update an existing project's name, abbreviation, or description. - :param :class:` ` project_update: The updates for the project. + :param :class:` ` project_update: The updates for the project. :param str project_id: The project id of the project to update. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(project_update, 'TeamProject') response = self._send(http_method='PATCH', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', @@ -331,9 +333,9 @@ def get_project_properties(self, project_id, keys=None): :param [str] keys: A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned. :rtype: [ProjectProperty] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if keys is not None: keys = ",".join(keys) @@ -350,11 +352,11 @@ def set_project_properties(self, project_id, patch_document): """SetProjectProperties. [Preview API] Create, update, and delete team project properties. :param str project_id: The team project ID. - :param :class:`<[JsonPatchOperation]> ` patch_document: A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. + :param :class:`<[JsonPatchOperation]> ` patch_document: A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='4976a71a-4487-49aa-8aab-a1eda469037a', @@ -366,8 +368,8 @@ def set_project_properties(self, project_id, patch_document): def create_or_update_proxy(self, proxy): """CreateOrUpdateProxy. [Preview API] - :param :class:` ` proxy: - :rtype: :class:` ` + :param :class:` ` proxy: + :rtype: :class:` ` """ content = self._serialize.body(proxy, 'Proxy') response = self._send(http_method='PUT', @@ -411,13 +413,13 @@ def get_proxies(self, proxy_url=None): def create_team(self, team, project_id): """CreateTeam. Creates a team - :param :class:` ` team: The team data used to create the team. + :param :class:` ` team: The team data used to create the team. :param str project_id: The name or id (GUID) of the team project in which to create the team. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(team, 'WebApiTeam') response = self._send(http_method='POST', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', @@ -432,10 +434,11 @@ def delete_team(self, project_id, team_id): :param str project_id: The name or id (GUID) of the team project containing the team to delete. :param str team_id: The name of id of the team to delete. """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') self._send(http_method='DELETE', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', version='4.0', @@ -446,12 +449,13 @@ def get_team(self, project_id, team_id): Gets a team :param str project_id: :param str team_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') response = self._send(http_method='GET', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', version='4.0', @@ -465,9 +469,9 @@ def get_teams(self, project_id, top=None, skip=None): :param int skip: :rtype: [WebApiTeam] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -484,15 +488,16 @@ def get_teams(self, project_id, top=None, skip=None): def update_team(self, team_data, project_id, team_id): """UpdateTeam. Updates a team's name and/or description - :param :class:` ` team_data: + :param :class:` ` team_data: :param str project_id: The name or id (GUID) of the team project containing the team to update. :param str team_id: The name of id of the team to update. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') content = self._serialize.body(team_data, 'WebApiTeam') response = self._send(http_method='PATCH', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', diff --git a/vsts/vsts/core/v4_0/models/process.py b/vsts/vsts/core/v4_0/models/process.py index 2b4157fa..4c755858 100644 --- a/vsts/vsts/core/v4_0/models/process.py +++ b/vsts/vsts/core/v4_0/models/process.py @@ -17,7 +17,7 @@ class Process(ProcessReference): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: :type description: str :param id: diff --git a/vsts/vsts/core/v4_0/models/project_info.py b/vsts/vsts/core/v4_0/models/project_info.py index 86e262be..61d5a1df 100644 --- a/vsts/vsts/core/v4_0/models/project_info.py +++ b/vsts/vsts/core/v4_0/models/project_info.py @@ -23,7 +23,7 @@ class ProjectInfo(Model): :param name: :type name: str :param properties: - :type properties: list of :class:`ProjectProperty ` + :type properties: list of :class:`ProjectProperty ` :param revision: Current revision of the project :type revision: long :param state: diff --git a/vsts/vsts/core/v4_0/models/proxy.py b/vsts/vsts/core/v4_0/models/proxy.py index b8684bb3..cfbba6c7 100644 --- a/vsts/vsts/core/v4_0/models/proxy.py +++ b/vsts/vsts/core/v4_0/models/proxy.py @@ -13,7 +13,7 @@ class Proxy(Model): """Proxy. :param authorization: - :type authorization: :class:`ProxyAuthorization ` + :type authorization: :class:`ProxyAuthorization ` :param description: This is a description string :type description: str :param friendly_name: The friendly name of the server diff --git a/vsts/vsts/core/v4_0/models/proxy_authorization.py b/vsts/vsts/core/v4_0/models/proxy_authorization.py index 2a0e7ebf..887e2371 100644 --- a/vsts/vsts/core/v4_0/models/proxy_authorization.py +++ b/vsts/vsts/core/v4_0/models/proxy_authorization.py @@ -17,9 +17,9 @@ class ProxyAuthorization(Model): :param client_id: Gets or sets the client identifier for this proxy. :type client_id: str :param identity: Gets or sets the user identity to authorize for on-prem. - :type identity: :class:`str ` + :type identity: :class:`str ` :param public_key: Gets or sets the public key used to verify the identity of this proxy. Only specify on hosted. - :type public_key: :class:`PublicKey ` + :type public_key: :class:`PublicKey ` """ _attribute_map = { diff --git a/vsts/vsts/core/v4_0/models/team_project.py b/vsts/vsts/core/v4_0/models/team_project.py index 2544c788..34ea4471 100644 --- a/vsts/vsts/core/v4_0/models/team_project.py +++ b/vsts/vsts/core/v4_0/models/team_project.py @@ -29,11 +29,11 @@ class TeamProject(TeamProjectReference): :param visibility: Project visibility. :type visibility: object :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param capabilities: Set of capabilities this project has (such as process template & version control). :type capabilities: dict :param default_team: The shallow ref to the default team. - :type default_team: :class:`WebApiTeamRef ` + :type default_team: :class:`WebApiTeamRef ` """ _attribute_map = { diff --git a/vsts/vsts/core/v4_0/models/team_project_collection.py b/vsts/vsts/core/v4_0/models/team_project_collection.py index fdd82e1e..0d5d11c0 100644 --- a/vsts/vsts/core/v4_0/models/team_project_collection.py +++ b/vsts/vsts/core/v4_0/models/team_project_collection.py @@ -19,7 +19,7 @@ class TeamProjectCollection(TeamProjectCollectionReference): :param url: Collection REST Url. :type url: str :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Project collection description. :type description: str :param state: Project collection state. diff --git a/vsts/vsts/core/v4_0/models/web_api_connected_service.py b/vsts/vsts/core/v4_0/models/web_api_connected_service.py index 9eabedbb..06303cea 100644 --- a/vsts/vsts/core/v4_0/models/web_api_connected_service.py +++ b/vsts/vsts/core/v4_0/models/web_api_connected_service.py @@ -15,7 +15,7 @@ class WebApiConnectedService(WebApiConnectedServiceRef): :param url: :type url: str :param authenticated_by: The user who did the OAuth authentication to created this service - :type authenticated_by: :class:`IdentityRef ` + :type authenticated_by: :class:`IdentityRef ` :param description: Extra description on the service. :type description: str :param friendly_name: Friendly Name of service connection @@ -25,7 +25,7 @@ class WebApiConnectedService(WebApiConnectedServiceRef): :param kind: The kind of service. :type kind: str :param project: The project associated with this service - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param service_uri: Optional uri to connect directly to the service such as https://windows.azure.com :type service_uri: str """ diff --git a/vsts/vsts/core/v4_0/models/web_api_connected_service_details.py b/vsts/vsts/core/v4_0/models/web_api_connected_service_details.py index 6ed5bdb5..1a5dee7f 100644 --- a/vsts/vsts/core/v4_0/models/web_api_connected_service_details.py +++ b/vsts/vsts/core/v4_0/models/web_api_connected_service_details.py @@ -17,7 +17,7 @@ class WebApiConnectedServiceDetails(WebApiConnectedServiceRef): :param url: :type url: str :param connected_service_meta_data: Meta data for service connection - :type connected_service_meta_data: :class:`WebApiConnectedService ` + :type connected_service_meta_data: :class:`WebApiConnectedService ` :param credentials_xml: Credential info :type credentials_xml: str :param end_point: Optional uri to connect directly to the service such as https://windows.azure.com diff --git a/vsts/vsts/core/v4_1/core_client.py b/vsts/vsts/core/v4_1/core_client.py index 07485e2e..50e4e81d 100644 --- a/vsts/vsts/core/v4_1/core_client.py +++ b/vsts/vsts/core/v4_1/core_client.py @@ -28,13 +28,13 @@ def __init__(self, base_url=None, creds=None): def create_connected_service(self, connected_service_creation_data, project_id): """CreateConnectedService. [Preview API] - :param :class:` ` connected_service_creation_data: + :param :class:` ` connected_service_creation_data: :param str project_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(connected_service_creation_data, 'WebApiConnectedServiceDetails') response = self._send(http_method='POST', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', @@ -48,12 +48,13 @@ def get_connected_service_details(self, project_id, name): [Preview API] :param str project_id: :param str name: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'name': self._serialize.url('name', name, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if name is not None: + route_values['name'] = self._serialize.url('name', name, 'str') response = self._send(http_method='GET', location_id='b4f70219-e18b-42c5-abe3-98b07d35525e', version='4.1-preview.1', @@ -67,9 +68,9 @@ def get_connected_services(self, project_id, kind=None): :param ConnectedServiceKind kind: :rtype: [WebApiConnectedService] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if kind is not None: query_parameters['kind'] = self._serialize.query('kind', kind, 'ConnectedServiceKind') @@ -84,12 +85,12 @@ def get_connected_services(self, project_id, kind=None): def create_identity_mru(self, mru_data, mru_name): """CreateIdentityMru. [Preview API] - :param :class:` ` mru_data: + :param :class:` ` mru_data: :param str mru_name: """ - route_values = { - 'mruName': self._serialize.url('mru_name', mru_name, 'str') - } + route_values = {} + if mru_name is not None: + route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') content = self._serialize.body(mru_data, 'IdentityData') self._send(http_method='POST', location_id='5ead0b70-2572-4697-97e9-f341069a783a', @@ -103,9 +104,9 @@ def get_identity_mru(self, mru_name): :param str mru_name: :rtype: [IdentityRef] """ - route_values = { - 'mruName': self._serialize.url('mru_name', mru_name, 'str') - } + route_values = {} + if mru_name is not None: + route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') response = self._send(http_method='GET', location_id='5ead0b70-2572-4697-97e9-f341069a783a', version='4.1-preview.1', @@ -116,12 +117,12 @@ def get_identity_mru(self, mru_name): def update_identity_mru(self, mru_data, mru_name): """UpdateIdentityMru. [Preview API] - :param :class:` ` mru_data: + :param :class:` ` mru_data: :param str mru_name: """ - route_values = { - 'mruName': self._serialize.url('mru_name', mru_name, 'str') - } + route_values = {} + if mru_name is not None: + route_values['mruName'] = self._serialize.url('mru_name', mru_name, 'str') content = self._serialize.body(mru_data, 'IdentityData') self._send(http_method='PATCH', location_id='5ead0b70-2572-4697-97e9-f341069a783a', @@ -138,10 +139,11 @@ def get_team_members_with_extended_properties(self, project_id, team_id, top=Non :param int skip: :rtype: [TeamMember] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -149,7 +151,7 @@ def get_team_members_with_extended_properties(self, project_id, team_id, top=Non query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='294c494c-2600-4d7e-b76c-3dd50c3c95be', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values, query_parameters=query_parameters, returns_collection=True) @@ -159,11 +161,11 @@ def get_process_by_id(self, process_id): """GetProcessById. [Preview API] Get a process by ID. :param str process_id: ID for a process. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'processId': self._serialize.url('process_id', process_id, 'str') - } + route_values = {} + if process_id is not None: + route_values['processId'] = self._serialize.url('process_id', process_id, 'str') response = self._send(http_method='GET', location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8', version='4.1-preview.1', @@ -185,11 +187,11 @@ def get_project_collection(self, collection_id): """GetProjectCollection. [Preview API] Get project collection with the specified id or name. :param str collection_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'collectionId': self._serialize.url('collection_id', collection_id, 'str') - } + route_values = {} + if collection_id is not None: + route_values['collectionId'] = self._serialize.url('collection_id', collection_id, 'str') response = self._send(http_method='GET', location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf', version='4.1-preview.2', @@ -237,11 +239,11 @@ def get_project(self, project_id, include_capabilities=None, include_history=Non :param str project_id: :param bool include_capabilities: Include capabilities (such as source control) in the team project result (default: false). :param bool include_history: Search within renamed projects (that had such name in the past). - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if include_capabilities is not None: query_parameters['includeCapabilities'] = self._serialize.query('include_capabilities', include_capabilities, 'bool') @@ -282,8 +284,8 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke def queue_create_project(self, project_to_create): """QueueCreateProject. [Preview API] Queue a project creation. - :param :class:` ` project_to_create: The project to create. - :rtype: :class:` ` + :param :class:` ` project_to_create: The project to create. + :rtype: :class:` ` """ content = self._serialize.body(project_to_create, 'TeamProject') response = self._send(http_method='POST', @@ -296,11 +298,11 @@ def queue_delete_project(self, project_id): """QueueDeleteProject. [Preview API] Queue a project deletion. :param str project_id: The project id of the project to delete. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') response = self._send(http_method='DELETE', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', version='4.1-preview.3', @@ -310,13 +312,13 @@ def queue_delete_project(self, project_id): def update_project(self, project_update, project_id): """UpdateProject. [Preview API] Update an existing project's name, abbreviation, or description. - :param :class:` ` project_update: The updates for the project. + :param :class:` ` project_update: The updates for the project. :param str project_id: The project id of the project to update. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(project_update, 'TeamProject') response = self._send(http_method='PATCH', location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1', @@ -332,9 +334,9 @@ def get_project_properties(self, project_id, keys=None): :param [str] keys: A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned. :rtype: [ProjectProperty] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} if keys is not None: keys = ",".join(keys) @@ -351,11 +353,11 @@ def set_project_properties(self, project_id, patch_document): """SetProjectProperties. [Preview API] Create, update, and delete team project properties. :param str project_id: The team project ID. - :param :class:`<[JsonPatchOperation]> ` patch_document: A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. + :param :class:`<[JsonPatchOperation]> ` patch_document: A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='4976a71a-4487-49aa-8aab-a1eda469037a', @@ -367,8 +369,8 @@ def set_project_properties(self, project_id, patch_document): def create_or_update_proxy(self, proxy): """CreateOrUpdateProxy. [Preview API] - :param :class:` ` proxy: - :rtype: :class:` ` + :param :class:` ` proxy: + :rtype: :class:` ` """ content = self._serialize.body(proxy, 'Proxy') response = self._send(http_method='PUT', @@ -409,20 +411,42 @@ def get_proxies(self, proxy_url=None): returns_collection=True) return self._deserialize('[Proxy]', response) + def get_all_teams(self, mine=None, top=None, skip=None): + """GetAllTeams. + [Preview API] Get a list of all teams. + :param bool mine: If true return all the teams requesting user is member, otherwise return all the teams user has read access + :param int top: Maximum number of teams to return. + :param int skip: Number of teams to skip. + :rtype: [WebApiTeam] + """ + query_parameters = {} + if mine is not None: + query_parameters['$mine'] = self._serialize.query('mine', mine, 'bool') + if top is not None: + query_parameters['$top'] = self._serialize.query('top', top, 'int') + if skip is not None: + query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') + response = self._send(http_method='GET', + location_id='7a4d9ee9-3433-4347-b47a-7a80f1cf307e', + version='4.1-preview.2', + query_parameters=query_parameters, + returns_collection=True) + return self._deserialize('[WebApiTeam]', response) + def create_team(self, team, project_id): """CreateTeam. [Preview API] Create a team in a team project. - :param :class:` ` team: The team data used to create the team. + :param :class:` ` team: The team data used to create the team. :param str project_id: The name or ID (GUID) of the team project in which to create the team. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') content = self._serialize.body(team, 'WebApiTeam') response = self._send(http_method='POST', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) @@ -433,13 +457,14 @@ def delete_team(self, project_id, team_id): :param str project_id: The name or ID (GUID) of the team project containing the team to delete. :param str team_id: The name of ID of the team to delete. """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') self._send(http_method='DELETE', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values) def get_team(self, project_id, team_id): @@ -447,37 +472,41 @@ def get_team(self, project_id, team_id): [Preview API] Get a specific team. :param str project_id: The name or ID (GUID) of the team project containing the team. :param str team_id: The name or ID (GUID) of the team. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') response = self._send(http_method='GET', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values) return self._deserialize('WebApiTeam', response) - def get_teams(self, project_id, top=None, skip=None): + def get_teams(self, project_id, mine=None, top=None, skip=None): """GetTeams. [Preview API] Get a list of teams. :param str project_id: + :param bool mine: If true return all the teams requesting user is member, otherwise return all the teams user has read access :param int top: Maximum number of teams to return. :param int skip: Number of teams to skip. :rtype: [WebApiTeam] """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') query_parameters = {} + if mine is not None: + query_parameters['$mine'] = self._serialize.query('mine', mine, 'bool') if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') response = self._send(http_method='GET', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values, query_parameters=query_parameters, returns_collection=True) @@ -486,19 +515,20 @@ def get_teams(self, project_id, top=None, skip=None): def update_team(self, team_data, project_id, team_id): """UpdateTeam. [Preview API] Update a team's name and/or description. - :param :class:` ` team_data: + :param :class:` ` team_data: :param str project_id: The name or ID (GUID) of the team project containing the team to update. :param str team_id: The name of ID of the team to update. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'projectId': self._serialize.url('project_id', project_id, 'str'), - 'teamId': self._serialize.url('team_id', team_id, 'str') - } + route_values = {} + if project_id is not None: + route_values['projectId'] = self._serialize.url('project_id', project_id, 'str') + if team_id is not None: + route_values['teamId'] = self._serialize.url('team_id', team_id, 'str') content = self._serialize.body(team_data, 'WebApiTeam') response = self._send(http_method='PATCH', location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59', - version='4.1-preview.1', + version='4.1-preview.2', route_values=route_values, content=content) return self._deserialize('WebApiTeam', response) diff --git a/vsts/vsts/core/v4_1/models/process.py b/vsts/vsts/core/v4_1/models/process.py index 2b4157fa..bcbb35ba 100644 --- a/vsts/vsts/core/v4_1/models/process.py +++ b/vsts/vsts/core/v4_1/models/process.py @@ -17,7 +17,7 @@ class Process(ProcessReference): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: :type description: str :param id: diff --git a/vsts/vsts/core/v4_1/models/project_info.py b/vsts/vsts/core/v4_1/models/project_info.py index 86e262be..db391e77 100644 --- a/vsts/vsts/core/v4_1/models/project_info.py +++ b/vsts/vsts/core/v4_1/models/project_info.py @@ -23,7 +23,7 @@ class ProjectInfo(Model): :param name: :type name: str :param properties: - :type properties: list of :class:`ProjectProperty ` + :type properties: list of :class:`ProjectProperty ` :param revision: Current revision of the project :type revision: long :param state: diff --git a/vsts/vsts/core/v4_1/models/proxy.py b/vsts/vsts/core/v4_1/models/proxy.py index b8684bb3..ec17a518 100644 --- a/vsts/vsts/core/v4_1/models/proxy.py +++ b/vsts/vsts/core/v4_1/models/proxy.py @@ -13,7 +13,7 @@ class Proxy(Model): """Proxy. :param authorization: - :type authorization: :class:`ProxyAuthorization ` + :type authorization: :class:`ProxyAuthorization ` :param description: This is a description string :type description: str :param friendly_name: The friendly name of the server diff --git a/vsts/vsts/core/v4_1/models/proxy_authorization.py b/vsts/vsts/core/v4_1/models/proxy_authorization.py index 2a0e7ebf..8b4178a1 100644 --- a/vsts/vsts/core/v4_1/models/proxy_authorization.py +++ b/vsts/vsts/core/v4_1/models/proxy_authorization.py @@ -17,9 +17,9 @@ class ProxyAuthorization(Model): :param client_id: Gets or sets the client identifier for this proxy. :type client_id: str :param identity: Gets or sets the user identity to authorize for on-prem. - :type identity: :class:`str ` + :type identity: :class:`str ` :param public_key: Gets or sets the public key used to verify the identity of this proxy. Only specify on hosted. - :type public_key: :class:`PublicKey ` + :type public_key: :class:`PublicKey ` """ _attribute_map = { diff --git a/vsts/vsts/core/v4_1/models/team_member.py b/vsts/vsts/core/v4_1/models/team_member.py index 9b90a57a..1f316f88 100644 --- a/vsts/vsts/core/v4_1/models/team_member.py +++ b/vsts/vsts/core/v4_1/models/team_member.py @@ -13,7 +13,7 @@ class TeamMember(Model): """TeamMember. :param identity: - :type identity: :class:`IdentityRef ` + :type identity: :class:`IdentityRef ` :param is_team_admin: :type is_team_admin: bool """ diff --git a/vsts/vsts/core/v4_1/models/team_project.py b/vsts/vsts/core/v4_1/models/team_project.py index 2544c788..b6a2db7e 100644 --- a/vsts/vsts/core/v4_1/models/team_project.py +++ b/vsts/vsts/core/v4_1/models/team_project.py @@ -29,11 +29,11 @@ class TeamProject(TeamProjectReference): :param visibility: Project visibility. :type visibility: object :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param capabilities: Set of capabilities this project has (such as process template & version control). :type capabilities: dict :param default_team: The shallow ref to the default team. - :type default_team: :class:`WebApiTeamRef ` + :type default_team: :class:`WebApiTeamRef ` """ _attribute_map = { diff --git a/vsts/vsts/core/v4_1/models/team_project_collection.py b/vsts/vsts/core/v4_1/models/team_project_collection.py index fdd82e1e..29ba3fbf 100644 --- a/vsts/vsts/core/v4_1/models/team_project_collection.py +++ b/vsts/vsts/core/v4_1/models/team_project_collection.py @@ -19,7 +19,7 @@ class TeamProjectCollection(TeamProjectCollectionReference): :param url: Collection REST Url. :type url: str :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Project collection description. :type description: str :param state: Project collection state. diff --git a/vsts/vsts/core/v4_1/models/web_api_connected_service.py b/vsts/vsts/core/v4_1/models/web_api_connected_service.py index 9eabedbb..59e2fdd9 100644 --- a/vsts/vsts/core/v4_1/models/web_api_connected_service.py +++ b/vsts/vsts/core/v4_1/models/web_api_connected_service.py @@ -15,7 +15,7 @@ class WebApiConnectedService(WebApiConnectedServiceRef): :param url: :type url: str :param authenticated_by: The user who did the OAuth authentication to created this service - :type authenticated_by: :class:`IdentityRef ` + :type authenticated_by: :class:`IdentityRef ` :param description: Extra description on the service. :type description: str :param friendly_name: Friendly Name of service connection @@ -25,7 +25,7 @@ class WebApiConnectedService(WebApiConnectedServiceRef): :param kind: The kind of service. :type kind: str :param project: The project associated with this service - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param service_uri: Optional uri to connect directly to the service such as https://windows.azure.com :type service_uri: str """ diff --git a/vsts/vsts/core/v4_1/models/web_api_connected_service_details.py b/vsts/vsts/core/v4_1/models/web_api_connected_service_details.py index 6ed5bdb5..a9729b37 100644 --- a/vsts/vsts/core/v4_1/models/web_api_connected_service_details.py +++ b/vsts/vsts/core/v4_1/models/web_api_connected_service_details.py @@ -17,7 +17,7 @@ class WebApiConnectedServiceDetails(WebApiConnectedServiceRef): :param url: :type url: str :param connected_service_meta_data: Meta data for service connection - :type connected_service_meta_data: :class:`WebApiConnectedService ` + :type connected_service_meta_data: :class:`WebApiConnectedService ` :param credentials_xml: Credential info :type credentials_xml: str :param end_point: Optional uri to connect directly to the service such as https://windows.azure.com diff --git a/vsts/vsts/git/v4_0/git_client_base.py b/vsts/vsts/git/v4_0/git_client_base.py index e3ec5c49..13c1812c 100644 --- a/vsts/vsts/git/v4_0/git_client_base.py +++ b/vsts/vsts/git/v4_0/git_client_base.py @@ -28,15 +28,16 @@ def __init__(self, base_url=None, creds=None): def create_annotated_tag(self, tag_object, project, repository_id): """CreateAnnotatedTag. [Preview API] Create an annotated tag - :param :class:` ` tag_object: Object containing details of tag to be created + :param :class:` ` tag_object: Object containing details of tag to be created :param str project: Project ID or project name :param str repository_id: Friendly name or guid of repository - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(tag_object, 'GitAnnotatedTag') response = self._send(http_method='POST', location_id='5e8a8081-3851-4626-b677-9891cc04102e', @@ -51,13 +52,15 @@ def get_annotated_tag(self, project, repository_id, object_id): :param str project: Project ID or project name :param str repository_id: :param str object_id: Sha1 of annotated tag to be returned - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'objectId': self._serialize.url('object_id', object_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if object_id is not None: + route_values['objectId'] = self._serialize.url('object_id', object_id, 'str') response = self._send(http_method='GET', location_id='5e8a8081-3851-4626-b677-9891cc04102e', version='4.0-preview.1', @@ -72,13 +75,15 @@ def get_blob(self, repository_id, sha1, project=None, download=None, file_name=N :param str project: Project ID or project name :param bool download: :param str file_name: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if download is not None: query_parameters['download'] = self._serialize.query('download', download, 'bool') @@ -101,11 +106,13 @@ def get_blob_content(self, repository_id, sha1, project=None, download=None, fil :param str file_name: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if download is not None: query_parameters['download'] = self._serialize.query('download', download, 'bool') @@ -127,10 +134,11 @@ def get_blobs_zip(self, blob_ids, repository_id, project=None, filename=None): :param str filename: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if filename is not None: query_parameters['filename'] = self._serialize.query('filename', filename, 'str') @@ -153,11 +161,13 @@ def get_blob_zip(self, repository_id, sha1, project=None, download=None, file_na :param str file_name: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if download is not None: query_parameters['download'] = self._serialize.query('download', download, 'bool') @@ -176,13 +186,14 @@ def get_branch(self, repository_id, name, project=None, base_version_descriptor= :param str repository_id: Friendly name or guid of repository :param str name: Name of the branch :param str project: Project ID or project name - :param :class:` ` base_version_descriptor: - :rtype: :class:` ` + :param :class:` ` base_version_descriptor: + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if name is not None: query_parameters['name'] = self._serialize.query('name', name, 'str') @@ -205,13 +216,14 @@ def get_branches(self, repository_id, project=None, base_version_descriptor=None Retrieve statistics about all branches within a repository. :param str repository_id: Friendly name or guid of repository :param str project: Project ID or project name - :param :class:` ` base_version_descriptor: + :param :class:` ` base_version_descriptor: :rtype: [GitBranchStats] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if base_version_descriptor is not None: if base_version_descriptor.version_type is not None: @@ -231,15 +243,16 @@ def get_branches(self, repository_id, project=None, base_version_descriptor=None def get_branch_stats_batch(self, search_criteria, repository_id, project=None): """GetBranchStatsBatch. Retrieve statistics for multiple commits - :param :class:` ` search_criteria: + :param :class:` ` search_criteria: :param str repository_id: Friendly name or guid of repository :param str project: Project ID or project name :rtype: [GitBranchStats] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(search_criteria, 'GitQueryBranchStatsCriteria') response = self._send(http_method='POST', location_id='d5b216de-d8d5-4d32-ae76-51df755b16d3', @@ -257,13 +270,15 @@ def get_changes(self, commit_id, repository_id, project=None, top=None, skip=Non :param str project: Project ID or project name :param int top: The maximum number of changes to return. :param int skip: The number of changes to skip. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if top is not None: query_parameters['top'] = self._serialize.query('top', top, 'int') @@ -279,15 +294,16 @@ def get_changes(self, commit_id, repository_id, project=None, top=None, skip=Non def create_cherry_pick(self, cherry_pick_to_create, project, repository_id): """CreateCherryPick. [Preview API] - :param :class:` ` cherry_pick_to_create: + :param :class:` ` cherry_pick_to_create: :param str project: Project ID or project name :param str repository_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(cherry_pick_to_create, 'GitAsyncRefOperationParameters') response = self._send(http_method='POST', location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', @@ -302,13 +318,15 @@ def get_cherry_pick(self, project, cherry_pick_id, repository_id): :param str project: Project ID or project name :param int cherry_pick_id: :param str repository_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'cherryPickId': self._serialize.url('cherry_pick_id', cherry_pick_id, 'int'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if cherry_pick_id is not None: + route_values['cherryPickId'] = self._serialize.url('cherry_pick_id', cherry_pick_id, 'int') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', version='4.0-preview.1', @@ -321,12 +339,13 @@ def get_cherry_pick_for_ref_name(self, project, repository_id, ref_name): :param str project: Project ID or project name :param str repository_id: :param str ref_name: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if ref_name is not None: query_parameters['refName'] = self._serialize.query('ref_name', ref_name, 'str') @@ -345,14 +364,15 @@ def get_commit_diffs(self, repository_id, project=None, diff_common_commit=None, :param bool diff_common_commit: :param int top: Maximum number of changes to return :param int skip: Number of changes to skip - :param :class:` ` base_version_descriptor: - :param :class:` ` target_version_descriptor: - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + :param :class:` ` base_version_descriptor: + :param :class:` ` target_version_descriptor: + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if diff_common_commit is not None: query_parameters['diffCommonCommit'] = self._serialize.query('diff_common_commit', diff_common_commit, 'bool') @@ -388,13 +408,15 @@ def get_commit(self, commit_id, repository_id, project=None, change_count=None): :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. :param str project: Project ID or project name :param int change_count: The number of changes to include in the result. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if change_count is not None: query_parameters['changeCount'] = self._serialize.query('change_count', change_count, 'int') @@ -409,16 +431,17 @@ def get_commits(self, repository_id, search_criteria, project=None, skip=None, t """GetCommits. Retrieve git commits for a project :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - :param :class:` ` search_criteria: + :param :class:` ` search_criteria: :param str project: Project ID or project name :param int skip: :param int top: :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if search_criteria is not None: if search_criteria.ids is not None: @@ -486,10 +509,11 @@ def get_push_commits(self, repository_id, push_id, project=None, top=None, skip= :param bool include_links: :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if push_id is not None: query_parameters['pushId'] = self._serialize.query('push_id', push_id, 'int') @@ -510,7 +534,7 @@ def get_push_commits(self, repository_id, push_id, project=None, top=None, skip= def get_commits_batch(self, search_criteria, repository_id, project=None, skip=None, top=None, include_statuses=None): """GetCommitsBatch. Retrieve git commits for a project - :param :class:` ` search_criteria: Search options + :param :class:` ` search_criteria: Search options :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. :param str project: Project ID or project name :param int skip: @@ -518,10 +542,11 @@ def get_commits_batch(self, search_criteria, repository_id, project=None, skip=N :param bool include_statuses: :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') @@ -545,9 +570,9 @@ def get_deleted_repositories(self, project): :param str project: Project ID or project name :rtype: [GitDeletedRepository] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='2b6869c4-cb25-42b5-b7a3-0d3e6be0a11a', version='4.0-preview.1', @@ -564,11 +589,13 @@ def get_forks(self, repository_name_or_id, collection_id, project=None, include_ :param bool include_links: :rtype: [GitRepositoryRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str'), - 'collectionId': self._serialize.url('collection_id', collection_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') + if collection_id is not None: + route_values['collectionId'] = self._serialize.url('collection_id', collection_id, 'str') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -583,16 +610,17 @@ def get_forks(self, repository_name_or_id, collection_id, project=None, include_ def create_fork_sync_request(self, sync_params, repository_name_or_id, project=None, include_links=None): """CreateForkSyncRequest. [Preview API] Request that another repository's refs be fetched into this one. - :param :class:` ` sync_params: Source repository and ref mapping. + :param :class:` ` sync_params: Source repository and ref mapping. :param str repository_name_or_id: ID or name of the repository. :param str project: Project ID or project name :param bool include_links: True to include links - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -612,13 +640,15 @@ def get_fork_sync_request(self, repository_name_or_id, fork_sync_operation_id, p :param int fork_sync_operation_id: OperationId of the sync request. :param str project: Project ID or project name :param bool include_links: True to include links. - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str'), - 'forkSyncOperationId': self._serialize.url('fork_sync_operation_id', fork_sync_operation_id, 'int') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') + if fork_sync_operation_id is not None: + route_values['forkSyncOperationId'] = self._serialize.url('fork_sync_operation_id', fork_sync_operation_id, 'int') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -638,10 +668,11 @@ def get_fork_sync_requests(self, repository_name_or_id, project=None, include_ab :param bool include_links: True to include links. :rtype: [GitForkSyncRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') query_parameters = {} if include_abandoned is not None: query_parameters['includeAbandoned'] = self._serialize.query('include_abandoned', include_abandoned, 'bool') @@ -658,15 +689,16 @@ def get_fork_sync_requests(self, repository_name_or_id, project=None, include_ab def create_import_request(self, import_request, project, repository_id): """CreateImportRequest. [Preview API] Create an import request - :param :class:` ` import_request: + :param :class:` ` import_request: :param str project: Project ID or project name :param str repository_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(import_request, 'GitImportRequest') response = self._send(http_method='POST', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', @@ -681,13 +713,15 @@ def get_import_request(self, project, repository_id, import_request_id): :param str project: Project ID or project name :param str repository_id: :param int import_request_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'importRequestId': self._serialize.url('import_request_id', import_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if import_request_id is not None: + route_values['importRequestId'] = self._serialize.url('import_request_id', import_request_id, 'int') response = self._send(http_method='GET', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', version='4.0-preview.1', @@ -702,10 +736,11 @@ def query_import_requests(self, project, repository_id, include_abandoned=None): :param bool include_abandoned: :rtype: [GitImportRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if include_abandoned is not None: query_parameters['includeAbandoned'] = self._serialize.query('include_abandoned', include_abandoned, 'bool') @@ -720,17 +755,19 @@ def query_import_requests(self, project, repository_id, include_abandoned=None): def update_import_request(self, import_request_to_update, project, repository_id, import_request_id): """UpdateImportRequest. [Preview API] Update an import request - :param :class:` ` import_request_to_update: + :param :class:` ` import_request_to_update: :param str project: Project ID or project name :param str repository_id: :param int import_request_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'importRequestId': self._serialize.url('import_request_id', import_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if import_request_id is not None: + route_values['importRequestId'] = self._serialize.url('import_request_id', import_request_id, 'int') content = self._serialize.body(import_request_to_update, 'GitImportRequest') response = self._send(http_method='PATCH', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', @@ -750,13 +787,14 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: - :param :class:` ` version_descriptor: - :rtype: :class:` ` + :param :class:` ` version_descriptor: + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -795,13 +833,14 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: - :param :class:` ` version_descriptor: + :param :class:` ` version_descriptor: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -840,13 +879,14 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve :param bool latest_processed_change: :param bool download: :param bool include_links: - :param :class:` ` version_descriptor: + :param :class:` ` version_descriptor: :rtype: [GitItem] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') @@ -886,13 +926,14 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: - :param :class:` ` version_descriptor: + :param :class:` ` version_descriptor: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -931,13 +972,14 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur :param bool include_content_metadata: :param bool latest_processed_change: :param bool download: - :param :class:` ` version_descriptor: + :param :class:` ` version_descriptor: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -968,15 +1010,16 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur def get_items_batch(self, request_data, repository_id, project=None): """GetItemsBatch. Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path - :param :class:` ` request_data: + :param :class:` ` request_data: :param str repository_id: :param str project: Project ID or project name :rtype: [[GitItem]] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(request_data, 'GitItemRequestData') response = self._send(http_method='POST', location_id='630fd2e4-fb88-4f85-ad21-13f3fd1fbca9', @@ -994,14 +1037,17 @@ def create_attachment(self, upload_stream, file_name, repository_id, pull_reques :param str repository_id: :param int pull_request_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(upload_stream, 'object') response = self._send(http_method='POST', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', @@ -1019,12 +1065,15 @@ def delete_attachment(self, file_name, repository_id, pull_request_id, project=N :param int pull_request_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') self._send(http_method='DELETE', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.0-preview.1', @@ -1039,12 +1088,15 @@ def get_attachment_content(self, file_name, repository_id, pull_request_id, proj :param str project: Project ID or project name :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.0-preview.1', @@ -1059,11 +1111,13 @@ def get_attachments(self, repository_id, pull_request_id, project=None): :param str project: Project ID or project name :rtype: [Attachment] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.0-preview.1', @@ -1080,12 +1134,15 @@ def get_attachment_zip(self, file_name, repository_id, pull_request_id, project= :param str project: Project ID or project name :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.0-preview.1', @@ -1101,13 +1158,17 @@ def create_like(self, repository_id, pull_request_id, thread_id, comment_id, pro :param int comment_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='POST', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', version='4.0-preview.1', @@ -1122,13 +1183,17 @@ def delete_like(self, repository_id, pull_request_id, thread_id, comment_id, pro :param int comment_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='DELETE', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', version='4.0-preview.1', @@ -1144,13 +1209,17 @@ def get_likes(self, repository_id, pull_request_id, thread_id, comment_id, proje :param str project: Project ID or project name :rtype: [IdentityRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', version='4.0-preview.1', @@ -1167,12 +1236,15 @@ def get_pull_request_iteration_commits(self, repository_id, pull_request_id, ite :param str project: Project ID or project name :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='e7ea0883-095f-4926-b5fb-f24691c26fb9', version='4.0', @@ -1188,11 +1260,13 @@ def get_pull_request_commits(self, repository_id, pull_request_id, project=None) :param str project: Project ID or project name :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='52823034-34a8-4576-922c-8d8b77e9e4c4', version='4.0', @@ -1209,14 +1283,17 @@ def get_pull_request_iteration_changes(self, repository_id, pull_request_id, ite :param int top: :param int skip: :param int compare_to: - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -1237,14 +1314,17 @@ def get_pull_request_iteration(self, repository_id, pull_request_id, iteration_i :param int pull_request_id: :param int iteration_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='d43911ee-6958-46b0-a42b-8445b8a0d004', version='4.0', @@ -1259,11 +1339,13 @@ def get_pull_request_iterations(self, repository_id, pull_request_id, project=No :param bool include_commits: :rtype: [GitPullRequestIteration] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if include_commits is not None: query_parameters['includeCommits'] = self._serialize.query('include_commits', include_commits, 'bool') @@ -1278,19 +1360,22 @@ def get_pull_request_iterations(self, repository_id, pull_request_id, project=No def create_pull_request_iteration_status(self, status, repository_id, pull_request_id, iteration_id, project=None): """CreatePullRequestIterationStatus. [Preview API] Create a pull request status on the iteration. This method will have the same result as CreatePullRequestStatus with specified iterationId in the request body. - :param :class:` ` status: Pull request status to create. + :param :class:` ` status: Pull request status to create. :param str repository_id: ID of the repository the pull request belongs to. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') content = self._serialize.body(status, 'GitPullRequestStatus') response = self._send(http_method='POST', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', @@ -1307,15 +1392,19 @@ def get_pull_request_iteration_status(self, repository_id, pull_request_id, iter :param int iteration_id: ID of the pull request iteration. :param int status_id: ID of the pull request status. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int'), - 'statusId': self._serialize.url('status_id', status_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + if status_id is not None: + route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') response = self._send(http_method='GET', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', version='4.0-preview.1', @@ -1331,12 +1420,15 @@ def get_pull_request_iteration_statuses(self, repository_id, pull_request_id, it :param str project: Project ID or project name :rtype: [GitPullRequestStatus] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', version='4.0-preview.1', @@ -1347,18 +1439,20 @@ def get_pull_request_iteration_statuses(self, repository_id, pull_request_id, it def create_pull_request_label(self, label, repository_id, pull_request_id, project=None, project_id=None): """CreatePullRequestLabel. [Preview API] - :param :class:` ` label: + :param :class:` ` label: :param str repository_id: :param int pull_request_id: :param str project: Project ID or project name :param str project_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1380,12 +1474,15 @@ def delete_pull_request_labels(self, repository_id, pull_request_id, label_id_or :param str project: Project ID or project name :param str project_id: """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'labelIdOrName': self._serialize.url('label_id_or_name', label_id_or_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if label_id_or_name is not None: + route_values['labelIdOrName'] = self._serialize.url('label_id_or_name', label_id_or_name, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1403,14 +1500,17 @@ def get_pull_request_label(self, repository_id, pull_request_id, label_id_or_nam :param str label_id_or_name: :param str project: Project ID or project name :param str project_id: - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'labelIdOrName': self._serialize.url('label_id_or_name', label_id_or_name, 'str') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if label_id_or_name is not None: + route_values['labelIdOrName'] = self._serialize.url('label_id_or_name', label_id_or_name, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1430,11 +1530,13 @@ def get_pull_request_labels(self, repository_id, pull_request_id, project=None, :param str project_id: :rtype: [WebApiTagDefinition] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1449,15 +1551,16 @@ def get_pull_request_labels(self, repository_id, pull_request_id, project=None, def get_pull_request_query(self, queries, repository_id, project=None): """GetPullRequestQuery. Query for pull requests - :param :class:` ` queries: + :param :class:` ` queries: :param str repository_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(queries, 'GitPullRequestQuery') response = self._send(http_method='POST', location_id='b3a6eebe-9cf0-49ea-b6cb-1a4c5f5007b0', @@ -1469,19 +1572,22 @@ def get_pull_request_query(self, queries, repository_id, project=None): def create_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, reviewer_id, project=None): """CreatePullRequestReviewer. Adds a reviewer to a git pull request - :param :class:` ` reviewer: + :param :class:` ` reviewer: :param str repository_id: :param int pull_request_id: :param str reviewer_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'reviewerId': self._serialize.url('reviewer_id', reviewer_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if reviewer_id is not None: + route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') content = self._serialize.body(reviewer, 'IdentityRefWithVote') response = self._send(http_method='PUT', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', @@ -1499,11 +1605,13 @@ def create_pull_request_reviewers(self, reviewers, repository_id, pull_request_i :param str project: Project ID or project name :rtype: [IdentityRefWithVote] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(reviewers, '[IdentityRef]') response = self._send(http_method='POST', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', @@ -1521,12 +1629,15 @@ def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_ :param str reviewer_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'reviewerId': self._serialize.url('reviewer_id', reviewer_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if reviewer_id is not None: + route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') self._send(http_method='DELETE', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', version='4.0', @@ -1539,14 +1650,17 @@ def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, :param int pull_request_id: :param str reviewer_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'reviewerId': self._serialize.url('reviewer_id', reviewer_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if reviewer_id is not None: + route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') response = self._send(http_method='GET', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', version='4.0', @@ -1561,11 +1675,13 @@ def get_pull_request_reviewers(self, repository_id, pull_request_id, project=Non :param str project: Project ID or project name :rtype: [IdentityRefWithVote] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', version='4.0', @@ -1581,11 +1697,13 @@ def update_pull_request_reviewers(self, patch_votes, repository_id, pull_request :param int pull_request_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(patch_votes, '[IdentityRefWithVote]') self._send(http_method='PATCH', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', @@ -1597,11 +1715,11 @@ def get_pull_request_by_id(self, pull_request_id): """GetPullRequestById. Get a pull request using its ID :param int pull_request_id: the Id of the pull request - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='01a46dea-7d46-4d40-bc84-319e7c260d99', version='4.0', @@ -1612,15 +1730,15 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len """GetPullRequestsByProject. Query pull requests by project :param str project: Project ID or project name - :param :class:` ` search_criteria: + :param :class:` ` search_criteria: :param int max_comment_length: :param int skip: :param int top: :rtype: [GitPullRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if search_criteria is not None: if search_criteria.repository_id is not None: @@ -1656,16 +1774,17 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len def create_pull_request(self, git_pull_request_to_create, repository_id, project=None, supports_iterations=None): """CreatePullRequest. Create a git pull request - :param :class:` ` git_pull_request_to_create: + :param :class:` ` git_pull_request_to_create: :param str repository_id: :param str project: Project ID or project name :param bool supports_iterations: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if supports_iterations is not None: query_parameters['supportsIterations'] = self._serialize.query('supports_iterations', supports_iterations, 'bool') @@ -1689,13 +1808,15 @@ def get_pull_request(self, repository_id, pull_request_id, project=None, max_com :param int top: :param bool include_commits: :param bool include_work_item_refs: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if max_comment_length is not None: query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') @@ -1718,17 +1839,18 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co """GetPullRequests. Query for pull requests :param str repository_id: - :param :class:` ` search_criteria: + :param :class:` ` search_criteria: :param str project: Project ID or project name :param int max_comment_length: :param int skip: :param int top: :rtype: [GitPullRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if search_criteria is not None: if search_criteria.repository_id is not None: @@ -1764,17 +1886,19 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co def update_pull_request(self, git_pull_request_to_update, repository_id, pull_request_id, project=None): """UpdatePullRequest. Updates a pull request - :param :class:` ` git_pull_request_to_update: + :param :class:` ` git_pull_request_to_update: :param str repository_id: :param int pull_request_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(git_pull_request_to_update, 'GitPullRequest') response = self._send(http_method='PATCH', location_id='9946fd70-0d40-406e-b686-b4744cbbcc37', @@ -1786,16 +1910,18 @@ def update_pull_request(self, git_pull_request_to_update, repository_id, pull_re def share_pull_request(self, user_message, repository_id, pull_request_id, project=None): """SharePullRequest. [Preview API] - :param :class:` ` user_message: + :param :class:` ` user_message: :param str repository_id: :param int pull_request_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(user_message, 'ShareNotificationContext') self._send(http_method='POST', location_id='696f3a82-47c9-487f-9117-b9d00972ca84', @@ -1806,17 +1932,19 @@ def share_pull_request(self, user_message, repository_id, pull_request_id, proje def create_pull_request_status(self, status, repository_id, pull_request_id, project=None): """CreatePullRequestStatus. [Preview API] Create a pull request status. - :param :class:` ` status: Pull request status to create. + :param :class:` ` status: Pull request status to create. :param str repository_id: ID of the repository the pull request belongs to. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(status, 'GitPullRequestStatus') response = self._send(http_method='POST', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', @@ -1832,14 +1960,17 @@ def get_pull_request_status(self, repository_id, pull_request_id, status_id, pro :param int pull_request_id: ID of the pull request. :param int status_id: ID of the pull request status. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'statusId': self._serialize.url('status_id', status_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if status_id is not None: + route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') response = self._send(http_method='GET', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', version='4.0-preview.1', @@ -1854,11 +1985,13 @@ def get_pull_request_statuses(self, repository_id, pull_request_id, project=None :param str project: Project ID or project name :rtype: [GitPullRequestStatus] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', version='4.0-preview.1', @@ -1869,19 +2002,22 @@ def get_pull_request_statuses(self, repository_id, pull_request_id, project=None def create_comment(self, comment, repository_id, pull_request_id, thread_id, project=None): """CreateComment. Create a pull request review comment - :param :class:` ` comment: + :param :class:` ` comment: :param str repository_id: :param int pull_request_id: :param int thread_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') content = self._serialize.body(comment, 'Comment') response = self._send(http_method='POST', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', @@ -1899,13 +2035,17 @@ def delete_comment(self, repository_id, pull_request_id, thread_id, comment_id, :param int comment_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='DELETE', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', version='4.0', @@ -1919,15 +2059,19 @@ def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, pro :param int thread_id: :param int comment_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', version='4.0', @@ -1943,12 +2087,15 @@ def get_comments(self, repository_id, pull_request_id, thread_id, project=None): :param str project: Project ID or project name :rtype: [Comment] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') response = self._send(http_method='GET', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', version='4.0', @@ -1959,21 +2106,25 @@ def get_comments(self, repository_id, pull_request_id, thread_id, project=None): def update_comment(self, comment, repository_id, pull_request_id, thread_id, comment_id, project=None): """UpdateComment. Update a pull request review comment thread - :param :class:` ` comment: + :param :class:` ` comment: :param str repository_id: :param int pull_request_id: :param int thread_id: :param int comment_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') content = self._serialize.body(comment, 'Comment') response = self._send(http_method='PATCH', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', @@ -1985,17 +2136,19 @@ def update_comment(self, comment, repository_id, pull_request_id, thread_id, com def create_thread(self, comment_thread, repository_id, pull_request_id, project=None): """CreateThread. Create a pull request review comment thread - :param :class:` ` comment_thread: + :param :class:` ` comment_thread: :param str repository_id: :param int pull_request_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(comment_thread, 'GitPullRequestCommentThread') response = self._send(http_method='POST', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', @@ -2013,14 +2166,17 @@ def get_pull_request_thread(self, repository_id, pull_request_id, thread_id, pro :param str project: Project ID or project name :param int iteration: :param int base_iteration: - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') query_parameters = {} if iteration is not None: query_parameters['$iteration'] = self._serialize.query('iteration', iteration, 'int') @@ -2043,11 +2199,13 @@ def get_threads(self, repository_id, pull_request_id, project=None, iteration=No :param int base_iteration: :rtype: [GitPullRequestCommentThread] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if iteration is not None: query_parameters['$iteration'] = self._serialize.query('iteration', iteration, 'int') @@ -2064,19 +2222,22 @@ def get_threads(self, repository_id, pull_request_id, project=None, iteration=No def update_thread(self, comment_thread, repository_id, pull_request_id, thread_id, project=None): """UpdateThread. Update a pull request review comment thread - :param :class:` ` comment_thread: + :param :class:` ` comment_thread: :param str repository_id: :param int pull_request_id: :param int thread_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') content = self._serialize.body(comment_thread, 'GitPullRequestCommentThread') response = self._send(http_method='PATCH', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', @@ -2093,11 +2254,13 @@ def get_pull_request_work_items(self, repository_id, pull_request_id, project=No :param str project: Project ID or project name :rtype: [AssociatedWorkItem] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='0a637fcc-5370-4ce8-b0e8-98091f5f9482', version='4.0', @@ -2108,15 +2271,16 @@ def get_pull_request_work_items(self, repository_id, pull_request_id, project=No def create_push(self, push, repository_id, project=None): """CreatePush. Push changes to the repository. - :param :class:` ` push: + :param :class:` ` push: :param str repository_id: The id or friendly name of the repository. To use the friendly name, a project-scoped route must be used. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(push, 'GitPush') response = self._send(http_method='POST', location_id='ea98d07b-3c87-4971-8ede-a613694ffb55', @@ -2133,13 +2297,15 @@ def get_push(self, repository_id, push_id, project=None, include_commits=None, i :param str project: Project ID or project name :param int include_commits: The number of commits to include in the result. :param bool include_ref_updates: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pushId': self._serialize.url('push_id', push_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if push_id is not None: + route_values['pushId'] = self._serialize.url('push_id', push_id, 'int') query_parameters = {} if include_commits is not None: query_parameters['includeCommits'] = self._serialize.query('include_commits', include_commits, 'int') @@ -2159,13 +2325,14 @@ def get_pushes(self, repository_id, project=None, skip=None, top=None, search_cr :param str project: Project ID or project name :param int skip: :param int top: - :param :class:` ` search_criteria: + :param :class:` ` search_criteria: :rtype: [GitPush] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') @@ -2202,10 +2369,11 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, :param bool latest_statuses_only: :rtype: [GitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if filter is not None: query_parameters['filter'] = self._serialize.query('filter', filter, 'str') @@ -2223,17 +2391,18 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, def update_ref(self, new_ref_info, repository_id, filter, project=None, project_id=None): """UpdateRef. - :param :class:` ` new_ref_info: + :param :class:` ` new_ref_info: :param str repository_id: :param str filter: :param str project: Project ID or project name :param str project_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if filter is not None: query_parameters['filter'] = self._serialize.query('filter', filter, 'str') @@ -2257,10 +2426,11 @@ def update_refs(self, ref_updates, repository_id, project=None, project_id=None) :param str project_id: The id of the project. :rtype: [GitRefUpdateResult] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -2277,13 +2447,13 @@ def update_refs(self, ref_updates, repository_id, project=None, project_id=None) def create_favorite(self, favorite, project): """CreateFavorite. [Preview API] Creates a ref favorite - :param :class:` ` favorite: + :param :class:` ` favorite: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(favorite, 'GitRefFavorite') response = self._send(http_method='POST', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', @@ -2298,10 +2468,11 @@ def delete_ref_favorite(self, project, favorite_id): :param str project: Project ID or project name :param int favorite_id: """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'favoriteId': self._serialize.url('favorite_id', favorite_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if favorite_id is not None: + route_values['favoriteId'] = self._serialize.url('favorite_id', favorite_id, 'int') self._send(http_method='DELETE', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', version='4.0-preview.1', @@ -2312,12 +2483,13 @@ def get_ref_favorite(self, project, favorite_id): [Preview API] :param str project: Project ID or project name :param int favorite_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'favoriteId': self._serialize.url('favorite_id', favorite_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if favorite_id is not None: + route_values['favoriteId'] = self._serialize.url('favorite_id', favorite_id, 'int') response = self._send(http_method='GET', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', version='4.0-preview.1', @@ -2332,9 +2504,9 @@ def get_ref_favorites(self, project, repository_id=None, identity_id=None): :param str identity_id: The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. :rtype: [GitRefFavorite] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if repository_id is not None: query_parameters['repositoryId'] = self._serialize.query('repository_id', repository_id, 'str') @@ -2351,14 +2523,14 @@ def get_ref_favorites(self, project, repository_id=None, identity_id=None): def create_repository(self, git_repository_to_create, project=None, source_ref=None): """CreateRepository. Create a git repository - :param :class:` ` git_repository_to_create: + :param :class:` ` git_repository_to_create: :param str project: Project ID or project name :param str source_ref: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if source_ref is not None: query_parameters['sourceRef'] = self._serialize.query('source_ref', source_ref, 'str') @@ -2377,10 +2549,11 @@ def delete_repository(self, repository_id, project=None): :param str repository_id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') self._send(http_method='DELETE', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', version='4.0', @@ -2394,9 +2567,9 @@ def get_repositories(self, project=None, include_links=None, include_all_urls=No :param bool include_all_urls: :rtype: [GitRepository] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -2415,12 +2588,13 @@ def get_repository(self, repository_id, project=None, include_parent=None): :param str repository_id: :param str project: Project ID or project name :param bool include_parent: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if include_parent is not None: query_parameters['includeParent'] = self._serialize.query('include_parent', include_parent, 'bool') @@ -2434,15 +2608,16 @@ def get_repository(self, repository_id, project=None, include_parent=None): def update_repository(self, new_repository_info, repository_id, project=None): """UpdateRepository. Updates the Git repository with the single populated change in the specified repository information. - :param :class:` ` new_repository_info: + :param :class:` ` new_repository_info: :param str repository_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(new_repository_info, 'GitRepository') response = self._send(http_method='PATCH', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', @@ -2454,15 +2629,16 @@ def update_repository(self, new_repository_info, repository_id, project=None): def create_revert(self, revert_to_create, project, repository_id): """CreateRevert. [Preview API] - :param :class:` ` revert_to_create: + :param :class:` ` revert_to_create: :param str project: Project ID or project name :param str repository_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(revert_to_create, 'GitAsyncRefOperationParameters') response = self._send(http_method='POST', location_id='bc866058-5449-4715-9cf1-a510b6ff193c', @@ -2477,13 +2653,15 @@ def get_revert(self, project, revert_id, repository_id): :param str project: Project ID or project name :param int revert_id: :param str repository_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'revertId': self._serialize.url('revert_id', revert_id, 'int'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if revert_id is not None: + route_values['revertId'] = self._serialize.url('revert_id', revert_id, 'int') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='bc866058-5449-4715-9cf1-a510b6ff193c', version='4.0-preview.1', @@ -2496,12 +2674,13 @@ def get_revert_for_ref_name(self, project, repository_id, ref_name): :param str project: Project ID or project name :param str repository_id: :param str ref_name: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if ref_name is not None: query_parameters['refName'] = self._serialize.query('ref_name', ref_name, 'str') @@ -2514,17 +2693,19 @@ def get_revert_for_ref_name(self, project, repository_id, ref_name): def create_commit_status(self, git_commit_status_to_create, commit_id, repository_id, project=None): """CreateCommitStatus. - :param :class:` ` git_commit_status_to_create: + :param :class:` ` git_commit_status_to_create: :param str commit_id: :param str repository_id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(git_commit_status_to_create, 'GitStatus') response = self._send(http_method='POST', location_id='428dd4fb-fda5-4722-af02-9313b80305da', @@ -2543,11 +2724,13 @@ def get_statuses(self, commit_id, repository_id, project=None, top=None, skip=No :param bool latest_only: :rtype: [GitStatus] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if top is not None: query_parameters['top'] = self._serialize.query('top', top, 'int') @@ -2570,10 +2753,11 @@ def get_suggestions(self, repository_id, project=None): :param str project: Project ID or project name :rtype: [GitSuggestion] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='9393b4fb-4445-4919-972b-9ad16f442d83', version='4.0-preview.1', @@ -2589,13 +2773,15 @@ def get_tree(self, repository_id, sha1, project=None, project_id=None, recursive :param str project_id: :param bool recursive: :param str file_name: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -2620,11 +2806,13 @@ def get_tree_zip(self, repository_id, sha1, project=None, project_id=None, recur :param str file_name: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') diff --git a/vsts/vsts/git/v4_0/models/attachment.py b/vsts/vsts/git/v4_0/models/attachment.py index 71e91c1c..519408af 100644 --- a/vsts/vsts/git/v4_0/models/attachment.py +++ b/vsts/vsts/git/v4_0/models/attachment.py @@ -13,9 +13,9 @@ class Attachment(Model): """Attachment. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: The person that uploaded this attachment - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param content_hash: Content hash of on-disk representation of file content. Its calculated by the server by using SHA1 hash function. :type content_hash: str :param created_date: The time the attachment was uploaded @@ -27,7 +27,7 @@ class Attachment(Model): :param id: Id of the code review attachment :type id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param url: The url to download the content of the attachment :type url: str """ diff --git a/vsts/vsts/git/v4_0/models/change.py b/vsts/vsts/git/v4_0/models/change.py index 466afe6d..cd0aa11d 100644 --- a/vsts/vsts/git/v4_0/models/change.py +++ b/vsts/vsts/git/v4_0/models/change.py @@ -17,7 +17,7 @@ class Change(Model): :param item: :type item: object :param new_content: - :type new_content: :class:`ItemContent ` + :type new_content: :class:`ItemContent ` :param source_server_item: :type source_server_item: str :param url: diff --git a/vsts/vsts/git/v4_0/models/comment.py b/vsts/vsts/git/v4_0/models/comment.py index a11439c4..b516cc6c 100644 --- a/vsts/vsts/git/v4_0/models/comment.py +++ b/vsts/vsts/git/v4_0/models/comment.py @@ -13,9 +13,9 @@ class Comment(Model): """Comment. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: The author of the pull request comment. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param comment_type: Determines what kind of comment when it was created. :type comment_type: object :param content: The comment's content. @@ -33,7 +33,7 @@ class Comment(Model): :param published_date: The date a comment was first published. :type published_date: datetime :param users_liked: A list of the users who've liked this comment. - :type users_liked: list of :class:`IdentityRef ` + :type users_liked: list of :class:`IdentityRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/comment_thread.py b/vsts/vsts/git/v4_0/models/comment_thread.py index 02826e1d..f3ab99d9 100644 --- a/vsts/vsts/git/v4_0/models/comment_thread.py +++ b/vsts/vsts/git/v4_0/models/comment_thread.py @@ -13,9 +13,9 @@ class CommentThread(Model): """CommentThread. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: A list of the comments. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param id: The comment thread id. :type id: int :param is_deleted: Specify if the thread is deleted which happens when all comments are deleted @@ -23,13 +23,13 @@ class CommentThread(Model): :param last_updated_date: The time this thread was last updated. :type last_updated_date: datetime :param properties: A list of (optional) thread properties. - :type properties: :class:`object ` + :type properties: :class:`object ` :param published_date: The time this thread was published. :type published_date: datetime :param status: The status of the comment thread. :type status: object :param thread_context: Specify thread context such as position in left/right file. - :type thread_context: :class:`CommentThreadContext ` + :type thread_context: :class:`CommentThreadContext ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/comment_thread_context.py b/vsts/vsts/git/v4_0/models/comment_thread_context.py index adaf5f09..cb264f7e 100644 --- a/vsts/vsts/git/v4_0/models/comment_thread_context.py +++ b/vsts/vsts/git/v4_0/models/comment_thread_context.py @@ -15,13 +15,13 @@ class CommentThreadContext(Model): :param file_path: File path relative to the root of the repository. It's up to the client to use any path format. :type file_path: str :param left_file_end: Position of last character of the comment in left file. - :type left_file_end: :class:`CommentPosition ` + :type left_file_end: :class:`CommentPosition ` :param left_file_start: Position of first character of the comment in left file. - :type left_file_start: :class:`CommentPosition ` + :type left_file_start: :class:`CommentPosition ` :param right_file_end: Position of last character of the comment in right file. - :type right_file_end: :class:`CommentPosition ` + :type right_file_end: :class:`CommentPosition ` :param right_file_start: Position of first character of the comment in right file. - :type right_file_start: :class:`CommentPosition ` + :type right_file_start: :class:`CommentPosition ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/comment_tracking_criteria.py b/vsts/vsts/git/v4_0/models/comment_tracking_criteria.py index e8281b6f..e9407863 100644 --- a/vsts/vsts/git/v4_0/models/comment_tracking_criteria.py +++ b/vsts/vsts/git/v4_0/models/comment_tracking_criteria.py @@ -15,13 +15,13 @@ class CommentTrackingCriteria(Model): :param first_comparing_iteration: The first comparing iteration being viewed. Threads will be tracked if this is greater than 0. :type first_comparing_iteration: int :param orig_left_file_end: Original position of last character of the comment in left file. - :type orig_left_file_end: :class:`CommentPosition ` + :type orig_left_file_end: :class:`CommentPosition ` :param orig_left_file_start: Original position of first character of the comment in left file. - :type orig_left_file_start: :class:`CommentPosition ` + :type orig_left_file_start: :class:`CommentPosition ` :param orig_right_file_end: Original position of last character of the comment in right file. - :type orig_right_file_end: :class:`CommentPosition ` + :type orig_right_file_end: :class:`CommentPosition ` :param orig_right_file_start: Original position of first character of the comment in right file. - :type orig_right_file_start: :class:`CommentPosition ` + :type orig_right_file_start: :class:`CommentPosition ` :param second_comparing_iteration: The second comparing iteration being viewed. Threads will be tracked if this is greater than 0. :type second_comparing_iteration: int """ diff --git a/vsts/vsts/git/v4_0/models/git_annotated_tag.py b/vsts/vsts/git/v4_0/models/git_annotated_tag.py index 2bbcb1ed..6a9aaf45 100644 --- a/vsts/vsts/git/v4_0/models/git_annotated_tag.py +++ b/vsts/vsts/git/v4_0/models/git_annotated_tag.py @@ -19,9 +19,9 @@ class GitAnnotatedTag(Model): :param object_id: :type object_id: str :param tagged_by: User name, Email and date of tagging - :type tagged_by: :class:`GitUserDate ` + :type tagged_by: :class:`GitUserDate ` :param tagged_object: Tagged git object - :type tagged_object: :class:`GitObject ` + :type tagged_object: :class:`GitObject ` :param url: :type url: str """ diff --git a/vsts/vsts/git/v4_0/models/git_async_ref_operation.py b/vsts/vsts/git/v4_0/models/git_async_ref_operation.py index 86f37613..f9763339 100644 --- a/vsts/vsts/git/v4_0/models/git_async_ref_operation.py +++ b/vsts/vsts/git/v4_0/models/git_async_ref_operation.py @@ -13,11 +13,11 @@ class GitAsyncRefOperation(Model): """GitAsyncRefOperation. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: diff --git a/vsts/vsts/git/v4_0/models/git_async_ref_operation_parameters.py b/vsts/vsts/git/v4_0/models/git_async_ref_operation_parameters.py index 3d2b473a..bc98c96f 100644 --- a/vsts/vsts/git/v4_0/models/git_async_ref_operation_parameters.py +++ b/vsts/vsts/git/v4_0/models/git_async_ref_operation_parameters.py @@ -17,9 +17,9 @@ class GitAsyncRefOperationParameters(Model): :param onto_ref_name: :type onto_ref_name: str :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param source: - :type source: :class:`GitAsyncRefOperationSource ` + :type source: :class:`GitAsyncRefOperationSource ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_async_ref_operation_source.py b/vsts/vsts/git/v4_0/models/git_async_ref_operation_source.py index 6cfed2b2..46831949 100644 --- a/vsts/vsts/git/v4_0/models/git_async_ref_operation_source.py +++ b/vsts/vsts/git/v4_0/models/git_async_ref_operation_source.py @@ -13,7 +13,7 @@ class GitAsyncRefOperationSource(Model): """GitAsyncRefOperationSource. :param commit_list: - :type commit_list: list of :class:`GitCommitRef ` + :type commit_list: list of :class:`GitCommitRef ` :param pull_request_id: :type pull_request_id: int """ diff --git a/vsts/vsts/git/v4_0/models/git_blob_ref.py b/vsts/vsts/git/v4_0/models/git_blob_ref.py index 6b128769..81c546c6 100644 --- a/vsts/vsts/git/v4_0/models/git_blob_ref.py +++ b/vsts/vsts/git/v4_0/models/git_blob_ref.py @@ -13,7 +13,7 @@ class GitBlobRef(Model): """GitBlobRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param object_id: SHA1 hash of git object :type object_id: str :param size: Size of blob content (in bytes) diff --git a/vsts/vsts/git/v4_0/models/git_branch_stats.py b/vsts/vsts/git/v4_0/models/git_branch_stats.py index 217e7021..88629a1b 100644 --- a/vsts/vsts/git/v4_0/models/git_branch_stats.py +++ b/vsts/vsts/git/v4_0/models/git_branch_stats.py @@ -17,7 +17,7 @@ class GitBranchStats(Model): :param behind_count: :type behind_count: int :param commit: - :type commit: :class:`GitCommitRef ` + :type commit: :class:`GitCommitRef ` :param is_base_version: :type is_base_version: bool :param name: diff --git a/vsts/vsts/git/v4_0/models/git_change.py b/vsts/vsts/git/v4_0/models/git_change.py index d38f22bd..c7a25411 100644 --- a/vsts/vsts/git/v4_0/models/git_change.py +++ b/vsts/vsts/git/v4_0/models/git_change.py @@ -15,7 +15,7 @@ class GitChange(Change): :param change_id: Id of the change within the group. For example, within the iteration :type change_id: int :param new_content_template: New Content template to be used - :type new_content_template: :class:`GitTemplate ` + :type new_content_template: :class:`GitTemplate ` :param original_path: Original path of item if different from current path :type original_path: str """ diff --git a/vsts/vsts/git/v4_0/models/git_cherry_pick.py b/vsts/vsts/git/v4_0/models/git_cherry_pick.py index f5039a77..c211ad1f 100644 --- a/vsts/vsts/git/v4_0/models/git_cherry_pick.py +++ b/vsts/vsts/git/v4_0/models/git_cherry_pick.py @@ -13,11 +13,11 @@ class GitCherryPick(GitAsyncRefOperation): """GitCherryPick. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: diff --git a/vsts/vsts/git/v4_0/models/git_commit.py b/vsts/vsts/git/v4_0/models/git_commit.py index 50651a61..545a3965 100644 --- a/vsts/vsts/git/v4_0/models/git_commit.py +++ b/vsts/vsts/git/v4_0/models/git_commit.py @@ -13,13 +13,13 @@ class GitCommit(GitCommitRef): """GitCommit. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: - :type author: :class:`GitUserDate ` + :type author: :class:`GitUserDate ` :param change_counts: - :type change_counts: :class:`ChangeCountDictionary ` + :type change_counts: :class:`ChangeCountDictionary ` :param changes: - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` :param comment: :type comment: str :param comment_truncated: @@ -27,19 +27,19 @@ class GitCommit(GitCommitRef): :param commit_id: :type commit_id: str :param committer: - :type committer: :class:`GitUserDate ` + :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 ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str :param work_items: - :type work_items: list of :class:`ResourceRef ` + :type work_items: list of :class:`ResourceRef ` :param push: - :type push: :class:`GitPushRef ` + :type push: :class:`GitPushRef ` :param tree_id: :type tree_id: str """ diff --git a/vsts/vsts/git/v4_0/models/git_commit_changes.py b/vsts/vsts/git/v4_0/models/git_commit_changes.py index 1d18984a..ef3e3789 100644 --- a/vsts/vsts/git/v4_0/models/git_commit_changes.py +++ b/vsts/vsts/git/v4_0/models/git_commit_changes.py @@ -13,9 +13,9 @@ class GitCommitChanges(Model): """GitCommitChanges. :param change_counts: - :type change_counts: :class:`ChangeCountDictionary ` + :type change_counts: :class:`ChangeCountDictionary ` :param changes: - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_commit_diffs.py b/vsts/vsts/git/v4_0/models/git_commit_diffs.py index 6a7cd35a..5e1e57b8 100644 --- a/vsts/vsts/git/v4_0/models/git_commit_diffs.py +++ b/vsts/vsts/git/v4_0/models/git_commit_diffs.py @@ -23,7 +23,7 @@ class GitCommitDiffs(Model): :param change_counts: :type change_counts: dict :param changes: - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` :param common_commit: :type common_commit: str :param target_commit: diff --git a/vsts/vsts/git/v4_0/models/git_commit_ref.py b/vsts/vsts/git/v4_0/models/git_commit_ref.py index 7c3386ee..bbe06483 100644 --- a/vsts/vsts/git/v4_0/models/git_commit_ref.py +++ b/vsts/vsts/git/v4_0/models/git_commit_ref.py @@ -13,13 +13,13 @@ class GitCommitRef(Model): """GitCommitRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: - :type author: :class:`GitUserDate ` + :type author: :class:`GitUserDate ` :param change_counts: - :type change_counts: :class:`ChangeCountDictionary ` + :type change_counts: :class:`ChangeCountDictionary ` :param changes: - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` :param comment: :type comment: str :param comment_truncated: @@ -27,17 +27,17 @@ class GitCommitRef(Model): :param commit_id: :type commit_id: str :param committer: - :type committer: :class:`GitUserDate ` + :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 ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str :param work_items: - :type work_items: list of :class:`ResourceRef ` + :type work_items: list of :class:`ResourceRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_conflict.py b/vsts/vsts/git/v4_0/models/git_conflict.py index 029fdd5d..79766c04 100644 --- a/vsts/vsts/git/v4_0/models/git_conflict.py +++ b/vsts/vsts/git/v4_0/models/git_conflict.py @@ -13,7 +13,7 @@ class GitConflict(Model): """GitConflict. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param conflict_id: :type conflict_id: int :param conflict_path: @@ -21,19 +21,19 @@ class GitConflict(Model): :param conflict_type: :type conflict_type: object :param merge_base_commit: - :type merge_base_commit: :class:`GitCommitRef ` + :type merge_base_commit: :class:`GitCommitRef ` :param merge_origin: - :type merge_origin: :class:`GitMergeOriginRef ` + :type merge_origin: :class:`GitMergeOriginRef ` :param merge_source_commit: - :type merge_source_commit: :class:`GitCommitRef ` + :type merge_source_commit: :class:`GitCommitRef ` :param merge_target_commit: - :type merge_target_commit: :class:`GitCommitRef ` + :type merge_target_commit: :class:`GitCommitRef ` :param resolution_error: :type resolution_error: object :param resolution_status: :type resolution_status: object :param resolved_by: - :type resolved_by: :class:`IdentityRef ` + :type resolved_by: :class:`IdentityRef ` :param resolved_date: :type resolved_date: datetime :param url: diff --git a/vsts/vsts/git/v4_0/models/git_deleted_repository.py b/vsts/vsts/git/v4_0/models/git_deleted_repository.py index 81f6f8c8..a51bb682 100644 --- a/vsts/vsts/git/v4_0/models/git_deleted_repository.py +++ b/vsts/vsts/git/v4_0/models/git_deleted_repository.py @@ -15,7 +15,7 @@ class GitDeletedRepository(Model): :param created_date: :type created_date: datetime :param deleted_by: - :type deleted_by: :class:`IdentityRef ` + :type deleted_by: :class:`IdentityRef ` :param deleted_date: :type deleted_date: datetime :param id: @@ -23,7 +23,7 @@ class GitDeletedRepository(Model): :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_fork_ref.py b/vsts/vsts/git/v4_0/models/git_fork_ref.py index 0bea6437..ac966f79 100644 --- a/vsts/vsts/git/v4_0/models/git_fork_ref.py +++ b/vsts/vsts/git/v4_0/models/git_fork_ref.py @@ -13,11 +13,11 @@ class GitForkRef(GitRef): """GitForkRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param is_locked: :type is_locked: bool :param is_locked_by: - :type is_locked_by: :class:`IdentityRef ` + :type is_locked_by: :class:`IdentityRef ` :param name: :type name: str :param object_id: @@ -25,11 +25,11 @@ class GitForkRef(GitRef): :param peeled_object_id: :type peeled_object_id: str :param statuses: - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_fork_sync_request.py b/vsts/vsts/git/v4_0/models/git_fork_sync_request.py index b5303a07..82d11ed3 100644 --- a/vsts/vsts/git/v4_0/models/git_fork_sync_request.py +++ b/vsts/vsts/git/v4_0/models/git_fork_sync_request.py @@ -13,15 +13,15 @@ class GitForkSyncRequest(Model): """GitForkSyncRequest. :param _links: Collection of related links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitForkOperationStatusDetail ` + :type detailed_status: :class:`GitForkOperationStatusDetail ` :param operation_id: Unique identifier for the operation. :type operation_id: int :param source: Fully-qualified identifier for the source repository. - :type source: :class:`GlobalGitRepositoryKey ` + :type source: :class:`GlobalGitRepositoryKey ` :param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. - :type source_to_target_refs: list of :class:`SourceToTargetRef ` + :type source_to_target_refs: list of :class:`SourceToTargetRef ` :param status: :type status: object """ diff --git a/vsts/vsts/git/v4_0/models/git_fork_sync_request_parameters.py b/vsts/vsts/git/v4_0/models/git_fork_sync_request_parameters.py index 6ea0caba..25c51324 100644 --- a/vsts/vsts/git/v4_0/models/git_fork_sync_request_parameters.py +++ b/vsts/vsts/git/v4_0/models/git_fork_sync_request_parameters.py @@ -13,9 +13,9 @@ class GitForkSyncRequestParameters(Model): """GitForkSyncRequestParameters. :param source: Fully-qualified identifier for the source repository. - :type source: :class:`GlobalGitRepositoryKey ` + :type source: :class:`GlobalGitRepositoryKey ` :param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. - :type source_to_target_refs: list of :class:`SourceToTargetRef ` + :type source_to_target_refs: list of :class:`SourceToTargetRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_import_request.py b/vsts/vsts/git/v4_0/models/git_import_request.py index 2a9b8b21..b68fb658 100644 --- a/vsts/vsts/git/v4_0/models/git_import_request.py +++ b/vsts/vsts/git/v4_0/models/git_import_request.py @@ -13,15 +13,15 @@ class GitImportRequest(Model): """GitImportRequest. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitImportStatusDetail ` + :type detailed_status: :class:`GitImportStatusDetail ` :param import_request_id: :type import_request_id: int :param parameters: Parameters for creating an import request - :type parameters: :class:`GitImportRequestParameters ` + :type parameters: :class:`GitImportRequestParameters ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param status: :type status: object :param url: diff --git a/vsts/vsts/git/v4_0/models/git_import_request_parameters.py b/vsts/vsts/git/v4_0/models/git_import_request_parameters.py index f4150067..f03b5016 100644 --- a/vsts/vsts/git/v4_0/models/git_import_request_parameters.py +++ b/vsts/vsts/git/v4_0/models/git_import_request_parameters.py @@ -15,11 +15,11 @@ class GitImportRequestParameters(Model): :param delete_service_endpoint_after_import_is_done: Option to delete service endpoint when import is done :type delete_service_endpoint_after_import_is_done: bool :param git_source: Source for importing git repository - :type git_source: :class:`GitImportGitSource ` + :type git_source: :class:`GitImportGitSource ` :param service_endpoint_id: Service Endpoint for connection to external endpoint :type service_endpoint_id: str :param tfvc_source: Source for importing tfvc repository - :type tfvc_source: :class:`GitImportTfvcSource ` + :type tfvc_source: :class:`GitImportTfvcSource ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_item.py b/vsts/vsts/git/v4_0/models/git_item.py index ee99bac2..0af3c7a8 100644 --- a/vsts/vsts/git/v4_0/models/git_item.py +++ b/vsts/vsts/git/v4_0/models/git_item.py @@ -13,9 +13,9 @@ class GitItem(ItemModel): """GitItem. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: @@ -29,7 +29,7 @@ class GitItem(ItemModel): :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 ` + :type latest_processed_change: :class:`GitCommitRef ` :param object_id: Git object id :type object_id: str :param original_object_id: Git object id diff --git a/vsts/vsts/git/v4_0/models/git_item_request_data.py b/vsts/vsts/git/v4_0/models/git_item_request_data.py index dcf51f48..4e2f4341 100644 --- a/vsts/vsts/git/v4_0/models/git_item_request_data.py +++ b/vsts/vsts/git/v4_0/models/git_item_request_data.py @@ -17,7 +17,7 @@ class GitItemRequestData(Model): :param include_links: Whether to include the _links field on the shallow references :type include_links: bool :param item_descriptors: Collection of items to fetch, including path, version, and recursion level - :type item_descriptors: list of :class:`GitItemDescriptor ` + :type item_descriptors: list of :class:`GitItemDescriptor ` :param latest_processed_change: Whether to include shallow ref to commit that last changed each item :type latest_processed_change: bool """ diff --git a/vsts/vsts/git/v4_0/models/git_pull_request.py b/vsts/vsts/git/v4_0/models/git_pull_request.py index 3dbc2b9c..baafdfe2 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request.py @@ -13,39 +13,39 @@ class GitPullRequest(Model): """GitPullRequest. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifact_id: :type artifact_id: str :param auto_complete_set_by: - :type auto_complete_set_by: :class:`IdentityRef ` + :type auto_complete_set_by: :class:`IdentityRef ` :param closed_by: - :type closed_by: :class:`IdentityRef ` + :type closed_by: :class:`IdentityRef ` :param closed_date: :type closed_date: datetime :param code_review_id: :type code_review_id: int :param commits: - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param completion_options: - :type completion_options: :class:`GitPullRequestCompletionOptions ` + :type completion_options: :class:`GitPullRequestCompletionOptions ` :param completion_queue_time: :type completion_queue_time: datetime :param created_by: - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param creation_date: :type creation_date: datetime :param description: :type description: str :param fork_source: - :type fork_source: :class:`GitForkRef ` + :type fork_source: :class:`GitForkRef ` :param labels: - :type labels: list of :class:`WebApiTagDefinition ` + :type labels: list of :class:`WebApiTagDefinition ` :param last_merge_commit: - :type last_merge_commit: :class:`GitCommitRef ` + :type last_merge_commit: :class:`GitCommitRef ` :param last_merge_source_commit: - :type last_merge_source_commit: :class:`GitCommitRef ` + :type last_merge_source_commit: :class:`GitCommitRef ` :param last_merge_target_commit: - :type last_merge_target_commit: :class:`GitCommitRef ` + :type last_merge_target_commit: :class:`GitCommitRef ` :param merge_failure_message: :type merge_failure_message: str :param merge_failure_type: @@ -53,7 +53,7 @@ class GitPullRequest(Model): :param merge_id: :type merge_id: str :param merge_options: - :type merge_options: :class:`GitPullRequestMergeOptions ` + :type merge_options: :class:`GitPullRequestMergeOptions ` :param merge_status: :type merge_status: object :param pull_request_id: @@ -61,9 +61,9 @@ class GitPullRequest(Model): :param remote_url: :type remote_url: str :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param reviewers: - :type reviewers: list of :class:`IdentityRefWithVote ` + :type reviewers: list of :class:`IdentityRefWithVote ` :param source_ref_name: :type source_ref_name: str :param status: @@ -77,7 +77,7 @@ class GitPullRequest(Model): :param url: :type url: str :param work_item_refs: - :type work_item_refs: list of :class:`ResourceRef ` + :type work_item_refs: list of :class:`ResourceRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_pull_request_change.py b/vsts/vsts/git/v4_0/models/git_pull_request_change.py index aa45eadb..65b85a40 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request_change.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request_change.py @@ -15,7 +15,7 @@ class GitPullRequestChange(GitChange): :param change_id: Id of the change within the group. For example, within the iteration :type change_id: int :param new_content_template: New Content template to be used - :type new_content_template: :class:`GitTemplate ` + :type new_content_template: :class:`GitTemplate ` :param original_path: Original path of item if different from current path :type original_path: str :param change_tracking_id: Id used to track files through multiple changes diff --git a/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread.py b/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread.py index 1a93a128..b6cc3580 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread.py @@ -13,9 +13,9 @@ class GitPullRequestCommentThread(CommentThread): """GitPullRequestCommentThread. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: A list of the comments. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param id: The comment thread id. :type id: int :param is_deleted: Specify if the thread is deleted which happens when all comments are deleted @@ -23,15 +23,15 @@ class GitPullRequestCommentThread(CommentThread): :param last_updated_date: The time this thread was last updated. :type last_updated_date: datetime :param properties: A list of (optional) thread properties. - :type properties: :class:`object ` + :type properties: :class:`object ` :param published_date: The time this thread was published. :type published_date: datetime :param status: The status of the comment thread. :type status: object :param thread_context: Specify thread context such as position in left/right file. - :type thread_context: :class:`CommentThreadContext ` + :type thread_context: :class:`CommentThreadContext ` :param pull_request_thread_context: Extended context information unique to pull requests - :type pull_request_thread_context: :class:`GitPullRequestCommentThreadContext ` + :type pull_request_thread_context: :class:`GitPullRequestCommentThreadContext ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread_context.py b/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread_context.py index 13abb438..62f9c749 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread_context.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request_comment_thread_context.py @@ -15,9 +15,9 @@ class GitPullRequestCommentThreadContext(Model): :param change_tracking_id: Used to track a comment across iterations. This value can be found by looking at the iteration's changes list. Must be set for pull requests with iteration support. Otherwise, it's not required for 'legacy' pull requests. :type change_tracking_id: int :param iteration_context: Specify comparing iteration Ids when a comment thread is added while comparing 2 iterations. - :type iteration_context: :class:`CommentIterationContext ` + :type iteration_context: :class:`CommentIterationContext ` :param tracking_criteria: The criteria used to track this thread. If this property is filled out when the thread is returned, then the thread has been tracked from its original location using the given criteria. - :type tracking_criteria: :class:`CommentTrackingCriteria ` + :type tracking_criteria: :class:`CommentTrackingCriteria ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_pull_request_iteration.py b/vsts/vsts/git/v4_0/models/git_pull_request_iteration.py index 68e58128..91c67038 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request_iteration.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request_iteration.py @@ -13,15 +13,15 @@ class GitPullRequestIteration(Model): """GitPullRequestIteration. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param change_list: - :type change_list: list of :class:`GitPullRequestChange ` + :type change_list: list of :class:`GitPullRequestChange ` :param commits: - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param common_ref_commit: - :type common_ref_commit: :class:`GitCommitRef ` + :type common_ref_commit: :class:`GitCommitRef ` :param created_date: :type created_date: datetime :param description: @@ -31,13 +31,13 @@ class GitPullRequestIteration(Model): :param id: :type id: int :param push: - :type push: :class:`GitPushRef ` + :type push: :class:`GitPushRef ` :param reason: :type reason: object :param source_ref_commit: - :type source_ref_commit: :class:`GitCommitRef ` + :type source_ref_commit: :class:`GitCommitRef ` :param target_ref_commit: - :type target_ref_commit: :class:`GitCommitRef ` + :type target_ref_commit: :class:`GitCommitRef ` :param updated_date: :type updated_date: datetime """ diff --git a/vsts/vsts/git/v4_0/models/git_pull_request_iteration_changes.py b/vsts/vsts/git/v4_0/models/git_pull_request_iteration_changes.py index cc61ef84..f815be81 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request_iteration_changes.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request_iteration_changes.py @@ -13,7 +13,7 @@ class GitPullRequestIterationChanges(Model): """GitPullRequestIterationChanges. :param change_entries: - :type change_entries: list of :class:`GitPullRequestChange ` + :type change_entries: list of :class:`GitPullRequestChange ` :param next_skip: :type next_skip: int :param next_top: diff --git a/vsts/vsts/git/v4_0/models/git_pull_request_query.py b/vsts/vsts/git/v4_0/models/git_pull_request_query.py index ba9935fa..8210f2dd 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request_query.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request_query.py @@ -13,7 +13,7 @@ class GitPullRequestQuery(Model): """GitPullRequestQuery. :param queries: The query to perform - :type queries: list of :class:`GitPullRequestQueryInput ` + :type queries: list of :class:`GitPullRequestQueryInput ` :param results: The results of the query :type results: list of {[GitPullRequest]} """ diff --git a/vsts/vsts/git/v4_0/models/git_pull_request_status.py b/vsts/vsts/git/v4_0/models/git_pull_request_status.py index 18346eaf..72b44879 100644 --- a/vsts/vsts/git/v4_0/models/git_pull_request_status.py +++ b/vsts/vsts/git/v4_0/models/git_pull_request_status.py @@ -13,11 +13,11 @@ class GitPullRequestStatus(GitStatus): """GitPullRequestStatus. :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param context: Context of the status. - :type context: :class:`GitStatusContext ` + :type context: :class:`GitStatusContext ` :param created_by: Identity that created the status. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`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. diff --git a/vsts/vsts/git/v4_0/models/git_push.py b/vsts/vsts/git/v4_0/models/git_push.py index 6fd2b575..5eba60c9 100644 --- a/vsts/vsts/git/v4_0/models/git_push.py +++ b/vsts/vsts/git/v4_0/models/git_push.py @@ -13,23 +13,23 @@ class GitPush(GitPushRef): """GitPush. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param date: :type date: datetime :param push_correlation_id: :type push_correlation_id: str :param pushed_by: - :type pushed_by: :class:`IdentityRef ` + :type pushed_by: :class:`IdentityRef ` :param push_id: :type push_id: int :param url: :type url: str :param commits: - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param ref_updates: - :type ref_updates: list of :class:`GitRefUpdate ` + :type ref_updates: list of :class:`GitRefUpdate ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_push_ref.py b/vsts/vsts/git/v4_0/models/git_push_ref.py index 42ee50c7..39019790 100644 --- a/vsts/vsts/git/v4_0/models/git_push_ref.py +++ b/vsts/vsts/git/v4_0/models/git_push_ref.py @@ -13,13 +13,13 @@ class GitPushRef(Model): """GitPushRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param date: :type date: datetime :param push_correlation_id: :type push_correlation_id: str :param pushed_by: - :type pushed_by: :class:`IdentityRef ` + :type pushed_by: :class:`IdentityRef ` :param push_id: :type push_id: int :param url: diff --git a/vsts/vsts/git/v4_0/models/git_query_branch_stats_criteria.py b/vsts/vsts/git/v4_0/models/git_query_branch_stats_criteria.py index c1c5f21f..eabfdfdd 100644 --- a/vsts/vsts/git/v4_0/models/git_query_branch_stats_criteria.py +++ b/vsts/vsts/git/v4_0/models/git_query_branch_stats_criteria.py @@ -13,9 +13,9 @@ class GitQueryBranchStatsCriteria(Model): """GitQueryBranchStatsCriteria. :param base_commit: - :type base_commit: :class:`GitVersionDescriptor ` + :type base_commit: :class:`GitVersionDescriptor ` :param target_commits: - :type target_commits: list of :class:`GitVersionDescriptor ` + :type target_commits: list of :class:`GitVersionDescriptor ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_query_commits_criteria.py b/vsts/vsts/git/v4_0/models/git_query_commits_criteria.py index f4253427..7f3a5a17 100644 --- a/vsts/vsts/git/v4_0/models/git_query_commits_criteria.py +++ b/vsts/vsts/git/v4_0/models/git_query_commits_criteria.py @@ -19,7 +19,7 @@ class GitQueryCommitsCriteria(Model): :param author: Alias or display name of the author :type author: str :param compare_version: If provided, the earliest commit in the graph to search - :type compare_version: :class:`GitVersionDescriptor ` + :type compare_version: :class:`GitVersionDescriptor ` :param exclude_deletes: If true, don't include delete history entries :type exclude_deletes: bool :param from_commit_id: If provided, a lower bound for filtering commits alphabetically @@ -37,7 +37,7 @@ class GitQueryCommitsCriteria(Model): :param item_path: Path of item to search under :type item_path: str :param item_version: If provided, identifies the commit or branch to search - :type item_version: :class:`GitVersionDescriptor ` + :type item_version: :class:`GitVersionDescriptor ` :param to_commit_id: If provided, an upper bound for filtering commits alphabetically :type to_commit_id: str :param to_date: If provided, only include history entries created before this date (string) diff --git a/vsts/vsts/git/v4_0/models/git_ref.py b/vsts/vsts/git/v4_0/models/git_ref.py index 817ece8f..2d4b53d6 100644 --- a/vsts/vsts/git/v4_0/models/git_ref.py +++ b/vsts/vsts/git/v4_0/models/git_ref.py @@ -13,11 +13,11 @@ class GitRef(Model): """GitRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param is_locked: :type is_locked: bool :param is_locked_by: - :type is_locked_by: :class:`IdentityRef ` + :type is_locked_by: :class:`IdentityRef ` :param name: :type name: str :param object_id: @@ -25,7 +25,7 @@ class GitRef(Model): :param peeled_object_id: :type peeled_object_id: str :param statuses: - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str """ diff --git a/vsts/vsts/git/v4_0/models/git_ref_favorite.py b/vsts/vsts/git/v4_0/models/git_ref_favorite.py index 2144ebc1..d1f2d359 100644 --- a/vsts/vsts/git/v4_0/models/git_ref_favorite.py +++ b/vsts/vsts/git/v4_0/models/git_ref_favorite.py @@ -13,7 +13,7 @@ class GitRefFavorite(Model): """GitRefFavorite. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: :type id: int :param identity_id: diff --git a/vsts/vsts/git/v4_0/models/git_repository.py b/vsts/vsts/git/v4_0/models/git_repository.py index bf4f1193..ba0da3b5 100644 --- a/vsts/vsts/git/v4_0/models/git_repository.py +++ b/vsts/vsts/git/v4_0/models/git_repository.py @@ -13,15 +13,15 @@ class GitRepository(Model): """GitRepository. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by_forking: True if the repository was created as a fork :type created_by_forking: bool :param default_branch: :type default_branch: str :param fork_options: If set, options for creating this repo as a fork of another one. If unset, this repo is unrelated to any existing forks. - :type fork_options: :class:`GitForkSyncRequestParameters ` + :type fork_options: :class:`GitForkSyncRequestParameters ` :param fork_parent: Only set when querying repositories. If set, the "parent" fork of this repository. - :type fork_parent: :class:`GlobalGitRepositoryKey ` + :type fork_parent: :class:`GlobalGitRepositoryKey ` :param id: :type id: str :param is_fork: True if the repository was created as a fork @@ -29,9 +29,9 @@ class GitRepository(Model): :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param url: diff --git a/vsts/vsts/git/v4_0/models/git_repository_create_options.py b/vsts/vsts/git/v4_0/models/git_repository_create_options.py index 2593bd19..d27f3971 100644 --- a/vsts/vsts/git/v4_0/models/git_repository_create_options.py +++ b/vsts/vsts/git/v4_0/models/git_repository_create_options.py @@ -13,13 +13,13 @@ class GitRepositoryCreateOptions(Model): """GitRepositoryCreateOptions. :param fork_options: If set, options for creating this repo as a fork of another one. If unset, this repo is unrelated to any existing forks. - :type fork_options: :class:`GitForkSyncRequestParameters ` + :type fork_options: :class:`GitForkSyncRequestParameters ` :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_repository_ref.py b/vsts/vsts/git/v4_0/models/git_repository_ref.py index 4ed1ee30..9eb0911b 100644 --- a/vsts/vsts/git/v4_0/models/git_repository_ref.py +++ b/vsts/vsts/git/v4_0/models/git_repository_ref.py @@ -13,13 +13,13 @@ class GitRepositoryRef(Model): """GitRepositoryRef. :param collection: Team Project Collection where this Fork resides - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param id: :type id: str :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param url: diff --git a/vsts/vsts/git/v4_0/models/git_revert.py b/vsts/vsts/git/v4_0/models/git_revert.py index c6d631e1..8d3c0cc6 100644 --- a/vsts/vsts/git/v4_0/models/git_revert.py +++ b/vsts/vsts/git/v4_0/models/git_revert.py @@ -13,11 +13,11 @@ class GitRevert(GitAsyncRefOperation): """GitRevert. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: diff --git a/vsts/vsts/git/v4_0/models/git_status.py b/vsts/vsts/git/v4_0/models/git_status.py index 8e368532..0d283da7 100644 --- a/vsts/vsts/git/v4_0/models/git_status.py +++ b/vsts/vsts/git/v4_0/models/git_status.py @@ -13,11 +13,11 @@ class GitStatus(Model): """GitStatus. :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param context: Context of the status. - :type context: :class:`GitStatusContext ` + :type context: :class:`GitStatusContext ` :param created_by: Identity that created the status. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`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. diff --git a/vsts/vsts/git/v4_0/models/git_tree_diff.py b/vsts/vsts/git/v4_0/models/git_tree_diff.py index d39121fd..ece6ac5b 100644 --- a/vsts/vsts/git/v4_0/models/git_tree_diff.py +++ b/vsts/vsts/git/v4_0/models/git_tree_diff.py @@ -15,7 +15,7 @@ class GitTreeDiff(Model): :param base_tree_id: ObjectId of the base tree of this diff. :type base_tree_id: str :param diff_entries: List of tree entries that differ between the base and target tree. Renames and object type changes are returned as a delete for the old object and add for the new object. If a continuation token is returned in the response header, some tree entries are yet to be processed and may yeild more diff entries. If the continuation token is not returned all the diff entries have been included in this response. - :type diff_entries: list of :class:`GitTreeDiffEntry ` + :type diff_entries: list of :class:`GitTreeDiffEntry ` :param target_tree_id: ObjectId of the target tree of this diff. :type target_tree_id: str :param url: REST Url to this resource. diff --git a/vsts/vsts/git/v4_0/models/git_tree_diff_response.py b/vsts/vsts/git/v4_0/models/git_tree_diff_response.py index de4caf69..e8cd9a18 100644 --- a/vsts/vsts/git/v4_0/models/git_tree_diff_response.py +++ b/vsts/vsts/git/v4_0/models/git_tree_diff_response.py @@ -15,7 +15,7 @@ class GitTreeDiffResponse(Model): :param continuation_token: The HTTP client methods find the continuation token header in the response and populate this field. :type continuation_token: list of str :param tree_diff: - :type tree_diff: :class:`GitTreeDiff ` + :type tree_diff: :class:`GitTreeDiff ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/git_tree_ref.py b/vsts/vsts/git/v4_0/models/git_tree_ref.py index a9f1adba..b6d0612c 100644 --- a/vsts/vsts/git/v4_0/models/git_tree_ref.py +++ b/vsts/vsts/git/v4_0/models/git_tree_ref.py @@ -13,13 +13,13 @@ class GitTreeRef(Model): """GitTreeRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param object_id: SHA1 hash of git object :type object_id: str :param size: Sum of sizes of all children :type size: long :param tree_entries: Blobs and trees under this tree - :type tree_entries: list of :class:`GitTreeEntryRef ` + :type tree_entries: list of :class:`GitTreeEntryRef ` :param url: Url to tree :type url: str """ diff --git a/vsts/vsts/git/v4_0/models/identity_ref_with_vote.py b/vsts/vsts/git/v4_0/models/identity_ref_with_vote.py index a67cf1da..e990e4cc 100644 --- a/vsts/vsts/git/v4_0/models/identity_ref_with_vote.py +++ b/vsts/vsts/git/v4_0/models/identity_ref_with_vote.py @@ -39,7 +39,7 @@ class IdentityRefWithVote(IdentityRef): :param vote: :type vote: int :param voted_for: - :type voted_for: list of :class:`IdentityRefWithVote ` + :type voted_for: list of :class:`IdentityRefWithVote ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/import_repository_validation.py b/vsts/vsts/git/v4_0/models/import_repository_validation.py index 41fa7be7..82d46ab6 100644 --- a/vsts/vsts/git/v4_0/models/import_repository_validation.py +++ b/vsts/vsts/git/v4_0/models/import_repository_validation.py @@ -13,11 +13,11 @@ class ImportRepositoryValidation(Model): """ImportRepositoryValidation. :param git_source: - :type git_source: :class:`GitImportGitSource ` + :type git_source: :class:`GitImportGitSource ` :param password: :type password: str :param tfvc_source: - :type tfvc_source: :class:`GitImportTfvcSource ` + :type tfvc_source: :class:`GitImportTfvcSource ` :param username: :type username: str """ diff --git a/vsts/vsts/git/v4_0/models/item_model.py b/vsts/vsts/git/v4_0/models/item_model.py index 819a9b77..447b8b3d 100644 --- a/vsts/vsts/git/v4_0/models/item_model.py +++ b/vsts/vsts/git/v4_0/models/item_model.py @@ -13,9 +13,9 @@ class ItemModel(Model): """ItemModel. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: diff --git a/vsts/vsts/git/v4_0/models/share_notification_context.py b/vsts/vsts/git/v4_0/models/share_notification_context.py index 8eec2662..d71ee9e9 100644 --- a/vsts/vsts/git/v4_0/models/share_notification_context.py +++ b/vsts/vsts/git/v4_0/models/share_notification_context.py @@ -15,7 +15,7 @@ class ShareNotificationContext(Model): :param message: Optional user note or message. :type message: str :param receivers: Identities of users who will receive a share notification. - :type receivers: list of :class:`IdentityRef ` + :type receivers: list of :class:`IdentityRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_0/models/vsts_info.py b/vsts/vsts/git/v4_0/models/vsts_info.py index 9d4606d2..d0a8d627 100644 --- a/vsts/vsts/git/v4_0/models/vsts_info.py +++ b/vsts/vsts/git/v4_0/models/vsts_info.py @@ -13,9 +13,9 @@ class VstsInfo(Model): """VstsInfo. :param collection: - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param server_url: :type server_url: str """ diff --git a/vsts/vsts/git/v4_1/git_client_base.py b/vsts/vsts/git/v4_1/git_client_base.py index 105c414f..4c48b172 100644 --- a/vsts/vsts/git/v4_1/git_client_base.py +++ b/vsts/vsts/git/v4_1/git_client_base.py @@ -28,15 +28,16 @@ def __init__(self, base_url=None, creds=None): def create_annotated_tag(self, tag_object, project, repository_id): """CreateAnnotatedTag. [Preview API] Create an annotated tag. - :param :class:` ` tag_object: Object containing details of tag to be created. + :param :class:` ` tag_object: Object containing details of tag to be created. :param str project: Project ID or project name :param str repository_id: ID or name of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(tag_object, 'GitAnnotatedTag') response = self._send(http_method='POST', location_id='5e8a8081-3851-4626-b677-9891cc04102e', @@ -51,13 +52,15 @@ def get_annotated_tag(self, project, repository_id, object_id): :param str project: Project ID or project name :param str repository_id: ID or name of the repository. :param str object_id: ObjectId (Sha1Id) of tag to get. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'objectId': self._serialize.url('object_id', object_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if object_id is not None: + route_values['objectId'] = self._serialize.url('object_id', object_id, 'str') response = self._send(http_method='GET', location_id='5e8a8081-3851-4626-b677-9891cc04102e', version='4.1-preview.1', @@ -72,13 +75,15 @@ def get_blob(self, repository_id, sha1, project=None, download=None, file_name=N :param str project: Project ID or project name :param bool download: If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip :param str file_name: Provide a fileName to use for a download. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if download is not None: query_parameters['download'] = self._serialize.query('download', download, 'bool') @@ -101,11 +106,13 @@ def get_blob_content(self, repository_id, sha1, project=None, download=None, fil :param str file_name: Provide a fileName to use for a download. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if download is not None: query_parameters['download'] = self._serialize.query('download', download, 'bool') @@ -127,10 +134,11 @@ def get_blobs_zip(self, blob_ids, repository_id, project=None, filename=None): :param str filename: :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if filename is not None: query_parameters['filename'] = self._serialize.query('filename', filename, 'str') @@ -153,11 +161,13 @@ def get_blob_zip(self, repository_id, sha1, project=None, download=None, file_na :param str file_name: Provide a fileName to use for a download. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if download is not None: query_parameters['download'] = self._serialize.query('download', download, 'bool') @@ -176,13 +186,14 @@ def get_branch(self, repository_id, name, project=None, base_version_descriptor= :param str repository_id: The name or ID of the repository. :param str name: Name of the branch. :param str project: Project ID or project name - :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. - :rtype: :class:` ` + :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if name is not None: query_parameters['name'] = self._serialize.query('name', name, 'str') @@ -205,13 +216,14 @@ def get_branches(self, repository_id, project=None, base_version_descriptor=None [Preview API] Retrieve statistics about all branches within a repository. :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name - :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. + :param :class:` ` base_version_descriptor: Identifies the commit or branch to use as the base. :rtype: [GitBranchStats] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if base_version_descriptor is not None: if base_version_descriptor.version_type is not None: @@ -236,13 +248,15 @@ def get_changes(self, commit_id, repository_id, project=None, top=None, skip=Non :param str project: Project ID or project name :param int top: The maximum number of changes to return. :param int skip: The number of changes to skip. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if top is not None: query_parameters['top'] = self._serialize.query('top', top, 'int') @@ -258,15 +272,16 @@ def get_changes(self, commit_id, repository_id, project=None, top=None, skip=Non def create_cherry_pick(self, cherry_pick_to_create, project, repository_id): """CreateCherryPick. [Preview API] Cherry pick a specific commit or commits that are associated to a pull request into a new branch. - :param :class:` ` cherry_pick_to_create: + :param :class:` ` cherry_pick_to_create: :param str project: Project ID or project name :param str repository_id: ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(cherry_pick_to_create, 'GitAsyncRefOperationParameters') response = self._send(http_method='POST', location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', @@ -281,13 +296,15 @@ def get_cherry_pick(self, project, cherry_pick_id, repository_id): :param str project: Project ID or project name :param int cherry_pick_id: ID of the cherry pick. :param str repository_id: ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'cherryPickId': self._serialize.url('cherry_pick_id', cherry_pick_id, 'int'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if cherry_pick_id is not None: + route_values['cherryPickId'] = self._serialize.url('cherry_pick_id', cherry_pick_id, 'int') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='033bad68-9a14-43d1-90e0-59cb8856fef6', version='4.1-preview.1', @@ -300,12 +317,13 @@ def get_cherry_pick_for_ref_name(self, project, repository_id, ref_name): :param str project: Project ID or project name :param str repository_id: ID of the repository. :param str ref_name: The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if ref_name is not None: query_parameters['refName'] = self._serialize.query('ref_name', ref_name, 'str') @@ -324,14 +342,15 @@ def get_commit_diffs(self, repository_id, project=None, diff_common_commit=None, :param bool diff_common_commit: :param int top: Maximum number of changes to return. Defaults to 100. :param int skip: Number of changes to skip - :param :class:` ` base_version_descriptor: Base item version. Compared against target item version to find changes in between. - :param :class:` ` target_version_descriptor: Target item version to use for finding the diffs. Compared against base item version to find changes in between. - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + :param :class:` ` base_version_descriptor: Base item version. Compared against target item version to find changes in between. + :param :class:` ` target_version_descriptor: Target item version to use for finding the diffs. Compared against base item version to find changes in between. + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if diff_common_commit is not None: query_parameters['diffCommonCommit'] = self._serialize.query('diff_common_commit', diff_common_commit, 'bool') @@ -367,13 +386,15 @@ def get_commit(self, commit_id, repository_id, project=None, change_count=None): :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. :param str project: Project ID or project name :param int change_count: The number of changes to include in the result. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if change_count is not None: query_parameters['changeCount'] = self._serialize.query('change_count', change_count, 'int') @@ -388,16 +409,17 @@ def get_commits(self, repository_id, search_criteria, project=None, skip=None, t """GetCommits. [Preview API] Retrieve git commits for a project :param str repository_id: The id or friendly name of the repository. To use the friendly name, projectId must also be specified. - :param :class:` ` search_criteria: + :param :class:` ` search_criteria: :param str project: Project ID or project name :param int skip: :param int top: :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if search_criteria is not None: if search_criteria.ids is not None: @@ -465,10 +487,11 @@ def get_push_commits(self, repository_id, push_id, project=None, top=None, skip= :param bool include_links: :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if push_id is not None: query_parameters['pushId'] = self._serialize.query('push_id', push_id, 'int') @@ -489,7 +512,7 @@ def get_push_commits(self, repository_id, push_id, project=None, top=None, skip= def get_commits_batch(self, search_criteria, repository_id, project=None, skip=None, top=None, include_statuses=None): """GetCommitsBatch. [Preview API] Retrieve git commits for a project matching the search criteria - :param :class:` ` search_criteria: Search options + :param :class:` ` search_criteria: Search options :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name :param int skip: Number of commits to skip. @@ -497,10 +520,11 @@ def get_commits_batch(self, search_criteria, repository_id, project=None, skip=N :param bool include_statuses: True to include additional commit status information. :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') @@ -524,9 +548,9 @@ def get_deleted_repositories(self, project): :param str project: Project ID or project name :rtype: [GitDeletedRepository] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='2b6869c4-cb25-42b5-b7a3-0d3e6be0a11a', version='4.1-preview.1', @@ -543,11 +567,13 @@ def get_forks(self, repository_name_or_id, collection_id, project=None, include_ :param bool include_links: True to include links. :rtype: [GitRepositoryRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str'), - 'collectionId': self._serialize.url('collection_id', collection_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') + if collection_id is not None: + route_values['collectionId'] = self._serialize.url('collection_id', collection_id, 'str') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -562,16 +588,17 @@ def get_forks(self, repository_name_or_id, collection_id, project=None, include_ def create_fork_sync_request(self, sync_params, repository_name_or_id, project=None, include_links=None): """CreateForkSyncRequest. [Preview API] Request that another repository's refs be fetched into this one. - :param :class:` ` sync_params: Source repository and ref mapping. + :param :class:` ` sync_params: Source repository and ref mapping. :param str repository_name_or_id: The name or ID of the repository. :param str project: Project ID or project name :param bool include_links: True to include links - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -591,13 +618,15 @@ def get_fork_sync_request(self, repository_name_or_id, fork_sync_operation_id, p :param int fork_sync_operation_id: OperationId of the sync request. :param str project: Project ID or project name :param bool include_links: True to include links. - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str'), - 'forkSyncOperationId': self._serialize.url('fork_sync_operation_id', fork_sync_operation_id, 'int') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') + if fork_sync_operation_id is not None: + route_values['forkSyncOperationId'] = self._serialize.url('fork_sync_operation_id', fork_sync_operation_id, 'int') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -617,10 +646,11 @@ def get_fork_sync_requests(self, repository_name_or_id, project=None, include_ab :param bool include_links: True to include links. :rtype: [GitForkSyncRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') query_parameters = {} if include_abandoned is not None: query_parameters['includeAbandoned'] = self._serialize.query('include_abandoned', include_abandoned, 'bool') @@ -637,15 +667,16 @@ def get_fork_sync_requests(self, repository_name_or_id, project=None, include_ab def create_import_request(self, import_request, project, repository_id): """CreateImportRequest. [Preview API] Create an import request. - :param :class:` ` import_request: The import request to create. + :param :class:` ` import_request: The import request to create. :param str project: Project ID or project name :param str repository_id: The name or ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(import_request, 'GitImportRequest') response = self._send(http_method='POST', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', @@ -660,13 +691,15 @@ def get_import_request(self, project, repository_id, import_request_id): :param str project: Project ID or project name :param str repository_id: The name or ID of the repository. :param int import_request_id: The unique identifier for the import request. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'importRequestId': self._serialize.url('import_request_id', import_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if import_request_id is not None: + route_values['importRequestId'] = self._serialize.url('import_request_id', import_request_id, 'int') response = self._send(http_method='GET', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', version='4.1-preview.1', @@ -681,10 +714,11 @@ def query_import_requests(self, project, repository_id, include_abandoned=None): :param bool include_abandoned: True to include abandoned import requests in the results. :rtype: [GitImportRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if include_abandoned is not None: query_parameters['includeAbandoned'] = self._serialize.query('include_abandoned', include_abandoned, 'bool') @@ -699,17 +733,19 @@ def query_import_requests(self, project, repository_id, include_abandoned=None): def update_import_request(self, import_request_to_update, project, repository_id, import_request_id): """UpdateImportRequest. [Preview API] Retry or abandon a failed import request. - :param :class:` ` import_request_to_update: The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. + :param :class:` ` import_request_to_update: The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. :param str project: Project ID or project name :param str repository_id: The name or ID of the repository. :param int import_request_id: The unique identifier for the import request to update. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'importRequestId': self._serialize.url('import_request_id', import_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if import_request_id is not None: + route_values['importRequestId'] = self._serialize.url('import_request_id', import_request_id, 'int') content = self._serialize.body(import_request_to_update, 'GitImportRequest') response = self._send(http_method='PATCH', location_id='01828ddc-3600-4a41-8633-99b3a73a0eb3', @@ -720,7 +756,7 @@ def update_import_request(self, import_request_to_update, project, repository_id def get_item(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): """GetItem. - [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -729,13 +765,14 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is null. - :rtype: :class:` ` + :param :class:` ` version_descriptor: Version descriptor. Default is null. + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -765,7 +802,7 @@ def get_item(self, repository_id, path, project=None, scope_path=None, recursion def get_item_content(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): """GetItemContent. - [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -774,13 +811,14 @@ def get_item_content(self, repository_id, path, project=None, scope_path=None, r :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -819,13 +857,14 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. :param bool include_links: Set to true to include links to items. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :rtype: [GitItem] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if scope_path is not None: query_parameters['scopePath'] = self._serialize.query('scope_path', scope_path, 'str') @@ -856,7 +895,7 @@ def get_items(self, repository_id, project=None, scope_path=None, recursion_leve def get_item_text(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): """GetItemText. - [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -865,13 +904,14 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -901,7 +941,7 @@ def get_item_text(self, repository_id, path, project=None, scope_path=None, recu def get_item_zip(self, repository_id, path, project=None, scope_path=None, recursion_level=None, include_content_metadata=None, latest_processed_change=None, download=None, version_descriptor=None): """GetItemZip. - [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + [Preview API] Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. :param str repository_id: The Id of the repository. :param str path: The item path. :param str project: Project ID or project name @@ -910,13 +950,14 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur :param bool include_content_metadata: Set to true to include content metadata. Default is false. :param bool latest_processed_change: Set to true to include the lastest changes. Default is false. :param bool download: Set to true to download the response as a file. Default is false. - :param :class:` ` version_descriptor: Version descriptor. Default is null. + :param :class:` ` version_descriptor: Version descriptor. Default is null. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if path is not None: query_parameters['path'] = self._serialize.query('path', path, 'str') @@ -947,15 +988,16 @@ def get_item_zip(self, repository_id, path, project=None, scope_path=None, recur def get_items_batch(self, request_data, repository_id, project=None): """GetItemsBatch. [Preview API] Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path - :param :class:` ` request_data: Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. + :param :class:` ` request_data: Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. :param str repository_id: The name or ID of the repository :param str project: Project ID or project name :rtype: [[GitItem]] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(request_data, 'GitItemRequestData') response = self._send(http_method='POST', location_id='630fd2e4-fb88-4f85-ad21-13f3fd1fbca9', @@ -976,11 +1018,13 @@ def get_merge_bases(self, repository_name_or_id, commit_id, other_commit_id, pro :param str other_repository_id: The repository ID where otherCommitId lives. :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryNameOrId': self._serialize.url('repository_name_or_id', repository_name_or_id, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_name_or_id is not None: + route_values['repositoryNameOrId'] = self._serialize.url('repository_name_or_id', repository_name_or_id, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') query_parameters = {} if other_commit_id is not None: query_parameters['otherCommitId'] = self._serialize.query('other_commit_id', other_commit_id, 'str') @@ -1004,14 +1048,17 @@ def create_attachment(self, upload_stream, file_name, repository_id, pull_reques :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(upload_stream, 'object') response = self._send(http_method='POST', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', @@ -1029,12 +1076,15 @@ def delete_attachment(self, file_name, repository_id, pull_request_id, project=N :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') self._send(http_method='DELETE', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.1-preview.1', @@ -1049,12 +1099,15 @@ def get_attachment_content(self, file_name, repository_id, pull_request_id, proj :param str project: Project ID or project name :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.1-preview.1', @@ -1069,11 +1122,13 @@ def get_attachments(self, repository_id, pull_request_id, project=None): :param str project: Project ID or project name :rtype: [Attachment] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.1-preview.1', @@ -1090,12 +1145,15 @@ def get_attachment_zip(self, file_name, repository_id, pull_request_id, project= :param str project: Project ID or project name :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fileName': self._serialize.url('file_name', file_name, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if file_name is not None: + route_values['fileName'] = self._serialize.url('file_name', file_name, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='965d9361-878b-413b-a494-45d5b5fd8ab7', version='4.1-preview.1', @@ -1111,13 +1169,17 @@ def create_like(self, repository_id, pull_request_id, thread_id, comment_id, pro :param int comment_id: The ID of the comment. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='POST', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', version='4.1-preview.1', @@ -1132,13 +1194,17 @@ def delete_like(self, repository_id, pull_request_id, thread_id, comment_id, pro :param int comment_id: The ID of the comment. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='DELETE', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', version='4.1-preview.1', @@ -1154,13 +1220,17 @@ def get_likes(self, repository_id, pull_request_id, thread_id, comment_id, proje :param str project: Project ID or project name :rtype: [IdentityRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='5f2e2851-1389-425b-a00b-fb2adb3ef31b', version='4.1-preview.1', @@ -1177,12 +1247,15 @@ def get_pull_request_iteration_commits(self, repository_id, pull_request_id, ite :param str project: Project ID or project name :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='e7ea0883-095f-4926-b5fb-f24691c26fb9', version='4.1-preview.1', @@ -1198,11 +1271,13 @@ def get_pull_request_commits(self, repository_id, pull_request_id, project=None) :param str project: Project ID or project name :rtype: [GitCommitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='52823034-34a8-4576-922c-8d8b77e9e4c4', version='4.1-preview.1', @@ -1220,14 +1295,17 @@ def get_pull_request_iteration_changes(self, repository_id, pull_request_id, ite :param int top: Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000. :param int skip: Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100. :param int compare_to: ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -1249,14 +1327,17 @@ def get_pull_request_iteration(self, repository_id, pull_request_id, iteration_i :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration to return. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='d43911ee-6958-46b0-a42b-8445b8a0d004', version='4.1-preview.1', @@ -1272,11 +1353,13 @@ def get_pull_request_iterations(self, repository_id, pull_request_id, project=No :param bool include_commits: If true, include the commits associated with each iteration in the response. :rtype: [GitPullRequestIteration] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if include_commits is not None: query_parameters['includeCommits'] = self._serialize.query('include_commits', include_commits, 'bool') @@ -1291,19 +1374,22 @@ def get_pull_request_iterations(self, repository_id, pull_request_id, project=No def create_pull_request_iteration_status(self, status, repository_id, pull_request_id, iteration_id, project=None): """CreatePullRequestIterationStatus. [Preview API] Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body. - :param :class:` ` status: Pull request status to create. + :param :class:` ` status: Pull request status to create. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') content = self._serialize.body(status, 'GitPullRequestStatus') response = self._send(http_method='POST', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', @@ -1321,13 +1407,17 @@ def delete_pull_request_iteration_status(self, repository_id, pull_request_id, i :param int status_id: ID of the pull request status. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int'), - 'statusId': self._serialize.url('status_id', status_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + if status_id is not None: + route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') self._send(http_method='DELETE', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', version='4.1-preview.1', @@ -1341,15 +1431,19 @@ def get_pull_request_iteration_status(self, repository_id, pull_request_id, iter :param int iteration_id: ID of the pull request iteration. :param int status_id: ID of the pull request status. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int'), - 'statusId': self._serialize.url('status_id', status_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') + if status_id is not None: + route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') response = self._send(http_method='GET', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', version='4.1-preview.1', @@ -1365,12 +1459,15 @@ def get_pull_request_iteration_statuses(self, repository_id, pull_request_id, it :param str project: Project ID or project name :rtype: [GitPullRequestStatus] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') response = self._send(http_method='GET', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', version='4.1-preview.1', @@ -1381,18 +1478,21 @@ def get_pull_request_iteration_statuses(self, repository_id, pull_request_id, it def update_pull_request_iteration_statuses(self, patch_document, repository_id, pull_request_id, iteration_id, project=None): """UpdatePullRequestIterationStatuses. [Preview API] Update pull request iteration statuses collection. The only supported operation type is `remove`. - :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. + :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int iteration_id: ID of the pull request iteration. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'iterationId': self._serialize.url('iteration_id', iteration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if iteration_id is not None: + route_values['iterationId'] = self._serialize.url('iteration_id', iteration_id, 'int') content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='75cf11c5-979f-4038-a76e-058a06adf2bf', @@ -1404,18 +1504,20 @@ def update_pull_request_iteration_statuses(self, patch_document, repository_id, def create_pull_request_label(self, label, repository_id, pull_request_id, project=None, project_id=None): """CreatePullRequestLabel. [Preview API] Create a label for a specified pull request. The only required field is the name of the new label. - :param :class:` ` label: Label to assign to the pull request. + :param :class:` ` label: Label to assign to the pull request. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name :param str project_id: Project ID or project name. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1437,12 +1539,15 @@ def delete_pull_request_labels(self, repository_id, pull_request_id, label_id_or :param str project: Project ID or project name :param str project_id: Project ID or project name. """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'labelIdOrName': self._serialize.url('label_id_or_name', label_id_or_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if label_id_or_name is not None: + route_values['labelIdOrName'] = self._serialize.url('label_id_or_name', label_id_or_name, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1460,14 +1565,17 @@ def get_pull_request_label(self, repository_id, pull_request_id, label_id_or_nam :param str label_id_or_name: The name or ID of the label requested. :param str project: Project ID or project name :param str project_id: Project ID or project name. - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'labelIdOrName': self._serialize.url('label_id_or_name', label_id_or_name, 'str') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if label_id_or_name is not None: + route_values['labelIdOrName'] = self._serialize.url('label_id_or_name', label_id_or_name, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1487,11 +1595,13 @@ def get_pull_request_labels(self, repository_id, pull_request_id, project=None, :param str project_id: Project ID or project name. :rtype: [WebApiTagDefinition] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -1509,13 +1619,15 @@ def get_pull_request_properties(self, repository_id, pull_request_id, project=No :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='48a52185-5b9e-4736-9dc1-bb1e2feac80b', version='4.1-preview.1', @@ -1525,17 +1637,19 @@ def get_pull_request_properties(self, repository_id, pull_request_id, project=No def update_pull_request_properties(self, patch_document, repository_id, pull_request_id, project=None): """UpdatePullRequestProperties. [Preview API] Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed. - :param :class:`<[JsonPatchOperation]> ` patch_document: Properties to add, replace or remove in JSON Patch format. + :param :class:`<[JsonPatchOperation]> ` patch_document: Properties to add, replace or remove in JSON Patch format. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(patch_document, '[JsonPatchOperation]') response = self._send(http_method='PATCH', location_id='48a52185-5b9e-4736-9dc1-bb1e2feac80b', @@ -1548,15 +1662,16 @@ def update_pull_request_properties(self, patch_document, repository_id, pull_req def get_pull_request_query(self, queries, repository_id, project=None): """GetPullRequestQuery. [Preview API] This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests. - :param :class:` ` queries: The list of queries to perform. + :param :class:` ` queries: The list of queries to perform. :param str repository_id: ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(queries, 'GitPullRequestQuery') response = self._send(http_method='POST', location_id='b3a6eebe-9cf0-49ea-b6cb-1a4c5f5007b0', @@ -1568,19 +1683,22 @@ def get_pull_request_query(self, queries, repository_id, project=None): def create_pull_request_reviewer(self, reviewer, repository_id, pull_request_id, reviewer_id, project=None): """CreatePullRequestReviewer. [Preview API] Add a reviewer to a pull request or cast a vote. - :param :class:` ` reviewer: Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. + :param :class:` ` reviewer: Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str reviewer_id: ID of the reviewer. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'reviewerId': self._serialize.url('reviewer_id', reviewer_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if reviewer_id is not None: + route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') content = self._serialize.body(reviewer, 'IdentityRefWithVote') response = self._send(http_method='PUT', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', @@ -1598,11 +1716,13 @@ def create_pull_request_reviewers(self, reviewers, repository_id, pull_request_i :param str project: Project ID or project name :rtype: [IdentityRefWithVote] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(reviewers, '[IdentityRef]') response = self._send(http_method='POST', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', @@ -1620,12 +1740,15 @@ def delete_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_ :param str reviewer_id: ID of the reviewer to remove. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'reviewerId': self._serialize.url('reviewer_id', reviewer_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if reviewer_id is not None: + route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') self._send(http_method='DELETE', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', version='4.1-preview.1', @@ -1638,14 +1761,17 @@ def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, :param int pull_request_id: ID of the pull request. :param str reviewer_id: ID of the reviewer. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'reviewerId': self._serialize.url('reviewer_id', reviewer_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if reviewer_id is not None: + route_values['reviewerId'] = self._serialize.url('reviewer_id', reviewer_id, 'str') response = self._send(http_method='GET', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', version='4.1-preview.1', @@ -1660,11 +1786,13 @@ def get_pull_request_reviewers(self, repository_id, pull_request_id, project=Non :param str project: Project ID or project name :rtype: [IdentityRefWithVote] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', version='4.1-preview.1', @@ -1680,11 +1808,13 @@ def update_pull_request_reviewers(self, patch_votes, repository_id, pull_request :param int pull_request_id: ID of the pull request :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(patch_votes, '[IdentityRefWithVote]') self._send(http_method='PATCH', location_id='4b6702c7-aa35-4b89-9c96-b9abf6d3e540', @@ -1696,11 +1826,11 @@ def get_pull_request_by_id(self, pull_request_id): """GetPullRequestById. [Preview API] Retrieve a pull request. :param int pull_request_id: The ID of the pull request to retrieve. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='01a46dea-7d46-4d40-bc84-319e7c260d99', version='4.1-preview.1', @@ -1711,15 +1841,15 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len """GetPullRequestsByProject. [Preview API] Retrieve all pull requests matching a specified criteria. :param str project: Project ID or project name - :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. + :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. :param int max_comment_length: Not used. :param int skip: The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. :param int top: The number of pull requests to retrieve. :rtype: [GitPullRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if search_criteria is not None: if search_criteria.repository_id is not None: @@ -1755,16 +1885,17 @@ def get_pull_requests_by_project(self, project, search_criteria, max_comment_len def create_pull_request(self, git_pull_request_to_create, repository_id, project=None, supports_iterations=None): """CreatePullRequest. [Preview API] Create a pull request. - :param :class:` ` git_pull_request_to_create: The pull request to create. + :param :class:` ` git_pull_request_to_create: The pull request to create. :param str repository_id: The repository ID of the pull request's target branch. :param str project: Project ID or project name :param bool supports_iterations: If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if supports_iterations is not None: query_parameters['supportsIterations'] = self._serialize.query('supports_iterations', supports_iterations, 'bool') @@ -1788,13 +1919,15 @@ def get_pull_request(self, repository_id, pull_request_id, project=None, max_com :param int top: Not used. :param bool include_commits: If true, the pull request will be returned with the associated commits. :param bool include_work_item_refs: If true, the pull request will be returned with the associated work item references. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if max_comment_length is not None: query_parameters['maxCommentLength'] = self._serialize.query('max_comment_length', max_comment_length, 'int') @@ -1817,17 +1950,18 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co """GetPullRequests. [Preview API] Retrieve all pull requests matching a specified criteria. :param str repository_id: The repository ID of the pull request's target branch. - :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. + :param :class:` ` search_criteria: Pull requests will be returned that match this search criteria. :param str project: Project ID or project name :param int max_comment_length: Not used. :param int skip: The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. :param int top: The number of pull requests to retrieve. :rtype: [GitPullRequest] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if search_criteria is not None: if search_criteria.repository_id is not None: @@ -1863,17 +1997,19 @@ def get_pull_requests(self, repository_id, search_criteria, project=None, max_co def update_pull_request(self, git_pull_request_to_update, repository_id, pull_request_id, project=None): """UpdatePullRequest. [Preview API] Update a pull request. - :param :class:` ` git_pull_request_to_update: The pull request content to update. + :param :class:` ` git_pull_request_to_update: The pull request content to update. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: The ID of the pull request to retrieve. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(git_pull_request_to_update, 'GitPullRequest') response = self._send(http_method='PATCH', location_id='9946fd70-0d40-406e-b686-b4744cbbcc37', @@ -1885,16 +2021,18 @@ def update_pull_request(self, git_pull_request_to_update, repository_id, pull_re def share_pull_request(self, user_message, repository_id, pull_request_id, project=None): """SharePullRequest. [Preview API] Sends an e-mail notification about a specific pull request to a set of recipients - :param :class:` ` user_message: + :param :class:` ` user_message: :param str repository_id: ID of the git repository. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(user_message, 'ShareNotificationContext') self._send(http_method='POST', location_id='696f3a82-47c9-487f-9117-b9d00972ca84', @@ -1905,17 +2043,19 @@ def share_pull_request(self, user_message, repository_id, pull_request_id, proje def create_pull_request_status(self, status, repository_id, pull_request_id, project=None): """CreatePullRequestStatus. [Preview API] Create a pull request status. - :param :class:` ` status: Pull request status to create. + :param :class:` ` status: Pull request status to create. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(status, 'GitPullRequestStatus') response = self._send(http_method='POST', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', @@ -1932,12 +2072,15 @@ def delete_pull_request_status(self, repository_id, pull_request_id, status_id, :param int status_id: ID of the pull request status. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'statusId': self._serialize.url('status_id', status_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if status_id is not None: + route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') self._send(http_method='DELETE', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', version='4.1-preview.1', @@ -1950,14 +2093,17 @@ def get_pull_request_status(self, repository_id, pull_request_id, status_id, pro :param int pull_request_id: ID of the pull request. :param int status_id: ID of the pull request status. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'statusId': self._serialize.url('status_id', status_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if status_id is not None: + route_values['statusId'] = self._serialize.url('status_id', status_id, 'int') response = self._send(http_method='GET', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', version='4.1-preview.1', @@ -1972,11 +2118,13 @@ def get_pull_request_statuses(self, repository_id, pull_request_id, project=None :param str project: Project ID or project name :rtype: [GitPullRequestStatus] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', version='4.1-preview.1', @@ -1987,16 +2135,18 @@ def get_pull_request_statuses(self, repository_id, pull_request_id, project=None def update_pull_request_statuses(self, patch_document, repository_id, pull_request_id, project=None): """UpdatePullRequestStatuses. [Preview API] Update pull request statuses collection. The only supported operation type is `remove`. - :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. + :param :class:`<[JsonPatchOperation]> ` patch_document: Operations to apply to the pull request statuses in JSON Patch format. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(patch_document, '[JsonPatchOperation]') self._send(http_method='PATCH', location_id='b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35', @@ -2008,19 +2158,22 @@ def update_pull_request_statuses(self, patch_document, repository_id, pull_reque def create_comment(self, comment, repository_id, pull_request_id, thread_id, project=None): """CreateComment. [Preview API] Create a comment on a specific thread in a pull request. - :param :class:` ` comment: The comment to create. + :param :class:` ` comment: The comment to create. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread that the desired comment is in. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') content = self._serialize.body(comment, 'Comment') response = self._send(http_method='POST', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', @@ -2038,13 +2191,17 @@ def delete_comment(self, repository_id, pull_request_id, thread_id, comment_id, :param int comment_id: ID of the comment. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') self._send(http_method='DELETE', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', version='4.1-preview.1', @@ -2058,15 +2215,19 @@ def get_comment(self, repository_id, pull_request_id, thread_id, comment_id, pro :param int thread_id: ID of the thread that the desired comment is in. :param int comment_id: ID of the comment. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') response = self._send(http_method='GET', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', version='4.1-preview.1', @@ -2082,12 +2243,15 @@ def get_comments(self, repository_id, pull_request_id, thread_id, project=None): :param str project: Project ID or project name :rtype: [Comment] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') response = self._send(http_method='GET', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', version='4.1-preview.1', @@ -2098,21 +2262,25 @@ def get_comments(self, repository_id, pull_request_id, thread_id, project=None): def update_comment(self, comment, repository_id, pull_request_id, thread_id, comment_id, project=None): """UpdateComment. [Preview API] Update a comment associated with a specific thread in a pull request. - :param :class:` ` comment: The comment content that should be updated. + :param :class:` ` comment: The comment content that should be updated. :param str repository_id: The repository ID of the pull request’s target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread that the desired comment is in. :param int comment_id: ID of the comment to update. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int'), - 'commentId': self._serialize.url('comment_id', comment_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') + if comment_id is not None: + route_values['commentId'] = self._serialize.url('comment_id', comment_id, 'int') content = self._serialize.body(comment, 'Comment') response = self._send(http_method='PATCH', location_id='965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b', @@ -2124,17 +2292,19 @@ def update_comment(self, comment, repository_id, pull_request_id, thread_id, com def create_thread(self, comment_thread, repository_id, pull_request_id, project=None): """CreateThread. [Preview API] Create a thread in a pull request. - :param :class:` ` comment_thread: The thread to create. Thread must contain at least one comment. + :param :class:` ` comment_thread: The thread to create. Thread must contain at least one comment. :param str repository_id: Repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') content = self._serialize.body(comment_thread, 'GitPullRequestCommentThread') response = self._send(http_method='POST', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', @@ -2152,14 +2322,17 @@ def get_pull_request_thread(self, repository_id, pull_request_id, thread_id, pro :param str project: Project ID or project name :param int iteration: If specified, thread position will be tracked using this iteration as the right side of the diff. :param int base_iteration: If specified, thread position will be tracked using this iteration as the left side of the diff. - :rtype: :class:` ` - """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + :rtype: :class:` ` + """ + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') query_parameters = {} if iteration is not None: query_parameters['$iteration'] = self._serialize.query('iteration', iteration, 'int') @@ -2182,11 +2355,13 @@ def get_threads(self, repository_id, pull_request_id, project=None, iteration=No :param int base_iteration: If specified, thread positions will be tracked using this iteration as the left side of the diff. :rtype: [GitPullRequestCommentThread] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') query_parameters = {} if iteration is not None: query_parameters['$iteration'] = self._serialize.query('iteration', iteration, 'int') @@ -2203,19 +2378,22 @@ def get_threads(self, repository_id, pull_request_id, project=None, iteration=No def update_thread(self, comment_thread, repository_id, pull_request_id, thread_id, project=None): """UpdateThread. [Preview API] Update a thread in a pull request. - :param :class:` ` comment_thread: The thread content that should be updated. + :param :class:` ` comment_thread: The thread content that should be updated. :param str repository_id: The repository ID of the pull request's target branch. :param int pull_request_id: ID of the pull request. :param int thread_id: ID of the thread to update. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int'), - 'threadId': self._serialize.url('thread_id', thread_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') + if thread_id is not None: + route_values['threadId'] = self._serialize.url('thread_id', thread_id, 'int') content = self._serialize.body(comment_thread, 'GitPullRequestCommentThread') response = self._send(http_method='PATCH', location_id='ab6e2e5d-a0b7-4153-b64a-a4efe0d49449', @@ -2232,11 +2410,13 @@ def get_pull_request_work_items(self, repository_id, pull_request_id, project=No :param str project: Project ID or project name :rtype: [AssociatedWorkItem] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pullRequestId': self._serialize.url('pull_request_id', pull_request_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if pull_request_id is not None: + route_values['pullRequestId'] = self._serialize.url('pull_request_id', pull_request_id, 'int') response = self._send(http_method='GET', location_id='0a637fcc-5370-4ce8-b0e8-98091f5f9482', version='4.1-preview.1', @@ -2247,15 +2427,16 @@ def get_pull_request_work_items(self, repository_id, pull_request_id, project=No def create_push(self, push, repository_id, project=None): """CreatePush. [Preview API] Push changes to the repository. - :param :class:` ` push: + :param :class:` ` push: :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(push, 'GitPush') response = self._send(http_method='POST', location_id='ea98d07b-3c87-4971-8ede-a613694ffb55', @@ -2272,13 +2453,15 @@ def get_push(self, repository_id, push_id, project=None, include_commits=None, i :param str project: Project ID or project name :param int include_commits: The number of commits to include in the result. :param bool include_ref_updates: If true, include the list of refs that were updated by the push. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'pushId': self._serialize.url('push_id', push_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if push_id is not None: + route_values['pushId'] = self._serialize.url('push_id', push_id, 'int') query_parameters = {} if include_commits is not None: query_parameters['includeCommits'] = self._serialize.query('include_commits', include_commits, 'int') @@ -2298,13 +2481,14 @@ def get_pushes(self, repository_id, project=None, skip=None, top=None, search_cr :param str project: Project ID or project name :param int skip: Number of pushes to skip. :param int top: Number of pushes to return. - :param :class:` ` search_criteria: Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. + :param :class:` ` search_criteria: Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. :rtype: [GitPush] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if skip is not None: query_parameters['$skip'] = self._serialize.query('skip', skip, 'int') @@ -2341,10 +2525,11 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, :param bool latest_statuses_only: [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false. :rtype: [GitRef] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if filter is not None: query_parameters['filter'] = self._serialize.query('filter', filter, 'str') @@ -2363,17 +2548,18 @@ def get_refs(self, repository_id, project=None, filter=None, include_links=None, def update_ref(self, new_ref_info, repository_id, filter, project=None, project_id=None): """UpdateRef. [Preview API] Lock or Unlock a branch. - :param :class:` ` new_ref_info: The ref update action (lock/unlock) to perform + :param :class:` ` new_ref_info: The ref update action (lock/unlock) to perform :param str repository_id: The name or ID of the repository. :param str filter: The name of the branch to lock/unlock :param str project: Project ID or project name :param str project_id: ID or name of the team project. Optional if specifying an ID for repository. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if filter is not None: query_parameters['filter'] = self._serialize.query('filter', filter, 'str') @@ -2397,10 +2583,11 @@ def update_refs(self, ref_updates, repository_id, project=None, project_id=None) :param str project_id: ID or name of the team project. Optional if specifying an ID for repository. :rtype: [GitRefUpdateResult] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -2417,13 +2604,13 @@ def update_refs(self, ref_updates, repository_id, project=None, project_id=None) def create_favorite(self, favorite, project): """CreateFavorite. [Preview API] Creates a ref favorite - :param :class:` ` favorite: The ref favorite to create. + :param :class:` ` favorite: The ref favorite to create. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(favorite, 'GitRefFavorite') response = self._send(http_method='POST', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', @@ -2438,10 +2625,11 @@ def delete_ref_favorite(self, project, favorite_id): :param str project: Project ID or project name :param int favorite_id: The Id of the ref favorite to delete. """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'favoriteId': self._serialize.url('favorite_id', favorite_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if favorite_id is not None: + route_values['favoriteId'] = self._serialize.url('favorite_id', favorite_id, 'int') self._send(http_method='DELETE', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', version='4.1-preview.1', @@ -2452,12 +2640,13 @@ def get_ref_favorite(self, project, favorite_id): [Preview API] Gets the refs favorite for a favorite Id. :param str project: Project ID or project name :param int favorite_id: The Id of the requested ref favorite. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'favoriteId': self._serialize.url('favorite_id', favorite_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if favorite_id is not None: + route_values['favoriteId'] = self._serialize.url('favorite_id', favorite_id, 'int') response = self._send(http_method='GET', location_id='876f70af-5792-485a-a1c7-d0a7b2f42bbb', version='4.1-preview.1', @@ -2472,9 +2661,9 @@ def get_ref_favorites(self, project, repository_id=None, identity_id=None): :param str identity_id: The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. :rtype: [GitRefFavorite] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if repository_id is not None: query_parameters['repositoryId'] = self._serialize.query('repository_id', repository_id, 'str') @@ -2491,14 +2680,14 @@ def get_ref_favorites(self, project, repository_id=None, identity_id=None): def create_repository(self, git_repository_to_create, project=None, source_ref=None): """CreateRepository. [Preview API] Create a git repository in a team project. - :param :class:` ` git_repository_to_create: Specify the repo name, team project and/or parent repository + :param :class:` ` git_repository_to_create: Specify the repo name, team project and/or parent repository :param str project: Project ID or project name :param str source_ref: [optional] Specify the source refs to use while creating a fork repo - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if source_ref is not None: query_parameters['sourceRef'] = self._serialize.query('source_ref', source_ref, 'str') @@ -2517,10 +2706,11 @@ def delete_repository(self, repository_id, project=None): :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') self._send(http_method='DELETE', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', version='4.1-preview.1', @@ -2535,9 +2725,9 @@ def get_repositories(self, project=None, include_links=None, include_all_urls=No :param bool include_hidden: [optional] True to include hidden repositories. The default value is false. :rtype: [GitRepository] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if include_links is not None: query_parameters['includeLinks'] = self._serialize.query('include_links', include_links, 'bool') @@ -2559,12 +2749,13 @@ def get_repository(self, repository_id, project=None, include_parent=None): :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name :param bool include_parent: [optional] True to include parent repository. The default value is false. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if include_parent is not None: query_parameters['includeParent'] = self._serialize.query('include_parent', include_parent, 'bool') @@ -2578,15 +2769,16 @@ def get_repository(self, repository_id, project=None, include_parent=None): def update_repository(self, new_repository_info, repository_id, project=None): """UpdateRepository. [Preview API] Updates the Git repository with either a new repo name or a new default branch. - :param :class:` ` new_repository_info: Specify a new repo name or a new default branch of the repository + :param :class:` ` new_repository_info: Specify a new repo name or a new default branch of the repository :param str repository_id: The name or ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(new_repository_info, 'GitRepository') response = self._send(http_method='PATCH', location_id='225f7195-f9c7-4d14-ab28-a83f7ff77e1f', @@ -2598,15 +2790,16 @@ def update_repository(self, new_repository_info, repository_id, project=None): def create_revert(self, revert_to_create, project, repository_id): """CreateRevert. [Preview API] Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request. - :param :class:` ` revert_to_create: + :param :class:` ` revert_to_create: :param str project: Project ID or project name :param str repository_id: ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(revert_to_create, 'GitAsyncRefOperationParameters') response = self._send(http_method='POST', location_id='bc866058-5449-4715-9cf1-a510b6ff193c', @@ -2621,13 +2814,15 @@ def get_revert(self, project, revert_id, repository_id): :param str project: Project ID or project name :param int revert_id: ID of the revert operation. :param str repository_id: ID of the repository. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'revertId': self._serialize.url('revert_id', revert_id, 'int'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if revert_id is not None: + route_values['revertId'] = self._serialize.url('revert_id', revert_id, 'int') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='bc866058-5449-4715-9cf1-a510b6ff193c', version='4.1-preview.1', @@ -2640,12 +2835,13 @@ def get_revert_for_ref_name(self, project, repository_id, ref_name): :param str project: Project ID or project name :param str repository_id: ID of the repository. :param str ref_name: The GitAsyncRefOperationParameters generatedRefName used for the revert operation. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if ref_name is not None: query_parameters['refName'] = self._serialize.query('ref_name', ref_name, 'str') @@ -2659,17 +2855,19 @@ def get_revert_for_ref_name(self, project, repository_id, ref_name): def create_commit_status(self, git_commit_status_to_create, commit_id, repository_id, project=None): """CreateCommitStatus. [Preview API] Create Git commit status. - :param :class:` ` git_commit_status_to_create: Git commit status object to create. + :param :class:` ` git_commit_status_to_create: Git commit status object to create. :param str commit_id: ID of the Git commit. :param str repository_id: ID of the repository. :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') content = self._serialize.body(git_commit_status_to_create, 'GitStatus') response = self._send(http_method='POST', location_id='428dd4fb-fda5-4722-af02-9313b80305da', @@ -2689,11 +2887,13 @@ def get_statuses(self, commit_id, repository_id, project=None, top=None, skip=No :param bool latest_only: The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`. :rtype: [GitStatus] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'commitId': self._serialize.url('commit_id', commit_id, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if commit_id is not None: + route_values['commitId'] = self._serialize.url('commit_id', commit_id, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') query_parameters = {} if top is not None: query_parameters['top'] = self._serialize.query('top', top, 'int') @@ -2716,10 +2916,11 @@ def get_suggestions(self, repository_id, project=None): :param str project: Project ID or project name :rtype: [GitSuggestion] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') response = self._send(http_method='GET', location_id='9393b4fb-4445-4919-972b-9ad16f442d83', version='4.1-preview.1', @@ -2736,13 +2937,15 @@ def get_tree(self, repository_id, sha1, project=None, project_id=None, recursive :param str project_id: Project Id. :param bool recursive: Search recursively. Include trees underneath this tree. Default is false. :param str file_name: Name to use if a .zip file is returned. Default is the object ID. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') @@ -2768,11 +2971,13 @@ def get_tree_zip(self, repository_id, sha1, project=None, project_id=None, recur :param str file_name: Name to use if a .zip file is returned. Default is the object ID. :rtype: object """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'repositoryId': self._serialize.url('repository_id', repository_id, 'str'), - 'sha1': self._serialize.url('sha1', sha1, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if repository_id is not None: + route_values['repositoryId'] = self._serialize.url('repository_id', repository_id, 'str') + if sha1 is not None: + route_values['sha1'] = self._serialize.url('sha1', sha1, 'str') query_parameters = {} if project_id is not None: query_parameters['projectId'] = self._serialize.query('project_id', project_id, 'str') diff --git a/vsts/vsts/git/v4_1/models/attachment.py b/vsts/vsts/git/v4_1/models/attachment.py index edd7e64b..1bc88d51 100644 --- a/vsts/vsts/git/v4_1/models/attachment.py +++ b/vsts/vsts/git/v4_1/models/attachment.py @@ -13,9 +13,9 @@ class Attachment(Model): """Attachment. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: The person that uploaded this attachment. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param content_hash: Content hash of on-disk representation of file content. Its calculated by the server by using SHA1 hash function. :type content_hash: str :param created_date: The time the attachment was uploaded. @@ -27,7 +27,7 @@ class Attachment(Model): :param id: Id of the attachment. :type id: int :param properties: Extended properties. - :type properties: :class:`object ` + :type properties: :class:`object ` :param url: The url to download the content of the attachment. :type url: str """ diff --git a/vsts/vsts/git/v4_1/models/change.py b/vsts/vsts/git/v4_1/models/change.py index 432f7e04..6a5921f0 100644 --- a/vsts/vsts/git/v4_1/models/change.py +++ b/vsts/vsts/git/v4_1/models/change.py @@ -17,7 +17,7 @@ class Change(Model): :param item: Current version. :type item: object :param new_content: Content of the item after the change. - :type new_content: :class:`ItemContent ` + :type new_content: :class:`ItemContent ` :param source_server_item: Path of the item on the server. :type source_server_item: str :param url: URL to retrieve the item. diff --git a/vsts/vsts/git/v4_1/models/comment.py b/vsts/vsts/git/v4_1/models/comment.py index 291d20b4..a5546dc0 100644 --- a/vsts/vsts/git/v4_1/models/comment.py +++ b/vsts/vsts/git/v4_1/models/comment.py @@ -13,9 +13,9 @@ class Comment(Model): """Comment. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: The author of the comment. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param comment_type: The comment type at the time of creation. :type comment_type: object :param content: The comment content. @@ -33,7 +33,7 @@ class Comment(Model): :param published_date: The date the comment was first published. :type published_date: datetime :param users_liked: A list of the users who have liked this comment. - :type users_liked: list of :class:`IdentityRef ` + :type users_liked: list of :class:`IdentityRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/comment_thread.py b/vsts/vsts/git/v4_1/models/comment_thread.py index e82dd8e8..9cb6d0f4 100644 --- a/vsts/vsts/git/v4_1/models/comment_thread.py +++ b/vsts/vsts/git/v4_1/models/comment_thread.py @@ -13,9 +13,9 @@ class CommentThread(Model): """CommentThread. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: A list of the comments. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param id: The comment thread id. :type id: int :param is_deleted: Specify if the thread is deleted which happens when all comments are deleted. @@ -23,13 +23,13 @@ class CommentThread(Model): :param last_updated_date: The time this thread was last updated. :type last_updated_date: datetime :param properties: Optional properties associated with the thread as a collection of key-value pairs. - :type properties: :class:`object ` + :type properties: :class:`object ` :param published_date: The time this thread was published. :type published_date: datetime :param status: The status of the comment thread. :type status: object :param thread_context: Specify thread context such as position in left/right file. - :type thread_context: :class:`CommentThreadContext ` + :type thread_context: :class:`CommentThreadContext ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/comment_thread_context.py b/vsts/vsts/git/v4_1/models/comment_thread_context.py index 931ebff8..ab02bda7 100644 --- a/vsts/vsts/git/v4_1/models/comment_thread_context.py +++ b/vsts/vsts/git/v4_1/models/comment_thread_context.py @@ -15,13 +15,13 @@ class CommentThreadContext(Model): :param file_path: File path relative to the root of the repository. It's up to the client to use any path format. :type file_path: str :param left_file_end: Position of last character of the thread's span in left file. - :type left_file_end: :class:`CommentPosition ` + :type left_file_end: :class:`CommentPosition ` :param left_file_start: Position of first character of the thread's span in left file. - :type left_file_start: :class:`CommentPosition ` + :type left_file_start: :class:`CommentPosition ` :param right_file_end: Position of last character of the thread's span in right file. - :type right_file_end: :class:`CommentPosition ` + :type right_file_end: :class:`CommentPosition ` :param right_file_start: Position of first character of the thread's span in right file. - :type right_file_start: :class:`CommentPosition ` + :type right_file_start: :class:`CommentPosition ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/comment_tracking_criteria.py b/vsts/vsts/git/v4_1/models/comment_tracking_criteria.py index 5fd95f5b..f6adc4e0 100644 --- a/vsts/vsts/git/v4_1/models/comment_tracking_criteria.py +++ b/vsts/vsts/git/v4_1/models/comment_tracking_criteria.py @@ -17,13 +17,13 @@ class CommentTrackingCriteria(Model): :param orig_file_path: Original filepath the thread was created on before tracking. This will be different than the current thread filepath if the file in question was renamed in a later iteration. :type orig_file_path: str :param orig_left_file_end: Original position of last character of the thread's span in left file. - :type orig_left_file_end: :class:`CommentPosition ` + :type orig_left_file_end: :class:`CommentPosition ` :param orig_left_file_start: Original position of first character of the thread's span in left file. - :type orig_left_file_start: :class:`CommentPosition ` + :type orig_left_file_start: :class:`CommentPosition ` :param orig_right_file_end: Original position of last character of the thread's span in right file. - :type orig_right_file_end: :class:`CommentPosition ` + :type orig_right_file_end: :class:`CommentPosition ` :param orig_right_file_start: Original position of first character of the thread's span in right file. - :type orig_right_file_start: :class:`CommentPosition ` + :type orig_right_file_start: :class:`CommentPosition ` :param second_comparing_iteration: The iteration of the file on the right side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0. :type second_comparing_iteration: int """ diff --git a/vsts/vsts/git/v4_1/models/git_annotated_tag.py b/vsts/vsts/git/v4_1/models/git_annotated_tag.py index 1d62d93b..22bc01ae 100644 --- a/vsts/vsts/git/v4_1/models/git_annotated_tag.py +++ b/vsts/vsts/git/v4_1/models/git_annotated_tag.py @@ -19,9 +19,9 @@ class GitAnnotatedTag(Model): :param object_id: The objectId (Sha1Id) of the tag. :type object_id: str :param tagged_by: User info and date of tagging. - :type tagged_by: :class:`GitUserDate ` + :type tagged_by: :class:`GitUserDate ` :param tagged_object: Tagged git object. - :type tagged_object: :class:`GitObject ` + :type tagged_object: :class:`GitObject ` :param url: :type url: str """ diff --git a/vsts/vsts/git/v4_1/models/git_async_ref_operation.py b/vsts/vsts/git/v4_1/models/git_async_ref_operation.py index 321baf1b..717e9c30 100644 --- a/vsts/vsts/git/v4_1/models/git_async_ref_operation.py +++ b/vsts/vsts/git/v4_1/models/git_async_ref_operation.py @@ -13,11 +13,11 @@ class GitAsyncRefOperation(Model): """GitAsyncRefOperation. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: A URL that can be used to make further requests for status about the operation diff --git a/vsts/vsts/git/v4_1/models/git_async_ref_operation_parameters.py b/vsts/vsts/git/v4_1/models/git_async_ref_operation_parameters.py index f580870c..5ef419b1 100644 --- a/vsts/vsts/git/v4_1/models/git_async_ref_operation_parameters.py +++ b/vsts/vsts/git/v4_1/models/git_async_ref_operation_parameters.py @@ -17,9 +17,9 @@ class GitAsyncRefOperationParameters(Model): :param onto_ref_name: The target branch for the cherry pick or revert operation. :type onto_ref_name: str :param repository: The git repository for the cherry pick or revert operation. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param source: Details about the source of the cherry pick or revert operation (e.g. A pull request or a specific commit). - :type source: :class:`GitAsyncRefOperationSource ` + :type source: :class:`GitAsyncRefOperationSource ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_async_ref_operation_source.py b/vsts/vsts/git/v4_1/models/git_async_ref_operation_source.py index 5058a957..202f7e5e 100644 --- a/vsts/vsts/git/v4_1/models/git_async_ref_operation_source.py +++ b/vsts/vsts/git/v4_1/models/git_async_ref_operation_source.py @@ -13,7 +13,7 @@ class GitAsyncRefOperationSource(Model): """GitAsyncRefOperationSource. :param commit_list: A list of commits to cherry pick or revert - :type commit_list: list of :class:`GitCommitRef ` + :type commit_list: list of :class:`GitCommitRef ` :param pull_request_id: Id of the pull request to cherry pick or revert :type pull_request_id: int """ diff --git a/vsts/vsts/git/v4_1/models/git_blob_ref.py b/vsts/vsts/git/v4_1/models/git_blob_ref.py index 6b128769..aa965e38 100644 --- a/vsts/vsts/git/v4_1/models/git_blob_ref.py +++ b/vsts/vsts/git/v4_1/models/git_blob_ref.py @@ -13,7 +13,7 @@ class GitBlobRef(Model): """GitBlobRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param object_id: SHA1 hash of git object :type object_id: str :param size: Size of blob content (in bytes) diff --git a/vsts/vsts/git/v4_1/models/git_branch_stats.py b/vsts/vsts/git/v4_1/models/git_branch_stats.py index 55680b87..f8a6ab31 100644 --- a/vsts/vsts/git/v4_1/models/git_branch_stats.py +++ b/vsts/vsts/git/v4_1/models/git_branch_stats.py @@ -17,7 +17,7 @@ class GitBranchStats(Model): :param behind_count: Number of commits behind. :type behind_count: int :param commit: Current commit. - :type commit: :class:`GitCommitRef ` + :type commit: :class:`GitCommitRef ` :param is_base_version: True if this is the result for the base version. :type is_base_version: bool :param name: Name of the ref. diff --git a/vsts/vsts/git/v4_1/models/git_change.py b/vsts/vsts/git/v4_1/models/git_change.py index 292e03db..aa3c716c 100644 --- a/vsts/vsts/git/v4_1/models/git_change.py +++ b/vsts/vsts/git/v4_1/models/git_change.py @@ -15,7 +15,7 @@ class GitChange(Change): :param change_id: ID of the change within the group of changes. :type change_id: int :param new_content_template: New Content template to be used when pushing new changes. - :type new_content_template: :class:`GitTemplate ` + :type new_content_template: :class:`GitTemplate ` :param original_path: Original path of item if different from current path. :type original_path: str """ diff --git a/vsts/vsts/git/v4_1/models/git_cherry_pick.py b/vsts/vsts/git/v4_1/models/git_cherry_pick.py index c443cdac..c4b396f6 100644 --- a/vsts/vsts/git/v4_1/models/git_cherry_pick.py +++ b/vsts/vsts/git/v4_1/models/git_cherry_pick.py @@ -13,11 +13,11 @@ class GitCherryPick(GitAsyncRefOperation): """GitCherryPick. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: A URL that can be used to make further requests for status about the operation diff --git a/vsts/vsts/git/v4_1/models/git_commit.py b/vsts/vsts/git/v4_1/models/git_commit.py index 16b21316..a158afdb 100644 --- a/vsts/vsts/git/v4_1/models/git_commit.py +++ b/vsts/vsts/git/v4_1/models/git_commit.py @@ -13,13 +13,13 @@ class GitCommit(GitCommitRef): """GitCommit. :param _links: A collection of related REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Author of the commit. - :type author: :class:`GitUserDate ` + :type author: :class:`GitUserDate ` :param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit. - :type change_counts: :class:`ChangeCountDictionary ` + :type change_counts: :class:`ChangeCountDictionary ` :param changes: An enumeration of the changes included with the commit. - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` :param comment: Comment or message of the commit. :type comment: str :param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message. @@ -27,19 +27,19 @@ class GitCommit(GitCommitRef): :param commit_id: ID (SHA-1) of the commit. :type commit_id: str :param committer: Committer of the commit. - :type committer: :class:`GitUserDate ` + :type committer: :class:`GitUserDate ` :param parents: An enumeration of the parent commit IDs for this commit. :type parents: list of str :param remote_url: Remote URL path to the commit. :type remote_url: str :param statuses: A list of status metadata from services and extensions that may associate additional information to the commit. - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: REST URL for this resource. :type url: str :param work_items: A list of workitems associated with this commit. - :type work_items: list of :class:`ResourceRef ` + :type work_items: list of :class:`ResourceRef ` :param push: - :type push: :class:`GitPushRef ` + :type push: :class:`GitPushRef ` :param tree_id: :type tree_id: str """ diff --git a/vsts/vsts/git/v4_1/models/git_commit_changes.py b/vsts/vsts/git/v4_1/models/git_commit_changes.py index 1d18984a..b2a1c728 100644 --- a/vsts/vsts/git/v4_1/models/git_commit_changes.py +++ b/vsts/vsts/git/v4_1/models/git_commit_changes.py @@ -13,9 +13,9 @@ class GitCommitChanges(Model): """GitCommitChanges. :param change_counts: - :type change_counts: :class:`ChangeCountDictionary ` + :type change_counts: :class:`ChangeCountDictionary ` :param changes: - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_commit_diffs.py b/vsts/vsts/git/v4_1/models/git_commit_diffs.py index 6a7cd35a..c5d14b37 100644 --- a/vsts/vsts/git/v4_1/models/git_commit_diffs.py +++ b/vsts/vsts/git/v4_1/models/git_commit_diffs.py @@ -23,7 +23,7 @@ class GitCommitDiffs(Model): :param change_counts: :type change_counts: dict :param changes: - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` :param common_commit: :type common_commit: str :param target_commit: diff --git a/vsts/vsts/git/v4_1/models/git_commit_ref.py b/vsts/vsts/git/v4_1/models/git_commit_ref.py index 419cf2f5..a3f58b76 100644 --- a/vsts/vsts/git/v4_1/models/git_commit_ref.py +++ b/vsts/vsts/git/v4_1/models/git_commit_ref.py @@ -13,13 +13,13 @@ class GitCommitRef(Model): """GitCommitRef. :param _links: A collection of related REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Author of the commit. - :type author: :class:`GitUserDate ` + :type author: :class:`GitUserDate ` :param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit. - :type change_counts: :class:`ChangeCountDictionary ` + :type change_counts: :class:`ChangeCountDictionary ` :param changes: An enumeration of the changes included with the commit. - :type changes: list of :class:`GitChange ` + :type changes: list of :class:`GitChange ` :param comment: Comment or message of the commit. :type comment: str :param comment_truncated: Indicates if the comment is truncated from the full Git commit comment message. @@ -27,17 +27,17 @@ class GitCommitRef(Model): :param commit_id: ID (SHA-1) of the commit. :type commit_id: str :param committer: Committer of the commit. - :type committer: :class:`GitUserDate ` + :type committer: :class:`GitUserDate ` :param parents: An enumeration of the parent commit IDs for this commit. :type parents: list of str :param remote_url: Remote URL path to the commit. :type remote_url: str :param statuses: A list of status metadata from services and extensions that may associate additional information to the commit. - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: REST URL for this resource. :type url: str :param work_items: A list of workitems associated with this commit. - :type work_items: list of :class:`ResourceRef ` + :type work_items: list of :class:`ResourceRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_conflict.py b/vsts/vsts/git/v4_1/models/git_conflict.py index 029fdd5d..018a9afe 100644 --- a/vsts/vsts/git/v4_1/models/git_conflict.py +++ b/vsts/vsts/git/v4_1/models/git_conflict.py @@ -13,7 +13,7 @@ class GitConflict(Model): """GitConflict. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param conflict_id: :type conflict_id: int :param conflict_path: @@ -21,19 +21,19 @@ class GitConflict(Model): :param conflict_type: :type conflict_type: object :param merge_base_commit: - :type merge_base_commit: :class:`GitCommitRef ` + :type merge_base_commit: :class:`GitCommitRef ` :param merge_origin: - :type merge_origin: :class:`GitMergeOriginRef ` + :type merge_origin: :class:`GitMergeOriginRef ` :param merge_source_commit: - :type merge_source_commit: :class:`GitCommitRef ` + :type merge_source_commit: :class:`GitCommitRef ` :param merge_target_commit: - :type merge_target_commit: :class:`GitCommitRef ` + :type merge_target_commit: :class:`GitCommitRef ` :param resolution_error: :type resolution_error: object :param resolution_status: :type resolution_status: object :param resolved_by: - :type resolved_by: :class:`IdentityRef ` + :type resolved_by: :class:`IdentityRef ` :param resolved_date: :type resolved_date: datetime :param url: diff --git a/vsts/vsts/git/v4_1/models/git_conflict_update_result.py b/vsts/vsts/git/v4_1/models/git_conflict_update_result.py index 1aa52624..b60af798 100644 --- a/vsts/vsts/git/v4_1/models/git_conflict_update_result.py +++ b/vsts/vsts/git/v4_1/models/git_conflict_update_result.py @@ -17,7 +17,7 @@ class GitConflictUpdateResult(Model): :param custom_message: Reason for failing :type custom_message: str :param updated_conflict: New state of the conflict after updating - :type updated_conflict: :class:`GitConflict ` + :type updated_conflict: :class:`GitConflict ` :param update_status: Status of the update on the server :type update_status: object """ diff --git a/vsts/vsts/git/v4_1/models/git_deleted_repository.py b/vsts/vsts/git/v4_1/models/git_deleted_repository.py index 81f6f8c8..c6710b55 100644 --- a/vsts/vsts/git/v4_1/models/git_deleted_repository.py +++ b/vsts/vsts/git/v4_1/models/git_deleted_repository.py @@ -15,7 +15,7 @@ class GitDeletedRepository(Model): :param created_date: :type created_date: datetime :param deleted_by: - :type deleted_by: :class:`IdentityRef ` + :type deleted_by: :class:`IdentityRef ` :param deleted_date: :type deleted_date: datetime :param id: @@ -23,7 +23,7 @@ class GitDeletedRepository(Model): :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_fork_ref.py b/vsts/vsts/git/v4_1/models/git_fork_ref.py index 0f4c9846..46f8ab5f 100644 --- a/vsts/vsts/git/v4_1/models/git_fork_ref.py +++ b/vsts/vsts/git/v4_1/models/git_fork_ref.py @@ -13,11 +13,11 @@ class GitForkRef(GitRef): """GitForkRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param is_locked: :type is_locked: bool :param is_locked_by: - :type is_locked_by: :class:`IdentityRef ` + :type is_locked_by: :class:`IdentityRef ` :param name: :type name: str :param object_id: @@ -25,11 +25,11 @@ class GitForkRef(GitRef): :param peeled_object_id: :type peeled_object_id: str :param statuses: - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str :param repository: The repository ID of the fork. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_fork_sync_request.py b/vsts/vsts/git/v4_1/models/git_fork_sync_request.py index b5303a07..4630508a 100644 --- a/vsts/vsts/git/v4_1/models/git_fork_sync_request.py +++ b/vsts/vsts/git/v4_1/models/git_fork_sync_request.py @@ -13,15 +13,15 @@ class GitForkSyncRequest(Model): """GitForkSyncRequest. :param _links: Collection of related links - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitForkOperationStatusDetail ` + :type detailed_status: :class:`GitForkOperationStatusDetail ` :param operation_id: Unique identifier for the operation. :type operation_id: int :param source: Fully-qualified identifier for the source repository. - :type source: :class:`GlobalGitRepositoryKey ` + :type source: :class:`GlobalGitRepositoryKey ` :param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. - :type source_to_target_refs: list of :class:`SourceToTargetRef ` + :type source_to_target_refs: list of :class:`SourceToTargetRef ` :param status: :type status: object """ diff --git a/vsts/vsts/git/v4_1/models/git_fork_sync_request_parameters.py b/vsts/vsts/git/v4_1/models/git_fork_sync_request_parameters.py index 6ea0caba..6aee27ed 100644 --- a/vsts/vsts/git/v4_1/models/git_fork_sync_request_parameters.py +++ b/vsts/vsts/git/v4_1/models/git_fork_sync_request_parameters.py @@ -13,9 +13,9 @@ class GitForkSyncRequestParameters(Model): """GitForkSyncRequestParameters. :param source: Fully-qualified identifier for the source repository. - :type source: :class:`GlobalGitRepositoryKey ` + :type source: :class:`GlobalGitRepositoryKey ` :param source_to_target_refs: If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. - :type source_to_target_refs: list of :class:`SourceToTargetRef ` + :type source_to_target_refs: list of :class:`SourceToTargetRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_import_request.py b/vsts/vsts/git/v4_1/models/git_import_request.py index 2e308d14..694e1fc0 100644 --- a/vsts/vsts/git/v4_1/models/git_import_request.py +++ b/vsts/vsts/git/v4_1/models/git_import_request.py @@ -13,15 +13,15 @@ class GitImportRequest(Model): """GitImportRequest. :param _links: Links to related resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: Detailed status of the import, including the current step and an error message, if applicable. - :type detailed_status: :class:`GitImportStatusDetail ` + :type detailed_status: :class:`GitImportStatusDetail ` :param import_request_id: The unique identifier for this import request. :type import_request_id: int :param parameters: Parameters for creating the import request. - :type parameters: :class:`GitImportRequestParameters ` + :type parameters: :class:`GitImportRequestParameters ` :param repository: The target repository for this import. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param status: Current status of the import. :type status: object :param url: A link back to this import request resource. diff --git a/vsts/vsts/git/v4_1/models/git_import_request_parameters.py b/vsts/vsts/git/v4_1/models/git_import_request_parameters.py index f4150067..62485b9e 100644 --- a/vsts/vsts/git/v4_1/models/git_import_request_parameters.py +++ b/vsts/vsts/git/v4_1/models/git_import_request_parameters.py @@ -15,11 +15,11 @@ class GitImportRequestParameters(Model): :param delete_service_endpoint_after_import_is_done: Option to delete service endpoint when import is done :type delete_service_endpoint_after_import_is_done: bool :param git_source: Source for importing git repository - :type git_source: :class:`GitImportGitSource ` + :type git_source: :class:`GitImportGitSource ` :param service_endpoint_id: Service Endpoint for connection to external endpoint :type service_endpoint_id: str :param tfvc_source: Source for importing tfvc repository - :type tfvc_source: :class:`GitImportTfvcSource ` + :type tfvc_source: :class:`GitImportTfvcSource ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_item.py b/vsts/vsts/git/v4_1/models/git_item.py index ee99bac2..0980208b 100644 --- a/vsts/vsts/git/v4_1/models/git_item.py +++ b/vsts/vsts/git/v4_1/models/git_item.py @@ -13,9 +13,9 @@ class GitItem(ItemModel): """GitItem. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: @@ -29,7 +29,7 @@ class GitItem(ItemModel): :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 ` + :type latest_processed_change: :class:`GitCommitRef ` :param object_id: Git object id :type object_id: str :param original_object_id: Git object id diff --git a/vsts/vsts/git/v4_1/models/git_item_request_data.py b/vsts/vsts/git/v4_1/models/git_item_request_data.py index dcf51f48..4b3c504f 100644 --- a/vsts/vsts/git/v4_1/models/git_item_request_data.py +++ b/vsts/vsts/git/v4_1/models/git_item_request_data.py @@ -17,7 +17,7 @@ class GitItemRequestData(Model): :param include_links: Whether to include the _links field on the shallow references :type include_links: bool :param item_descriptors: Collection of items to fetch, including path, version, and recursion level - :type item_descriptors: list of :class:`GitItemDescriptor ` + :type item_descriptors: list of :class:`GitItemDescriptor ` :param latest_processed_change: Whether to include shallow ref to commit that last changed each item :type latest_processed_change: bool """ diff --git a/vsts/vsts/git/v4_1/models/git_pull_request.py b/vsts/vsts/git/v4_1/models/git_pull_request.py index 5958d8f2..ee3288aa 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request.py @@ -13,39 +13,39 @@ class GitPullRequest(Model): """GitPullRequest. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifact_id: A string which uniquely identifies this pull request. To generate an artifact ID for a pull request, use this template: ```vstfs:///Git/PullRequestId/{projectId}/{repositoryId}/{pullRequestId}``` :type artifact_id: str :param auto_complete_set_by: If set, auto-complete is enabled for this pull request and this is the identity that enabled it. - :type auto_complete_set_by: :class:`IdentityRef ` + :type auto_complete_set_by: :class:`IdentityRef ` :param closed_by: The user who closed the pull request. - :type closed_by: :class:`IdentityRef ` + :type closed_by: :class:`IdentityRef ` :param closed_date: The date when the pull request was closed (completed, abandoned, or merged externally). :type closed_date: datetime :param code_review_id: The code review ID of the pull request. Used internally. :type code_review_id: int :param commits: The commits contained in the pull request. - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param completion_options: Options which affect how the pull request will be merged when it is completed. - :type completion_options: :class:`GitPullRequestCompletionOptions ` + :type completion_options: :class:`GitPullRequestCompletionOptions ` :param completion_queue_time: The most recent date at which the pull request entered the queue to be completed. Used internally. :type completion_queue_time: datetime :param created_by: The identity of the user who created the pull request. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param creation_date: The date when the pull request was created. :type creation_date: datetime :param description: The description of the pull request. :type description: str :param fork_source: If this is a PR from a fork this will contain information about its source. - :type fork_source: :class:`GitForkRef ` + :type fork_source: :class:`GitForkRef ` :param labels: The labels associated with the pull request. - :type labels: list of :class:`WebApiTagDefinition ` + :type labels: list of :class:`WebApiTagDefinition ` :param last_merge_commit: The commit of the most recent pull request merge. If empty, the most recent merge is in progress or was unsuccessful. - :type last_merge_commit: :class:`GitCommitRef ` + :type last_merge_commit: :class:`GitCommitRef ` :param last_merge_source_commit: The commit at the head of the source branch at the time of the last pull request merge. - :type last_merge_source_commit: :class:`GitCommitRef ` + :type last_merge_source_commit: :class:`GitCommitRef ` :param last_merge_target_commit: The commit at the head of the target branch at the time of the last pull request merge. - :type last_merge_target_commit: :class:`GitCommitRef ` + :type last_merge_target_commit: :class:`GitCommitRef ` :param merge_failure_message: If set, pull request merge failed for this reason. :type merge_failure_message: str :param merge_failure_type: The type of failure (if any) of the pull request merge. @@ -53,7 +53,7 @@ class GitPullRequest(Model): :param merge_id: The ID of the job used to run the pull request merge. Used internally. :type merge_id: str :param merge_options: Options used when the pull request merge runs. These are separate from completion options since completion happens only once and a new merge will run every time the source branch of the pull request changes. - :type merge_options: :class:`GitPullRequestMergeOptions ` + :type merge_options: :class:`GitPullRequestMergeOptions ` :param merge_status: The current status of the pull request merge. :type merge_status: object :param pull_request_id: The ID of the pull request. @@ -61,9 +61,9 @@ class GitPullRequest(Model): :param remote_url: Used internally. :type remote_url: str :param repository: The repository containing the target branch of the pull request. - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param reviewers: A list of reviewers on the pull request along with the state of their votes. - :type reviewers: list of :class:`IdentityRefWithVote ` + :type reviewers: list of :class:`IdentityRefWithVote ` :param source_ref_name: The name of the source branch of the pull request. :type source_ref_name: str :param status: The status of the pull request. @@ -77,7 +77,7 @@ class GitPullRequest(Model): :param url: Used internally. :type url: str :param work_item_refs: Any work item references associated with this pull request. - :type work_item_refs: list of :class:`ResourceRef ` + :type work_item_refs: list of :class:`ResourceRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_change.py b/vsts/vsts/git/v4_1/models/git_pull_request_change.py index 91efd10b..69e19c22 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_change.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_change.py @@ -15,7 +15,7 @@ class GitPullRequestChange(GitChange): :param change_id: ID of the change within the group of changes. :type change_id: int :param new_content_template: New Content template to be used when pushing new changes. - :type new_content_template: :class:`GitTemplate ` + :type new_content_template: :class:`GitTemplate ` :param original_path: Original path of item if different from current path. :type original_path: str :param change_tracking_id: ID used to track files through multiple changes. diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread.py b/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread.py index 14137d4e..99164041 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread.py @@ -13,9 +13,9 @@ class GitPullRequestCommentThread(CommentThread): """GitPullRequestCommentThread. :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param comments: A list of the comments. - :type comments: list of :class:`Comment ` + :type comments: list of :class:`Comment ` :param id: The comment thread id. :type id: int :param is_deleted: Specify if the thread is deleted which happens when all comments are deleted. @@ -23,15 +23,15 @@ class GitPullRequestCommentThread(CommentThread): :param last_updated_date: The time this thread was last updated. :type last_updated_date: datetime :param properties: Optional properties associated with the thread as a collection of key-value pairs. - :type properties: :class:`object ` + :type properties: :class:`object ` :param published_date: The time this thread was published. :type published_date: datetime :param status: The status of the comment thread. :type status: object :param thread_context: Specify thread context such as position in left/right file. - :type thread_context: :class:`CommentThreadContext ` + :type thread_context: :class:`CommentThreadContext ` :param pull_request_thread_context: Extended context information unique to pull requests - :type pull_request_thread_context: :class:`GitPullRequestCommentThreadContext ` + :type pull_request_thread_context: :class:`GitPullRequestCommentThreadContext ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread_context.py b/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread_context.py index 727192ac..c0173cf5 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread_context.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_comment_thread_context.py @@ -15,9 +15,9 @@ class GitPullRequestCommentThreadContext(Model): :param change_tracking_id: Used to track a comment across iterations. This value can be found by looking at the iteration's changes list. Must be set for pull requests with iteration support. Otherwise, it's not required for 'legacy' pull requests. :type change_tracking_id: int :param iteration_context: The iteration context being viewed when the thread was created. - :type iteration_context: :class:`CommentIterationContext ` + :type iteration_context: :class:`CommentIterationContext ` :param tracking_criteria: The criteria used to track this thread. If this property is filled out when the thread is returned, then the thread has been tracked from its original location using the given criteria. - :type tracking_criteria: :class:`CommentTrackingCriteria ` + :type tracking_criteria: :class:`CommentTrackingCriteria ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_iteration.py b/vsts/vsts/git/v4_1/models/git_pull_request_iteration.py index 48292052..4814062e 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_iteration.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_iteration.py @@ -13,15 +13,15 @@ class GitPullRequestIteration(Model): """GitPullRequestIteration. :param _links: A collection of related REST reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param author: Author of the pull request iteration. - :type author: :class:`IdentityRef ` + :type author: :class:`IdentityRef ` :param change_list: Changes included with the pull request iteration. - :type change_list: list of :class:`GitPullRequestChange ` + :type change_list: list of :class:`GitPullRequestChange ` :param commits: The commits included with the pull request iteration. - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param common_ref_commit: The first common Git commit of the source and target refs. - :type common_ref_commit: :class:`GitCommitRef ` + :type common_ref_commit: :class:`GitCommitRef ` :param created_date: The creation date of the pull request iteration. :type created_date: datetime :param description: Description of the pull request iteration. @@ -31,13 +31,13 @@ class GitPullRequestIteration(Model): :param id: ID of the pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. :type id: int :param push: The Git push information associated with this pull request iteration. - :type push: :class:`GitPushRef ` + :type push: :class:`GitPushRef ` :param reason: The reason for which the pull request iteration was created. :type reason: object :param source_ref_commit: The source Git commit of this iteration. - :type source_ref_commit: :class:`GitCommitRef ` + :type source_ref_commit: :class:`GitCommitRef ` :param target_ref_commit: The target Git commit of this iteration. - :type target_ref_commit: :class:`GitCommitRef ` + :type target_ref_commit: :class:`GitCommitRef ` :param updated_date: The updated date of the pull request iteration. :type updated_date: datetime """ diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_iteration_changes.py b/vsts/vsts/git/v4_1/models/git_pull_request_iteration_changes.py index 06ecea0c..56cc5534 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_iteration_changes.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_iteration_changes.py @@ -13,7 +13,7 @@ class GitPullRequestIterationChanges(Model): """GitPullRequestIterationChanges. :param change_entries: Changes made in the iteration. - :type change_entries: list of :class:`GitPullRequestChange ` + :type change_entries: list of :class:`GitPullRequestChange ` :param next_skip: Value to specify as skip to get the next page of changes. This will be zero if there are no more changes. :type next_skip: int :param next_top: Value to specify as top to get the next page of changes. This will be zero if there are no more changes. diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_query.py b/vsts/vsts/git/v4_1/models/git_pull_request_query.py index 79d128f9..e557ed21 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_query.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_query.py @@ -13,7 +13,7 @@ class GitPullRequestQuery(Model): """GitPullRequestQuery. :param queries: The queries to perform. - :type queries: list of :class:`GitPullRequestQueryInput ` + :type queries: list of :class:`GitPullRequestQueryInput ` :param results: The results of the queries. This matches the QueryInputs list so Results[n] are the results of QueryInputs[n]. Each entry in the list is a dictionary of commit->pull requests. :type results: list of {[GitPullRequest]} """ diff --git a/vsts/vsts/git/v4_1/models/git_pull_request_status.py b/vsts/vsts/git/v4_1/models/git_pull_request_status.py index 74474f7d..60115ed5 100644 --- a/vsts/vsts/git/v4_1/models/git_pull_request_status.py +++ b/vsts/vsts/git/v4_1/models/git_pull_request_status.py @@ -13,11 +13,11 @@ class GitPullRequestStatus(GitStatus): """GitPullRequestStatus. :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param context: Context of the status. - :type context: :class:`GitStatusContext ` + :type context: :class:`GitStatusContext ` :param created_by: Identity that created the status. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`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. @@ -33,7 +33,7 @@ class GitPullRequestStatus(GitStatus): :param iteration_id: ID of the iteration to associate status with. Minimum value is 1. :type iteration_id: int :param properties: Custom properties of the status. - :type properties: :class:`object ` + :type properties: :class:`object ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_push.py b/vsts/vsts/git/v4_1/models/git_push.py index 6fd2b575..90c52e16 100644 --- a/vsts/vsts/git/v4_1/models/git_push.py +++ b/vsts/vsts/git/v4_1/models/git_push.py @@ -13,23 +13,23 @@ class GitPush(GitPushRef): """GitPush. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param date: :type date: datetime :param push_correlation_id: :type push_correlation_id: str :param pushed_by: - :type pushed_by: :class:`IdentityRef ` + :type pushed_by: :class:`IdentityRef ` :param push_id: :type push_id: int :param url: :type url: str :param commits: - :type commits: list of :class:`GitCommitRef ` + :type commits: list of :class:`GitCommitRef ` :param ref_updates: - :type ref_updates: list of :class:`GitRefUpdate ` + :type ref_updates: list of :class:`GitRefUpdate ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_push_ref.py b/vsts/vsts/git/v4_1/models/git_push_ref.py index 42ee50c7..12ee92fc 100644 --- a/vsts/vsts/git/v4_1/models/git_push_ref.py +++ b/vsts/vsts/git/v4_1/models/git_push_ref.py @@ -13,13 +13,13 @@ class GitPushRef(Model): """GitPushRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param date: :type date: datetime :param push_correlation_id: :type push_correlation_id: str :param pushed_by: - :type pushed_by: :class:`IdentityRef ` + :type pushed_by: :class:`IdentityRef ` :param push_id: :type push_id: int :param url: diff --git a/vsts/vsts/git/v4_1/models/git_query_branch_stats_criteria.py b/vsts/vsts/git/v4_1/models/git_query_branch_stats_criteria.py index c1c5f21f..758ac676 100644 --- a/vsts/vsts/git/v4_1/models/git_query_branch_stats_criteria.py +++ b/vsts/vsts/git/v4_1/models/git_query_branch_stats_criteria.py @@ -13,9 +13,9 @@ class GitQueryBranchStatsCriteria(Model): """GitQueryBranchStatsCriteria. :param base_commit: - :type base_commit: :class:`GitVersionDescriptor ` + :type base_commit: :class:`GitVersionDescriptor ` :param target_commits: - :type target_commits: list of :class:`GitVersionDescriptor ` + :type target_commits: list of :class:`GitVersionDescriptor ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_query_commits_criteria.py b/vsts/vsts/git/v4_1/models/git_query_commits_criteria.py index f4253427..be8dc823 100644 --- a/vsts/vsts/git/v4_1/models/git_query_commits_criteria.py +++ b/vsts/vsts/git/v4_1/models/git_query_commits_criteria.py @@ -19,7 +19,7 @@ class GitQueryCommitsCriteria(Model): :param author: Alias or display name of the author :type author: str :param compare_version: If provided, the earliest commit in the graph to search - :type compare_version: :class:`GitVersionDescriptor ` + :type compare_version: :class:`GitVersionDescriptor ` :param exclude_deletes: If true, don't include delete history entries :type exclude_deletes: bool :param from_commit_id: If provided, a lower bound for filtering commits alphabetically @@ -37,7 +37,7 @@ class GitQueryCommitsCriteria(Model): :param item_path: Path of item to search under :type item_path: str :param item_version: If provided, identifies the commit or branch to search - :type item_version: :class:`GitVersionDescriptor ` + :type item_version: :class:`GitVersionDescriptor ` :param to_commit_id: If provided, an upper bound for filtering commits alphabetically :type to_commit_id: str :param to_date: If provided, only include history entries created before this date (string) diff --git a/vsts/vsts/git/v4_1/models/git_ref.py b/vsts/vsts/git/v4_1/models/git_ref.py index 817ece8f..b549bebc 100644 --- a/vsts/vsts/git/v4_1/models/git_ref.py +++ b/vsts/vsts/git/v4_1/models/git_ref.py @@ -13,11 +13,11 @@ class GitRef(Model): """GitRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param is_locked: :type is_locked: bool :param is_locked_by: - :type is_locked_by: :class:`IdentityRef ` + :type is_locked_by: :class:`IdentityRef ` :param name: :type name: str :param object_id: @@ -25,7 +25,7 @@ class GitRef(Model): :param peeled_object_id: :type peeled_object_id: str :param statuses: - :type statuses: list of :class:`GitStatus ` + :type statuses: list of :class:`GitStatus ` :param url: :type url: str """ diff --git a/vsts/vsts/git/v4_1/models/git_ref_favorite.py b/vsts/vsts/git/v4_1/models/git_ref_favorite.py index 2144ebc1..cef6f3fc 100644 --- a/vsts/vsts/git/v4_1/models/git_ref_favorite.py +++ b/vsts/vsts/git/v4_1/models/git_ref_favorite.py @@ -13,7 +13,7 @@ class GitRefFavorite(Model): """GitRefFavorite. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param id: :type id: int :param identity_id: diff --git a/vsts/vsts/git/v4_1/models/git_repository.py b/vsts/vsts/git/v4_1/models/git_repository.py index 4c64242d..5950c196 100644 --- a/vsts/vsts/git/v4_1/models/git_repository.py +++ b/vsts/vsts/git/v4_1/models/git_repository.py @@ -13,7 +13,7 @@ class GitRepository(Model): """GitRepository. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_branch: :type default_branch: str :param id: @@ -23,9 +23,9 @@ class GitRepository(Model): :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param ssh_url: diff --git a/vsts/vsts/git/v4_1/models/git_repository_create_options.py b/vsts/vsts/git/v4_1/models/git_repository_create_options.py index 309ff4e8..c219de4b 100644 --- a/vsts/vsts/git/v4_1/models/git_repository_create_options.py +++ b/vsts/vsts/git/v4_1/models/git_repository_create_options.py @@ -15,9 +15,9 @@ class GitRepositoryCreateOptions(Model): :param name: :type name: str :param parent_repository: - :type parent_repository: :class:`GitRepositoryRef ` + :type parent_repository: :class:`GitRepositoryRef ` :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_repository_ref.py b/vsts/vsts/git/v4_1/models/git_repository_ref.py index 5fe6a845..1f3dd3f1 100644 --- a/vsts/vsts/git/v4_1/models/git_repository_ref.py +++ b/vsts/vsts/git/v4_1/models/git_repository_ref.py @@ -13,7 +13,7 @@ class GitRepositoryRef(Model): """GitRepositoryRef. :param collection: Team Project Collection where this Fork resides - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param id: :type id: str :param is_fork: True if the repository was created as a fork @@ -21,7 +21,7 @@ class GitRepositoryRef(Model): :param name: :type name: str :param project: - :type project: :class:`TeamProjectReference ` + :type project: :class:`TeamProjectReference ` :param remote_url: :type remote_url: str :param ssh_url: diff --git a/vsts/vsts/git/v4_1/models/git_revert.py b/vsts/vsts/git/v4_1/models/git_revert.py index 506cd034..454be085 100644 --- a/vsts/vsts/git/v4_1/models/git_revert.py +++ b/vsts/vsts/git/v4_1/models/git_revert.py @@ -13,11 +13,11 @@ class GitRevert(GitAsyncRefOperation): """GitRevert. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_status: - :type detailed_status: :class:`GitAsyncRefOperationDetail ` + :type detailed_status: :class:`GitAsyncRefOperationDetail ` :param parameters: - :type parameters: :class:`GitAsyncRefOperationParameters ` + :type parameters: :class:`GitAsyncRefOperationParameters ` :param status: :type status: object :param url: A URL that can be used to make further requests for status about the operation diff --git a/vsts/vsts/git/v4_1/models/git_status.py b/vsts/vsts/git/v4_1/models/git_status.py index 8e368532..f662717a 100644 --- a/vsts/vsts/git/v4_1/models/git_status.py +++ b/vsts/vsts/git/v4_1/models/git_status.py @@ -13,11 +13,11 @@ class GitStatus(Model): """GitStatus. :param _links: Reference links. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param context: Context of the status. - :type context: :class:`GitStatusContext ` + :type context: :class:`GitStatusContext ` :param created_by: Identity that created the status. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`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. diff --git a/vsts/vsts/git/v4_1/models/git_tree_diff.py b/vsts/vsts/git/v4_1/models/git_tree_diff.py index d39121fd..c305ff1f 100644 --- a/vsts/vsts/git/v4_1/models/git_tree_diff.py +++ b/vsts/vsts/git/v4_1/models/git_tree_diff.py @@ -15,7 +15,7 @@ class GitTreeDiff(Model): :param base_tree_id: ObjectId of the base tree of this diff. :type base_tree_id: str :param diff_entries: List of tree entries that differ between the base and target tree. Renames and object type changes are returned as a delete for the old object and add for the new object. If a continuation token is returned in the response header, some tree entries are yet to be processed and may yeild more diff entries. If the continuation token is not returned all the diff entries have been included in this response. - :type diff_entries: list of :class:`GitTreeDiffEntry ` + :type diff_entries: list of :class:`GitTreeDiffEntry ` :param target_tree_id: ObjectId of the target tree of this diff. :type target_tree_id: str :param url: REST Url to this resource. diff --git a/vsts/vsts/git/v4_1/models/git_tree_diff_response.py b/vsts/vsts/git/v4_1/models/git_tree_diff_response.py index de4caf69..0c7f81a5 100644 --- a/vsts/vsts/git/v4_1/models/git_tree_diff_response.py +++ b/vsts/vsts/git/v4_1/models/git_tree_diff_response.py @@ -15,7 +15,7 @@ class GitTreeDiffResponse(Model): :param continuation_token: The HTTP client methods find the continuation token header in the response and populate this field. :type continuation_token: list of str :param tree_diff: - :type tree_diff: :class:`GitTreeDiff ` + :type tree_diff: :class:`GitTreeDiff ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/git_tree_ref.py b/vsts/vsts/git/v4_1/models/git_tree_ref.py index a9f1adba..a2d385d9 100644 --- a/vsts/vsts/git/v4_1/models/git_tree_ref.py +++ b/vsts/vsts/git/v4_1/models/git_tree_ref.py @@ -13,13 +13,13 @@ class GitTreeRef(Model): """GitTreeRef. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param object_id: SHA1 hash of git object :type object_id: str :param size: Sum of sizes of all children :type size: long :param tree_entries: Blobs and trees under this tree - :type tree_entries: list of :class:`GitTreeEntryRef ` + :type tree_entries: list of :class:`GitTreeEntryRef ` :param url: Url to tree :type url: str """ diff --git a/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py b/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py index f4aa4cab..2830b26b 100644 --- a/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py +++ b/vsts/vsts/git/v4_1/models/identity_ref_with_vote.py @@ -39,7 +39,7 @@ class IdentityRefWithVote(IdentityRef): :param vote: Vote on a pull request:
10 - approved 5 - approved with suggestions 0 - no vote -5 - waiting for author -10 - rejected :type vote: int :param voted_for: Groups or teams that that this reviewer contributed to.
Groups and teams can be reviewers on pull requests but can not vote directly. When a member of the group or team votes, that vote is rolled up into the group or team vote. VotedFor is a list of such votes. - :type voted_for: list of :class:`IdentityRefWithVote ` + :type voted_for: list of :class:`IdentityRefWithVote ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/import_repository_validation.py b/vsts/vsts/git/v4_1/models/import_repository_validation.py index 41fa7be7..ef525499 100644 --- a/vsts/vsts/git/v4_1/models/import_repository_validation.py +++ b/vsts/vsts/git/v4_1/models/import_repository_validation.py @@ -13,11 +13,11 @@ class ImportRepositoryValidation(Model): """ImportRepositoryValidation. :param git_source: - :type git_source: :class:`GitImportGitSource ` + :type git_source: :class:`GitImportGitSource ` :param password: :type password: str :param tfvc_source: - :type tfvc_source: :class:`GitImportTfvcSource ` + :type tfvc_source: :class:`GitImportTfvcSource ` :param username: :type username: str """ diff --git a/vsts/vsts/git/v4_1/models/item_model.py b/vsts/vsts/git/v4_1/models/item_model.py index 819a9b77..2bc23b37 100644 --- a/vsts/vsts/git/v4_1/models/item_model.py +++ b/vsts/vsts/git/v4_1/models/item_model.py @@ -13,9 +13,9 @@ class ItemModel(Model): """ItemModel. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param content_metadata: - :type content_metadata: :class:`FileContentMetadata ` + :type content_metadata: :class:`FileContentMetadata ` :param is_folder: :type is_folder: bool :param is_sym_link: diff --git a/vsts/vsts/git/v4_1/models/share_notification_context.py b/vsts/vsts/git/v4_1/models/share_notification_context.py index 8eec2662..ff08aad1 100644 --- a/vsts/vsts/git/v4_1/models/share_notification_context.py +++ b/vsts/vsts/git/v4_1/models/share_notification_context.py @@ -15,7 +15,7 @@ class ShareNotificationContext(Model): :param message: Optional user note or message. :type message: str :param receivers: Identities of users who will receive a share notification. - :type receivers: list of :class:`IdentityRef ` + :type receivers: list of :class:`IdentityRef ` """ _attribute_map = { diff --git a/vsts/vsts/git/v4_1/models/vsts_info.py b/vsts/vsts/git/v4_1/models/vsts_info.py index 9d4606d2..1b494d28 100644 --- a/vsts/vsts/git/v4_1/models/vsts_info.py +++ b/vsts/vsts/git/v4_1/models/vsts_info.py @@ -13,9 +13,9 @@ class VstsInfo(Model): """VstsInfo. :param collection: - :type collection: :class:`TeamProjectCollectionReference ` + :type collection: :class:`TeamProjectCollectionReference ` :param repository: - :type repository: :class:`GitRepository ` + :type repository: :class:`GitRepository ` :param server_url: :type server_url: str """ diff --git a/vsts/vsts/identity/v4_0/identity_client.py b/vsts/vsts/identity/v4_0/identity_client.py index eb640994..89c30211 100644 --- a/vsts/vsts/identity/v4_0/identity_client.py +++ b/vsts/vsts/identity/v4_0/identity_client.py @@ -28,8 +28,8 @@ def __init__(self, base_url=None, creds=None): def create_or_bind_with_claims(self, source_identity): """CreateOrBindWithClaims. [Preview API] - :param :class:` ` source_identity: - :rtype: :class:` ` + :param :class:` ` source_identity: + :rtype: :class:` ` """ content = self._serialize.body(source_identity, 'Identity') response = self._send(http_method='PUT', @@ -43,11 +43,11 @@ def get_descriptor_by_id(self, id, is_master_id=None): [Preview API] :param str id: :param bool is_master_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'str') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if is_master_id is not None: query_parameters['isMasterId'] = self._serialize.query('is_master_id', is_master_id, 'bool') @@ -60,7 +60,7 @@ def get_descriptor_by_id(self, id, is_master_id=None): def create_groups(self, container): """CreateGroups. - :param :class:` ` container: + :param :class:` ` container: :rtype: [Identity] """ content = self._serialize.body(container, 'object') @@ -75,9 +75,9 @@ def delete_group(self, group_id): """DeleteGroup. :param str group_id: """ - route_values = { - 'groupId': self._serialize.url('group_id', group_id, 'str') - } + route_values = {} + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') self._send(http_method='DELETE', location_id='5966283b-4196-4d57-9211-1b68f41ec1c2', version='4.0', @@ -112,7 +112,7 @@ def get_identity_changes(self, identity_sequence_id, group_sequence_id, scope_id :param int identity_sequence_id: :param int group_sequence_id: :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if identity_sequence_id is not None: @@ -204,11 +204,11 @@ def read_identity(self, identity_id, query_membership=None, properties=None): :param str identity_id: :param QueryMembership query_membership: :param str properties: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'identityId': self._serialize.url('identity_id', identity_id, 'str') - } + route_values = {} + if identity_id is not None: + route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -223,7 +223,7 @@ def read_identity(self, identity_id, query_membership=None, properties=None): def update_identities(self, identities): """UpdateIdentities. - :param :class:` ` identities: + :param :class:` ` identities: :rtype: [IdentityUpdateData] """ content = self._serialize.body(identities, 'VssJsonCollectionWrapper') @@ -236,12 +236,12 @@ def update_identities(self, identities): def update_identity(self, identity, identity_id): """UpdateIdentity. - :param :class:` ` identity: + :param :class:` ` identity: :param str identity_id: """ - route_values = { - 'identityId': self._serialize.url('identity_id', identity_id, 'str') - } + route_values = {} + if identity_id is not None: + route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str') content = self._serialize.body(identity, 'Identity') self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', @@ -251,8 +251,8 @@ def update_identity(self, identity, identity_id): def create_identity(self, framework_identity_info): """CreateIdentity. - :param :class:` ` framework_identity_info: - :rtype: :class:` ` + :param :class:` ` framework_identity_info: + :rtype: :class:` ` """ content = self._serialize.body(framework_identity_info, 'FrameworkIdentityInfo') response = self._send(http_method='PUT', @@ -264,7 +264,7 @@ def create_identity(self, framework_identity_info): def read_identity_batch(self, batch_info): """ReadIdentityBatch. [Preview API] - :param :class:` ` batch_info: + :param :class:` ` batch_info: :rtype: [Identity] """ content = self._serialize.body(batch_info, 'IdentityBatchInfo') @@ -279,11 +279,11 @@ def get_identity_snapshot(self, scope_id): """GetIdentitySnapshot. [Preview API] :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') response = self._send(http_method='GET', location_id='d56223df-8ccd-45c9-89b4-eddf692400d7', version='4.0-preview.1', @@ -303,7 +303,7 @@ def get_max_sequence_id(self): def get_self(self): """GetSelf. Read identity of the home tenant request user. - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='4bb02b5b-c120-4be2-b68e-21f7c50a4b82', @@ -317,10 +317,11 @@ def add_member(self, container_id, member_id): :param str member_id: :rtype: bool """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str'), - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') response = self._send(http_method='PUT', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.0-preview.1', @@ -333,12 +334,13 @@ def read_member(self, container_id, member_id, query_membership=None): :param str container_id: :param str member_id: :param QueryMembership query_membership: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str'), - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -356,9 +358,9 @@ def read_members(self, container_id, query_membership=None): :param QueryMembership query_membership: :rtype: [str] """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -377,10 +379,11 @@ def remove_member(self, container_id, member_id): :param str member_id: :rtype: bool """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str'), - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') response = self._send(http_method='DELETE', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.0-preview.1', @@ -393,12 +396,13 @@ def read_member_of(self, member_id, container_id, query_membership=None): :param str member_id: :param str container_id: :param QueryMembership query_membership: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'memberId': self._serialize.url('member_id', member_id, 'str'), - 'containerId': self._serialize.url('container_id', container_id, 'str') - } + route_values = {} + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -416,9 +420,9 @@ def read_members_of(self, member_id, query_membership=None): :param QueryMembership query_membership: :rtype: [str] """ - route_values = { - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -433,13 +437,13 @@ def read_members_of(self, member_id, query_membership=None): def create_scope(self, info, scope_id): """CreateScope. [Preview API] - :param :class:` ` info: + :param :class:` ` info: :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') content = self._serialize.body(info, 'CreateScopeInfo') response = self._send(http_method='PUT', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', @@ -453,9 +457,9 @@ def delete_scope(self, scope_id): [Preview API] :param str scope_id: """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') self._send(http_method='DELETE', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', version='4.0-preview.1', @@ -465,11 +469,11 @@ def get_scope_by_id(self, scope_id): """GetScopeById. [Preview API] :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') response = self._send(http_method='GET', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', version='4.0-preview.1', @@ -480,7 +484,7 @@ def get_scope_by_name(self, scope_name): """GetScopeByName. [Preview API] :param str scope_name: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if scope_name is not None: @@ -494,12 +498,12 @@ def get_scope_by_name(self, scope_name): def rename_scope(self, rename_scope, scope_id): """RenameScope. [Preview API] - :param :class:` ` rename_scope: + :param :class:` ` rename_scope: :param str scope_id: """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') content = self._serialize.body(rename_scope, 'IdentityScope') self._send(http_method='PATCH', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', @@ -510,7 +514,7 @@ def rename_scope(self, rename_scope, scope_id): def get_signed_in_token(self): """GetSignedInToken. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='6074ff18-aaad-4abb-a41e-5c75f6178057', @@ -520,7 +524,7 @@ def get_signed_in_token(self): def get_signout_token(self): """GetSignoutToken. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='be39e83c-7529-45e9-9c67-0410885880da', @@ -531,11 +535,11 @@ def get_tenant(self, tenant_id): """GetTenant. [Preview API] :param str tenant_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'tenantId': self._serialize.url('tenant_id', tenant_id, 'str') - } + route_values = {} + if tenant_id is not None: + route_values['tenantId'] = self._serialize.url('tenant_id', tenant_id, 'str') response = self._send(http_method='GET', location_id='5f0a1723-2e2c-4c31-8cae-002d01bdd592', version='4.0-preview.1', diff --git a/vsts/vsts/identity/v4_0/models/access_token_result.py b/vsts/vsts/identity/v4_0/models/access_token_result.py index 203f22c5..7ec13e88 100644 --- a/vsts/vsts/identity/v4_0/models/access_token_result.py +++ b/vsts/vsts/identity/v4_0/models/access_token_result.py @@ -13,7 +13,7 @@ class AccessTokenResult(Model): """AccessTokenResult. :param access_token: - :type access_token: :class:`JsonWebToken ` + :type access_token: :class:`JsonWebToken ` :param access_token_error: :type access_token_error: object :param authorization_id: @@ -23,7 +23,7 @@ class AccessTokenResult(Model): :param has_error: :type has_error: bool :param refresh_token: - :type refresh_token: :class:`RefreshTokenGrant ` + :type refresh_token: :class:`RefreshTokenGrant ` :param token_type: :type token_type: str :param valid_to: diff --git a/vsts/vsts/identity/v4_0/models/changed_identities.py b/vsts/vsts/identity/v4_0/models/changed_identities.py index 76909563..1cb58d93 100644 --- a/vsts/vsts/identity/v4_0/models/changed_identities.py +++ b/vsts/vsts/identity/v4_0/models/changed_identities.py @@ -13,9 +13,9 @@ class ChangedIdentities(Model): """ChangedIdentities. :param identities: Changed Identities - :type identities: list of :class:`Identity ` + :type identities: list of :class:`Identity ` :param sequence_context: Last Identity SequenceId - :type sequence_context: :class:`ChangedIdentitiesContext ` + :type sequence_context: :class:`ChangedIdentitiesContext ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_0/models/group_membership.py b/vsts/vsts/identity/v4_0/models/group_membership.py index 103ac171..4728df3e 100644 --- a/vsts/vsts/identity/v4_0/models/group_membership.py +++ b/vsts/vsts/identity/v4_0/models/group_membership.py @@ -15,7 +15,7 @@ class GroupMembership(Model): :param active: :type active: bool :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: :type id: str :param queried_id: diff --git a/vsts/vsts/identity/v4_0/models/identity.py b/vsts/vsts/identity/v4_0/models/identity.py index fc6bcd0e..3ab07faa 100644 --- a/vsts/vsts/identity/v4_0/models/identity.py +++ b/vsts/vsts/identity/v4_0/models/identity.py @@ -15,7 +15,7 @@ class Identity(Model): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: :type id: str :param is_active: @@ -27,19 +27,19 @@ class Identity(Model): :param member_ids: :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param subject_descriptor: - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ diff --git a/vsts/vsts/identity/v4_0/models/identity_batch_info.py b/vsts/vsts/identity/v4_0/models/identity_batch_info.py index e1ebf401..5e1798c0 100644 --- a/vsts/vsts/identity/v4_0/models/identity_batch_info.py +++ b/vsts/vsts/identity/v4_0/models/identity_batch_info.py @@ -13,7 +13,7 @@ class IdentityBatchInfo(Model): """IdentityBatchInfo. :param descriptors: - :type descriptors: list of :class:`str ` + :type descriptors: list of :class:`str ` :param identity_ids: :type identity_ids: list of str :param include_restricted_visibility: diff --git a/vsts/vsts/identity/v4_0/models/identity_scope.py b/vsts/vsts/identity/v4_0/models/identity_scope.py index e46f395e..6cb63a09 100644 --- a/vsts/vsts/identity/v4_0/models/identity_scope.py +++ b/vsts/vsts/identity/v4_0/models/identity_scope.py @@ -13,7 +13,7 @@ class IdentityScope(Model): """IdentityScope. :param administrators: - :type administrators: :class:`str ` + :type administrators: :class:`str ` :param id: :type id: str :param is_active: @@ -31,7 +31,7 @@ class IdentityScope(Model): :param securing_host_id: :type securing_host_id: str :param subject_descriptor: - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_0/models/identity_self.py b/vsts/vsts/identity/v4_0/models/identity_self.py index e1ae58dc..e4f90f43 100644 --- a/vsts/vsts/identity/v4_0/models/identity_self.py +++ b/vsts/vsts/identity/v4_0/models/identity_self.py @@ -19,7 +19,7 @@ class IdentitySelf(Model): :param id: :type id: str :param tenants: - :type tenants: list of :class:`TenantInfo ` + :type tenants: list of :class:`TenantInfo ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_0/models/identity_snapshot.py b/vsts/vsts/identity/v4_0/models/identity_snapshot.py index bafad083..59229d1a 100644 --- a/vsts/vsts/identity/v4_0/models/identity_snapshot.py +++ b/vsts/vsts/identity/v4_0/models/identity_snapshot.py @@ -13,15 +13,15 @@ class IdentitySnapshot(Model): """IdentitySnapshot. :param groups: - :type groups: list of :class:`Identity ` + :type groups: list of :class:`Identity ` :param identity_ids: :type identity_ids: list of str :param memberships: - :type memberships: list of :class:`GroupMembership ` + :type memberships: list of :class:`GroupMembership ` :param scope_id: :type scope_id: str :param scopes: - :type scopes: list of :class:`IdentityScope ` + :type scopes: list of :class:`IdentityScope ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_0/models/refresh_token_grant.py b/vsts/vsts/identity/v4_0/models/refresh_token_grant.py index 05293e91..05a13501 100644 --- a/vsts/vsts/identity/v4_0/models/refresh_token_grant.py +++ b/vsts/vsts/identity/v4_0/models/refresh_token_grant.py @@ -15,7 +15,7 @@ class RefreshTokenGrant(AuthorizationGrant): :param grant_type: :type grant_type: object :param jwt: - :type jwt: :class:`JsonWebToken ` + :type jwt: :class:`JsonWebToken ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_1/identity_client.py b/vsts/vsts/identity/v4_1/identity_client.py index e9c206d9..bf86d156 100644 --- a/vsts/vsts/identity/v4_1/identity_client.py +++ b/vsts/vsts/identity/v4_1/identity_client.py @@ -28,8 +28,8 @@ def __init__(self, base_url=None, creds=None): def create_or_bind_with_claims(self, source_identity): """CreateOrBindWithClaims. [Preview API] - :param :class:` ` source_identity: - :rtype: :class:` ` + :param :class:` ` source_identity: + :rtype: :class:` ` """ content = self._serialize.body(source_identity, 'Identity') response = self._send(http_method='PUT', @@ -43,11 +43,11 @@ def get_descriptor_by_id(self, id, is_master_id=None): [Preview API] :param str id: :param bool is_master_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'str') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if is_master_id is not None: query_parameters['isMasterId'] = self._serialize.query('is_master_id', is_master_id, 'bool') @@ -61,7 +61,7 @@ def get_descriptor_by_id(self, id, is_master_id=None): def create_groups(self, container): """CreateGroups. [Preview API] - :param :class:` ` container: + :param :class:` ` container: :rtype: [Identity] """ content = self._serialize.body(container, 'object') @@ -77,9 +77,9 @@ def delete_group(self, group_id): [Preview API] :param str group_id: """ - route_values = { - 'groupId': self._serialize.url('group_id', group_id, 'str') - } + route_values = {} + if group_id is not None: + route_values['groupId'] = self._serialize.url('group_id', group_id, 'str') self._send(http_method='DELETE', location_id='5966283b-4196-4d57-9211-1b68f41ec1c2', version='4.1-preview.1', @@ -116,7 +116,7 @@ def get_identity_changes(self, identity_sequence_id, group_sequence_id, scope_id :param int identity_sequence_id: :param int group_sequence_id: :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if identity_sequence_id is not None: @@ -212,11 +212,11 @@ def read_identity(self, identity_id, query_membership=None, properties=None): :param str identity_id: :param QueryMembership query_membership: :param str properties: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'identityId': self._serialize.url('identity_id', identity_id, 'str') - } + route_values = {} + if identity_id is not None: + route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -232,7 +232,7 @@ def read_identity(self, identity_id, query_membership=None, properties=None): def update_identities(self, identities): """UpdateIdentities. [Preview API] - :param :class:` ` identities: + :param :class:` ` identities: :rtype: [IdentityUpdateData] """ content = self._serialize.body(identities, 'VssJsonCollectionWrapper') @@ -246,12 +246,12 @@ def update_identities(self, identities): def update_identity(self, identity, identity_id): """UpdateIdentity. [Preview API] - :param :class:` ` identity: + :param :class:` ` identity: :param str identity_id: """ - route_values = { - 'identityId': self._serialize.url('identity_id', identity_id, 'str') - } + route_values = {} + if identity_id is not None: + route_values['identityId'] = self._serialize.url('identity_id', identity_id, 'str') content = self._serialize.body(identity, 'Identity') self._send(http_method='PUT', location_id='28010c54-d0c0-4c89-a5b0-1c9e188b9fb7', @@ -262,8 +262,8 @@ def update_identity(self, identity, identity_id): def create_identity(self, framework_identity_info): """CreateIdentity. [Preview API] - :param :class:` ` framework_identity_info: - :rtype: :class:` ` + :param :class:` ` framework_identity_info: + :rtype: :class:` ` """ content = self._serialize.body(framework_identity_info, 'FrameworkIdentityInfo') response = self._send(http_method='PUT', @@ -275,7 +275,7 @@ def create_identity(self, framework_identity_info): def read_identity_batch(self, batch_info): """ReadIdentityBatch. [Preview API] - :param :class:` ` batch_info: + :param :class:` ` batch_info: :rtype: [Identity] """ content = self._serialize.body(batch_info, 'IdentityBatchInfo') @@ -290,11 +290,11 @@ def get_identity_snapshot(self, scope_id): """GetIdentitySnapshot. [Preview API] :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') response = self._send(http_method='GET', location_id='d56223df-8ccd-45c9-89b4-eddf692400d7', version='4.1-preview.1', @@ -314,7 +314,7 @@ def get_max_sequence_id(self): def get_self(self): """GetSelf. [Preview API] Read identity of the home tenant request user. - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='4bb02b5b-c120-4be2-b68e-21f7c50a4b82', @@ -328,10 +328,11 @@ def add_member(self, container_id, member_id): :param str member_id: :rtype: bool """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str'), - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') response = self._send(http_method='PUT', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.1-preview.1', @@ -344,12 +345,13 @@ def read_member(self, container_id, member_id, query_membership=None): :param str container_id: :param str member_id: :param QueryMembership query_membership: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str'), - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -367,9 +369,9 @@ def read_members(self, container_id, query_membership=None): :param QueryMembership query_membership: :rtype: [str] """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -388,10 +390,11 @@ def remove_member(self, container_id, member_id): :param str member_id: :rtype: bool """ - route_values = { - 'containerId': self._serialize.url('container_id', container_id, 'str'), - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') response = self._send(http_method='DELETE', location_id='8ba35978-138e-41f8-8963-7b1ea2c5f775', version='4.1-preview.1', @@ -404,12 +407,13 @@ def read_member_of(self, member_id, container_id, query_membership=None): :param str member_id: :param str container_id: :param QueryMembership query_membership: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'memberId': self._serialize.url('member_id', member_id, 'str'), - 'containerId': self._serialize.url('container_id', container_id, 'str') - } + route_values = {} + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') + if container_id is not None: + route_values['containerId'] = self._serialize.url('container_id', container_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -427,9 +431,9 @@ def read_members_of(self, member_id, query_membership=None): :param QueryMembership query_membership: :rtype: [str] """ - route_values = { - 'memberId': self._serialize.url('member_id', member_id, 'str') - } + route_values = {} + if member_id is not None: + route_values['memberId'] = self._serialize.url('member_id', member_id, 'str') query_parameters = {} if query_membership is not None: query_parameters['queryMembership'] = self._serialize.query('query_membership', query_membership, 'QueryMembership') @@ -444,13 +448,13 @@ def read_members_of(self, member_id, query_membership=None): def create_scope(self, info, scope_id): """CreateScope. [Preview API] - :param :class:` ` info: + :param :class:` ` info: :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') content = self._serialize.body(info, 'CreateScopeInfo') response = self._send(http_method='PUT', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', @@ -464,9 +468,9 @@ def delete_scope(self, scope_id): [Preview API] :param str scope_id: """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') self._send(http_method='DELETE', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', version='4.1-preview.1', @@ -476,11 +480,11 @@ def get_scope_by_id(self, scope_id): """GetScopeById. [Preview API] :param str scope_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') response = self._send(http_method='GET', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', version='4.1-preview.1', @@ -491,7 +495,7 @@ def get_scope_by_name(self, scope_name): """GetScopeByName. [Preview API] :param str scope_name: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if scope_name is not None: @@ -505,12 +509,12 @@ def get_scope_by_name(self, scope_name): def rename_scope(self, rename_scope, scope_id): """RenameScope. [Preview API] - :param :class:` ` rename_scope: + :param :class:` ` rename_scope: :param str scope_id: """ - route_values = { - 'scopeId': self._serialize.url('scope_id', scope_id, 'str') - } + route_values = {} + if scope_id is not None: + route_values['scopeId'] = self._serialize.url('scope_id', scope_id, 'str') content = self._serialize.body(rename_scope, 'IdentityScope') self._send(http_method='PATCH', location_id='4e11e2bf-1e79-4eb5-8f34-a6337bd0de38', @@ -521,7 +525,7 @@ def rename_scope(self, rename_scope, scope_id): def get_signed_in_token(self): """GetSignedInToken. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='6074ff18-aaad-4abb-a41e-5c75f6178057', @@ -531,7 +535,7 @@ def get_signed_in_token(self): def get_signout_token(self): """GetSignoutToken. [Preview API] - :rtype: :class:` ` + :rtype: :class:` ` """ response = self._send(http_method='GET', location_id='be39e83c-7529-45e9-9c67-0410885880da', @@ -542,11 +546,11 @@ def get_tenant(self, tenant_id): """GetTenant. [Preview API] :param str tenant_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'tenantId': self._serialize.url('tenant_id', tenant_id, 'str') - } + route_values = {} + if tenant_id is not None: + route_values['tenantId'] = self._serialize.url('tenant_id', tenant_id, 'str') response = self._send(http_method='GET', location_id='5f0a1723-2e2c-4c31-8cae-002d01bdd592', version='4.1-preview.1', diff --git a/vsts/vsts/identity/v4_1/models/access_token_result.py b/vsts/vsts/identity/v4_1/models/access_token_result.py index 203f22c5..958f43bb 100644 --- a/vsts/vsts/identity/v4_1/models/access_token_result.py +++ b/vsts/vsts/identity/v4_1/models/access_token_result.py @@ -13,7 +13,7 @@ class AccessTokenResult(Model): """AccessTokenResult. :param access_token: - :type access_token: :class:`JsonWebToken ` + :type access_token: :class:`JsonWebToken ` :param access_token_error: :type access_token_error: object :param authorization_id: @@ -23,7 +23,7 @@ class AccessTokenResult(Model): :param has_error: :type has_error: bool :param refresh_token: - :type refresh_token: :class:`RefreshTokenGrant ` + :type refresh_token: :class:`RefreshTokenGrant ` :param token_type: :type token_type: str :param valid_to: diff --git a/vsts/vsts/identity/v4_1/models/changed_identities.py b/vsts/vsts/identity/v4_1/models/changed_identities.py index 76909563..32b30a32 100644 --- a/vsts/vsts/identity/v4_1/models/changed_identities.py +++ b/vsts/vsts/identity/v4_1/models/changed_identities.py @@ -13,9 +13,9 @@ class ChangedIdentities(Model): """ChangedIdentities. :param identities: Changed Identities - :type identities: list of :class:`Identity ` + :type identities: list of :class:`Identity ` :param sequence_context: Last Identity SequenceId - :type sequence_context: :class:`ChangedIdentitiesContext ` + :type sequence_context: :class:`ChangedIdentitiesContext ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_1/models/group_membership.py b/vsts/vsts/identity/v4_1/models/group_membership.py index 103ac171..8a0d801b 100644 --- a/vsts/vsts/identity/v4_1/models/group_membership.py +++ b/vsts/vsts/identity/v4_1/models/group_membership.py @@ -15,7 +15,7 @@ class GroupMembership(Model): :param active: :type active: bool :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: :type id: str :param queried_id: diff --git a/vsts/vsts/identity/v4_1/models/identity.py b/vsts/vsts/identity/v4_1/models/identity.py index fc6bcd0e..2622bc22 100644 --- a/vsts/vsts/identity/v4_1/models/identity.py +++ b/vsts/vsts/identity/v4_1/models/identity.py @@ -15,7 +15,7 @@ class Identity(Model): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: :type id: str :param is_active: @@ -27,19 +27,19 @@ class Identity(Model): :param member_ids: :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param subject_descriptor: - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ diff --git a/vsts/vsts/identity/v4_1/models/identity_batch_info.py b/vsts/vsts/identity/v4_1/models/identity_batch_info.py index e1ebf401..527e9a8e 100644 --- a/vsts/vsts/identity/v4_1/models/identity_batch_info.py +++ b/vsts/vsts/identity/v4_1/models/identity_batch_info.py @@ -13,7 +13,7 @@ class IdentityBatchInfo(Model): """IdentityBatchInfo. :param descriptors: - :type descriptors: list of :class:`str ` + :type descriptors: list of :class:`str ` :param identity_ids: :type identity_ids: list of str :param include_restricted_visibility: diff --git a/vsts/vsts/identity/v4_1/models/identity_scope.py b/vsts/vsts/identity/v4_1/models/identity_scope.py index e46f395e..046f11e1 100644 --- a/vsts/vsts/identity/v4_1/models/identity_scope.py +++ b/vsts/vsts/identity/v4_1/models/identity_scope.py @@ -13,7 +13,7 @@ class IdentityScope(Model): """IdentityScope. :param administrators: - :type administrators: :class:`str ` + :type administrators: :class:`str ` :param id: :type id: str :param is_active: @@ -31,7 +31,7 @@ class IdentityScope(Model): :param securing_host_id: :type securing_host_id: str :param subject_descriptor: - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_1/models/identity_self.py b/vsts/vsts/identity/v4_1/models/identity_self.py index e1ae58dc..daa61649 100644 --- a/vsts/vsts/identity/v4_1/models/identity_self.py +++ b/vsts/vsts/identity/v4_1/models/identity_self.py @@ -19,7 +19,7 @@ class IdentitySelf(Model): :param id: :type id: str :param tenants: - :type tenants: list of :class:`TenantInfo ` + :type tenants: list of :class:`TenantInfo ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_1/models/identity_snapshot.py b/vsts/vsts/identity/v4_1/models/identity_snapshot.py index bafad083..dbba580b 100644 --- a/vsts/vsts/identity/v4_1/models/identity_snapshot.py +++ b/vsts/vsts/identity/v4_1/models/identity_snapshot.py @@ -13,15 +13,15 @@ class IdentitySnapshot(Model): """IdentitySnapshot. :param groups: - :type groups: list of :class:`Identity ` + :type groups: list of :class:`Identity ` :param identity_ids: :type identity_ids: list of str :param memberships: - :type memberships: list of :class:`GroupMembership ` + :type memberships: list of :class:`GroupMembership ` :param scope_id: :type scope_id: str :param scopes: - :type scopes: list of :class:`IdentityScope ` + :type scopes: list of :class:`IdentityScope ` """ _attribute_map = { diff --git a/vsts/vsts/identity/v4_1/models/refresh_token_grant.py b/vsts/vsts/identity/v4_1/models/refresh_token_grant.py index 05293e91..1ce08212 100644 --- a/vsts/vsts/identity/v4_1/models/refresh_token_grant.py +++ b/vsts/vsts/identity/v4_1/models/refresh_token_grant.py @@ -15,7 +15,7 @@ class RefreshTokenGrant(AuthorizationGrant): :param grant_type: :type grant_type: object :param jwt: - :type jwt: :class:`JsonWebToken ` + :type jwt: :class:`JsonWebToken ` """ _attribute_map = { diff --git a/vsts/vsts/location/v4_0/location_client.py b/vsts/vsts/location/v4_0/location_client.py index 276badc4..43aef308 100644 --- a/vsts/vsts/location/v4_0/location_client.py +++ b/vsts/vsts/location/v4_0/location_client.py @@ -31,7 +31,7 @@ def get_connection_data(self, connect_options=None, last_change_id=None, last_ch :param ConnectOptions connect_options: :param int last_change_id: Obsolete 32-bit LastChangeId :param long last_change_id64: Non-truncated 64-bit LastChangeId - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if connect_options is not None: @@ -50,11 +50,11 @@ def get_resource_area(self, area_id): """GetResourceArea. [Preview API] :param str area_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'areaId': self._serialize.url('area_id', area_id, 'str') - } + route_values = {} + if area_id is not None: + route_values['areaId'] = self._serialize.url('area_id', area_id, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', version='4.0-preview.1', @@ -78,10 +78,11 @@ def delete_service_definition(self, service_type, identifier): :param str service_type: :param str identifier: """ - route_values = { - 'serviceType': self._serialize.url('service_type', service_type, 'str'), - 'identifier': self._serialize.url('identifier', identifier, 'str') - } + route_values = {} + if service_type is not None: + route_values['serviceType'] = self._serialize.url('service_type', service_type, 'str') + if identifier is not None: + route_values['identifier'] = self._serialize.url('identifier', identifier, 'str') self._send(http_method='DELETE', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', version='4.0-preview.1', @@ -93,12 +94,13 @@ def get_service_definition(self, service_type, identifier, allow_fault_in=None): :param str service_type: :param str identifier: :param bool allow_fault_in: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'serviceType': self._serialize.url('service_type', service_type, 'str'), - 'identifier': self._serialize.url('identifier', identifier, 'str') - } + route_values = {} + if service_type is not None: + route_values['serviceType'] = self._serialize.url('service_type', service_type, 'str') + if identifier is not None: + route_values['identifier'] = self._serialize.url('identifier', identifier, 'str') query_parameters = {} if allow_fault_in is not None: query_parameters['allowFaultIn'] = self._serialize.query('allow_fault_in', allow_fault_in, 'bool') @@ -115,9 +117,9 @@ def get_service_definitions(self, service_type=None): :param str service_type: :rtype: [ServiceDefinition] """ - route_values = { - 'serviceType': self._serialize.url('service_type', service_type, 'str') - } + route_values = {} + if service_type is not None: + route_values['serviceType'] = self._serialize.url('service_type', service_type, 'str') response = self._send(http_method='GET', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', version='4.0-preview.1', @@ -128,7 +130,7 @@ def get_service_definitions(self, service_type=None): def update_service_definitions(self, service_definitions): """UpdateServiceDefinitions. [Preview API] - :param :class:` ` service_definitions: + :param :class:` ` service_definitions: """ content = self._serialize.body(service_definitions, 'VssJsonCollectionWrapper') self._send(http_method='PATCH', diff --git a/vsts/vsts/location/v4_0/models/connection_data.py b/vsts/vsts/location/v4_0/models/connection_data.py index 6e047e11..85d70a0b 100644 --- a/vsts/vsts/location/v4_0/models/connection_data.py +++ b/vsts/vsts/location/v4_0/models/connection_data.py @@ -13,9 +13,9 @@ class ConnectionData(Model): """ConnectionData. :param authenticated_user: The Id of the authenticated user who made this request. More information about the user can be obtained by passing this Id to the Identity service - :type authenticated_user: :class:`Identity ` + :type authenticated_user: :class:`Identity ` :param authorized_user: The Id of the authorized user who made this request. More information about the user can be obtained by passing this Id to the Identity service - :type authorized_user: :class:`Identity ` + :type authorized_user: :class:`Identity ` :param deployment_id: The id for the server. :type deployment_id: str :param instance_id: The instance id for this host. @@ -23,7 +23,7 @@ class ConnectionData(Model): :param last_user_access: The last user access for this instance. Null if not requested specifically. :type last_user_access: datetime :param location_service_data: Data that the location service holds. - :type location_service_data: :class:`LocationServiceData ` + :type location_service_data: :class:`LocationServiceData ` :param web_application_relative_directory: The virtual directory of the host we are talking to. :type web_application_relative_directory: str """ diff --git a/vsts/vsts/location/v4_0/models/identity.py b/vsts/vsts/location/v4_0/models/identity.py index e41ab437..36327d2b 100644 --- a/vsts/vsts/location/v4_0/models/identity.py +++ b/vsts/vsts/location/v4_0/models/identity.py @@ -15,7 +15,7 @@ class Identity(Model): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: :type id: str :param is_active: @@ -27,19 +27,19 @@ class Identity(Model): :param member_ids: :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param subject_descriptor: - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ diff --git a/vsts/vsts/location/v4_0/models/location_service_data.py b/vsts/vsts/location/v4_0/models/location_service_data.py index 333f6620..72027dd7 100644 --- a/vsts/vsts/location/v4_0/models/location_service_data.py +++ b/vsts/vsts/location/v4_0/models/location_service_data.py @@ -13,7 +13,7 @@ class LocationServiceData(Model): """LocationServiceData. :param access_mappings: Data about the access mappings contained by this location service. - :type access_mappings: list of :class:`AccessMapping ` + :type access_mappings: list of :class:`AccessMapping ` :param client_cache_fresh: Data that the location service holds. :type client_cache_fresh: bool :param client_cache_time_to_live: The time to live on the location service cache. @@ -25,7 +25,7 @@ class LocationServiceData(Model): :param last_change_id64: The non-truncated 64-bit id for the last change that took place on the server. :type last_change_id64: long :param service_definitions: Data about the service definitions contained by this location service. - :type service_definitions: list of :class:`ServiceDefinition ` + :type service_definitions: list of :class:`ServiceDefinition ` :param service_owner: The identifier of the deployment which is hosting this location data (e.g. SPS, TFS, ELS, Napa, etc.) :type service_owner: str """ diff --git a/vsts/vsts/location/v4_0/models/service_definition.py b/vsts/vsts/location/v4_0/models/service_definition.py index 068a87ae..8201cd26 100644 --- a/vsts/vsts/location/v4_0/models/service_definition.py +++ b/vsts/vsts/location/v4_0/models/service_definition.py @@ -21,7 +21,7 @@ class ServiceDefinition(Model): :param inherit_level: :type inherit_level: object :param location_mappings: - :type location_mappings: list of :class:`LocationMapping ` + :type location_mappings: list of :class:`LocationMapping ` :param max_version: Maximum api version that this resource supports (current server version for this resource). Copied from ApiResourceLocation. :type max_version: str :param min_version: Minimum api version that this resource supports. Copied from ApiResourceLocation. @@ -31,7 +31,7 @@ class ServiceDefinition(Model): :param parent_service_type: :type parent_service_type: str :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param relative_path: :type relative_path: str :param relative_to_setting: diff --git a/vsts/vsts/location/v4_1/location_client.py b/vsts/vsts/location/v4_1/location_client.py index 4e1b2527..5b2f3011 100644 --- a/vsts/vsts/location/v4_1/location_client.py +++ b/vsts/vsts/location/v4_1/location_client.py @@ -31,7 +31,7 @@ def get_connection_data(self, connect_options=None, last_change_id=None, last_ch :param ConnectOptions connect_options: :param int last_change_id: Obsolete 32-bit LastChangeId :param long last_change_id64: Non-truncated 64-bit LastChangeId - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if connect_options is not None: @@ -50,11 +50,11 @@ def get_resource_area(self, area_id): """GetResourceArea. [Preview API] :param str area_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'areaId': self._serialize.url('area_id', area_id, 'str') - } + route_values = {} + if area_id is not None: + route_values['areaId'] = self._serialize.url('area_id', area_id, 'str') response = self._send(http_method='GET', location_id='e81700f7-3be2-46de-8624-2eb35882fcaa', version='4.1-preview.1', @@ -78,10 +78,11 @@ def delete_service_definition(self, service_type, identifier): :param str service_type: :param str identifier: """ - route_values = { - 'serviceType': self._serialize.url('service_type', service_type, 'str'), - 'identifier': self._serialize.url('identifier', identifier, 'str') - } + route_values = {} + if service_type is not None: + route_values['serviceType'] = self._serialize.url('service_type', service_type, 'str') + if identifier is not None: + route_values['identifier'] = self._serialize.url('identifier', identifier, 'str') self._send(http_method='DELETE', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', version='4.1-preview.1', @@ -94,12 +95,13 @@ def get_service_definition(self, service_type, identifier, allow_fault_in=None, :param str identifier: :param bool allow_fault_in: If true, we will attempt to fault in a host instance mapping if in SPS. :param bool preview_fault_in: If true, we will calculate and return a host instance mapping, but not persist it. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'serviceType': self._serialize.url('service_type', service_type, 'str'), - 'identifier': self._serialize.url('identifier', identifier, 'str') - } + route_values = {} + if service_type is not None: + route_values['serviceType'] = self._serialize.url('service_type', service_type, 'str') + if identifier is not None: + route_values['identifier'] = self._serialize.url('identifier', identifier, 'str') query_parameters = {} if allow_fault_in is not None: query_parameters['allowFaultIn'] = self._serialize.query('allow_fault_in', allow_fault_in, 'bool') @@ -118,9 +120,9 @@ def get_service_definitions(self, service_type=None): :param str service_type: :rtype: [ServiceDefinition] """ - route_values = { - 'serviceType': self._serialize.url('service_type', service_type, 'str') - } + route_values = {} + if service_type is not None: + route_values['serviceType'] = self._serialize.url('service_type', service_type, 'str') response = self._send(http_method='GET', location_id='d810a47d-f4f4-4a62-a03f-fa1860585c4c', version='4.1-preview.1', @@ -131,7 +133,7 @@ def get_service_definitions(self, service_type=None): def update_service_definitions(self, service_definitions): """UpdateServiceDefinitions. [Preview API] - :param :class:` ` service_definitions: + :param :class:` ` service_definitions: """ content = self._serialize.body(service_definitions, 'VssJsonCollectionWrapper') self._send(http_method='PATCH', diff --git a/vsts/vsts/location/v4_1/models/connection_data.py b/vsts/vsts/location/v4_1/models/connection_data.py index 6e047e11..513b677d 100644 --- a/vsts/vsts/location/v4_1/models/connection_data.py +++ b/vsts/vsts/location/v4_1/models/connection_data.py @@ -13,9 +13,9 @@ class ConnectionData(Model): """ConnectionData. :param authenticated_user: The Id of the authenticated user who made this request. More information about the user can be obtained by passing this Id to the Identity service - :type authenticated_user: :class:`Identity ` + :type authenticated_user: :class:`Identity ` :param authorized_user: The Id of the authorized user who made this request. More information about the user can be obtained by passing this Id to the Identity service - :type authorized_user: :class:`Identity ` + :type authorized_user: :class:`Identity ` :param deployment_id: The id for the server. :type deployment_id: str :param instance_id: The instance id for this host. @@ -23,7 +23,7 @@ class ConnectionData(Model): :param last_user_access: The last user access for this instance. Null if not requested specifically. :type last_user_access: datetime :param location_service_data: Data that the location service holds. - :type location_service_data: :class:`LocationServiceData ` + :type location_service_data: :class:`LocationServiceData ` :param web_application_relative_directory: The virtual directory of the host we are talking to. :type web_application_relative_directory: str """ diff --git a/vsts/vsts/location/v4_1/models/identity.py b/vsts/vsts/location/v4_1/models/identity.py index e41ab437..65172c4a 100644 --- a/vsts/vsts/location/v4_1/models/identity.py +++ b/vsts/vsts/location/v4_1/models/identity.py @@ -15,7 +15,7 @@ class Identity(Model): :param custom_display_name: The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) :type custom_display_name: str :param descriptor: - :type descriptor: :class:`str ` + :type descriptor: :class:`str ` :param id: :type id: str :param is_active: @@ -27,19 +27,19 @@ class Identity(Model): :param member_ids: :type member_ids: list of str :param member_of: - :type member_of: list of :class:`str ` + :type member_of: list of :class:`str ` :param members: - :type members: list of :class:`str ` + :type members: list of :class:`str ` :param meta_type_id: :type meta_type_id: int :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param provider_display_name: The display name for the identity as specified by the source identity provider. :type provider_display_name: str :param resource_version: :type resource_version: int :param subject_descriptor: - :type subject_descriptor: :class:`str ` + :type subject_descriptor: :class:`str ` :param unique_user_id: :type unique_user_id: int """ diff --git a/vsts/vsts/location/v4_1/models/location_service_data.py b/vsts/vsts/location/v4_1/models/location_service_data.py index 333f6620..122cf2fb 100644 --- a/vsts/vsts/location/v4_1/models/location_service_data.py +++ b/vsts/vsts/location/v4_1/models/location_service_data.py @@ -13,7 +13,7 @@ class LocationServiceData(Model): """LocationServiceData. :param access_mappings: Data about the access mappings contained by this location service. - :type access_mappings: list of :class:`AccessMapping ` + :type access_mappings: list of :class:`AccessMapping ` :param client_cache_fresh: Data that the location service holds. :type client_cache_fresh: bool :param client_cache_time_to_live: The time to live on the location service cache. @@ -25,7 +25,7 @@ class LocationServiceData(Model): :param last_change_id64: The non-truncated 64-bit id for the last change that took place on the server. :type last_change_id64: long :param service_definitions: Data about the service definitions contained by this location service. - :type service_definitions: list of :class:`ServiceDefinition ` + :type service_definitions: list of :class:`ServiceDefinition ` :param service_owner: The identifier of the deployment which is hosting this location data (e.g. SPS, TFS, ELS, Napa, etc.) :type service_owner: str """ diff --git a/vsts/vsts/location/v4_1/models/service_definition.py b/vsts/vsts/location/v4_1/models/service_definition.py index 068a87ae..8684205a 100644 --- a/vsts/vsts/location/v4_1/models/service_definition.py +++ b/vsts/vsts/location/v4_1/models/service_definition.py @@ -21,7 +21,7 @@ class ServiceDefinition(Model): :param inherit_level: :type inherit_level: object :param location_mappings: - :type location_mappings: list of :class:`LocationMapping ` + :type location_mappings: list of :class:`LocationMapping ` :param max_version: Maximum api version that this resource supports (current server version for this resource). Copied from ApiResourceLocation. :type max_version: str :param min_version: Minimum api version that this resource supports. Copied from ApiResourceLocation. @@ -31,7 +31,7 @@ class ServiceDefinition(Model): :param parent_service_type: :type parent_service_type: str :param properties: - :type properties: :class:`object ` + :type properties: :class:`object ` :param relative_path: :type relative_path: str :param relative_to_setting: diff --git a/vsts/vsts/operations/v4_0/models/operation.py b/vsts/vsts/operations/v4_0/models/operation.py index b84d57bf..1bc4e215 100644 --- a/vsts/vsts/operations/v4_0/models/operation.py +++ b/vsts/vsts/operations/v4_0/models/operation.py @@ -19,7 +19,7 @@ class Operation(OperationReference): :param url: Url to get the full object. :type url: str :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param result_message: The result message which is generally not set. :type result_message: str """ diff --git a/vsts/vsts/operations/v4_0/operations_client.py b/vsts/vsts/operations/v4_0/operations_client.py index 62c66d06..282a4cd9 100644 --- a/vsts/vsts/operations/v4_0/operations_client.py +++ b/vsts/vsts/operations/v4_0/operations_client.py @@ -29,11 +29,11 @@ def get_operation(self, operation_id): """GetOperation. Gets an operation from the the Id. :param str operation_id: The id for the operation. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'operationId': self._serialize.url('operation_id', operation_id, 'str') - } + route_values = {} + if operation_id is not None: + route_values['operationId'] = self._serialize.url('operation_id', operation_id, 'str') response = self._send(http_method='GET', location_id='9a1b74b4-2ca8-4a9f-8470-c2f2e6fdc949', version='4.0', diff --git a/vsts/vsts/operations/v4_1/models/operation.py b/vsts/vsts/operations/v4_1/models/operation.py index 5d9b0a8c..502b100d 100644 --- a/vsts/vsts/operations/v4_1/models/operation.py +++ b/vsts/vsts/operations/v4_1/models/operation.py @@ -21,13 +21,13 @@ class Operation(OperationReference): :param url: URL to get the full operation object. :type url: str :param _links: Links to other related objects. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param detailed_message: Detailed messaged about the status of an operation. :type detailed_message: str :param result_message: Result message for an operation. :type result_message: str :param result_url: URL to the operation result. - :type result_url: :class:`OperationResultReference ` + :type result_url: :class:`OperationResultReference ` """ _attribute_map = { diff --git a/vsts/vsts/operations/v4_1/operations_client.py b/vsts/vsts/operations/v4_1/operations_client.py index 4aa36e41..5bedf682 100644 --- a/vsts/vsts/operations/v4_1/operations_client.py +++ b/vsts/vsts/operations/v4_1/operations_client.py @@ -30,11 +30,11 @@ def get_operation(self, operation_id, plugin_id=None): [Preview API] Gets an operation from the the operationId using the given pluginId. :param str operation_id: The ID for the operation. :param str plugin_id: The ID for the plugin. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'operationId': self._serialize.url('operation_id', operation_id, 'str') - } + route_values = {} + if operation_id is not None: + route_values['operationId'] = self._serialize.url('operation_id', operation_id, 'str') query_parameters = {} if plugin_id is not None: query_parameters['pluginId'] = self._serialize.query('plugin_id', plugin_id, 'str') diff --git a/vsts/vsts/policy/v4_0/models/policy_configuration.py b/vsts/vsts/policy/v4_0/models/policy_configuration.py index 58456bb0..444fb2f7 100644 --- a/vsts/vsts/policy/v4_0/models/policy_configuration.py +++ b/vsts/vsts/policy/v4_0/models/policy_configuration.py @@ -15,15 +15,15 @@ class PolicyConfiguration(VersionedPolicyConfigurationRef): :param id: :type id: int :param type: - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: :type url: str :param revision: :type revision: int :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by: - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: :type created_date: datetime :param is_blocking: @@ -33,7 +33,7 @@ class PolicyConfiguration(VersionedPolicyConfigurationRef): :param is_enabled: :type is_enabled: bool :param settings: - :type settings: :class:`object ` + :type settings: :class:`object ` """ _attribute_map = { diff --git a/vsts/vsts/policy/v4_0/models/policy_configuration_ref.py b/vsts/vsts/policy/v4_0/models/policy_configuration_ref.py index 292362a7..069f41bf 100644 --- a/vsts/vsts/policy/v4_0/models/policy_configuration_ref.py +++ b/vsts/vsts/policy/v4_0/models/policy_configuration_ref.py @@ -15,7 +15,7 @@ class PolicyConfigurationRef(Model): :param id: :type id: int :param type: - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: :type url: str """ diff --git a/vsts/vsts/policy/v4_0/models/policy_evaluation_record.py b/vsts/vsts/policy/v4_0/models/policy_evaluation_record.py index cc9dff6a..8ca910ea 100644 --- a/vsts/vsts/policy/v4_0/models/policy_evaluation_record.py +++ b/vsts/vsts/policy/v4_0/models/policy_evaluation_record.py @@ -13,15 +13,15 @@ class PolicyEvaluationRecord(Model): """PolicyEvaluationRecord. :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifact_id: :type artifact_id: str :param completed_date: :type completed_date: datetime :param configuration: - :type configuration: :class:`PolicyConfiguration ` + :type configuration: :class:`PolicyConfiguration ` :param context: - :type context: :class:`object ` + :type context: :class:`object ` :param evaluation_id: :type evaluation_id: str :param started_date: diff --git a/vsts/vsts/policy/v4_0/models/policy_type.py b/vsts/vsts/policy/v4_0/models/policy_type.py index b00d600a..b63adbd0 100644 --- a/vsts/vsts/policy/v4_0/models/policy_type.py +++ b/vsts/vsts/policy/v4_0/models/policy_type.py @@ -19,7 +19,7 @@ class PolicyType(PolicyTypeRef): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: :type description: str """ diff --git a/vsts/vsts/policy/v4_0/models/versioned_policy_configuration_ref.py b/vsts/vsts/policy/v4_0/models/versioned_policy_configuration_ref.py index 720df4c3..89ad8bba 100644 --- a/vsts/vsts/policy/v4_0/models/versioned_policy_configuration_ref.py +++ b/vsts/vsts/policy/v4_0/models/versioned_policy_configuration_ref.py @@ -15,7 +15,7 @@ class VersionedPolicyConfigurationRef(PolicyConfigurationRef): :param id: :type id: int :param type: - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: :type url: str :param revision: diff --git a/vsts/vsts/policy/v4_0/policy_client.py b/vsts/vsts/policy/v4_0/policy_client.py index 419e345c..a18a7f24 100644 --- a/vsts/vsts/policy/v4_0/policy_client.py +++ b/vsts/vsts/policy/v4_0/policy_client.py @@ -27,15 +27,16 @@ def __init__(self, base_url=None, creds=None): def create_policy_configuration(self, configuration, project, configuration_id=None): """CreatePolicyConfiguration. - :param :class:` ` configuration: + :param :class:` ` configuration: :param str project: Project ID or project name :param int configuration_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='POST', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', @@ -49,10 +50,11 @@ def delete_policy_configuration(self, project, configuration_id): :param str project: Project ID or project name :param int configuration_id: """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') self._send(http_method='DELETE', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='4.0', @@ -62,12 +64,13 @@ def get_policy_configuration(self, project, configuration_id): """GetPolicyConfiguration. :param str project: Project ID or project name :param int configuration_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='4.0', @@ -80,9 +83,9 @@ def get_policy_configurations(self, project, scope=None): :param str scope: :rtype: [PolicyConfiguration] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if scope is not None: query_parameters['scope'] = self._serialize.query('scope', scope, 'str') @@ -96,15 +99,16 @@ def get_policy_configurations(self, project, scope=None): def update_policy_configuration(self, configuration, project, configuration_id): """UpdatePolicyConfiguration. - :param :class:` ` configuration: + :param :class:` ` configuration: :param str project: Project ID or project name :param int configuration_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='PUT', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', @@ -118,12 +122,13 @@ def get_policy_evaluation(self, project, evaluation_id): [Preview API] :param str project: Project ID or project name :param str evaluation_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'evaluationId': self._serialize.url('evaluation_id', evaluation_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if evaluation_id is not None: + route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='GET', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', version='4.0-preview.1', @@ -135,12 +140,13 @@ def requeue_policy_evaluation(self, project, evaluation_id): [Preview API] :param str project: Project ID or project name :param str evaluation_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'evaluationId': self._serialize.url('evaluation_id', evaluation_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if evaluation_id is not None: + route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='PATCH', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', version='4.0-preview.1', @@ -157,9 +163,9 @@ def get_policy_evaluations(self, project, artifact_id, include_not_applicable=No :param int skip: :rtype: [PolicyEvaluationRecord] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if artifact_id is not None: query_parameters['artifactId'] = self._serialize.query('artifact_id', artifact_id, 'str') @@ -182,13 +188,15 @@ def get_policy_configuration_revision(self, project, configuration_id, revision_ :param str project: Project ID or project name :param int configuration_id: :param int revision_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int'), - 'revisionId': self._serialize.url('revision_id', revision_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') + if revision_id is not None: + route_values['revisionId'] = self._serialize.url('revision_id', revision_id, 'int') response = self._send(http_method='GET', location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95', version='4.0', @@ -203,10 +211,11 @@ def get_policy_configuration_revisions(self, project, configuration_id, top=None :param int skip: :rtype: [PolicyConfiguration] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -224,12 +233,13 @@ def get_policy_type(self, project, type_id): """GetPolicyType. :param str project: Project ID or project name :param str type_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'typeId': self._serialize.url('type_id', type_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type_id is not None: + route_values['typeId'] = self._serialize.url('type_id', type_id, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', version='4.0', @@ -241,9 +251,9 @@ def get_policy_types(self, project): :param str project: Project ID or project name :rtype: [PolicyType] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', version='4.0', diff --git a/vsts/vsts/policy/v4_1/models/policy_configuration.py b/vsts/vsts/policy/v4_1/models/policy_configuration.py index 4603f268..7b6445a6 100644 --- a/vsts/vsts/policy/v4_1/models/policy_configuration.py +++ b/vsts/vsts/policy/v4_1/models/policy_configuration.py @@ -15,15 +15,15 @@ class PolicyConfiguration(VersionedPolicyConfigurationRef): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str :param revision: The policy configuration revision ID. :type revision: int :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param created_by: A reference to the identity that created the policy. - :type created_by: :class:`IdentityRef ` + :type created_by: :class:`IdentityRef ` :param created_date: The date and time when the policy was created. :type created_date: datetime :param is_blocking: Indicates whether the policy is blocking. @@ -33,7 +33,7 @@ class PolicyConfiguration(VersionedPolicyConfigurationRef): :param is_enabled: Indicates whether the policy is enabled. :type is_enabled: bool :param settings: The policy configuration settings. - :type settings: :class:`object ` + :type settings: :class:`object ` """ _attribute_map = { diff --git a/vsts/vsts/policy/v4_1/models/policy_configuration_ref.py b/vsts/vsts/policy/v4_1/models/policy_configuration_ref.py index 301c7047..ac5c5608 100644 --- a/vsts/vsts/policy/v4_1/models/policy_configuration_ref.py +++ b/vsts/vsts/policy/v4_1/models/policy_configuration_ref.py @@ -15,7 +15,7 @@ class PolicyConfigurationRef(Model): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str """ diff --git a/vsts/vsts/policy/v4_1/models/policy_evaluation_record.py b/vsts/vsts/policy/v4_1/models/policy_evaluation_record.py index 721ad188..27f43c0c 100644 --- a/vsts/vsts/policy/v4_1/models/policy_evaluation_record.py +++ b/vsts/vsts/policy/v4_1/models/policy_evaluation_record.py @@ -13,15 +13,15 @@ class PolicyEvaluationRecord(Model): """PolicyEvaluationRecord. :param _links: Links to other related objects - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param artifact_id: A string which uniquely identifies the target of a policy evaluation. :type artifact_id: str :param completed_date: Time when this policy finished evaluating on this pull request. :type completed_date: datetime :param configuration: Contains all configuration data for the policy which is being evaluated. - :type configuration: :class:`PolicyConfiguration ` + :type configuration: :class:`PolicyConfiguration ` :param context: Internal context data of this policy evaluation. - :type context: :class:`object ` + :type context: :class:`object ` :param evaluation_id: Guid which uniquely identifies this evaluation record (one policy running on one pull request). :type evaluation_id: str :param started_date: Time when this policy was first evaluated on this pull request. diff --git a/vsts/vsts/policy/v4_1/models/policy_type.py b/vsts/vsts/policy/v4_1/models/policy_type.py index 190f725e..c4d045f9 100644 --- a/vsts/vsts/policy/v4_1/models/policy_type.py +++ b/vsts/vsts/policy/v4_1/models/policy_type.py @@ -19,7 +19,7 @@ class PolicyType(PolicyTypeRef): :param url: The URL where the policy type can be retrieved. :type url: str :param _links: The links to other objects related to this object. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: Detailed description of the policy type. :type description: str """ diff --git a/vsts/vsts/policy/v4_1/models/versioned_policy_configuration_ref.py b/vsts/vsts/policy/v4_1/models/versioned_policy_configuration_ref.py index 03eaf8bb..8b0a16da 100644 --- a/vsts/vsts/policy/v4_1/models/versioned_policy_configuration_ref.py +++ b/vsts/vsts/policy/v4_1/models/versioned_policy_configuration_ref.py @@ -15,7 +15,7 @@ class VersionedPolicyConfigurationRef(PolicyConfigurationRef): :param id: The policy configuration ID. :type id: int :param type: The policy configuration type. - :type type: :class:`PolicyTypeRef ` + :type type: :class:`PolicyTypeRef ` :param url: The URL where the policy configuration can be retrieved. :type url: str :param revision: The policy configuration revision ID. diff --git a/vsts/vsts/policy/v4_1/policy_client.py b/vsts/vsts/policy/v4_1/policy_client.py index a7e1e45c..a317a76a 100644 --- a/vsts/vsts/policy/v4_1/policy_client.py +++ b/vsts/vsts/policy/v4_1/policy_client.py @@ -28,15 +28,16 @@ def __init__(self, base_url=None, creds=None): def create_policy_configuration(self, configuration, project, configuration_id=None): """CreatePolicyConfiguration. [Preview API] Create a policy configuration of a given policy type. - :param :class:` ` configuration: The policy configuration to create. + :param :class:` ` configuration: The policy configuration to create. :param str project: Project ID or project name :param int configuration_id: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='POST', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', @@ -51,10 +52,11 @@ def delete_policy_configuration(self, project, configuration_id): :param str project: Project ID or project name :param int configuration_id: ID of the policy configuration to delete. """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') self._send(http_method='DELETE', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='4.1-preview.1', @@ -65,12 +67,13 @@ def get_policy_configuration(self, project, configuration_id): [Preview API] Get a policy configuration by its ID. :param str project: Project ID or project name :param int configuration_id: ID of the policy configuration - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') response = self._send(http_method='GET', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', version='4.1-preview.1', @@ -84,9 +87,9 @@ def get_policy_configurations(self, project, scope=None): :param str scope: The scope on which a subset of policies is applied. :rtype: [PolicyConfiguration] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if scope is not None: query_parameters['scope'] = self._serialize.query('scope', scope, 'str') @@ -101,15 +104,16 @@ def get_policy_configurations(self, project, scope=None): def update_policy_configuration(self, configuration, project, configuration_id): """UpdatePolicyConfiguration. [Preview API] Update a policy configuration by its ID. - :param :class:` ` configuration: The policy configuration to update. + :param :class:` ` configuration: The policy configuration to update. :param str project: Project ID or project name :param int configuration_id: ID of the existing policy configuration to be updated. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') content = self._serialize.body(configuration, 'PolicyConfiguration') response = self._send(http_method='PUT', location_id='dad91cbe-d183-45f8-9c6e-9c1164472121', @@ -123,12 +127,13 @@ def get_policy_evaluation(self, project, evaluation_id): [Preview API] Gets the present evaluation state of a policy. :param str project: Project ID or project name :param str evaluation_id: ID of the policy evaluation to be retrieved. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'evaluationId': self._serialize.url('evaluation_id', evaluation_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if evaluation_id is not None: + route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='GET', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', version='4.1-preview.1', @@ -140,12 +145,13 @@ def requeue_policy_evaluation(self, project, evaluation_id): [Preview API] Requeue the policy evaluation. :param str project: Project ID or project name :param str evaluation_id: ID of the policy evaluation to be retrieved. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'evaluationId': self._serialize.url('evaluation_id', evaluation_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if evaluation_id is not None: + route_values['evaluationId'] = self._serialize.url('evaluation_id', evaluation_id, 'str') response = self._send(http_method='PATCH', location_id='46aecb7a-5d2c-4647-897b-0209505a9fe4', version='4.1-preview.1', @@ -162,9 +168,9 @@ def get_policy_evaluations(self, project, artifact_id, include_not_applicable=No :param int skip: The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. :rtype: [PolicyEvaluationRecord] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if artifact_id is not None: query_parameters['artifactId'] = self._serialize.query('artifact_id', artifact_id, 'str') @@ -188,13 +194,15 @@ def get_policy_configuration_revision(self, project, configuration_id, revision_ :param str project: Project ID or project name :param int configuration_id: The policy configuration ID. :param int revision_id: The revision ID. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int'), - 'revisionId': self._serialize.url('revision_id', revision_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') + if revision_id is not None: + route_values['revisionId'] = self._serialize.url('revision_id', revision_id, 'int') response = self._send(http_method='GET', location_id='fe1e68a2-60d3-43cb-855b-85e41ae97c95', version='4.1-preview.1', @@ -210,10 +218,11 @@ def get_policy_configuration_revisions(self, project, configuration_id, top=None :param int skip: The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. :rtype: [PolicyConfiguration] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'configurationId': self._serialize.url('configuration_id', configuration_id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if configuration_id is not None: + route_values['configurationId'] = self._serialize.url('configuration_id', configuration_id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -232,12 +241,13 @@ def get_policy_type(self, project, type_id): [Preview API] Retrieve a specific policy type by ID. :param str project: Project ID or project name :param str type_id: The policy ID. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'typeId': self._serialize.url('type_id', type_id, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type_id is not None: + route_values['typeId'] = self._serialize.url('type_id', type_id, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', version='4.1-preview.1', @@ -250,9 +260,9 @@ def get_policy_types(self, project): :param str project: Project ID or project name :rtype: [PolicyType] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='44096322-2d3d-466a-bb30-d1b7de69f61f', version='4.1-preview.1', diff --git a/vsts/vsts/work_item_tracking/v4_0/models/account_my_work_result.py b/vsts/vsts/work_item_tracking/v4_0/models/account_my_work_result.py index 2c613ca0..b11684b7 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/account_my_work_result.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/account_my_work_result.py @@ -15,7 +15,7 @@ class AccountMyWorkResult(Model): :param query_size_limit_exceeded: True, when length of WorkItemDetails is same as the limit :type query_size_limit_exceeded: bool :param work_item_details: WorkItem Details - :type work_item_details: list of :class:`AccountWorkWorkItemModel ` + :type work_item_details: list of :class:`AccountWorkWorkItemModel ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/field_dependent_rule.py b/vsts/vsts/work_item_tracking/v4_0/models/field_dependent_rule.py index 1600f48a..9f83c976 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/field_dependent_rule.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/field_dependent_rule.py @@ -15,9 +15,9 @@ class FieldDependentRule(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dependent_fields: - :type dependent_fields: list of :class:`WorkItemFieldReference ` + :type dependent_fields: list of :class:`WorkItemFieldReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/project_work_item_state_colors.py b/vsts/vsts/work_item_tracking/v4_0/models/project_work_item_state_colors.py index 5a63da0c..31111254 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/project_work_item_state_colors.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/project_work_item_state_colors.py @@ -15,7 +15,7 @@ class ProjectWorkItemStateColors(Model): :param project_name: Project name :type project_name: str :param work_item_type_state_colors: State colors for all work item type in a project - :type work_item_type_state_colors: list of :class:`WorkItemTypeStateColors ` + :type work_item_type_state_colors: list of :class:`WorkItemTypeStateColors ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_item.py b/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_item.py index 9b50a3f7..b0c0dc3f 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_item.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_item.py @@ -15,15 +15,15 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param children: - :type children: list of :class:`QueryHierarchyItem ` + :type children: list of :class:`QueryHierarchyItem ` :param clauses: - :type clauses: :class:`WorkItemQueryClause ` + :type clauses: :class:`WorkItemQueryClause ` :param columns: - :type columns: list of :class:`WorkItemFieldReference ` + :type columns: list of :class:`WorkItemFieldReference ` :param created_by: - :type created_by: :class:`IdentityReference ` + :type created_by: :class:`IdentityReference ` :param created_date: :type created_date: datetime :param filter_options: @@ -41,11 +41,11 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param is_public: :type is_public: bool :param last_modified_by: - :type last_modified_by: :class:`IdentityReference ` + :type last_modified_by: :class:`IdentityReference ` :param last_modified_date: :type last_modified_date: datetime :param link_clauses: - :type link_clauses: :class:`WorkItemQueryClause ` + :type link_clauses: :class:`WorkItemQueryClause ` :param name: :type name: str :param path: @@ -53,11 +53,11 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param query_type: :type query_type: object :param sort_columns: - :type sort_columns: list of :class:`WorkItemQuerySortColumn ` + :type sort_columns: list of :class:`WorkItemQuerySortColumn ` :param source_clauses: - :type source_clauses: :class:`WorkItemQueryClause ` + :type source_clauses: :class:`WorkItemQueryClause ` :param target_clauses: - :type target_clauses: :class:`WorkItemQueryClause ` + :type target_clauses: :class:`WorkItemQueryClause ` :param wiql: :type wiql: str """ diff --git a/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_items_result.py b/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_items_result.py index 3330df99..76f1d64a 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_items_result.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/query_hierarchy_items_result.py @@ -17,7 +17,7 @@ class QueryHierarchyItemsResult(Model): :param has_more: :type has_more: bool :param value: - :type value: list of :class:`QueryHierarchyItem ` + :type value: list of :class:`QueryHierarchyItem ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/reporting_work_item_link.py b/vsts/vsts/work_item_tracking/v4_0/models/reporting_work_item_link.py index 3b8ec17d..def0a49d 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/reporting_work_item_link.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/reporting_work_item_link.py @@ -13,7 +13,7 @@ class ReportingWorkItemLink(Model): """ReportingWorkItemLink. :param changed_by: - :type changed_by: :class:`IdentityRef ` + :type changed_by: :class:`IdentityRef ` :param changed_date: :type changed_date: datetime :param changed_operation: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item.py index 48ccf55a..f31fcdfb 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item.py @@ -15,13 +15,13 @@ class WorkItem(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param fields: :type fields: dict :param id: :type id: int :param relations: - :type relations: list of :class:`WorkItemRelation ` + :type relations: list of :class:`WorkItemRelation ` :param rev: :type rev: int """ diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_classification_node.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_classification_node.py index a1f45619..1864398d 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_classification_node.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_classification_node.py @@ -15,11 +15,11 @@ class WorkItemClassificationNode(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param attributes: :type attributes: dict :param children: - :type children: list of :class:`WorkItemClassificationNode ` + :type children: list of :class:`WorkItemClassificationNode ` :param id: :type id: int :param identifier: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_comment.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_comment.py index 7d45412d..398a4a01 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_comment.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_comment.py @@ -15,9 +15,9 @@ class WorkItemComment(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param revised_by: - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: :type revised_date: datetime :param revision: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_comments.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_comments.py index ac6fa67c..5fab0ced 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_comments.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_comments.py @@ -13,7 +13,7 @@ class WorkItemComments(Model): """WorkItemComments. :param comments: - :type comments: list of :class:`WorkItemComment ` + :type comments: list of :class:`WorkItemComment ` :param count: :type count: int :param from_revision_count: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_delete.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_delete.py index b1cf6a11..d1a6686e 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_delete.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_delete.py @@ -31,7 +31,7 @@ class WorkItemDelete(WorkItemDeleteReference): :param url: :type url: str :param resource: - :type resource: :class:`WorkItem ` + :type resource: :class:`WorkItem ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_field.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_field.py index 94251e90..be716c99 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_field.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_field.py @@ -15,7 +15,7 @@ class WorkItemField(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: :type description: str :param is_identity: @@ -31,7 +31,7 @@ class WorkItemField(WorkItemTrackingResource): :param reference_name: :type reference_name: str :param supported_operations: - :type supported_operations: list of :class:`WorkItemFieldOperation ` + :type supported_operations: list of :class:`WorkItemFieldOperation ` :param type: :type type: object """ diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_history.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_history.py index e5af5160..1c11baf3 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_history.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_history.py @@ -15,11 +15,11 @@ class WorkItemHistory(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param rev: :type rev: int :param revised_by: - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: :type revised_date: datetime :param value: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_link.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_link.py index 895bc62d..abf2d833 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_link.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_link.py @@ -15,9 +15,9 @@ class WorkItemLink(Model): :param rel: :type rel: str :param source: - :type source: :class:`WorkItemReference ` + :type source: :class:`WorkItemReference ` :param target: - :type target: :class:`WorkItemReference ` + :type target: :class:`WorkItemReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_clause.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_clause.py index 16200be6..5b845e6e 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_clause.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_clause.py @@ -13,17 +13,17 @@ class WorkItemQueryClause(Model): """WorkItemQueryClause. :param clauses: - :type clauses: list of :class:`WorkItemQueryClause ` + :type clauses: list of :class:`WorkItemQueryClause ` :param field: - :type field: :class:`WorkItemFieldReference ` + :type field: :class:`WorkItemFieldReference ` :param field_value: - :type field_value: :class:`WorkItemFieldReference ` + :type field_value: :class:`WorkItemFieldReference ` :param is_field_value: :type is_field_value: bool :param logical_operator: :type logical_operator: object :param operator: - :type operator: :class:`WorkItemFieldOperation ` + :type operator: :class:`WorkItemFieldOperation ` :param value: :type value: str """ diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_result.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_result.py index 671383fe..79a17cc4 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_result.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_result.py @@ -15,17 +15,17 @@ class WorkItemQueryResult(Model): :param as_of: :type as_of: datetime :param columns: - :type columns: list of :class:`WorkItemFieldReference ` + :type columns: list of :class:`WorkItemFieldReference ` :param query_result_type: :type query_result_type: object :param query_type: :type query_type: object :param sort_columns: - :type sort_columns: list of :class:`WorkItemQuerySortColumn ` + :type sort_columns: list of :class:`WorkItemQuerySortColumn ` :param work_item_relations: - :type work_item_relations: list of :class:`WorkItemLink ` + :type work_item_relations: list of :class:`WorkItemLink ` :param work_items: - :type work_items: list of :class:`WorkItemReference ` + :type work_items: list of :class:`WorkItemReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_sort_column.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_sort_column.py index 4dd5a759..1203e993 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_sort_column.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_query_sort_column.py @@ -15,7 +15,7 @@ class WorkItemQuerySortColumn(Model): :param descending: :type descending: bool :param field: - :type field: :class:`WorkItemFieldReference ` + :type field: :class:`WorkItemFieldReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_type.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_type.py index 28732fc5..9192153b 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_type.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_type.py @@ -15,7 +15,7 @@ class WorkItemRelationType(WorkItemTrackingReference): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param name: :type name: str :param reference_name: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_updates.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_updates.py index 9eb85cc2..ba6739e5 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_updates.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_relation_updates.py @@ -13,11 +13,11 @@ class WorkItemRelationUpdates(Model): """WorkItemRelationUpdates. :param added: - :type added: list of :class:`WorkItemRelation ` + :type added: list of :class:`WorkItemRelation ` :param removed: - :type removed: list of :class:`WorkItemRelation ` + :type removed: list of :class:`WorkItemRelation ` :param updated: - :type updated: list of :class:`WorkItemRelation ` + :type updated: list of :class:`WorkItemRelation ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_template.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_template.py index 4b7690a7..b456dbdc 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_template.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_template.py @@ -15,7 +15,7 @@ class WorkItemTemplate(WorkItemTemplateReference): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: :type description: str :param id: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_template_reference.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_template_reference.py index 8204a848..672d9c17 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_template_reference.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_template_reference.py @@ -15,7 +15,7 @@ class WorkItemTemplateReference(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: :type description: str :param id: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_reference.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_reference.py index 95d83b87..b74bee0c 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_reference.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_reference.py @@ -15,7 +15,7 @@ class WorkItemTrackingReference(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param name: :type name: str :param reference_name: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_resource.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_resource.py index ce772d12..19f3d6d6 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_resource.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_tracking_resource.py @@ -15,7 +15,7 @@ class WorkItemTrackingResource(WorkItemTrackingResourceReference): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type.py index 43fd815e..fb9fe1ef 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type.py @@ -15,17 +15,17 @@ class WorkItemType(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param color: :type color: str :param description: :type description: str :param field_instances: - :type field_instances: list of :class:`WorkItemTypeFieldInstance ` + :type field_instances: list of :class:`WorkItemTypeFieldInstance ` :param fields: - :type fields: list of :class:`WorkItemTypeFieldInstance ` + :type fields: list of :class:`WorkItemTypeFieldInstance ` :param icon: - :type icon: :class:`WorkItemIcon ` + :type icon: :class:`WorkItemIcon ` :param name: :type name: str :param transitions: diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_category.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_category.py index c54e4194..5581bc08 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_category.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_category.py @@ -15,15 +15,15 @@ class WorkItemTypeCategory(WorkItemTrackingResource): :param url: :type url: str :param _links: - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_work_item_type: - :type default_work_item_type: :class:`WorkItemTypeReference ` + :type default_work_item_type: :class:`WorkItemTypeReference ` :param name: :type name: str :param reference_name: :type reference_name: str :param work_item_types: - :type work_item_types: list of :class:`WorkItemTypeReference ` + :type work_item_types: list of :class:`WorkItemTypeReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_field_instance.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_field_instance.py index a1551eac..91eb5881 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_field_instance.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_field_instance.py @@ -21,7 +21,7 @@ class WorkItemTypeFieldInstance(WorkItemFieldReference): :param always_required: :type always_required: bool :param field: - :type field: :class:`WorkItemFieldReference ` + :type field: :class:`WorkItemFieldReference ` :param help_text: :type help_text: str """ diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_state_colors.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_state_colors.py index 189d94e1..b0a24fde 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_state_colors.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_type_state_colors.py @@ -13,7 +13,7 @@ class WorkItemTypeStateColors(Model): """WorkItemTypeStateColors. :param state_colors: Work item type state colors - :type state_colors: list of :class:`WorkItemStateColor ` + :type state_colors: list of :class:`WorkItemStateColor ` :param work_item_type_name: Work item type name :type work_item_type_name: str """ diff --git a/vsts/vsts/work_item_tracking/v4_0/models/work_item_update.py b/vsts/vsts/work_item_tracking/v4_0/models/work_item_update.py index 1f6d33b0..c2ba7ccf 100644 --- a/vsts/vsts/work_item_tracking/v4_0/models/work_item_update.py +++ b/vsts/vsts/work_item_tracking/v4_0/models/work_item_update.py @@ -19,11 +19,11 @@ class WorkItemUpdate(WorkItemTrackingResourceReference): :param id: :type id: int :param relations: - :type relations: :class:`WorkItemRelationUpdates ` + :type relations: :class:`WorkItemRelationUpdates ` :param rev: :type rev: int :param revised_by: - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: :type revised_date: datetime :param work_item_id: diff --git a/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py b/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py index 120fd2a9..a63bb1ac 100644 --- a/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py +++ b/vsts/vsts/work_item_tracking/v4_0/work_item_tracking_client.py @@ -39,8 +39,8 @@ def get_work_artifact_link_types(self): def get_work_item_ids_for_artifact_uris(self, artifact_uri_query): """GetWorkItemIdsForArtifactUris. [Preview API] Gets the results of the work item ids linked to the artifact uri - :param :class:` ` artifact_uri_query: List of artifact uris. - :rtype: :class:` ` + :param :class:` ` artifact_uri_query: List of artifact uris. + :rtype: :class:` ` """ content = self._serialize.body(artifact_uri_query, 'ArtifactUriQuery') response = self._send(http_method='POST', @@ -56,7 +56,7 @@ def create_attachment(self, upload_stream, file_name=None, upload_type=None, are :param str file_name: :param str upload_type: :param str area_path: - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if file_name is not None: @@ -81,9 +81,9 @@ def get_attachment_content(self, id, file_name=None): :param str file_name: :rtype: object """ - route_values = { - 'id': self._serialize.url('id', id, 'str') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') @@ -101,9 +101,9 @@ def get_attachment_zip(self, id, file_name=None): :param str file_name: :rtype: object """ - route_values = { - 'id': self._serialize.url('id', id, 'str') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') @@ -120,9 +120,9 @@ def get_root_nodes(self, project, depth=None): :param int depth: :rtype: [WorkItemClassificationNode] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') @@ -136,17 +136,19 @@ def get_root_nodes(self, project, depth=None): def create_or_update_classification_node(self, posted_node, project, structure_group, path=None): """CreateOrUpdateClassificationNode. - :param :class:` ` posted_node: + :param :class:` ` posted_node: :param str project: Project ID or project name :param TreeStructureGroup structure_group: :param str path: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(posted_node, 'WorkItemClassificationNode') response = self._send(http_method='POST', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', @@ -162,11 +164,13 @@ def delete_classification_node(self, project, structure_group, path=None, reclas :param str path: :param int reclassify_id: """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if reclassify_id is not None: query_parameters['$reclassifyId'] = self._serialize.query('reclassify_id', reclassify_id, 'int') @@ -182,13 +186,15 @@ def get_classification_node(self, project, structure_group, path=None, depth=Non :param TreeStructureGroup structure_group: :param str path: :param int depth: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') @@ -201,17 +207,19 @@ def get_classification_node(self, project, structure_group, path=None, depth=Non def update_classification_node(self, posted_node, project, structure_group, path=None): """UpdateClassificationNode. - :param :class:` ` posted_node: + :param :class:` ` posted_node: :param str project: Project ID or project name :param TreeStructureGroup structure_group: :param str path: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(posted_node, 'WorkItemClassificationNode') response = self._send(http_method='PATCH', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', @@ -225,12 +233,13 @@ def get_comment(self, id, revision): [Preview API] Returns comment for a work item at the specified revision :param int id: :param int revision: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int'), - 'revision': self._serialize.url('revision', revision, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + if revision is not None: + route_values['revision'] = self._serialize.url('revision', revision, 'int') response = self._send(http_method='GET', location_id='19335ae7-22f7-4308-93d8-261f9384b7cf', version='4.0-preview.1', @@ -244,11 +253,11 @@ def get_comments(self, id, from_revision=None, top=None, order=None): :param int from_revision: Revision from which comments are to be fetched :param int top: The number of comments to return :param CommentSortOrder order: Ascending or descending by revision id - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if from_revision is not None: query_parameters['fromRevision'] = self._serialize.query('from_revision', from_revision, 'int') @@ -268,10 +277,11 @@ def delete_field(self, field_name_or_ref_name, project=None): :param str field_name_or_ref_name: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fieldNameOrRefName': self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if field_name_or_ref_name is not None: + route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') self._send(http_method='DELETE', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', version='4.0', @@ -282,12 +292,13 @@ def get_field(self, field_name_or_ref_name, project=None): Gets information on a specific field. :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fieldNameOrRefName': self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if field_name_or_ref_name is not None: + route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') response = self._send(http_method='GET', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', version='4.0', @@ -301,9 +312,9 @@ def get_fields(self, project=None, expand=None): :param GetFieldsExpand expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. :rtype: [WorkItemField] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'GetFieldsExpand') @@ -317,14 +328,15 @@ def get_fields(self, project=None, expand=None): def update_field(self, work_item_field, field_name_or_ref_name, project=None): """UpdateField. - :param :class:` ` work_item_field: + :param :class:` ` work_item_field: :param str field_name_or_ref_name: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fieldNameOrRefName': self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if field_name_or_ref_name is not None: + route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') content = self._serialize.body(work_item_field, 'WorkItemField') self._send(http_method='PATCH', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', @@ -335,15 +347,16 @@ def update_field(self, work_item_field, field_name_or_ref_name, project=None): def create_query(self, posted_query, project, query): """CreateQuery. Creates a query, or moves a query. - :param :class:` ` posted_query: The query to create. + :param :class:` ` posted_query: The query to create. :param str project: Project ID or project name :param str query: The parent path for the query to create. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') content = self._serialize.body(posted_query, 'QueryHierarchyItem') response = self._send(http_method='POST', location_id='a67d190c-c41f-424b-814d-0e906f659301', @@ -357,10 +370,11 @@ def delete_query(self, project, query): :param str project: Project ID or project name :param str query: """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') self._send(http_method='DELETE', location_id='a67d190c-c41f-424b-814d-0e906f659301', version='4.0', @@ -375,9 +389,9 @@ def get_queries(self, project, expand=None, depth=None, include_deleted=None): :param bool include_deleted: :rtype: [QueryHierarchyItem] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') @@ -401,12 +415,13 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non :param QueryExpand expand: :param int depth: :param bool include_deleted: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') @@ -429,11 +444,11 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted :param int top: :param QueryExpand expand: :param bool include_deleted: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if filter is not None: query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') @@ -452,16 +467,17 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted def update_query(self, query_update, project, query, undelete_descendants=None): """UpdateQuery. - :param :class:` ` query_update: + :param :class:` ` query_update: :param str project: Project ID or project name :param str query: :param bool undelete_descendants: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') query_parameters = {} if undelete_descendants is not None: query_parameters['$undeleteDescendants'] = self._serialize.query('undelete_descendants', undelete_descendants, 'bool') @@ -480,10 +496,11 @@ def destroy_work_item(self, id, project=None): :param int id: :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') self._send(http_method='DELETE', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', version='4.0-preview.1', @@ -494,12 +511,13 @@ def get_deleted_work_item(self, id, project=None): [Preview API] :param int id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', version='4.0-preview.1', @@ -512,9 +530,9 @@ def get_deleted_work_item_references(self, project=None): :param str project: Project ID or project name :rtype: [WorkItemDeleteShallowReference] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', version='4.0-preview.1', @@ -529,9 +547,9 @@ def get_deleted_work_items(self, ids, project=None): :param str project: Project ID or project name :rtype: [WorkItemDeleteReference] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if ids is not None: ids = ",".join(map(str, ids)) @@ -547,15 +565,16 @@ def get_deleted_work_items(self, ids, project=None): def restore_work_item(self, payload, id, project=None): """RestoreWorkItem. [Preview API] - :param :class:` ` payload: + :param :class:` ` payload: :param int id: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') content = self._serialize.body(payload, 'WorkItemDeleteUpdate') response = self._send(http_method='PATCH', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', @@ -570,12 +589,13 @@ def get_revision(self, id, revision_number, expand=None): :param int id: :param int revision_number: :param WorkItemExpand expand: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int'), - 'revisionNumber': self._serialize.url('revision_number', revision_number, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + if revision_number is not None: + route_values['revisionNumber'] = self._serialize.url('revision_number', revision_number, 'int') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') @@ -595,9 +615,9 @@ def get_revisions(self, id, top=None, skip=None, expand=None): :param WorkItemExpand expand: :rtype: [WorkItem] """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -616,7 +636,7 @@ def get_revisions(self, id, top=None, skip=None, expand=None): def evaluate_rules_on_field(self, rule_engine_input): """EvaluateRulesOnField. Validates the fields values. - :param :class:` ` rule_engine_input: + :param :class:` ` rule_engine_input: """ content = self._serialize.body(rule_engine_input, 'FieldsToEvaluate') self._send(http_method='POST', @@ -627,23 +647,27 @@ def evaluate_rules_on_field(self, rule_engine_input): def create_template(self, template, team_context): """CreateTemplate. [Preview API] Creates a template - :param :class:` ` template: Template contents - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + :param :class:` ` template: Template contents + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(template, 'WorkItemTemplate') response = self._send(http_method='POST', location_id='6a90345f-a676-4969-afce-8e163e1d5642', @@ -655,23 +679,27 @@ def create_template(self, template, team_context): def get_templates(self, team_context, workitemtypename=None): """GetTemplates. [Preview API] Gets template - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str workitemtypename: Optional, When specified returns templates for given Work item type. :rtype: [WorkItemTemplateReference] """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') query_parameters = {} if workitemtypename is not None: query_parameters['workitemtypename'] = self._serialize.query('workitemtypename', workitemtypename, 'str') @@ -686,23 +714,28 @@ def get_templates(self, team_context, workitemtypename=None): def delete_template(self, team_context, template_id): """DeleteTemplate. [Preview API] Deletes the template with given id - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str template_id: Template id """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') self._send(http_method='DELETE', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', version='4.0-preview.1', @@ -711,24 +744,29 @@ def delete_template(self, team_context, template_id): def get_template(self, team_context, template_id): """GetTemplate. [Preview API] Gets the template with specified id - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str template_id: Template Id - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') response = self._send(http_method='GET', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', version='4.0-preview.1', @@ -738,25 +776,30 @@ def get_template(self, team_context, template_id): def replace_template(self, template_content, team_context, template_id): """ReplaceTemplate. [Preview API] Replace template contents - :param :class:` ` template_content: Template contents to replace with - :param :class:` ` team_context: The team context for the operation + :param :class:` ` template_content: Template contents to replace with + :param :class:` ` team_context: The team context for the operation :param str template_id: Template id - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') content = self._serialize.body(template_content, 'WorkItemTemplate') response = self._send(http_method='PUT', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', @@ -770,12 +813,13 @@ def get_update(self, id, update_number): Returns a single update for a work item :param int id: :param int update_number: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int'), - 'updateNumber': self._serialize.url('update_number', update_number, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + if update_number is not None: + route_values['updateNumber'] = self._serialize.url('update_number', update_number, 'int') response = self._send(http_method='GET', location_id='6570bf97-d02c-4a91-8d93-3abe9895b1a9', version='4.0', @@ -790,9 +834,9 @@ def get_updates(self, id, top=None, skip=None): :param int skip: :rtype: [WorkItemUpdate] """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -809,25 +853,29 @@ def get_updates(self, id, top=None, skip=None): def query_by_wiql(self, wiql, team_context=None, time_precision=None, top=None): """QueryByWiql. Gets the results of the query. - :param :class:` ` wiql: The query containing the wiql. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` wiql: The query containing the wiql. + :param :class:` ` team_context: The team context for the operation :param bool time_precision: :param int top: - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') query_parameters = {} if time_precision is not None: query_parameters['timePrecision'] = self._serialize.query('time_precision', time_precision, 'bool') @@ -846,24 +894,29 @@ def get_query_result_count(self, id, team_context=None, time_precision=None): """GetQueryResultCount. Gets the results of the query by id. :param str id: The query id. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param bool time_precision: :rtype: int """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'id': self._serialize.url('id', id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if time_precision is not None: query_parameters['timePrecision'] = self._serialize.query('time_precision', time_precision, 'bool') @@ -878,24 +931,29 @@ def query_by_id(self, id, team_context=None, time_precision=None): """QueryById. Gets the results of the query by id. :param str id: The query id. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param bool time_precision: - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'id': self._serialize.url('id', id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if time_precision is not None: query_parameters['timePrecision'] = self._serialize.query('time_precision', time_precision, 'bool') @@ -912,11 +970,11 @@ def get_work_item_icon_json(self, icon, color=None, v=None): :param str icon: :param str color: :param int v: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'icon': self._serialize.url('icon', icon, 'str') - } + route_values = {} + if icon is not None: + route_values['icon'] = self._serialize.url('icon', icon, 'str') query_parameters = {} if color is not None: query_parameters['color'] = self._serialize.query('color', color, 'str') @@ -948,9 +1006,9 @@ def get_work_item_icon_svg(self, icon, color=None, v=None): :param int v: :rtype: object """ - route_values = { - 'icon': self._serialize.url('icon', icon, 'str') - } + route_values = {} + if icon is not None: + route_values['icon'] = self._serialize.url('icon', icon, 'str') query_parameters = {} if color is not None: query_parameters['color'] = self._serialize.query('color', color, 'str') @@ -970,11 +1028,11 @@ def get_reporting_links(self, project=None, types=None, continuation_token=None, :param [str] types: A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. :param str continuation_token: Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. :param datetime start_date_time: Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if types is not None: types = ",".join(types) @@ -994,11 +1052,11 @@ def get_relation_type(self, relation): """GetRelationType. Gets the work item relation types. :param str relation: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'relation': self._serialize.url('relation', relation, 'str') - } + route_values = {} + if relation is not None: + route_values['relation'] = self._serialize.url('relation', relation, 'str') response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', version='4.0', @@ -1030,11 +1088,11 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co :param bool include_latest_only: Return only the latest revisions of work items, skipping all historical revisions :param ReportingRevisionsExpand expand: Return all the fields in work item revisions, including long text fields which are not returned by default :param bool include_discussion_changes_only: Return only the those revisions of work items, where only history field was changed - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if fields is not None: fields = ",".join(fields) @@ -1068,16 +1126,16 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co def read_reporting_revisions_post(self, filter, project=None, continuation_token=None, start_date_time=None, expand=None): """ReadReportingRevisionsPost. Get a batch of work item revisions - :param :class:` ` filter: An object that contains request settings: field filter, type filter, identity format + :param :class:` ` filter: An object that contains request settings: field filter, type filter, identity format :param str project: Project ID or project name :param str continuation_token: Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. :param datetime start_date_time: Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. :param ReportingRevisionsExpand expand: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') @@ -1098,11 +1156,11 @@ def delete_work_item(self, id, destroy=None): """DeleteWorkItem. :param int id: :param bool destroy: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if destroy is not None: query_parameters['destroy'] = self._serialize.query('destroy', destroy, 'bool') @@ -1120,11 +1178,11 @@ def get_work_item(self, id, fields=None, as_of=None, expand=None): :param [str] fields: :param datetime as_of: :param WorkItemExpand expand: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if fields is not None: fields = ",".join(fields) @@ -1173,16 +1231,16 @@ def get_work_items(self, ids, fields=None, as_of=None, expand=None, error_policy def update_work_item(self, document, id, validate_only=None, bypass_rules=None, suppress_notifications=None): """UpdateWorkItem. Updates a single work item - :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the update + :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the update :param int id: The id of the work item to update :param bool validate_only: Indicate if you only want to validate the changes without saving the work item :param bool bypass_rules: Do not enforce the work item type rules on this update :param bool suppress_notifications: Do not fire any notifications for this change - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if validate_only is not None: query_parameters['validateOnly'] = self._serialize.query('validate_only', validate_only, 'bool') @@ -1203,18 +1261,19 @@ def update_work_item(self, document, id, validate_only=None, bypass_rules=None, def create_work_item(self, document, project, type, validate_only=None, bypass_rules=None, suppress_notifications=None): """CreateWorkItem. Creates a single work item - :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item + :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item :param str project: Project ID or project name :param str type: The work item type of the work item to create :param bool validate_only: Indicate if you only want to validate the changes without saving the work item :param bool bypass_rules: Do not enforce the work item type rules on this update :param bool suppress_notifications: Do not fire any notifications for this change - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') query_parameters = {} if validate_only is not None: query_parameters['validateOnly'] = self._serialize.query('validate_only', validate_only, 'bool') @@ -1240,12 +1299,13 @@ def get_work_item_template(self, project, type, fields=None, as_of=None, expand= :param str fields: :param datetime as_of: :param WorkItemExpand expand: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') query_parameters = {} if fields is not None: query_parameters['fields'] = self._serialize.query('fields', fields, 'str') @@ -1266,9 +1326,9 @@ def get_work_item_type_categories(self, project): :param str project: Project ID or project name :rtype: [WorkItemTypeCategory] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='9b9f5734-36c8-415e-ba67-f83b45c31408', version='4.0', @@ -1281,12 +1341,13 @@ def get_work_item_type_category(self, project, category): Returns a the deltas between work item revisions :param str project: Project ID or project name :param str category: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'category': self._serialize.url('category', category, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if category is not None: + route_values['category'] = self._serialize.url('category', category, 'str') response = self._send(http_method='GET', location_id='9b9f5734-36c8-415e-ba67-f83b45c31408', version='4.0', @@ -1298,12 +1359,13 @@ def get_work_item_type(self, project, type): Returns a the deltas between work item revisions :param str project: Project ID or project name :param str type: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa', version='4.0', @@ -1316,9 +1378,9 @@ def get_work_item_types(self, project): :param str project: Project ID or project name :rtype: [WorkItemType] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa', version='4.0', @@ -1332,13 +1394,15 @@ def get_dependent_fields(self, project, type, field): :param str project: Project ID or project name :param str type: :param str field: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str'), - 'field': self._serialize.url('field', field, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if field is not None: + route_values['field'] = self._serialize.url('field', field, 'str') response = self._send(http_method='GET', location_id='bd293ce5-3d25-4192-8e67-e8092e879efb', version='4.0', @@ -1352,10 +1416,11 @@ def get_work_item_type_states(self, project, type): :param str type: :rtype: [WorkItemStateColor] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7c9d7a76-4a09-43e8-b5df-bd792f4ac6aa', version='4.0-preview.1', @@ -1369,12 +1434,13 @@ def export_work_item_type_definition(self, project=None, type=None, export_globa :param str project: Project ID or project name :param str type: :param bool export_global_lists: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') query_parameters = {} if export_global_lists is not None: query_parameters['exportGlobalLists'] = self._serialize.query('export_global_lists', export_global_lists, 'bool') @@ -1388,13 +1454,13 @@ def export_work_item_type_definition(self, project=None, type=None, export_globa def update_work_item_type_definition(self, update_model, project=None): """UpdateWorkItemTypeDefinition. Add/updates a work item type - :param :class:` ` update_model: + :param :class:` ` update_model: :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') content = self._serialize.body(update_model, 'WorkItemTypeTemplateUpdateModel') response = self._send(http_method='POST', location_id='8637ac8b-5eb6-4f90-b3f7-4f2ff576a459', diff --git a/vsts/vsts/work_item_tracking/v4_1/models/account_my_work_result.py b/vsts/vsts/work_item_tracking/v4_1/models/account_my_work_result.py index 2c613ca0..39d22a57 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/account_my_work_result.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/account_my_work_result.py @@ -15,7 +15,7 @@ class AccountMyWorkResult(Model): :param query_size_limit_exceeded: True, when length of WorkItemDetails is same as the limit :type query_size_limit_exceeded: bool :param work_item_details: WorkItem Details - :type work_item_details: list of :class:`AccountWorkWorkItemModel ` + :type work_item_details: list of :class:`AccountWorkWorkItemModel ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/field_dependent_rule.py b/vsts/vsts/work_item_tracking/v4_1/models/field_dependent_rule.py index c4aa0f31..126f8f95 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/field_dependent_rule.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/field_dependent_rule.py @@ -15,9 +15,9 @@ class FieldDependentRule(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param dependent_fields: The dependent fields. - :type dependent_fields: list of :class:`WorkItemFieldReference ` + :type dependent_fields: list of :class:`WorkItemFieldReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/project_work_item_state_colors.py b/vsts/vsts/work_item_tracking/v4_1/models/project_work_item_state_colors.py index 5a63da0c..7931e5de 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/project_work_item_state_colors.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/project_work_item_state_colors.py @@ -15,7 +15,7 @@ class ProjectWorkItemStateColors(Model): :param project_name: Project name :type project_name: str :param work_item_type_state_colors: State colors for all work item type in a project - :type work_item_type_state_colors: list of :class:`WorkItemTypeStateColors ` + :type work_item_type_state_colors: list of :class:`WorkItemTypeStateColors ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py index a63bafc2..fe37d45c 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_item.py @@ -15,15 +15,15 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param children: - :type children: list of :class:`QueryHierarchyItem ` + :type children: list of :class:`QueryHierarchyItem ` :param clauses: - :type clauses: :class:`WorkItemQueryClause ` + :type clauses: :class:`WorkItemQueryClause ` :param columns: - :type columns: list of :class:`WorkItemFieldReference ` + :type columns: list of :class:`WorkItemFieldReference ` :param created_by: - :type created_by: :class:`IdentityReference ` + :type created_by: :class:`IdentityReference ` :param created_date: :type created_date: datetime :param filter_options: @@ -41,15 +41,15 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param is_public: :type is_public: bool :param last_executed_by: - :type last_executed_by: :class:`IdentityReference ` + :type last_executed_by: :class:`IdentityReference ` :param last_executed_date: :type last_executed_date: datetime :param last_modified_by: - :type last_modified_by: :class:`IdentityReference ` + :type last_modified_by: :class:`IdentityReference ` :param last_modified_date: :type last_modified_date: datetime :param link_clauses: - :type link_clauses: :class:`WorkItemQueryClause ` + :type link_clauses: :class:`WorkItemQueryClause ` :param name: :type name: str :param path: @@ -57,11 +57,11 @@ class QueryHierarchyItem(WorkItemTrackingResource): :param query_type: :type query_type: object :param sort_columns: - :type sort_columns: list of :class:`WorkItemQuerySortColumn ` + :type sort_columns: list of :class:`WorkItemQuerySortColumn ` :param source_clauses: - :type source_clauses: :class:`WorkItemQueryClause ` + :type source_clauses: :class:`WorkItemQueryClause ` :param target_clauses: - :type target_clauses: :class:`WorkItemQueryClause ` + :type target_clauses: :class:`WorkItemQueryClause ` :param wiql: :type wiql: str """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py index 3330df99..ff5a4898 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/query_hierarchy_items_result.py @@ -17,7 +17,7 @@ class QueryHierarchyItemsResult(Model): :param has_more: :type has_more: bool :param value: - :type value: list of :class:`QueryHierarchyItem ` + :type value: list of :class:`QueryHierarchyItem ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/reporting_work_item_link.py b/vsts/vsts/work_item_tracking/v4_1/models/reporting_work_item_link.py index 3b8ec17d..acbfd840 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/reporting_work_item_link.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/reporting_work_item_link.py @@ -13,7 +13,7 @@ class ReportingWorkItemLink(Model): """ReportingWorkItemLink. :param changed_by: - :type changed_by: :class:`IdentityRef ` + :type changed_by: :class:`IdentityRef ` :param changed_date: :type changed_date: datetime :param changed_operation: diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item.py index 8e97cf4f..3d8d61d1 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item.py @@ -15,13 +15,13 @@ class WorkItem(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param fields: Map of field and values for the work item. :type fields: dict :param id: The work item ID. :type id: int :param relations: Relations of the work item. - :type relations: list of :class:`WorkItemRelation ` + :type relations: list of :class:`WorkItemRelation ` :param rev: Revision number of the work item. :type rev: int """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_classification_node.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_classification_node.py index e316bee5..9e98f26e 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_classification_node.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_classification_node.py @@ -15,11 +15,11 @@ class WorkItemClassificationNode(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param attributes: Dictionary that has node attributes like start/finish date for iteration nodes. :type attributes: dict :param children: List of child nodes fetched. - :type children: list of :class:`WorkItemClassificationNode ` + :type children: list of :class:`WorkItemClassificationNode ` :param has_children: Flag that indicates if the classification node has any child nodes. :type has_children: bool :param id: Integer ID of the classification node. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py index f3c3f872..3298de29 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comment.py @@ -15,9 +15,9 @@ class WorkItemComment(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param revised_by: - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: :type revised_date: datetime :param revision: diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py index 31781561..549ad7bf 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_comments.py @@ -13,7 +13,7 @@ class WorkItemComments(Model): """WorkItemComments. :param comments: Comments collection. - :type comments: list of :class:`WorkItemComment ` + :type comments: list of :class:`WorkItemComment ` :param count: The count of comments. :type count: int :param from_revision_count: Count of comments from the revision. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_delete.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_delete.py index 0a0254f1..76968794 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_delete.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_delete.py @@ -31,7 +31,7 @@ class WorkItemDelete(WorkItemDeleteReference): :param url: REST API URL of the resource :type url: str :param resource: The work item object that was deleted. - :type resource: :class:`WorkItem ` + :type resource: :class:`WorkItem ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_field.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_field.py index 07b02026..8963da50 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_field.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_field.py @@ -15,7 +15,7 @@ class WorkItemField(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: The description of the field. :type description: str :param is_identity: Indicates whether this field is an identity field. @@ -31,7 +31,7 @@ class WorkItemField(WorkItemTrackingResource): :param reference_name: The reference name of the field. :type reference_name: str :param supported_operations: The supported operations on this field. - :type supported_operations: list of :class:`WorkItemFieldOperation ` + :type supported_operations: list of :class:`WorkItemFieldOperation ` :param type: The type of the field. :type type: object :param usage: The usage of the field. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_history.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_history.py index 2bacd1fe..60a120f4 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_history.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_history.py @@ -15,11 +15,11 @@ class WorkItemHistory(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param rev: :type rev: int :param revised_by: - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: :type revised_date: datetime :param value: diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py index 895bc62d..190f060c 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_link.py @@ -15,9 +15,9 @@ class WorkItemLink(Model): :param rel: :type rel: str :param source: - :type source: :class:`WorkItemReference ` + :type source: :class:`WorkItemReference ` :param target: - :type target: :class:`WorkItemReference ` + :type target: :class:`WorkItemReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py index 16200be6..4a260268 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_clause.py @@ -13,17 +13,17 @@ class WorkItemQueryClause(Model): """WorkItemQueryClause. :param clauses: - :type clauses: list of :class:`WorkItemQueryClause ` + :type clauses: list of :class:`WorkItemQueryClause ` :param field: - :type field: :class:`WorkItemFieldReference ` + :type field: :class:`WorkItemFieldReference ` :param field_value: - :type field_value: :class:`WorkItemFieldReference ` + :type field_value: :class:`WorkItemFieldReference ` :param is_field_value: :type is_field_value: bool :param logical_operator: :type logical_operator: object :param operator: - :type operator: :class:`WorkItemFieldOperation ` + :type operator: :class:`WorkItemFieldOperation ` :param value: :type value: str """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py index 671383fe..3c342d4c 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_result.py @@ -15,17 +15,17 @@ class WorkItemQueryResult(Model): :param as_of: :type as_of: datetime :param columns: - :type columns: list of :class:`WorkItemFieldReference ` + :type columns: list of :class:`WorkItemFieldReference ` :param query_result_type: :type query_result_type: object :param query_type: :type query_type: object :param sort_columns: - :type sort_columns: list of :class:`WorkItemQuerySortColumn ` + :type sort_columns: list of :class:`WorkItemQuerySortColumn ` :param work_item_relations: - :type work_item_relations: list of :class:`WorkItemLink ` + :type work_item_relations: list of :class:`WorkItemLink ` :param work_items: - :type work_items: list of :class:`WorkItemReference ` + :type work_items: list of :class:`WorkItemReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py index 4dd5a759..7517ac9a 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_query_sort_column.py @@ -15,7 +15,7 @@ class WorkItemQuerySortColumn(Model): :param descending: :type descending: bool :param field: - :type field: :class:`WorkItemFieldReference ` + :type field: :class:`WorkItemFieldReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_type.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_type.py index 740c275c..f04f57e9 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_type.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_type.py @@ -15,7 +15,7 @@ class WorkItemRelationType(WorkItemTrackingReference): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param name: The name. :type name: str :param reference_name: The reference name. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_updates.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_updates.py index f3c24115..cc5c9ac2 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_updates.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_relation_updates.py @@ -13,11 +13,11 @@ class WorkItemRelationUpdates(Model): """WorkItemRelationUpdates. :param added: List of newly added relations. - :type added: list of :class:`WorkItemRelation ` + :type added: list of :class:`WorkItemRelation ` :param removed: List of removed relations. - :type removed: list of :class:`WorkItemRelation ` + :type removed: list of :class:`WorkItemRelation ` :param updated: List of updated relations. - :type updated: list of :class:`WorkItemRelation ` + :type updated: list of :class:`WorkItemRelation ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_template.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_template.py index 3afb3ed6..c9cb3c3f 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_template.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_template.py @@ -15,7 +15,7 @@ class WorkItemTemplate(WorkItemTemplateReference): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: The description of the work item template. :type description: str :param id: The identifier of the work item template. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_template_reference.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_template_reference.py index e88c589f..2be411cd 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_template_reference.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_template_reference.py @@ -15,7 +15,7 @@ class WorkItemTemplateReference(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param description: The description of the work item template. :type description: str :param id: The identifier of the work item template. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_reference.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_reference.py index 5c15cf58..21f33d10 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_reference.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_reference.py @@ -15,7 +15,7 @@ class WorkItemTrackingReference(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param name: The name. :type name: str :param reference_name: The reference name. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_resource.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_resource.py index 10ca4e8e..ab6aad07 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_resource.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_tracking_resource.py @@ -15,7 +15,7 @@ class WorkItemTrackingResource(WorkItemTrackingResourceReference): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py index 333cbeed..26647eeb 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type.py @@ -15,17 +15,17 @@ class WorkItemType(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param color: The color. :type color: str :param description: The description of the work item type. :type description: str :param field_instances: The fields that exist on the work item type. - :type field_instances: list of :class:`WorkItemTypeFieldInstance ` + :type field_instances: list of :class:`WorkItemTypeFieldInstance ` :param fields: The fields that exist on the work item type. - :type fields: list of :class:`WorkItemTypeFieldInstance ` + :type fields: list of :class:`WorkItemTypeFieldInstance ` :param icon: The icon of the work item type. - :type icon: :class:`WorkItemIcon ` + :type icon: :class:`WorkItemIcon ` :param name: Gets the name of the work item type. :type name: str :param reference_name: The reference name of the work item type. diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_category.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_category.py index ba6501e9..cbab1415 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_category.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_category.py @@ -15,15 +15,15 @@ class WorkItemTypeCategory(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param default_work_item_type: Gets or sets the default type of the work item. - :type default_work_item_type: :class:`WorkItemTypeReference ` + :type default_work_item_type: :class:`WorkItemTypeReference ` :param name: The name of the category. :type name: str :param reference_name: The reference name of the category. :type reference_name: str :param work_item_types: The work item types that belond to the category. - :type work_item_types: list of :class:`WorkItemTypeReference ` + :type work_item_types: list of :class:`WorkItemTypeReference ` """ _attribute_map = { diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_state_colors.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_state_colors.py index 189d94e1..956e6e87 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_state_colors.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_type_state_colors.py @@ -13,7 +13,7 @@ class WorkItemTypeStateColors(Model): """WorkItemTypeStateColors. :param state_colors: Work item type state colors - :type state_colors: list of :class:`WorkItemStateColor ` + :type state_colors: list of :class:`WorkItemStateColor ` :param work_item_type_name: Work item type name :type work_item_type_name: str """ diff --git a/vsts/vsts/work_item_tracking/v4_1/models/work_item_update.py b/vsts/vsts/work_item_tracking/v4_1/models/work_item_update.py index 8cbc5ea1..3a96caab 100644 --- a/vsts/vsts/work_item_tracking/v4_1/models/work_item_update.py +++ b/vsts/vsts/work_item_tracking/v4_1/models/work_item_update.py @@ -15,17 +15,17 @@ class WorkItemUpdate(WorkItemTrackingResource): :param url: :type url: str :param _links: Link references to related REST resources. - :type _links: :class:`ReferenceLinks ` + :type _links: :class:`ReferenceLinks ` :param fields: List of updates to fields. :type fields: dict :param id: ID of update. :type id: int :param relations: List of updates to relations. - :type relations: :class:`WorkItemRelationUpdates ` + :type relations: :class:`WorkItemRelationUpdates ` :param rev: The revision number of work item update. :type rev: int :param revised_by: Identity for the work item update. - :type revised_by: :class:`IdentityReference ` + :type revised_by: :class:`IdentityReference ` :param revised_date: The work item updates revision date. :type revised_date: datetime :param work_item_id: The work item ID. diff --git a/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py b/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py index 9a9edf59..cb45a133 100644 --- a/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py +++ b/vsts/vsts/work_item_tracking/v4_1/work_item_tracking_client.py @@ -39,8 +39,8 @@ def get_work_artifact_link_types(self): def query_work_items_for_artifact_uris(self, artifact_uri_query): """QueryWorkItemsForArtifactUris. [Preview API] Queries work items linked to a given list of artifact URI. - :param :class:` ` artifact_uri_query: Defines a list of artifact URI for querying work items. - :rtype: :class:` ` + :param :class:` ` artifact_uri_query: Defines a list of artifact URI for querying work items. + :rtype: :class:` ` """ content = self._serialize.body(artifact_uri_query, 'ArtifactUriQuery') response = self._send(http_method='POST', @@ -56,7 +56,7 @@ def create_attachment(self, upload_stream, file_name=None, upload_type=None, are :param str file_name: The name of the file :param str upload_type: Attachment upload type: Simple or Chunked :param str area_path: Target project Area Path - :rtype: :class:` ` + :rtype: :class:` ` """ query_parameters = {} if file_name is not None: @@ -81,9 +81,9 @@ def get_attachment_content(self, id, file_name=None): :param str file_name: Name of the file :rtype: object """ - route_values = { - 'id': self._serialize.url('id', id, 'str') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') @@ -101,9 +101,9 @@ def get_attachment_zip(self, id, file_name=None): :param str file_name: Name of the file :rtype: object """ - route_values = { - 'id': self._serialize.url('id', id, 'str') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if file_name is not None: query_parameters['fileName'] = self._serialize.query('file_name', file_name, 'str') @@ -121,9 +121,9 @@ def get_root_nodes(self, project, depth=None): :param int depth: Depth of children to fetch. :rtype: [WorkItemClassificationNode] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') @@ -138,17 +138,19 @@ def get_root_nodes(self, project, depth=None): def create_or_update_classification_node(self, posted_node, project, structure_group, path=None): """CreateOrUpdateClassificationNode. [Preview API] Create new or update an existing classification node. - :param :class:` ` posted_node: Node to create or update. + :param :class:` ` posted_node: Node to create or update. :param str project: Project ID or project name :param TreeStructureGroup structure_group: Structure group of the classification node, area or iteration. :param str path: Path of the classification node. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(posted_node, 'WorkItemClassificationNode') response = self._send(http_method='POST', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', @@ -165,11 +167,13 @@ def delete_classification_node(self, project, structure_group, path=None, reclas :param str path: Path of the classification node. :param int reclassify_id: Id of the target classification node for reclassification. """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if reclassify_id is not None: query_parameters['$reclassifyId'] = self._serialize.query('reclassify_id', reclassify_id, 'int') @@ -186,13 +190,15 @@ def get_classification_node(self, project, structure_group, path=None, depth=Non :param TreeStructureGroup structure_group: Structure group of the classification node, area or iteration. :param str path: Path of the classification node. :param int depth: Depth of children to fetch. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') query_parameters = {} if depth is not None: query_parameters['$depth'] = self._serialize.query('depth', depth, 'int') @@ -206,17 +212,19 @@ def get_classification_node(self, project, structure_group, path=None, depth=Non def update_classification_node(self, posted_node, project, structure_group, path=None): """UpdateClassificationNode. [Preview API] Update an existing classification node. - :param :class:` ` posted_node: Node to create or update. + :param :class:` ` posted_node: Node to create or update. :param str project: Project ID or project name :param TreeStructureGroup structure_group: Structure group of the classification node, area or iteration. :param str path: Path of the classification node. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'structureGroup': self._serialize.url('structure_group', structure_group, 'TreeStructureGroup'), - 'path': self._serialize.url('path', path, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if structure_group is not None: + route_values['structureGroup'] = self._serialize.url('structure_group', structure_group, 'TreeStructureGroup') + if path is not None: + route_values['path'] = self._serialize.url('path', path, 'str') content = self._serialize.body(posted_node, 'WorkItemClassificationNode') response = self._send(http_method='PATCH', location_id='5a172953-1b41-49d3-840a-33f79c3ce89f', @@ -230,12 +238,13 @@ def get_comment(self, id, revision): [Preview API] Gets a comment for a work item at the specified revision. :param int id: Work item id :param int revision: Revision for which the comment need to be fetched - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int'), - 'revision': self._serialize.url('revision', revision, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + if revision is not None: + route_values['revision'] = self._serialize.url('revision', revision, 'int') response = self._send(http_method='GET', location_id='19335ae7-22f7-4308-93d8-261f9384b7cf', version='4.1-preview.1', @@ -249,11 +258,11 @@ def get_comments(self, id, from_revision=None, top=None, order=None): :param int from_revision: Revision from which comments are to be fetched :param int top: The number of comments to return :param CommentSortOrder order: Ascending or descending by revision id - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if from_revision is not None: query_parameters['fromRevision'] = self._serialize.query('from_revision', from_revision, 'int') @@ -274,10 +283,11 @@ def delete_field(self, field_name_or_ref_name, project=None): :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fieldNameOrRefName': self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if field_name_or_ref_name is not None: + route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') self._send(http_method='DELETE', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', version='4.1-preview.2', @@ -288,12 +298,13 @@ def get_field(self, field_name_or_ref_name, project=None): [Preview API] Gets information on a specific field. :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fieldNameOrRefName': self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if field_name_or_ref_name is not None: + route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') response = self._send(http_method='GET', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', version='4.1-preview.2', @@ -307,9 +318,9 @@ def get_fields(self, project=None, expand=None): :param GetFieldsExpand expand: Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. :rtype: [WorkItemField] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'GetFieldsExpand') @@ -324,14 +335,15 @@ def get_fields(self, project=None, expand=None): def update_field(self, work_item_field, field_name_or_ref_name, project=None): """UpdateField. [Preview API] Updates the field. - :param :class:` ` work_item_field: New field definition + :param :class:` ` work_item_field: New field definition :param str field_name_or_ref_name: Field simple name or reference name :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'fieldNameOrRefName': self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if field_name_or_ref_name is not None: + route_values['fieldNameOrRefName'] = self._serialize.url('field_name_or_ref_name', field_name_or_ref_name, 'str') content = self._serialize.body(work_item_field, 'WorkItemField') self._send(http_method='PATCH', location_id='b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94', @@ -342,15 +354,16 @@ def update_field(self, work_item_field, field_name_or_ref_name, project=None): def create_query(self, posted_query, project, query): """CreateQuery. [Preview API] Creates a query, or moves a query. - :param :class:` ` posted_query: The query to create. + :param :class:` ` posted_query: The query to create. :param str project: Project ID or project name :param str query: The parent path for the query to create. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') content = self._serialize.body(posted_query, 'QueryHierarchyItem') response = self._send(http_method='POST', location_id='a67d190c-c41f-424b-814d-0e906f659301', @@ -365,10 +378,11 @@ def delete_query(self, project, query): :param str project: Project ID or project name :param str query: ID or path of the query or folder to delete. """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') self._send(http_method='DELETE', location_id='a67d190c-c41f-424b-814d-0e906f659301', version='4.1-preview.2', @@ -383,9 +397,9 @@ def get_queries(self, project, expand=None, depth=None, include_deleted=None): :param bool include_deleted: Include deleted queries and folders :rtype: [QueryHierarchyItem] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') @@ -409,12 +423,13 @@ def get_query(self, project, query, expand=None, depth=None, include_deleted=Non :param QueryExpand expand: Include the query string (wiql), clauses, query result columns, and sort options in the results. :param int depth: In the folder of queries, return child queries and folders to this depth. :param bool include_deleted: Include deleted queries and folders - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'QueryExpand') @@ -437,11 +452,11 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted :param int top: The number of queries to return (Default is 50 and maximum is 200). :param QueryExpand expand: :param bool include_deleted: Include deleted queries and folders - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if filter is not None: query_parameters['$filter'] = self._serialize.query('filter', filter, 'str') @@ -461,16 +476,17 @@ def search_queries(self, project, filter, top=None, expand=None, include_deleted def update_query(self, query_update, project, query, undelete_descendants=None): """UpdateQuery. [Preview API] Update a query or a folder. This allows you to update, rename and move queries and folders. - :param :class:` ` query_update: The query to update. + :param :class:` ` query_update: The query to update. :param str project: Project ID or project name :param str query: The path for the query to update. :param bool undelete_descendants: Undelete the children of this folder. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'query': self._serialize.url('query', query, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if query is not None: + route_values['query'] = self._serialize.url('query', query, 'str') query_parameters = {} if undelete_descendants is not None: query_parameters['$undeleteDescendants'] = self._serialize.query('undelete_descendants', undelete_descendants, 'bool') @@ -489,10 +505,11 @@ def destroy_work_item(self, id, project=None): :param int id: ID of the work item to be destroyed permanently :param str project: Project ID or project name """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') self._send(http_method='DELETE', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', version='4.1-preview.1', @@ -503,12 +520,13 @@ def get_deleted_work_item(self, id, project=None): [Preview API] Gets a deleted work item from Recycle Bin. :param int id: ID of the work item to be returned :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', version='4.1-preview.1', @@ -521,9 +539,9 @@ def get_deleted_work_item_references(self, project=None): :param str project: Project ID or project name :rtype: [WorkItemReference] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', version='4.1-preview.1', @@ -538,9 +556,9 @@ def get_deleted_work_items(self, ids, project=None): :param str project: Project ID or project name :rtype: [WorkItemDeleteReference] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if ids is not None: ids = ",".join(map(str, ids)) @@ -556,15 +574,16 @@ def get_deleted_work_items(self, ids, project=None): def restore_work_item(self, payload, id, project=None): """RestoreWorkItem. [Preview API] Restores the deleted work item from Recycle Bin. - :param :class:` ` payload: Paylod with instructions to update the IsDeleted flag to false + :param :class:` ` payload: Paylod with instructions to update the IsDeleted flag to false :param int id: ID of the work item to be restored :param str project: Project ID or project name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') content = self._serialize.body(payload, 'WorkItemDeleteUpdate') response = self._send(http_method='PATCH', location_id='b70d8d39-926c-465e-b927-b1bf0e5ca0e0', @@ -579,12 +598,13 @@ def get_revision(self, id, revision_number, expand=None): :param int id: :param int revision_number: :param WorkItemExpand expand: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int'), - 'revisionNumber': self._serialize.url('revision_number', revision_number, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + if revision_number is not None: + route_values['revisionNumber'] = self._serialize.url('revision_number', revision_number, 'int') query_parameters = {} if expand is not None: query_parameters['$expand'] = self._serialize.query('expand', expand, 'WorkItemExpand') @@ -604,9 +624,9 @@ def get_revisions(self, id, top=None, skip=None, expand=None): :param WorkItemExpand expand: :rtype: [WorkItem] """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -625,23 +645,27 @@ def get_revisions(self, id, top=None, skip=None, expand=None): def create_template(self, template, team_context): """CreateTemplate. [Preview API] Creates a template - :param :class:` ` template: Template contents - :param :class:` ` team_context: The team context for the operation - :rtype: :class:` ` + :param :class:` ` template: Template contents + :param :class:` ` team_context: The team context for the operation + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') content = self._serialize.body(template, 'WorkItemTemplate') response = self._send(http_method='POST', location_id='6a90345f-a676-4969-afce-8e163e1d5642', @@ -653,23 +677,27 @@ def create_template(self, template, team_context): def get_templates(self, team_context, workitemtypename=None): """GetTemplates. [Preview API] Gets template - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str workitemtypename: Optional, When specified returns templates for given Work item type. :rtype: [WorkItemTemplateReference] """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') query_parameters = {} if workitemtypename is not None: query_parameters['workitemtypename'] = self._serialize.query('workitemtypename', workitemtypename, 'str') @@ -684,23 +712,28 @@ def get_templates(self, team_context, workitemtypename=None): def delete_template(self, team_context, template_id): """DeleteTemplate. [Preview API] Deletes the template with given id - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str template_id: Template id """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') self._send(http_method='DELETE', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', version='4.1-preview.1', @@ -709,24 +742,29 @@ def delete_template(self, team_context, template_id): def get_template(self, team_context, template_id): """GetTemplate. [Preview API] Gets the template with specified id - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param str template_id: Template Id - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') response = self._send(http_method='GET', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', version='4.1-preview.1', @@ -736,25 +774,30 @@ def get_template(self, team_context, template_id): def replace_template(self, template_content, team_context, template_id): """ReplaceTemplate. [Preview API] Replace template contents - :param :class:` ` template_content: Template contents to replace with - :param :class:` ` team_context: The team context for the operation + :param :class:` ` template_content: Template contents to replace with + :param :class:` ` team_context: The team context for the operation :param str template_id: Template id - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'templateId': self._serialize.url('template_id', template_id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if template_id is not None: + route_values['templateId'] = self._serialize.url('template_id', template_id, 'str') content = self._serialize.body(template_content, 'WorkItemTemplate') response = self._send(http_method='PUT', location_id='fb10264a-8836-48a0-8033-1b0ccd2748d5', @@ -768,12 +811,13 @@ def get_update(self, id, update_number): [Preview API] Returns a single update for a work item :param int id: :param int update_number: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int'), - 'updateNumber': self._serialize.url('update_number', update_number, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') + if update_number is not None: + route_values['updateNumber'] = self._serialize.url('update_number', update_number, 'int') response = self._send(http_method='GET', location_id='6570bf97-d02c-4a91-8d93-3abe9895b1a9', version='4.1-preview.2', @@ -788,9 +832,9 @@ def get_updates(self, id, top=None, skip=None): :param int skip: :rtype: [WorkItemUpdate] """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if top is not None: query_parameters['$top'] = self._serialize.query('top', top, 'int') @@ -807,25 +851,29 @@ def get_updates(self, id, top=None, skip=None): def query_by_wiql(self, wiql, team_context=None, time_precision=None, top=None): """QueryByWiql. [Preview API] Gets the results of the query given its WIQL. - :param :class:` ` wiql: The query containing the WIQL. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` wiql: The query containing the WIQL. + :param :class:` ` team_context: The team context for the operation :param bool time_precision: Whether or not to use time precision. :param int top: The max number of results to return. - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') query_parameters = {} if time_precision is not None: query_parameters['timePrecision'] = self._serialize.query('time_precision', time_precision, 'bool') @@ -844,24 +892,29 @@ def get_query_result_count(self, id, team_context=None, time_precision=None): """GetQueryResultCount. [Preview API] Gets the results of the query given the query ID. :param str id: The query ID. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param bool time_precision: Whether or not to use time precision. :rtype: int """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'id': self._serialize.url('id', id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if time_precision is not None: query_parameters['timePrecision'] = self._serialize.query('time_precision', time_precision, 'bool') @@ -876,24 +929,29 @@ def query_by_id(self, id, team_context=None, time_precision=None): """QueryById. [Preview API] Gets the results of the query given the query ID. :param str id: The query ID. - :param :class:` ` team_context: The team context for the operation + :param :class:` ` team_context: The team context for the operation :param bool time_precision: Whether or not to use time precision. - :rtype: :class:` ` + :rtype: :class:` ` """ - if team_context.projectId: - project = team_context.projectId - else: - project = team_context.project - if team_context.teamId: - team = team_context.teamId - else: - team = team_context.team - - route_values = { - 'project': self._serialize.url('project', project, 'string'), - 'team': self._serialize.url('team', team, 'string'), - 'id': self._serialize.url('id', id, 'str') - } + project = None + team = None + if team_context is not None: + if team_context.projectId: + project = team_context.projectId + else: + project = team_context.project + if team_context.teamId: + team = team_context.teamId + else: + team = team_context.team + + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'string') + if team is not None: + route_values['team'] = self._serialize.url('team', team, 'string') + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'str') query_parameters = {} if time_precision is not None: query_parameters['timePrecision'] = self._serialize.query('time_precision', time_precision, 'bool') @@ -910,11 +968,11 @@ def get_work_item_icon_json(self, icon, color=None, v=None): :param str icon: The name of the icon :param str color: The 6-digit hex color for the icon :param int v: The version of the icon (used only for cache invalidation) - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'icon': self._serialize.url('icon', icon, 'str') - } + route_values = {} + if icon is not None: + route_values['icon'] = self._serialize.url('icon', icon, 'str') query_parameters = {} if color is not None: query_parameters['color'] = self._serialize.query('color', color, 'str') @@ -946,9 +1004,9 @@ def get_work_item_icon_svg(self, icon, color=None, v=None): :param int v: The version of the icon (used only for cache invalidation) :rtype: object """ - route_values = { - 'icon': self._serialize.url('icon', icon, 'str') - } + route_values = {} + if icon is not None: + route_values['icon'] = self._serialize.url('icon', icon, 'str') query_parameters = {} if color is not None: query_parameters['color'] = self._serialize.query('color', color, 'str') @@ -968,11 +1026,11 @@ def get_reporting_links(self, project=None, types=None, continuation_token=None, :param [str] types: A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. :param str continuation_token: Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. :param datetime start_date_time: Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if types is not None: types = ",".join(types) @@ -992,11 +1050,11 @@ def get_relation_type(self, relation): """GetRelationType. [Preview API] Gets the work item relation type definition. :param str relation: The relation name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'relation': self._serialize.url('relation', relation, 'str') - } + route_values = {} + if relation is not None: + route_values['relation'] = self._serialize.url('relation', relation, 'str') response = self._send(http_method='GET', location_id='f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165', version='4.1-preview.2', @@ -1029,11 +1087,11 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co :param ReportingRevisionsExpand expand: Return all the fields in work item revisions, including long text fields which are not returned by default :param bool include_discussion_changes_only: Return only the those revisions of work items, where only history field was changed :param int max_page_size: The maximum number of results to return in this batch - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if fields is not None: fields = ",".join(fields) @@ -1069,16 +1127,16 @@ def read_reporting_revisions_get(self, project=None, fields=None, types=None, co def read_reporting_revisions_post(self, filter, project=None, continuation_token=None, start_date_time=None, expand=None): """ReadReportingRevisionsPost. [Preview API] Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit. - :param :class:` ` filter: An object that contains request settings: field filter, type filter, identity format + :param :class:` ` filter: An object that contains request settings: field filter, type filter, identity format :param str project: Project ID or project name :param str continuation_token: Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. :param datetime start_date_time: Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. :param ReportingRevisionsExpand expand: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') query_parameters = {} if continuation_token is not None: query_parameters['continuationToken'] = self._serialize.query('continuation_token', continuation_token, 'str') @@ -1100,11 +1158,11 @@ def delete_work_item(self, id, destroy=None): [Preview API] Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. :param int id: ID of the work item to be deleted :param bool destroy: Optional parameter, if set to true, the work item is deleted permanently - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if destroy is not None: query_parameters['destroy'] = self._serialize.query('destroy', destroy, 'bool') @@ -1122,11 +1180,11 @@ def get_work_item(self, id, fields=None, as_of=None, expand=None): :param [str] fields: Comma-separated list of requested fields :param datetime as_of: AsOf UTC date time string :param WorkItemExpand expand: The expand parameters for work item attributes - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if fields is not None: fields = ",".join(fields) @@ -1175,16 +1233,16 @@ def get_work_items(self, ids, fields=None, as_of=None, expand=None, error_policy def update_work_item(self, document, id, validate_only=None, bypass_rules=None, suppress_notifications=None): """UpdateWorkItem. [Preview API] Updates a single work item. - :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the update + :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the update :param int id: The id of the work item to update :param bool validate_only: Indicate if you only want to validate the changes without saving the work item :param bool bypass_rules: Do not enforce the work item type rules on this update :param bool suppress_notifications: Do not fire any notifications for this change - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'id': self._serialize.url('id', id, 'int') - } + route_values = {} + if id is not None: + route_values['id'] = self._serialize.url('id', id, 'int') query_parameters = {} if validate_only is not None: query_parameters['validateOnly'] = self._serialize.query('validate_only', validate_only, 'bool') @@ -1205,18 +1263,19 @@ def update_work_item(self, document, id, validate_only=None, bypass_rules=None, def create_work_item(self, document, project, type, validate_only=None, bypass_rules=None, suppress_notifications=None): """CreateWorkItem. [Preview API] Creates a single work item. - :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item + :param :class:`<[JsonPatchOperation]> ` document: The JSON Patch document representing the work item :param str project: Project ID or project name :param str type: The work item type of the work item to create :param bool validate_only: Indicate if you only want to validate the changes without saving the work item :param bool bypass_rules: Do not enforce the work item type rules on this update :param bool suppress_notifications: Do not fire any notifications for this change - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') query_parameters = {} if validate_only is not None: query_parameters['validateOnly'] = self._serialize.query('validate_only', validate_only, 'bool') @@ -1242,12 +1301,13 @@ def get_work_item_template(self, project, type, fields=None, as_of=None, expand= :param str fields: Comma-separated list of requested fields :param datetime as_of: AsOf UTC date time string :param WorkItemExpand expand: The expand parameters for work item attributes - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') query_parameters = {} if fields is not None: query_parameters['fields'] = self._serialize.query('fields', fields, 'str') @@ -1288,9 +1348,9 @@ def get_work_item_type_categories(self, project): :param str project: Project ID or project name :rtype: [WorkItemTypeCategory] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='9b9f5734-36c8-415e-ba67-f83b45c31408', version='4.1-preview.2', @@ -1303,12 +1363,13 @@ def get_work_item_type_category(self, project, category): [Preview API] Returns a the deltas between work item revisions. :param str project: Project ID or project name :param str category: The category name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'category': self._serialize.url('category', category, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if category is not None: + route_values['category'] = self._serialize.url('category', category, 'str') response = self._send(http_method='GET', location_id='9b9f5734-36c8-415e-ba67-f83b45c31408', version='4.1-preview.2', @@ -1320,12 +1381,13 @@ def get_work_item_type(self, project, type): [Preview API] Returns a work item type definition. :param str project: Project ID or project name :param str type: Work item type name - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa', version='4.1-preview.2', @@ -1338,9 +1400,9 @@ def get_work_item_types(self, project): :param str project: Project ID or project name :rtype: [WorkItemType] """ - route_values = { - 'project': self._serialize.url('project', project, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') response = self._send(http_method='GET', location_id='7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa', version='4.1-preview.2', @@ -1354,13 +1416,15 @@ def get_dependent_fields(self, project, type, field): :param str project: Project ID or project name :param str type: The work item type name :param str field: - :rtype: :class:` ` + :rtype: :class:` ` """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str'), - 'field': self._serialize.url('field', field, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') + if field is not None: + route_values['field'] = self._serialize.url('field', field, 'str') response = self._send(http_method='GET', location_id='bd293ce5-3d25-4192-8e67-e8092e879efb', version='4.1-preview.1', @@ -1374,10 +1438,11 @@ def get_work_item_type_states(self, project, type): :param str type: The state name :rtype: [WorkItemStateColor] """ - route_values = { - 'project': self._serialize.url('project', project, 'str'), - 'type': self._serialize.url('type', type, 'str') - } + route_values = {} + if project is not None: + route_values['project'] = self._serialize.url('project', project, 'str') + if type is not None: + route_values['type'] = self._serialize.url('type', type, 'str') response = self._send(http_method='GET', location_id='7c9d7a76-4a09-43e8-b5df-bd792f4ac6aa', version='4.1-preview.1',