Skip to content

Commit

Permalink
CodeGen from PR 19754 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
modify readme.typescript,md in workloads (Azure#19754)

* modify readme.typescript,md in workloads

* update properties

* update file

* update file

* update files

* Update readme.typescript.md

* Update readme.typescript.md

* Remove spaces

Co-authored-by: ZiWei Chen (WICRESOFT NORTH AMERICA LTD) <[email protected]>
Co-authored-by: Mary Gao <[email protected]>
  • Loading branch information
3 people committed Jul 20, 2022
1 parent 0cc2b50 commit 1824e7a
Show file tree
Hide file tree
Showing 37 changed files with 3,371 additions and 2,236 deletions.
6 changes: 3 additions & 3 deletions sdk/workloads/azure-mgmt-workloads/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"use": [
"@autorest/python@5.13.0",
"@autorest/python@5.16.0",
"@autorest/[email protected]"
],
"commit": "2d6cb29af754f48a08f94cb6113bb1f01a4e0eb9",
"commit": "9b33d815ac8b361446522fdec1e7a6dcf029910f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/workloads/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/[email protected] --version=3.7.2",
"autorest_command": "autorest specification/workloads/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/[email protected] --version=3.7.2",
"readme": "specification/workloads/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['WorkloadsClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
18 changes: 18 additions & 0 deletions sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/_vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from abc import ABC
from typing import TYPE_CHECKING

from azure.core.pipeline.transport import HttpRequest

from ._configuration import WorkloadsClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from msrest import Deserializer, Serializer

from azure.core import PipelineClient

def _convert_request(request, files=None):
data = request.content if not files else None
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
Expand All @@ -25,3 +36,10 @@ def _format_url_section(template, **kwargs):
c for c in formatted_components if "{}".format(key.args[0]) not in c
]
template = "/".join(components)

class MixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""
_client: "PipelineClient"
_config: WorkloadsClientConfiguration
_serialize: "Serializer"
_deserialize: "Deserializer"
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,36 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.php_workloads = PhpWorkloadsOperations(self._client, self._config, self._serialize, self._deserialize)
self.wordpress_instances = WordpressInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_virtual_instances = SAPVirtualInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_central_instances = SAPCentralInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_database_instances = SAPDatabaseInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_application_server_instances = SAPApplicationServerInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.monitors = MonitorsOperations(self._client, self._config, self._serialize, self._deserialize)
self.provider_instances = ProviderInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
self.php_workloads = PhpWorkloadsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.wordpress_instances = WordpressInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_virtual_instances = SAPVirtualInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_central_instances = SAPCentralInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_database_instances = SAPDatabaseInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_application_server_instances = SAPApplicationServerInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize
)
self.monitors = MonitorsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.provider_instances = ProviderInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.skus = SkusOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
# --------------------------------------------------------------------------

from ._workloads_client import WorkloadsClient

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
__all__ = ['WorkloadsClient']
__all__.extend([p for p in _patch_all if p not in __all__])

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
_patch_sdk()
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from abc import ABC
from typing import TYPE_CHECKING

from azure.core.pipeline.transport import HttpRequest

from ._configuration import WorkloadsClientConfiguration

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from msrest import Deserializer, Serializer

from azure.core import AsyncPipelineClient


class MixinABC(ABC):
"""DO NOT use this class. It is for internal typing use only."""
_client: "AsyncPipelineClient"
_config: WorkloadsClientConfiguration
_serialize: "Serializer"
_deserialize: "Deserializer"
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,36 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.php_workloads = PhpWorkloadsOperations(self._client, self._config, self._serialize, self._deserialize)
self.wordpress_instances = WordpressInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_virtual_instances = SAPVirtualInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_central_instances = SAPCentralInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_database_instances = SAPDatabaseInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sap_application_server_instances = SAPApplicationServerInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.monitors = MonitorsOperations(self._client, self._config, self._serialize, self._deserialize)
self.provider_instances = ProviderInstancesOperations(self._client, self._config, self._serialize, self._deserialize)
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
self.php_workloads = PhpWorkloadsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.wordpress_instances = WordpressInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_virtual_instances = SAPVirtualInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_central_instances = SAPCentralInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_database_instances = SAPDatabaseInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.sap_application_server_instances = SAPApplicationServerInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize
)
self.monitors = MonitorsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.provider_instances = ProviderInstancesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.skus = SkusOperations(
self._client, self._config, self._serialize, self._deserialize
)


def _send_request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
from ._provider_instances_operations import ProviderInstancesOperations
from ._skus_operations import SkusOperations

from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
__all__ = [
'PhpWorkloadsOperations',
'WordpressInstancesOperations',
Expand All @@ -31,3 +34,5 @@
'ProviderInstancesOperations',
'SkusOperations',
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Loading

0 comments on commit 1824e7a

Please sign in to comment.