Skip to content

Commit 02a2160

Browse files
committed
generate 3 new 4.0 REST Areas, and update resource ids
1 parent f77940c commit 02a2160

38 files changed

+1264
-13
lines changed

vsts/vsts/accounts/v4_0/accounts_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, base_url=None, creds=None):
2323
self._serialize = Serializer(client_models)
2424
self._deserialize = Deserializer(client_models)
2525

26-
resource_area_identifier = None
26+
resource_area_identifier = '0d55247a-1c47-4462-9b1f-5e2125590ee6'
2727

2828
def create_account(self, info, use_precreated=None):
2929
"""CreateAccount.

vsts/vsts/contributions/v4_0/contributions_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, base_url=None, creds=None):
2323
self._serialize = Serializer(client_models)
2424
self._deserialize = Deserializer(client_models)
2525

26-
resource_area_identifier = None
26+
resource_area_identifier = '8477aec9-a4c7-4bd4-a456-ba4c53c989cb'
2727

2828
def query_contribution_nodes(self, query):
2929
"""QueryContributionNodes.

vsts/vsts/dashboard/v4_0/dashboard_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, base_url=None, creds=None):
2323
self._serialize = Serializer(client_models)
2424
self._deserialize = Deserializer(client_models)
2525

26-
resource_area_identifier = None
26+
resource_area_identifier = '31c84e0a-3ece-48fd-a29d-100849af99ba'
2727

2828
def create_dashboard(self, dashboard, team_context):
2929
"""CreateDashboard.

vsts/vsts/extension_management/v4_0/extension_management_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, base_url=None, creds=None):
2323
self._serialize = Serializer(client_models)
2424
self._deserialize = Deserializer(client_models)
2525

26-
resource_area_identifier = None
26+
resource_area_identifier = '6c2b0933-3600-42ae-bf8b-93d4f7e83594'
2727

2828
def get_acquisition_options(self, item_id, test_commerce=None, is_free_or_trial_install=None):
2929
"""GetAcquisitionOptions.
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: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
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 FeatureAvailabilityClient(VssClient):
15+
"""FeatureAvailability
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(FeatureAvailabilityClient, 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 get_all_feature_flags(self, user_email=None):
29+
"""GetAllFeatureFlags.
30+
[Preview API] Retrieve a listing of all feature flags and their current states for a user
31+
:param str user_email: The email of the user to check
32+
:rtype: [FeatureFlag]
33+
"""
34+
query_parameters = {}
35+
if user_email is not None:
36+
query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str')
37+
response = self._send(http_method='GET',
38+
location_id='3e2b80f8-9e6f-441e-8393-005610692d9c',
39+
version='4.0-preview.1',
40+
query_parameters=query_parameters,
41+
returns_collection=True)
42+
return self._deserialize('[FeatureFlag]', response)
43+
44+
def get_feature_flag_by_name(self, name):
45+
"""GetFeatureFlagByName.
46+
[Preview API] Retrieve information on a single feature flag and its current states
47+
:param str name: The name of the feature to retrieve
48+
:rtype: :class:`<FeatureFlag> <feature-availability.v4_0.models.FeatureFlag>`
49+
"""
50+
route_values = {}
51+
if name is not None:
52+
route_values['name'] = self._serialize.url('name', name, 'str')
53+
response = self._send(http_method='GET',
54+
location_id='3e2b80f8-9e6f-441e-8393-005610692d9c',
55+
version='4.0-preview.1',
56+
route_values=route_values)
57+
return self._deserialize('FeatureFlag', response)
58+
59+
def get_feature_flag_by_name_and_user_email(self, name, user_email):
60+
"""GetFeatureFlagByNameAndUserEmail.
61+
[Preview API] Retrieve information on a single feature flag and its current states for a user
62+
:param str name: The name of the feature to retrieve
63+
:param str user_email: The email of the user to check
64+
:rtype: :class:`<FeatureFlag> <feature-availability.v4_0.models.FeatureFlag>`
65+
"""
66+
route_values = {}
67+
if name is not None:
68+
route_values['name'] = self._serialize.url('name', name, 'str')
69+
query_parameters = {}
70+
if user_email is not None:
71+
query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str')
72+
response = self._send(http_method='GET',
73+
location_id='3e2b80f8-9e6f-441e-8393-005610692d9c',
74+
version='4.0-preview.1',
75+
route_values=route_values,
76+
query_parameters=query_parameters)
77+
return self._deserialize('FeatureFlag', response)
78+
79+
def get_feature_flag_by_name_and_user_id(self, name, user_id):
80+
"""GetFeatureFlagByNameAndUserId.
81+
[Preview API] Retrieve information on a single feature flag and its current states for a user
82+
:param str name: The name of the feature to retrieve
83+
:param str user_id: The id of the user to check
84+
:rtype: :class:`<FeatureFlag> <feature-availability.v4_0.models.FeatureFlag>`
85+
"""
86+
route_values = {}
87+
if name is not None:
88+
route_values['name'] = self._serialize.url('name', name, 'str')
89+
query_parameters = {}
90+
if user_id is not None:
91+
query_parameters['userId'] = self._serialize.query('user_id', user_id, 'str')
92+
response = self._send(http_method='GET',
93+
location_id='3e2b80f8-9e6f-441e-8393-005610692d9c',
94+
version='4.0-preview.1',
95+
route_values=route_values,
96+
query_parameters=query_parameters)
97+
return self._deserialize('FeatureFlag', response)
98+
99+
def update_feature_flag(self, state, name, user_email=None, check_feature_exists=None, set_at_application_level_also=None):
100+
"""UpdateFeatureFlag.
101+
[Preview API] Change the state of an individual feature flag for a name
102+
:param :class:`<FeatureFlagPatch> <feature-availability.v4_0.models.FeatureFlagPatch>` state: State that should be set
103+
:param str name: The name of the feature to change
104+
:param str user_email:
105+
:param bool check_feature_exists: Checks if the feature exists before setting the state
106+
:param bool set_at_application_level_also:
107+
:rtype: :class:`<FeatureFlag> <feature-availability.v4_0.models.FeatureFlag>`
108+
"""
109+
route_values = {}
110+
if name is not None:
111+
route_values['name'] = self._serialize.url('name', name, 'str')
112+
query_parameters = {}
113+
if user_email is not None:
114+
query_parameters['userEmail'] = self._serialize.query('user_email', user_email, 'str')
115+
if check_feature_exists is not None:
116+
query_parameters['checkFeatureExists'] = self._serialize.query('check_feature_exists', check_feature_exists, 'bool')
117+
if set_at_application_level_also is not None:
118+
query_parameters['setAtApplicationLevelAlso'] = self._serialize.query('set_at_application_level_also', set_at_application_level_also, 'bool')
119+
content = self._serialize.body(state, 'FeatureFlagPatch')
120+
response = self._send(http_method='PATCH',
121+
location_id='3e2b80f8-9e6f-441e-8393-005610692d9c',
122+
version='4.0-preview.1',
123+
route_values=route_values,
124+
query_parameters=query_parameters,
125+
content=content)
126+
return self._deserialize('FeatureFlag', response)
127+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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 .feature_flag import FeatureFlag
10+
from .feature_flag_patch import FeatureFlagPatch
11+
12+
__all__ = [
13+
'FeatureFlag',
14+
'FeatureFlagPatch',
15+
]
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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 FeatureFlag(Model):
13+
"""FeatureFlag.
14+
15+
:param description:
16+
:type description: str
17+
:param effective_state:
18+
:type effective_state: str
19+
:param explicit_state:
20+
:type explicit_state: str
21+
:param name:
22+
:type name: str
23+
:param uri:
24+
:type uri: str
25+
"""
26+
27+
_attribute_map = {
28+
'description': {'key': 'description', 'type': 'str'},
29+
'effective_state': {'key': 'effectiveState', 'type': 'str'},
30+
'explicit_state': {'key': 'explicitState', 'type': 'str'},
31+
'name': {'key': 'name', 'type': 'str'},
32+
'uri': {'key': 'uri', 'type': 'str'}
33+
}
34+
35+
def __init__(self, description=None, effective_state=None, explicit_state=None, name=None, uri=None):
36+
super(FeatureFlag, self).__init__()
37+
self.description = description
38+
self.effective_state = effective_state
39+
self.explicit_state = explicit_state
40+
self.name = name
41+
self.uri = uri
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 FeatureFlagPatch(Model):
13+
"""FeatureFlagPatch.
14+
15+
:param state:
16+
:type state: str
17+
"""
18+
19+
_attribute_map = {
20+
'state': {'key': 'state', 'type': 'str'}
21+
}
22+
23+
def __init__(self, state=None):
24+
super(FeatureFlagPatch, self).__init__()
25+
self.state = state
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)