Skip to content

Commit 4dda514

Browse files
authored
Merge pull request #36 from Microsoft/users/tedchamb/regen
generate new 4.0 REST Areas
2 parents a713818 + 410d170 commit 4dda514

File tree

600 files changed

+35104
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

600 files changed

+35104
-31
lines changed

vsts/vsts/accounts/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------

vsts/vsts/accounts/v4_0/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------
8+
9+
from msrest import Serializer, Deserializer
10+
from ...vss_client import VssClient
11+
from . import models
12+
13+
14+
class AccountsClient(VssClient):
15+
"""Accounts
16+
:param str base_url: Service URL
17+
:param Authentication creds: Authenticated credentials.
18+
"""
19+
20+
def __init__(self, base_url=None, creds=None):
21+
super(AccountsClient, self).__init__(base_url, creds)
22+
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
23+
self._serialize = Serializer(client_models)
24+
self._deserialize = Deserializer(client_models)
25+
26+
resource_area_identifier = None
27+
28+
def create_account(self, info, use_precreated=None):
29+
"""CreateAccount.
30+
:param :class:`<AccountCreateInfoInternal> <accounts.v4_0.models.AccountCreateInfoInternal>` info:
31+
:param bool use_precreated:
32+
:rtype: :class:`<Account> <accounts.v4_0.models.Account>`
33+
"""
34+
query_parameters = {}
35+
if use_precreated is not None:
36+
query_parameters['usePrecreated'] = self._serialize.query('use_precreated', use_precreated, 'bool')
37+
content = self._serialize.body(info, 'AccountCreateInfoInternal')
38+
response = self._send(http_method='POST',
39+
location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e',
40+
version='4.0',
41+
query_parameters=query_parameters,
42+
content=content)
43+
return self._deserialize('Account', response)
44+
45+
def get_account(self, account_id):
46+
"""GetAccount.
47+
:param str account_id:
48+
:rtype: :class:`<Account> <accounts.v4_0.models.Account>`
49+
"""
50+
route_values = {}
51+
if account_id is not None:
52+
route_values['accountId'] = self._serialize.url('account_id', account_id, 'str')
53+
response = self._send(http_method='GET',
54+
location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e',
55+
version='4.0',
56+
route_values=route_values)
57+
return self._deserialize('Account', response)
58+
59+
def get_accounts(self, owner_id=None, member_id=None, properties=None):
60+
"""GetAccounts.
61+
A new version GetAccounts API. Only supports limited set of parameters, returns a list of account ref objects that only contains AccountUrl, AccountName and AccountId information, will use collection host Id as the AccountId.
62+
:param str owner_id: Owner Id to query for
63+
:param str member_id: Member Id to query for
64+
:param str properties: Only support service URL properties
65+
:rtype: [Account]
66+
"""
67+
query_parameters = {}
68+
if owner_id is not None:
69+
query_parameters['ownerId'] = self._serialize.query('owner_id', owner_id, 'str')
70+
if member_id is not None:
71+
query_parameters['memberId'] = self._serialize.query('member_id', member_id, 'str')
72+
if properties is not None:
73+
query_parameters['properties'] = self._serialize.query('properties', properties, 'str')
74+
response = self._send(http_method='GET',
75+
location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e',
76+
version='4.0',
77+
query_parameters=query_parameters,
78+
returns_collection=True)
79+
return self._deserialize('[Account]', response)
80+
81+
def get_account_settings(self):
82+
"""GetAccountSettings.
83+
[Preview API]
84+
:rtype: {str}
85+
"""
86+
response = self._send(http_method='GET',
87+
location_id='4e012dd4-f8e1-485d-9bb3-c50d83c5b71b',
88+
version='4.0-preview.1',
89+
returns_collection=True)
90+
return self._deserialize('{str}', response)
91+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------
8+
9+
from .account import Account
10+
from .account_create_info_internal import AccountCreateInfoInternal
11+
from .account_preferences_internal import AccountPreferencesInternal
12+
13+
__all__ = [
14+
'Account',
15+
'AccountCreateInfoInternal',
16+
'AccountPreferencesInternal',
17+
]
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------
8+
9+
from msrest.serialization import Model
10+
11+
12+
class Account(Model):
13+
"""Account.
14+
15+
:param account_id: Identifier for an Account
16+
:type account_id: str
17+
:param account_name: Name for an account
18+
:type account_name: str
19+
:param account_owner: Owner of account
20+
:type account_owner: str
21+
:param account_status: Current account status
22+
:type account_status: object
23+
:param account_type: Type of account: Personal, Organization
24+
:type account_type: object
25+
:param account_uri: Uri for an account
26+
:type account_uri: str
27+
:param created_by: Who created the account
28+
:type created_by: str
29+
:param created_date: Date account was created
30+
:type created_date: datetime
31+
:param has_moved:
32+
:type has_moved: bool
33+
:param last_updated_by: Identity of last person to update the account
34+
:type last_updated_by: str
35+
:param last_updated_date: Date account was last updated
36+
:type last_updated_date: datetime
37+
:param namespace_id: Namespace for an account
38+
:type namespace_id: str
39+
:param new_collection_id:
40+
:type new_collection_id: str
41+
:param organization_name: Organization that created the account
42+
:type organization_name: str
43+
:param properties: Extended properties
44+
:type properties: :class:`object <accounts.v4_0.models.object>`
45+
:param status_reason: Reason for current status
46+
:type status_reason: str
47+
"""
48+
49+
_attribute_map = {
50+
'account_id': {'key': 'accountId', 'type': 'str'},
51+
'account_name': {'key': 'accountName', 'type': 'str'},
52+
'account_owner': {'key': 'accountOwner', 'type': 'str'},
53+
'account_status': {'key': 'accountStatus', 'type': 'object'},
54+
'account_type': {'key': 'accountType', 'type': 'object'},
55+
'account_uri': {'key': 'accountUri', 'type': 'str'},
56+
'created_by': {'key': 'createdBy', 'type': 'str'},
57+
'created_date': {'key': 'createdDate', 'type': 'iso-8601'},
58+
'has_moved': {'key': 'hasMoved', 'type': 'bool'},
59+
'last_updated_by': {'key': 'lastUpdatedBy', 'type': 'str'},
60+
'last_updated_date': {'key': 'lastUpdatedDate', 'type': 'iso-8601'},
61+
'namespace_id': {'key': 'namespaceId', 'type': 'str'},
62+
'new_collection_id': {'key': 'newCollectionId', 'type': 'str'},
63+
'organization_name': {'key': 'organizationName', 'type': 'str'},
64+
'properties': {'key': 'properties', 'type': 'object'},
65+
'status_reason': {'key': 'statusReason', 'type': 'str'}
66+
}
67+
68+
def __init__(self, account_id=None, account_name=None, account_owner=None, account_status=None, account_type=None, account_uri=None, created_by=None, created_date=None, has_moved=None, last_updated_by=None, last_updated_date=None, namespace_id=None, new_collection_id=None, organization_name=None, properties=None, status_reason=None):
69+
super(Account, self).__init__()
70+
self.account_id = account_id
71+
self.account_name = account_name
72+
self.account_owner = account_owner
73+
self.account_status = account_status
74+
self.account_type = account_type
75+
self.account_uri = account_uri
76+
self.created_by = created_by
77+
self.created_date = created_date
78+
self.has_moved = has_moved
79+
self.last_updated_by = last_updated_by
80+
self.last_updated_date = last_updated_date
81+
self.namespace_id = namespace_id
82+
self.new_collection_id = new_collection_id
83+
self.organization_name = organization_name
84+
self.properties = properties
85+
self.status_reason = status_reason
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------
8+
9+
from msrest.serialization import Model
10+
11+
12+
class AccountCreateInfoInternal(Model):
13+
"""AccountCreateInfoInternal.
14+
15+
:param account_name:
16+
:type account_name: str
17+
:param creator:
18+
:type creator: str
19+
:param organization:
20+
:type organization: str
21+
:param preferences:
22+
:type preferences: :class:`AccountPreferencesInternal <accounts.v4_0.models.AccountPreferencesInternal>`
23+
:param properties:
24+
:type properties: :class:`object <accounts.v4_0.models.object>`
25+
:param service_definitions:
26+
:type service_definitions: list of { key: str; value: str }
27+
"""
28+
29+
_attribute_map = {
30+
'account_name': {'key': 'accountName', 'type': 'str'},
31+
'creator': {'key': 'creator', 'type': 'str'},
32+
'organization': {'key': 'organization', 'type': 'str'},
33+
'preferences': {'key': 'preferences', 'type': 'AccountPreferencesInternal'},
34+
'properties': {'key': 'properties', 'type': 'object'},
35+
'service_definitions': {'key': 'serviceDefinitions', 'type': '[{ key: str; value: str }]'}
36+
}
37+
38+
def __init__(self, account_name=None, creator=None, organization=None, preferences=None, properties=None, service_definitions=None):
39+
super(AccountCreateInfoInternal, self).__init__()
40+
self.account_name = account_name
41+
self.creator = creator
42+
self.organization = organization
43+
self.preferences = preferences
44+
self.properties = properties
45+
self.service_definitions = service_definitions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------
8+
9+
from msrest.serialization import Model
10+
11+
12+
class AccountPreferencesInternal(Model):
13+
"""AccountPreferencesInternal.
14+
15+
:param culture:
16+
:type culture: object
17+
:param language:
18+
:type language: object
19+
:param time_zone:
20+
:type time_zone: object
21+
"""
22+
23+
_attribute_map = {
24+
'culture': {'key': 'culture', 'type': 'object'},
25+
'language': {'key': 'language', 'type': 'object'},
26+
'time_zone': {'key': 'timeZone', 'type': 'object'}
27+
}
28+
29+
def __init__(self, culture=None, language=None, time_zone=None):
30+
super(AccountPreferencesInternal, self).__init__()
31+
self.culture = culture
32+
self.language = language
33+
self.time_zone = time_zone

vsts/vsts/contributions/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
# Generated file, DO NOT EDIT
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)