Skip to content

Commit

Permalink
CodeGen from PR 15384 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 6b93cf720efded73fc3f288c267a49a0f49a87c9 into ade8724
  • Loading branch information
SDKAuto committed Aug 2, 2021
1 parent 03516c3 commit 13648ee
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 53 deletions.
1 change: 1 addition & 0 deletions sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/apimanagement/azure-mgmt-apimanagement/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "11a0ddcb1ad5114d65b28ca715dafc4d080d8d22",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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",
"readme": "specification/apimanagement/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6097,14 +6097,20 @@ def __init__(self, **kwargs):
self.policies = kwargs.get('policies', None)


class OperationResultContract(Model):
"""Operation Result.
class OperationResultContract(Resource):
"""Long Running Git Operation Results.
Variables are only populated by the server, and will be ignored when
sending a request.
:param id: Operation result identifier.
:type id: str
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type for API Management resource.
:vartype type: str
:param operation_result_contract_id: Operation result identifier.
:type operation_result_contract_id: str
:param status: Status of an async operation. Possible values include:
'Started', 'InProgress', 'Succeeded', 'Failed'
:type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus
Expand All @@ -6129,22 +6135,28 @@ class OperationResultContract(Model):
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'action_log': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'status': {'key': 'status', 'type': 'AsyncOperationStatus'},
'started': {'key': 'started', 'type': 'iso-8601'},
'updated': {'key': 'updated', 'type': 'iso-8601'},
'result_info': {'key': 'resultInfo', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorResponseBody'},
'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'operation_result_contract_id': {'key': 'properties.id', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'AsyncOperationStatus'},
'started': {'key': 'properties.started', 'type': 'iso-8601'},
'updated': {'key': 'properties.updated', 'type': 'iso-8601'},
'result_info': {'key': 'properties.resultInfo', 'type': 'str'},
'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'},
'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'},
}

def __init__(self, **kwargs):
super(OperationResultContract, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.operation_result_contract_id = kwargs.get('operation_result_contract_id', None)
self.status = kwargs.get('status', None)
self.started = kwargs.get('started', None)
self.updated = kwargs.get('updated', None)
Expand Down Expand Up @@ -8451,7 +8463,7 @@ def __init__(self, **kwargs):


class TenantConfigurationSyncStateContract(Model):
"""Tenant Configuration Synchronization State.
"""Result of Tenant Configuration Sync State.
:param branch: The name of Git branch.
:type branch: str
Expand All @@ -8474,16 +8486,20 @@ class TenantConfigurationSyncStateContract(Model):
change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ`
as specified by the ISO 8601 standard.
:type configuration_change_date: datetime
:param last_operation_id: Most recent tenant configuration operation
identifier
:type last_operation_id: str
"""

_attribute_map = {
'branch': {'key': 'branch', 'type': 'str'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'is_export': {'key': 'isExport', 'type': 'bool'},
'is_synced': {'key': 'isSynced', 'type': 'bool'},
'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'},
'sync_date': {'key': 'syncDate', 'type': 'iso-8601'},
'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'},
'branch': {'key': 'properties.branch', 'type': 'str'},
'commit_id': {'key': 'properties.commitId', 'type': 'str'},
'is_export': {'key': 'properties.isExport', 'type': 'bool'},
'is_synced': {'key': 'properties.isSynced', 'type': 'bool'},
'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'},
'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'},
'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'},
'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -8495,6 +8511,7 @@ def __init__(self, **kwargs):
self.is_git_enabled = kwargs.get('is_git_enabled', None)
self.sync_date = kwargs.get('sync_date', None)
self.configuration_change_date = kwargs.get('configuration_change_date', None)
self.last_operation_id = kwargs.get('last_operation_id', None)


class TenantSettingsContract(Resource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6097,14 +6097,20 @@ def __init__(self, *, template_parameters=None, description: str=None, request=N
self.policies = policies


class OperationResultContract(Model):
"""Operation Result.
class OperationResultContract(Resource):
"""Long Running Git Operation Results.
Variables are only populated by the server, and will be ignored when
sending a request.
:param id: Operation result identifier.
:type id: str
:ivar id: Resource ID.
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type for API Management resource.
:vartype type: str
:param operation_result_contract_id: Operation result identifier.
:type operation_result_contract_id: str
:param status: Status of an async operation. Possible values include:
'Started', 'InProgress', 'Succeeded', 'Failed'
:type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus
Expand All @@ -6129,22 +6135,28 @@ class OperationResultContract(Model):
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'action_log': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'status': {'key': 'status', 'type': 'AsyncOperationStatus'},
'started': {'key': 'started', 'type': 'iso-8601'},
'updated': {'key': 'updated', 'type': 'iso-8601'},
'result_info': {'key': 'resultInfo', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorResponseBody'},
'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'operation_result_contract_id': {'key': 'properties.id', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'AsyncOperationStatus'},
'started': {'key': 'properties.started', 'type': 'iso-8601'},
'updated': {'key': 'properties.updated', 'type': 'iso-8601'},
'result_info': {'key': 'properties.resultInfo', 'type': 'str'},
'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'},
'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'},
}

def __init__(self, *, id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None:
def __init__(self, *, operation_result_contract_id: str=None, status=None, started=None, updated=None, result_info: str=None, error=None, **kwargs) -> None:
super(OperationResultContract, self).__init__(**kwargs)
self.id = id
self.operation_result_contract_id = operation_result_contract_id
self.status = status
self.started = started
self.updated = updated
Expand Down Expand Up @@ -8451,7 +8463,7 @@ def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None:


class TenantConfigurationSyncStateContract(Model):
"""Tenant Configuration Synchronization State.
"""Result of Tenant Configuration Sync State.
:param branch: The name of Git branch.
:type branch: str
Expand All @@ -8474,19 +8486,23 @@ class TenantConfigurationSyncStateContract(Model):
change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ`
as specified by the ISO 8601 standard.
:type configuration_change_date: datetime
:param last_operation_id: Most recent tenant configuration operation
identifier
:type last_operation_id: str
"""

_attribute_map = {
'branch': {'key': 'branch', 'type': 'str'},
'commit_id': {'key': 'commitId', 'type': 'str'},
'is_export': {'key': 'isExport', 'type': 'bool'},
'is_synced': {'key': 'isSynced', 'type': 'bool'},
'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'},
'sync_date': {'key': 'syncDate', 'type': 'iso-8601'},
'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'},
'branch': {'key': 'properties.branch', 'type': 'str'},
'commit_id': {'key': 'properties.commitId', 'type': 'str'},
'is_export': {'key': 'properties.isExport', 'type': 'bool'},
'is_synced': {'key': 'properties.isSynced', 'type': 'bool'},
'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'},
'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'},
'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'},
'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'},
}

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:
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:
super(TenantConfigurationSyncStateContract, self).__init__(**kwargs)
self.branch = branch
self.commit_id = commit_id
Expand All @@ -8495,6 +8511,7 @@ def __init__(self, *, branch: str=None, commit_id: str=None, is_export: bool=Non
self.is_git_enabled = is_git_enabled
self.sync_date = sync_date
self.configuration_change_date = configuration_change_date
self.last_operation_id = last_operation_id


class TenantSettingsContract(Resource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer):

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

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

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

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

def delete(
self, resource_group_name, service_name, content_type_id, content_item_id, if_match, custom_headers=None, raw=False, **operation_config):
"""Removes specified content item.
"""Removes the specified developer portal's content item.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self, client, config, serializer, deserializer):

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

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

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

def delete(
self, resource_group_name, service_name, content_type_id, if_match, custom_headers=None, raw=False, **operation_config):
"""Removes specified content type.
"""Removes the specified developer portal's content type. Content types
describe content items' properties, validation rules, and constraints.
Built-in content types (with identifiers starting with the `c-` prefix)
can't be removed.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer):

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

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

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

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

0 comments on commit 13648ee

Please sign in to comment.