Skip to content

Commit 83bde36

Browse files
author
SDKAuto
committed
CodeGen from PR 15377 in Azure/azure-rest-api-specs
Merge 3e03fe3fa578eb51fc094c301624728452032047 into 3893616
1 parent 03516c3 commit 83bde36

File tree

7 files changed

+110
-53
lines changed

7 files changed

+110
-53
lines changed

sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "V2",
3+
"use": "@microsoft.azure/autorest.python@~4.0.71",
4+
"commit": "fdd6a3bfd83c5e2ff8cfb81e496552967883ea1a",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/apimanagement/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
7+
"readme": "specification/apimanagement/resource-manager/readme.md"
8+
}

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6097,14 +6097,20 @@ def __init__(self, **kwargs):
60976097
self.policies = kwargs.get('policies', None)
60986098

60996099

6100-
class OperationResultContract(Model):
6101-
"""Operation Result.
6100+
class OperationResultContract(Resource):
6101+
"""Long Running Git Operation Results.
61026102
61036103
Variables are only populated by the server, and will be ignored when
61046104
sending a request.
61056105
6106-
:param id: Operation result identifier.
6107-
:type id: str
6106+
:ivar id: Resource ID.
6107+
:vartype id: str
6108+
:ivar name: Resource name.
6109+
:vartype name: str
6110+
:ivar type: Resource type for API Management resource.
6111+
:vartype type: str
6112+
:param operation_result_contract_id: Operation result identifier.
6113+
:type operation_result_contract_id: str
61086114
:param status: Status of an async operation. Possible values include:
61096115
'Started', 'InProgress', 'Succeeded', 'Failed'
61106116
:type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus
@@ -6129,22 +6135,28 @@ class OperationResultContract(Model):
61296135
"""
61306136

61316137
_validation = {
6138+
'id': {'readonly': True},
6139+
'name': {'readonly': True},
6140+
'type': {'readonly': True},
61326141
'action_log': {'readonly': True},
61336142
}
61346143

61356144
_attribute_map = {
61366145
'id': {'key': 'id', 'type': 'str'},
6137-
'status': {'key': 'status', 'type': 'AsyncOperationStatus'},
6138-
'started': {'key': 'started', 'type': 'iso-8601'},
6139-
'updated': {'key': 'updated', 'type': 'iso-8601'},
6140-
'result_info': {'key': 'resultInfo', 'type': 'str'},
6141-
'error': {'key': 'error', 'type': 'ErrorResponseBody'},
6142-
'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'},
6146+
'name': {'key': 'name', 'type': 'str'},
6147+
'type': {'key': 'type', 'type': 'str'},
6148+
'operation_result_contract_id': {'key': 'properties.id', 'type': 'str'},
6149+
'status': {'key': 'properties.status', 'type': 'AsyncOperationStatus'},
6150+
'started': {'key': 'properties.started', 'type': 'iso-8601'},
6151+
'updated': {'key': 'properties.updated', 'type': 'iso-8601'},
6152+
'result_info': {'key': 'properties.resultInfo', 'type': 'str'},
6153+
'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'},
6154+
'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'},
61436155
}
61446156

61456157
def __init__(self, **kwargs):
61466158
super(OperationResultContract, self).__init__(**kwargs)
6147-
self.id = kwargs.get('id', None)
6159+
self.operation_result_contract_id = kwargs.get('operation_result_contract_id', None)
61486160
self.status = kwargs.get('status', None)
61496161
self.started = kwargs.get('started', None)
61506162
self.updated = kwargs.get('updated', None)
@@ -8451,7 +8463,7 @@ def __init__(self, **kwargs):
84518463

84528464

84538465
class TenantConfigurationSyncStateContract(Model):
8454-
"""Tenant Configuration Synchronization State.
8466+
"""Result of Tenant Configuration Sync State.
84558467
84568468
:param branch: The name of Git branch.
84578469
:type branch: str
@@ -8474,16 +8486,20 @@ class TenantConfigurationSyncStateContract(Model):
84748486
change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ`
84758487
as specified by the ISO 8601 standard.
84768488
:type configuration_change_date: datetime
8489+
:param last_operation_id: Most recent tenant configuration operation
8490+
identifier
8491+
:type last_operation_id: str
84778492
"""
84788493

84798494
_attribute_map = {
8480-
'branch': {'key': 'branch', 'type': 'str'},
8481-
'commit_id': {'key': 'commitId', 'type': 'str'},
8482-
'is_export': {'key': 'isExport', 'type': 'bool'},
8483-
'is_synced': {'key': 'isSynced', 'type': 'bool'},
8484-
'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'},
8485-
'sync_date': {'key': 'syncDate', 'type': 'iso-8601'},
8486-
'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'},
8495+
'branch': {'key': 'properties.branch', 'type': 'str'},
8496+
'commit_id': {'key': 'properties.commitId', 'type': 'str'},
8497+
'is_export': {'key': 'properties.isExport', 'type': 'bool'},
8498+
'is_synced': {'key': 'properties.isSynced', 'type': 'bool'},
8499+
'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'},
8500+
'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'},
8501+
'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'},
8502+
'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'},
84878503
}
84888504

84898505
def __init__(self, **kwargs):
@@ -8495,6 +8511,7 @@ def __init__(self, **kwargs):
84958511
self.is_git_enabled = kwargs.get('is_git_enabled', None)
84968512
self.sync_date = kwargs.get('sync_date', None)
84978513
self.configuration_change_date = kwargs.get('configuration_change_date', None)
8514+
self.last_operation_id = kwargs.get('last_operation_id', None)
84988515

84998516

85008517
class TenantSettingsContract(Resource):

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6097,14 +6097,20 @@ def __init__(self, *, template_parameters=None, description: str=None, request=N
60976097
self.policies = policies
60986098

60996099

6100-
class OperationResultContract(Model):
6101-
"""Operation Result.
6100+
class OperationResultContract(Resource):
6101+
"""Long Running Git Operation Results.
61026102
61036103
Variables are only populated by the server, and will be ignored when
61046104
sending a request.
61056105
6106-
:param id: Operation result identifier.
6107-
:type id: str
6106+
:ivar id: Resource ID.
6107+
:vartype id: str
6108+
:ivar name: Resource name.
6109+
:vartype name: str
6110+
:ivar type: Resource type for API Management resource.
6111+
:vartype type: str
6112+
:param operation_result_contract_id: Operation result identifier.
6113+
:type operation_result_contract_id: str
61086114
:param status: Status of an async operation. Possible values include:
61096115
'Started', 'InProgress', 'Succeeded', 'Failed'
61106116
:type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus
@@ -6129,22 +6135,28 @@ class OperationResultContract(Model):
61296135
"""
61306136

61316137
_validation = {
6138+
'id': {'readonly': True},
6139+
'name': {'readonly': True},
6140+
'type': {'readonly': True},
61326141
'action_log': {'readonly': True},
61336142
}
61346143

61356144
_attribute_map = {
61366145
'id': {'key': 'id', 'type': 'str'},
6137-
'status': {'key': 'status', 'type': 'AsyncOperationStatus'},
6138-
'started': {'key': 'started', 'type': 'iso-8601'},
6139-
'updated': {'key': 'updated', 'type': 'iso-8601'},
6140-
'result_info': {'key': 'resultInfo', 'type': 'str'},
6141-
'error': {'key': 'error', 'type': 'ErrorResponseBody'},
6142-
'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'},
6146+
'name': {'key': 'name', 'type': 'str'},
6147+
'type': {'key': 'type', 'type': 'str'},
6148+
'operation_result_contract_id': {'key': 'properties.id', 'type': 'str'},
6149+
'status': {'key': 'properties.status', 'type': 'AsyncOperationStatus'},
6150+
'started': {'key': 'properties.started', 'type': 'iso-8601'},
6151+
'updated': {'key': 'properties.updated', 'type': 'iso-8601'},
6152+
'result_info': {'key': 'properties.resultInfo', 'type': 'str'},
6153+
'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'},
6154+
'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'},
61436155
}
61446156

6145-
def __init__(self, *, id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None:
6157+
def __init__(self, *, operation_result_contract_id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None:
61466158
super(OperationResultContract, self).__init__(**kwargs)
6147-
self.id = id
6159+
self.operation_result_contract_id = operation_result_contract_id
61486160
self.status = status
61496161
self.started = started
61506162
self.updated = updated
@@ -8451,7 +8463,7 @@ def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None:
84518463

84528464

84538465
class TenantConfigurationSyncStateContract(Model):
8454-
"""Tenant Configuration Synchronization State.
8466+
"""Result of Tenant Configuration Sync State.
84558467
84568468
:param branch: The name of Git branch.
84578469
:type branch: str
@@ -8474,19 +8486,23 @@ class TenantConfigurationSyncStateContract(Model):
84748486
change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ`
84758487
as specified by the ISO 8601 standard.
84768488
:type configuration_change_date: datetime
8489+
:param last_operation_id: Most recent tenant configuration operation
8490+
identifier
8491+
:type last_operation_id: str
84778492
"""
84788493

84798494
_attribute_map = {
8480-
'branch': {'key': 'branch', 'type': 'str'},
8481-
'commit_id': {'key': 'commitId', 'type': 'str'},
8482-
'is_export': {'key': 'isExport', 'type': 'bool'},
8483-
'is_synced': {'key': 'isSynced', 'type': 'bool'},
8484-
'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'},
8485-
'sync_date': {'key': 'syncDate', 'type': 'iso-8601'},
8486-
'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'},
8495+
'branch': {'key': 'properties.branch', 'type': 'str'},
8496+
'commit_id': {'key': 'properties.commitId', 'type': 'str'},
8497+
'is_export': {'key': 'properties.isExport', 'type': 'bool'},
8498+
'is_synced': {'key': 'properties.isSynced', 'type': 'bool'},
8499+
'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'},
8500+
'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'},
8501+
'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'},
8502+
'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'},
84878503
}
84888504

8489-
def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=None, is_synced: bool=None, is_git_enabled: bool=None, sync_date=None, configuration_change_date=None, **kwargs) -> None:
8505+
def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=None, is_synced: bool=None, is_git_enabled: bool=None, sync_date=None, configuration_change_date=None, last_operation_id: str=None, **kwargs) -> None:
84908506
super(TenantConfigurationSyncStateContract, self).__init__(**kwargs)
84918507
self.branch = branch
84928508
self.commit_id = commit_id
@@ -8495,6 +8511,7 @@ def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=Non
84958511
self.is_git_enabled = is_git_enabled
84968512
self.sync_date = sync_date
84978513
self.configuration_change_date = configuration_change_date
8514+
self.last_operation_id = last_operation_id
84988515

84998516

85008517
class TenantSettingsContract(Resource):

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer):
4040

4141
def list_by_service(
4242
self, resource_group_name, service_name, content_type_id, custom_headers=None, raw=False, **operation_config):
43-
"""Returns list of content items.
43+
"""Lists developer portal's content items specified by the provided
44+
content type.
4445
4546
:param resource_group_name: The name of the resource group.
4647
:type resource_group_name: str
@@ -114,7 +115,8 @@ def internal_paging(next_link=None):
114115

115116
def get_entity_tag(
116117
self, resource_group_name, service_name, content_type_id, content_item_id, custom_headers=None, raw=False, **operation_config):
117-
"""Returns content item metadata.
118+
"""Returns the entity state (ETag) version of the developer portal's
119+
content item specified by its identifier.
118120
119121
:param resource_group_name: The name of the resource group.
120122
:type resource_group_name: str
@@ -175,7 +177,8 @@ def get_entity_tag(
175177

176178
def get(
177179
self, resource_group_name, service_name, content_type_id, content_item_id, custom_headers=None, raw=False, **operation_config):
178-
"""Returns content item details.
180+
"""Returns the developer portal's content item specified by its
181+
identifier.
179182
180183
:param resource_group_name: The name of the resource group.
181184
:type resource_group_name: str
@@ -246,7 +249,8 @@ def get(
246249

247250
def create_or_update(
248251
self, resource_group_name, service_name, content_type_id, content_item_id, if_match=None, custom_headers=None, raw=False, **operation_config):
249-
"""Creates new content item.
252+
"""Creates a new developer portal's content item specified by the provided
253+
content type.
250254
251255
:param resource_group_name: The name of the resource group.
252256
:type resource_group_name: str
@@ -327,7 +331,7 @@ def create_or_update(
327331

328332
def delete(
329333
self, resource_group_name, service_name, content_type_id, content_item_id, if_match, custom_headers=None, raw=False, **operation_config):
330-
"""Removes specified content item.
334+
"""Removes the specified developer portal's content item.
331335
332336
:param resource_group_name: The name of the resource group.
333337
:type resource_group_name: str

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer):
4040

4141
def list_by_service(
4242
self, resource_group_name, service_name, custom_headers=None, raw=False, **operation_config):
43-
"""Returns list of content types.
43+
"""Lists the developer portal's content types. Content types describe
44+
content items' properties, validation rules, and constraints.
4445
4546
:param resource_group_name: The name of the resource group.
4647
:type resource_group_name: str
@@ -111,7 +112,8 @@ def internal_paging(next_link=None):
111112

112113
def get(
113114
self, resource_group_name, service_name, content_type_id, custom_headers=None, raw=False, **operation_config):
114-
"""Gets API Management content type details.
115+
"""Gets the details of the developer portal's content type. Content types
116+
describe content items' properties, validation rules, and constraints.
115117
116118
:param resource_group_name: The name of the resource group.
117119
:type resource_group_name: str
@@ -179,7 +181,10 @@ def get(
179181

180182
def create_or_update(
181183
self, resource_group_name, service_name, content_type_id, if_match=None, custom_headers=None, raw=False, **operation_config):
182-
"""Creates or updates an Content Type.
184+
"""Creates or updates the developer portal's content type. Content types
185+
describe content items' properties, validation rules, and constraints.
186+
Custom content types' identifiers need to start with the `c-` prefix.
187+
Built-in content types can't be modified.
183188
184189
:param resource_group_name: The name of the resource group.
185190
:type resource_group_name: str
@@ -257,7 +262,10 @@ def create_or_update(
257262

258263
def delete(
259264
self, resource_group_name, service_name, content_type_id, if_match, custom_headers=None, raw=False, **operation_config):
260-
"""Removes specified content type.
265+
"""Removes the specified developer portal's content type. Content types
266+
describe content items' properties, validation rules, and constraints.
267+
Built-in content types (with identifiers starting with the `c-` prefix)
268+
can't be removed.
261269
262270
:param resource_group_name: The name of the resource group.
263271
:type resource_group_name: str

sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer):
4242

4343
def list_by_service(
4444
self, resource_group_name, service_name, filter=None, top=None, skip=None, custom_headers=None, raw=False, **operation_config):
45-
"""Lists a collection of developer portal revision entities.
45+
"""Lists developer portal's revisions.
4646
4747
:param resource_group_name: The name of the resource group.
4848
:type resource_group_name: str
@@ -132,7 +132,7 @@ def internal_paging(next_link=None):
132132

133133
def get_entity_tag(
134134
self, resource_group_name, service_name, portal_revision_id, custom_headers=None, raw=False, **operation_config):
135-
"""Gets developer portal revision specified by its identifier.
135+
"""Gets the developer portal revision specified by its identifier.
136136
137137
:param resource_group_name: The name of the resource group.
138138
:type resource_group_name: str
@@ -191,7 +191,7 @@ def get_entity_tag(
191191

192192
def get(
193193
self, resource_group_name, service_name, portal_revision_id, custom_headers=None, raw=False, **operation_config):
194-
"""Gets developer portal revision specified by its identifier.
194+
"""Gets the developer portal's revision specified by its identifier.
195195
196196
:param resource_group_name: The name of the resource group.
197197
:type resource_group_name: str
@@ -316,7 +316,9 @@ def _create_or_update_initial(
316316

317317
def create_or_update(
318318
self, resource_group_name, service_name, portal_revision_id, description=None, is_current=None, custom_headers=None, raw=False, polling=True, **operation_config):
319-
"""Creates a new developer portal revision.
319+
"""Creates a new developer portal's revision by running the portal's
320+
publishing. The `isCurrent` property indicates if the revision is
321+
publicly accessible.
320322
321323
:param resource_group_name: The name of the resource group.
322324
:type resource_group_name: str

0 commit comments

Comments
 (0)