Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
316 changes: 293 additions & 23 deletions vsts/vsts/build/v4_1/build_client.py

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions vsts/vsts/build/v4_1/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
# --------------------------------------------------------------------------------------------

from .agent_pool_queue import AgentPoolQueue
from .aggregated_results_analysis import AggregatedResultsAnalysis
from .aggregated_results_by_outcome import AggregatedResultsByOutcome
from .aggregated_results_difference import AggregatedResultsDifference
from .aggregated_runs_by_state import AggregatedRunsByState
from .artifact_resource import ArtifactResource
from .associated_work_item import AssociatedWorkItem
from .attachment import Attachment
from .authorization_header import AuthorizationHeader
from .build import Build
from .build_artifact import BuildArtifact
from .build_badge import BuildBadge
from .build_controller import BuildController
from .build_definition import BuildDefinition
from .build_definition3_2 import BuildDefinition3_2
from .build_definition_counter import BuildDefinitionCounter
from .build_definition_reference import BuildDefinitionReference
from .build_definition_reference3_2 import BuildDefinitionReference3_2
from .build_definition_revision import BuildDefinitionRevision
Expand Down Expand Up @@ -42,15 +49,20 @@
from .definition_reference import DefinitionReference
from .deployment import Deployment
from .folder import Folder
from .graph_subject_base import GraphSubjectBase
from .identity_ref import IdentityRef
from .issue import Issue
from .json_patch_operation import JsonPatchOperation
from .process_parameters import ProcessParameters
from .reference_links import ReferenceLinks
from .release_reference import ReleaseReference
from .repository_webhook import RepositoryWebhook
from .resource_ref import ResourceRef
from .retention_policy import RetentionPolicy
from .source_provider_attributes import SourceProviderAttributes
from .source_repositories import SourceRepositories
from .source_repository import SourceRepository
from .source_repository_item import SourceRepositoryItem
from .supported_trigger import SupportedTrigger
from .task_agent_pool_reference import TaskAgentPoolReference
from .task_definition_reference import TaskDefinitionReference
Expand All @@ -60,6 +72,7 @@
from .task_reference import TaskReference
from .task_source_definition_base import TaskSourceDefinitionBase
from .team_project_reference import TeamProjectReference
from .test_results_context import TestResultsContext
from .timeline import Timeline
from .timeline_record import TimelineRecord
from .timeline_reference import TimelineReference
Expand All @@ -70,14 +83,21 @@

__all__ = [
'AgentPoolQueue',
'AggregatedResultsAnalysis',
'AggregatedResultsByOutcome',
'AggregatedResultsDifference',
'AggregatedRunsByState',
'ArtifactResource',
'AssociatedWorkItem',
'Attachment',
'AuthorizationHeader',
'Build',
'BuildArtifact',
'BuildBadge',
'BuildController',
'BuildDefinition',
'BuildDefinition3_2',
'BuildDefinitionCounter',
'BuildDefinitionReference',
'BuildDefinitionReference3_2',
'BuildDefinitionRevision',
Expand Down Expand Up @@ -105,15 +125,20 @@
'DefinitionReference',
'Deployment',
'Folder',
'GraphSubjectBase',
'IdentityRef',
'Issue',
'JsonPatchOperation',
'ProcessParameters',
'ReferenceLinks',
'ReleaseReference',
'RepositoryWebhook',
'ResourceRef',
'RetentionPolicy',
'SourceProviderAttributes',
'SourceRepositories',
'SourceRepository',
'SourceRepositoryItem',
'SupportedTrigger',
'TaskAgentPoolReference',
'TaskDefinitionReference',
Expand All @@ -123,6 +148,7 @@
'TaskReference',
'TaskSourceDefinitionBase',
'TeamProjectReference',
'TestResultsContext',
'Timeline',
'TimelineRecord',
'TimelineReference',
Expand Down
6 changes: 5 additions & 1 deletion vsts/vsts/build/v4_1/models/artifact_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class ArtifactResource(Model):
:type _links: :class:`ReferenceLinks <build.v4_1.models.ReferenceLinks>`
:param data: Type-specific data about the artifact.
:type data: str
:param download_ticket: A secret that can be sent in a request header to retrieve an artifact anonymously. Valid for a limited amount of time. Optional.
:type download_ticket: str
:param download_url: A link to download the resource.
:type download_url: str
:param properties: Type-specific properties of the artifact.
Expand All @@ -29,16 +31,18 @@ class ArtifactResource(Model):
_attribute_map = {
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'data': {'key': 'data', 'type': 'str'},
'download_ticket': {'key': 'downloadTicket', 'type': 'str'},
'download_url': {'key': 'downloadUrl', 'type': 'str'},
'properties': {'key': 'properties', 'type': '{str}'},
'type': {'key': 'type', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
}

def __init__(self, _links=None, data=None, download_url=None, properties=None, type=None, url=None):
def __init__(self, _links=None, data=None, download_ticket=None, download_url=None, properties=None, type=None, url=None):
super(ArtifactResource, self).__init__()
self._links = _links
self.data = data
self.download_ticket = download_ticket
self.download_url = download_url
self.properties = properties
self.type = type
Expand Down
6 changes: 5 additions & 1 deletion vsts/vsts/build/v4_1/models/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class Build(Model):
:type status: object
:param tags:
:type tags: list of str
:param triggered_by_build: The build that triggered this build via a Build completion trigger.
:type triggered_by_build: :class:`Build <build.v4_1.models.Build>`
:param trigger_info: Sourceprovider-specific information about what triggered the build
:type trigger_info: dict
:param uri: The URI of the build.
Expand Down Expand Up @@ -137,13 +139,14 @@ class Build(Model):
'start_time': {'key': 'startTime', 'type': 'iso-8601'},
'status': {'key': 'status', 'type': 'object'},
'tags': {'key': 'tags', 'type': '[str]'},
'triggered_by_build': {'key': 'triggeredByBuild', 'type': 'Build'},
'trigger_info': {'key': 'triggerInfo', 'type': '{str}'},
'uri': {'key': 'uri', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'validation_results': {'key': 'validationResults', 'type': '[BuildRequestValidationResult]'}
}

def __init__(self, _links=None, build_number=None, build_number_revision=None, controller=None, definition=None, deleted=None, deleted_by=None, deleted_date=None, deleted_reason=None, demands=None, finish_time=None, id=None, keep_forever=None, last_changed_by=None, last_changed_date=None, logs=None, orchestration_plan=None, parameters=None, plans=None, priority=None, project=None, properties=None, quality=None, queue=None, queue_options=None, queue_position=None, queue_time=None, reason=None, repository=None, requested_by=None, requested_for=None, result=None, retained_by_release=None, source_branch=None, source_version=None, start_time=None, status=None, tags=None, trigger_info=None, uri=None, url=None, validation_results=None):
def __init__(self, _links=None, build_number=None, build_number_revision=None, controller=None, definition=None, deleted=None, deleted_by=None, deleted_date=None, deleted_reason=None, demands=None, finish_time=None, id=None, keep_forever=None, last_changed_by=None, last_changed_date=None, logs=None, orchestration_plan=None, parameters=None, plans=None, priority=None, project=None, properties=None, quality=None, queue=None, queue_options=None, queue_position=None, queue_time=None, reason=None, repository=None, requested_by=None, requested_for=None, result=None, retained_by_release=None, source_branch=None, source_version=None, start_time=None, status=None, tags=None, triggered_by_build=None, trigger_info=None, uri=None, url=None, validation_results=None):
super(Build, self).__init__()
self._links = _links
self.build_number = build_number
Expand Down Expand Up @@ -183,6 +186,7 @@ def __init__(self, _links=None, build_number=None, build_number_revision=None, c
self.start_time = start_time
self.status = status
self.tags = tags
self.triggered_by_build = triggered_by_build
self.trigger_info = trigger_info
self.uri = uri
self.url = url
Expand Down
6 changes: 5 additions & 1 deletion vsts/vsts/build/v4_1/models/build_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class BuildDefinition(BuildDefinitionReference):
:type build_number_format: str
:param comment: A save-time comment for the definition.
:type comment: str
:param counters:
:type counters: dict
:param demands:
:type demands: list of :class:`object <build.v4_1.models.object>`
:param description: The description.
Expand Down Expand Up @@ -113,6 +115,7 @@ class BuildDefinition(BuildDefinitionReference):
'badge_enabled': {'key': 'badgeEnabled', 'type': 'bool'},
'build_number_format': {'key': 'buildNumberFormat', 'type': 'str'},
'comment': {'key': 'comment', 'type': 'str'},
'counters': {'key': 'counters', 'type': '{BuildDefinitionCounter}'},
'demands': {'key': 'demands', 'type': '[object]'},
'description': {'key': 'description', 'type': 'str'},
'drop_location': {'key': 'dropLocation', 'type': 'str'},
Expand All @@ -131,11 +134,12 @@ class BuildDefinition(BuildDefinitionReference):
'variables': {'key': 'variables', 'type': '{BuildDefinitionVariable}'}
}

def __init__(self, created_date=None, id=None, name=None, path=None, project=None, queue_status=None, revision=None, type=None, uri=None, url=None, _links=None, authored_by=None, draft_of=None, drafts=None, latest_build=None, latest_completed_build=None, metrics=None, quality=None, queue=None, badge_enabled=None, build_number_format=None, comment=None, demands=None, description=None, drop_location=None, job_authorization_scope=None, job_cancel_timeout_in_minutes=None, job_timeout_in_minutes=None, options=None, process=None, process_parameters=None, properties=None, repository=None, retention_rules=None, tags=None, triggers=None, variable_groups=None, variables=None):
def __init__(self, created_date=None, id=None, name=None, path=None, project=None, queue_status=None, revision=None, type=None, uri=None, url=None, _links=None, authored_by=None, draft_of=None, drafts=None, latest_build=None, latest_completed_build=None, metrics=None, quality=None, queue=None, badge_enabled=None, build_number_format=None, comment=None, counters=None, demands=None, description=None, drop_location=None, job_authorization_scope=None, job_cancel_timeout_in_minutes=None, job_timeout_in_minutes=None, options=None, process=None, process_parameters=None, properties=None, repository=None, retention_rules=None, tags=None, triggers=None, variable_groups=None, variables=None):
super(BuildDefinition, self).__init__(created_date=created_date, id=id, name=name, path=path, project=project, queue_status=queue_status, revision=revision, type=type, uri=uri, url=url, _links=_links, authored_by=authored_by, draft_of=draft_of, drafts=drafts, latest_build=latest_build, latest_completed_build=latest_completed_build, metrics=metrics, quality=quality, queue=queue)
self.badge_enabled = badge_enabled
self.build_number_format = build_number_format
self.comment = comment
self.counters = counters
self.demands = demands
self.description = description
self.drop_location = drop_location
Expand Down
6 changes: 5 additions & 1 deletion vsts/vsts/build/v4_1/models/build_definition_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class BuildDefinitionTemplate(Model):
:type can_delete: bool
:param category: The template category.
:type category: str
:param default_hosted_queue: An optional hosted agent queue for the template to use by default.
:type default_hosted_queue: str
:param description: A description of the template.
:type description: str
:param icons:
Expand All @@ -33,6 +35,7 @@ class BuildDefinitionTemplate(Model):
_attribute_map = {
'can_delete': {'key': 'canDelete', 'type': 'bool'},
'category': {'key': 'category', 'type': 'str'},
'default_hosted_queue': {'key': 'defaultHostedQueue', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'icons': {'key': 'icons', 'type': '{str}'},
'icon_task_id': {'key': 'iconTaskId', 'type': 'str'},
Expand All @@ -41,10 +44,11 @@ class BuildDefinitionTemplate(Model):
'template': {'key': 'template', 'type': 'BuildDefinition'}
}

def __init__(self, can_delete=None, category=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None):
def __init__(self, can_delete=None, category=None, default_hosted_queue=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None):
super(BuildDefinitionTemplate, self).__init__()
self.can_delete = can_delete
self.category = category
self.default_hosted_queue = default_hosted_queue
self.description = description
self.icons = icons
self.icon_task_id = icon_task_id
Expand Down
6 changes: 5 additions & 1 deletion vsts/vsts/build/v4_1/models/build_definition_template3_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class BuildDefinitionTemplate3_2(Model):
:type can_delete: bool
:param category:
:type category: str
:param default_hosted_queue:
:type default_hosted_queue: str
:param description:
:type description: str
:param icons:
Expand All @@ -33,6 +35,7 @@ class BuildDefinitionTemplate3_2(Model):
_attribute_map = {
'can_delete': {'key': 'canDelete', 'type': 'bool'},
'category': {'key': 'category', 'type': 'str'},
'default_hosted_queue': {'key': 'defaultHostedQueue', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
'icons': {'key': 'icons', 'type': '{str}'},
'icon_task_id': {'key': 'iconTaskId', 'type': 'str'},
Expand All @@ -41,10 +44,11 @@ class BuildDefinitionTemplate3_2(Model):
'template': {'key': 'template', 'type': 'BuildDefinition3_2'}
}

def __init__(self, can_delete=None, category=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None):
def __init__(self, can_delete=None, category=None, default_hosted_queue=None, description=None, icons=None, icon_task_id=None, id=None, name=None, template=None):
super(BuildDefinitionTemplate3_2, self).__init__()
self.can_delete = can_delete
self.category = category
self.default_hosted_queue = default_hosted_queue
self.description = description
self.icons = icons
self.icon_task_id = icon_task_id
Expand Down
16 changes: 8 additions & 8 deletions vsts/vsts/build/v4_1/models/data_source_binding_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
class DataSourceBindingBase(Model):
"""DataSourceBindingBase.

:param data_source_name:
:param data_source_name: Gets or sets the name of the data source.
:type data_source_name: str
:param endpoint_id:
:param endpoint_id: Gets or sets the endpoint Id.
:type endpoint_id: str
:param endpoint_url:
:param endpoint_url: Gets or sets the url of the service endpoint.
:type endpoint_url: str
:param headers:
:param headers: Gets or sets the authorization headers.
:type headers: list of :class:`AuthorizationHeader <microsoft.-team-foundation.-distributed-task.-common.-contracts.v4_1.models.AuthorizationHeader>`
:param parameters:
:param parameters: Gets or sets the parameters for the data source.
:type parameters: dict
:param result_selector:
:param result_selector: Gets or sets the result selector.
:type result_selector: str
:param result_template:
:param result_template: Gets or sets the result template.
:type result_template: str
:param target:
:param target: Gets or sets the target of the data source.
:type target: str
"""

Expand Down
30 changes: 17 additions & 13 deletions vsts/vsts/build/v4_1/models/identity_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------

from msrest.serialization import Model
from .graph_subject_base import GraphSubjectBase


class IdentityRef(Model):
class IdentityRef(GraphSubjectBase):
"""IdentityRef.

:param _links: This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject.
:type _links: :class:`ReferenceLinks <microsoft.-visual-studio.-services.-web-api.v4_1.models.ReferenceLinks>`
:param descriptor: The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
:type descriptor: str
:param display_name: This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
:type display_name: str
:param url: This url is the full route to the source resource of this graph subject.
:type url: str
:param directory_alias:
:type directory_alias: str
:param display_name:
:type display_name: str
:param id:
:type id: str
:param image_url:
Expand All @@ -30,32 +36,30 @@ class IdentityRef(Model):
:type profile_url: str
:param unique_name:
:type unique_name: str
:param url:
:type url: str
"""

_attribute_map = {
'directory_alias': {'key': 'directoryAlias', 'type': 'str'},
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'descriptor': {'key': 'descriptor', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
'directory_alias': {'key': 'directoryAlias', 'type': 'str'},
'id': {'key': 'id', 'type': 'str'},
'image_url': {'key': 'imageUrl', 'type': 'str'},
'inactive': {'key': 'inactive', 'type': 'bool'},
'is_aad_identity': {'key': 'isAadIdentity', 'type': 'bool'},
'is_container': {'key': 'isContainer', 'type': 'bool'},
'profile_url': {'key': 'profileUrl', 'type': 'str'},
'unique_name': {'key': 'uniqueName', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'}
'unique_name': {'key': 'uniqueName', 'type': 'str'}
}

def __init__(self, directory_alias=None, display_name=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None, url=None):
super(IdentityRef, self).__init__()
def __init__(self, _links=None, descriptor=None, display_name=None, url=None, directory_alias=None, id=None, image_url=None, inactive=None, is_aad_identity=None, is_container=None, profile_url=None, unique_name=None):
super(IdentityRef, self).__init__(_links=_links, descriptor=descriptor, display_name=display_name, url=url)
self.directory_alias = directory_alias
self.display_name = display_name
self.id = id
self.image_url = image_url
self.inactive = inactive
self.is_aad_identity = is_aad_identity
self.is_container = is_container
self.profile_url = profile_url
self.unique_name = unique_name
self.url = url
Loading