handle abstract git_change as object

This commit is contained in:
Ted Chambers 2018-04-23 12:09:13 -04:00
Родитель 9188db6cfb
Коммит ca0caebed8
14 изменённых файлов: 24 добавлений и 112 удалений

Просмотреть файл

@ -24,7 +24,6 @@ from .git_async_ref_operation_source import GitAsyncRefOperationSource
from .git_base_version_descriptor import GitBaseVersionDescriptor
from .git_blob_ref import GitBlobRef
from .git_branch_stats import GitBranchStats
from .git_change import GitChange
from .git_cherry_pick import GitCherryPick
from .git_commit import GitCommit
from .git_commit_changes import GitCommitChanges
@ -120,7 +119,6 @@ __all__ = [
'GitBaseVersionDescriptor',
'GitBlobRef',
'GitBranchStats',
'GitChange',
'GitCherryPick',
'GitCommit',
'GitCommitChanges',

Просмотреть файл

@ -1,33 +0,0 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .change import Change
class GitChange(Change):
"""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 <git.v4_0.models.GitTemplate>`
:param original_path: Original path of item if different from current path
:type original_path: str
"""
_attribute_map = {
'change_id': {'key': 'changeId', 'type': 'int'},
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
'original_path': {'key': 'originalPath', 'type': 'str'}
}
def __init__(self, change_id=None, new_content_template=None, original_path=None):
super(GitChange, self).__init__()
self.change_id = change_id
self.new_content_template = new_content_template
self.original_path = original_path

Просмотреть файл

@ -19,7 +19,7 @@ class GitCommit(GitCommitRef):
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
:type changes: list of :class:`object <git.v4_0.models.object>`
:param comment:
:type comment: str
:param comment_truncated:
@ -48,7 +48,7 @@ class GitCommit(GitCommitRef):
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'GitUserDate'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'},
'changes': {'key': 'changes', 'type': '[object]'},
'comment': {'key': 'comment', 'type': 'str'},
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
'commit_id': {'key': 'commitId', 'type': 'str'},

Просмотреть файл

@ -15,12 +15,12 @@ class GitCommitChanges(Model):
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
:type changes: list of :class:`object <git.v4_0.models.object>`
"""
_attribute_map = {
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'}
'changes': {'key': 'changes', 'type': '[object]'}
}
def __init__(self, change_counts=None, changes=None):

Просмотреть файл

@ -23,7 +23,7 @@ class GitCommitDiffs(Model):
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
:type changes: list of :class:`object <git.v4_0.models.object>`
:param common_commit:
:type common_commit: str
:param target_commit:
@ -36,7 +36,7 @@ class GitCommitDiffs(Model):
'base_commit': {'key': 'baseCommit', 'type': 'str'},
'behind_count': {'key': 'behindCount', 'type': 'int'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'},
'changes': {'key': 'changes', 'type': '[object]'},
'common_commit': {'key': 'commonCommit', 'type': 'str'},
'target_commit': {'key': 'targetCommit', 'type': 'str'}
}

Просмотреть файл

@ -19,7 +19,7 @@ class GitCommitRef(Model):
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`GitChange <git.v4_0.models.GitChange>`
:type changes: list of :class:`object <git.v4_0.models.object>`
:param comment:
:type comment: str
:param comment_truncated:
@ -44,7 +44,7 @@ class GitCommitRef(Model):
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'GitUserDate'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'},
'changes': {'key': 'changes', 'type': '[object]'},
'comment': {'key': 'comment', 'type': 'str'},
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
'commit_id': {'key': 'commitId', 'type': 'str'},

Просмотреть файл

@ -6,29 +6,20 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .git_change import GitChange
from msrest.serialization import Model
class GitPullRequestChange(GitChange):
class GitPullRequestChange(Model):
"""GitPullRequestChange.
: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 <git.v4_0.models.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
:type change_tracking_id: int
"""
_attribute_map = {
'change_id': {'key': 'changeId', 'type': 'int'},
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
'original_path': {'key': 'originalPath', 'type': 'str'},
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'}
}
def __init__(self, change_id=None, new_content_template=None, original_path=None, change_tracking_id=None):
super(GitPullRequestChange, self).__init__(change_id=change_id, new_content_template=new_content_template, original_path=original_path)
def __init__(self, change_tracking_id=None):
super(GitPullRequestChange, self).__init__()
self.change_tracking_id = change_tracking_id

Просмотреть файл

@ -23,7 +23,6 @@ from .git_async_ref_operation_source import GitAsyncRefOperationSource
from .git_base_version_descriptor import GitBaseVersionDescriptor
from .git_blob_ref import GitBlobRef
from .git_branch_stats import GitBranchStats
from .git_change import GitChange
from .git_cherry_pick import GitCherryPick
from .git_commit import GitCommit
from .git_commit_changes import GitCommitChanges
@ -122,7 +121,6 @@ __all__ = [
'GitBaseVersionDescriptor',
'GitBlobRef',
'GitBranchStats',
'GitChange',
'GitCherryPick',
'GitCommit',
'GitCommitChanges',

Просмотреть файл

@ -1,33 +0,0 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .change import Change
class GitChange(Change):
"""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 <git.v4_1.models.GitTemplate>`
:param original_path: Original path of item if different from current path.
:type original_path: str
"""
_attribute_map = {
'change_id': {'key': 'changeId', 'type': 'int'},
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
'original_path': {'key': 'originalPath', 'type': 'str'}
}
def __init__(self, change_id=None, new_content_template=None, original_path=None):
super(GitChange, self).__init__()
self.change_id = change_id
self.new_content_template = new_content_template
self.original_path = original_path

Просмотреть файл

@ -19,7 +19,7 @@ class GitCommit(GitCommitRef):
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
:type change_counts: dict
:param changes: An enumeration of the changes included with the commit.
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
:type changes: list of :class:`object <git.v4_1.models.object>`
: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.
@ -48,7 +48,7 @@ class GitCommit(GitCommitRef):
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'GitUserDate'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'},
'changes': {'key': 'changes', 'type': '[object]'},
'comment': {'key': 'comment', 'type': 'str'},
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
'commit_id': {'key': 'commitId', 'type': 'str'},

Просмотреть файл

@ -15,12 +15,12 @@ class GitCommitChanges(Model):
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
:type changes: list of :class:`object <git.v4_1.models.object>`
"""
_attribute_map = {
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'}
'changes': {'key': 'changes', 'type': '[object]'}
}
def __init__(self, change_counts=None, changes=None):

Просмотреть файл

@ -23,7 +23,7 @@ class GitCommitDiffs(Model):
:param change_counts:
:type change_counts: dict
:param changes:
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
:type changes: list of :class:`object <git.v4_1.models.object>`
:param common_commit:
:type common_commit: str
:param target_commit:
@ -36,7 +36,7 @@ class GitCommitDiffs(Model):
'base_commit': {'key': 'baseCommit', 'type': 'str'},
'behind_count': {'key': 'behindCount', 'type': 'int'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'},
'changes': {'key': 'changes', 'type': '[object]'},
'common_commit': {'key': 'commonCommit', 'type': 'str'},
'target_commit': {'key': 'targetCommit', 'type': 'str'}
}

Просмотреть файл

@ -19,7 +19,7 @@ class GitCommitRef(Model):
:param change_counts: Counts of the types of changes (edits, deletes, etc.) included with the commit.
:type change_counts: dict
:param changes: An enumeration of the changes included with the commit.
:type changes: list of :class:`GitChange <git.v4_1.models.GitChange>`
:type changes: list of :class:`object <git.v4_1.models.object>`
: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.
@ -44,7 +44,7 @@ class GitCommitRef(Model):
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
'author': {'key': 'author', 'type': 'GitUserDate'},
'change_counts': {'key': 'changeCounts', 'type': '{int}'},
'changes': {'key': 'changes', 'type': '[GitChange]'},
'changes': {'key': 'changes', 'type': '[object]'},
'comment': {'key': 'comment', 'type': 'str'},
'comment_truncated': {'key': 'commentTruncated', 'type': 'bool'},
'commit_id': {'key': 'commitId', 'type': 'str'},

Просмотреть файл

@ -6,29 +6,20 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------------------------
from .git_change import GitChange
from msrest.serialization import Model
class GitPullRequestChange(GitChange):
class GitPullRequestChange(Model):
"""GitPullRequestChange.
: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 <git.v4_1.models.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.
:type change_tracking_id: int
"""
_attribute_map = {
'change_id': {'key': 'changeId', 'type': 'int'},
'new_content_template': {'key': 'newContentTemplate', 'type': 'GitTemplate'},
'original_path': {'key': 'originalPath', 'type': 'str'},
'change_tracking_id': {'key': 'changeTrackingId', 'type': 'int'}
}
def __init__(self, change_id=None, new_content_template=None, original_path=None, change_tracking_id=None):
super(GitPullRequestChange, self).__init__(change_id=change_id, new_content_template=new_content_template, original_path=original_path)
def __init__(self, change_tracking_id=None):
super(GitPullRequestChange, self).__init__()
self.change_tracking_id = change_tracking_id