Skip to content

Commit a65e814

Browse files
author
SDKAuto
committed
CodeGen from PR 24268 in Azure/azure-rest-api-specs
Merge 69df78fe51252adb2dc6135d0dc3ef95cf94f638 into d650a21d6f78ecd512bee6e21685d7e999baf4b9
1 parent d4041cb commit a65e814

File tree

73 files changed

+3806
-965
lines changed

Some content is hidden

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

73 files changed

+3806
-965
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "f6d16956a7d5b75e125a88d81d7bc9b6fecfd41a",
2+
"commit": "82950b2c1860020cd1743681438d9c223768935c",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
6-
"@autorest/[email protected].0",
6+
"@autorest/[email protected].12",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/webpubsub/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected].0 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/webpubsub/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected].12 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/webpubsub/resource-manager/readme.md"
1111
}

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_configuration.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -33,17 +27,16 @@ class WebPubSubManagementClientConfiguration(Configuration): # pylint: disable=
3327
3428
:param credential: Credential needed for the client to connect to Azure. Required.
3529
:type credential: ~azure.core.credentials.TokenCredential
36-
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
37-
subscription. The subscription ID forms part of the URI for every service call. Required.
30+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3831
:type subscription_id: str
39-
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
40-
default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
4134
:paramtype api_version: str
4235
"""
4336

4437
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4538
super(WebPubSubManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version: Literal["2023-02-01"] = kwargs.pop("api_version", "2023-02-01")
39+
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")
4740

4841
if credential is None:
4942
raise ValueError("Parameter 'credential' must not be None.")

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_serialization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
629629
if xml_desc.get("attr", False):
630630
if xml_ns:
631631
ET.register_namespace(xml_prefix, xml_ns)
632-
xml_name = "{}{}".format(xml_ns, xml_name)
632+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
633633
serialized.set(xml_name, new_attr) # type: ignore
634634
continue
635635
if xml_desc.get("text", False):
@@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type):
12711271
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
12721272
xml_ns = internal_type_xml_map.get("ns", None)
12731273
if xml_ns:
1274-
xml_name = "{}{}".format(xml_ns, xml_name)
1274+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12751275
return xml_name
12761276

12771277

@@ -1295,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data):
12951295
# Integrate namespace if necessary
12961296
xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None))
12971297
if xml_ns:
1298-
xml_name = "{}{}".format(xml_ns, xml_name)
1298+
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
12991299

13001300
# If it's an attribute, that's simple
13011301
if xml_desc.get("attr", False):

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.1.0"
9+
VERSION = "0.1.0"

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_web_pub_sub_management_client.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
WebPubSubOperations,
2525
WebPubSubPrivateEndpointConnectionsOperations,
2626
WebPubSubPrivateLinkResourcesOperations,
27+
WebPubSubReplicasOperations,
2728
WebPubSubSharedPrivateLinkResourcesOperations,
2829
)
2930

@@ -56,19 +57,20 @@ class WebPubSubManagementClient: # pylint: disable=client-accepts-api-version-k
5657
:ivar web_pub_sub_private_link_resources: WebPubSubPrivateLinkResourcesOperations operations
5758
:vartype web_pub_sub_private_link_resources:
5859
azure.mgmt.webpubsub.operations.WebPubSubPrivateLinkResourcesOperations
60+
:ivar web_pub_sub_replicas: WebPubSubReplicasOperations operations
61+
:vartype web_pub_sub_replicas: azure.mgmt.webpubsub.operations.WebPubSubReplicasOperations
5962
:ivar web_pub_sub_shared_private_link_resources: WebPubSubSharedPrivateLinkResourcesOperations
6063
operations
6164
:vartype web_pub_sub_shared_private_link_resources:
6265
azure.mgmt.webpubsub.operations.WebPubSubSharedPrivateLinkResourcesOperations
6366
:param credential: Credential needed for the client to connect to Azure. Required.
6467
:type credential: ~azure.core.credentials.TokenCredential
65-
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
66-
subscription. The subscription ID forms part of the URI for every service call. Required.
68+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
6769
:type subscription_id: str
6870
:param base_url: Service URL. Default value is "https://management.azure.com".
6971
:type base_url: str
70-
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
71-
default value may result in unsupported behavior.
72+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
73+
this default value may result in unsupported behavior.
7274
:paramtype api_version: str
7375
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
7476
Retry-After header is present.
@@ -84,7 +86,7 @@ def __init__(
8486
self._config = WebPubSubManagementClientConfiguration(
8587
credential=credential, subscription_id=subscription_id, **kwargs
8688
)
87-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
89+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8890

8991
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
9092
self._serialize = Serializer(client_models)
@@ -106,6 +108,9 @@ def __init__(
106108
self.web_pub_sub_private_link_resources = WebPubSubPrivateLinkResourcesOperations(
107109
self._client, self._config, self._serialize, self._deserialize
108110
)
111+
self.web_pub_sub_replicas = WebPubSubReplicasOperations(
112+
self._client, self._config, self._serialize, self._deserialize
113+
)
109114
self.web_pub_sub_shared_private_link_resources = WebPubSubSharedPrivateLinkResourcesOperations(
110115
self._client, self._config, self._serialize, self._deserialize
111116
)

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_configuration.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from .._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials_async import AsyncTokenCredential
@@ -33,17 +27,16 @@ class WebPubSubManagementClientConfiguration(Configuration): # pylint: disable=
3327
3428
:param credential: Credential needed for the client to connect to Azure. Required.
3529
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
36-
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
37-
subscription. The subscription ID forms part of the URI for every service call. Required.
30+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3831
:type subscription_id: str
39-
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
40-
default value may result in unsupported behavior.
32+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
4134
:paramtype api_version: str
4235
"""
4336

4437
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
4538
super(WebPubSubManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version: Literal["2023-02-01"] = kwargs.pop("api_version", "2023-02-01")
39+
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")
4740

4841
if credential is None:
4942
raise ValueError("Parameter 'credential' must not be None.")

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_web_pub_sub_management_client.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
WebPubSubOperations,
2525
WebPubSubPrivateEndpointConnectionsOperations,
2626
WebPubSubPrivateLinkResourcesOperations,
27+
WebPubSubReplicasOperations,
2728
WebPubSubSharedPrivateLinkResourcesOperations,
2829
)
2930

@@ -56,19 +57,20 @@ class WebPubSubManagementClient: # pylint: disable=client-accepts-api-version-k
5657
:ivar web_pub_sub_private_link_resources: WebPubSubPrivateLinkResourcesOperations operations
5758
:vartype web_pub_sub_private_link_resources:
5859
azure.mgmt.webpubsub.aio.operations.WebPubSubPrivateLinkResourcesOperations
60+
:ivar web_pub_sub_replicas: WebPubSubReplicasOperations operations
61+
:vartype web_pub_sub_replicas: azure.mgmt.webpubsub.aio.operations.WebPubSubReplicasOperations
5962
:ivar web_pub_sub_shared_private_link_resources: WebPubSubSharedPrivateLinkResourcesOperations
6063
operations
6164
:vartype web_pub_sub_shared_private_link_resources:
6265
azure.mgmt.webpubsub.aio.operations.WebPubSubSharedPrivateLinkResourcesOperations
6366
:param credential: Credential needed for the client to connect to Azure. Required.
6467
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
65-
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
66-
subscription. The subscription ID forms part of the URI for every service call. Required.
68+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
6769
:type subscription_id: str
6870
:param base_url: Service URL. Default value is "https://management.azure.com".
6971
:type base_url: str
70-
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
71-
default value may result in unsupported behavior.
72+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
73+
this default value may result in unsupported behavior.
7274
:paramtype api_version: str
7375
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
7476
Retry-After header is present.
@@ -84,7 +86,7 @@ def __init__(
8486
self._config = WebPubSubManagementClientConfiguration(
8587
credential=credential, subscription_id=subscription_id, **kwargs
8688
)
87-
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
89+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
8890

8991
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
9092
self._serialize = Serializer(client_models)
@@ -106,6 +108,9 @@ def __init__(
106108
self.web_pub_sub_private_link_resources = WebPubSubPrivateLinkResourcesOperations(
107109
self._client, self._config, self._serialize, self._deserialize
108110
)
111+
self.web_pub_sub_replicas = WebPubSubReplicasOperations(
112+
self._client, self._config, self._serialize, self._deserialize
113+
)
109114
self.web_pub_sub_shared_private_link_resources = WebPubSubSharedPrivateLinkResourcesOperations(
110115
self._client, self._config, self._serialize, self._deserialize
111116
)

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from ._web_pub_sub_hubs_operations import WebPubSubHubsOperations
1515
from ._web_pub_sub_private_endpoint_connections_operations import WebPubSubPrivateEndpointConnectionsOperations
1616
from ._web_pub_sub_private_link_resources_operations import WebPubSubPrivateLinkResourcesOperations
17+
from ._web_pub_sub_replicas_operations import WebPubSubReplicasOperations
1718
from ._web_pub_sub_shared_private_link_resources_operations import WebPubSubSharedPrivateLinkResourcesOperations
1819

1920
from ._patch import __all__ as _patch_all
@@ -29,6 +30,7 @@
2930
"WebPubSubHubsOperations",
3031
"WebPubSubPrivateEndpointConnectionsOperations",
3132
"WebPubSubPrivateLinkResourcesOperations",
33+
"WebPubSubReplicasOperations",
3234
"WebPubSubSharedPrivateLinkResourcesOperations",
3335
]
3436
__all__.extend([p for p in _patch_all if p not in __all__])

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_operations.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9-
import sys
109
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
1110
import urllib.parse
1211

@@ -30,10 +29,6 @@
3029
from ..._vendor import _convert_request
3130
from ...operations._operations import build_list_request
3231

33-
if sys.version_info >= (3, 8):
34-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
35-
else:
36-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3732
T = TypeVar("T")
3833
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3934

@@ -69,9 +64,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
6964
_headers = kwargs.pop("headers", {}) or {}
7065
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
7166

72-
api_version: Literal["2023-02-01"] = kwargs.pop(
73-
"api_version", _params.pop("api-version", self._config.api_version)
74-
)
67+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
7568
cls: ClsType[_models.OperationList] = kwargs.pop("cls", None)
7669

7770
error_map = {
@@ -122,8 +115,9 @@ async def extract_data(pipeline_response):
122115
async def get_next(next_link=None):
123116
request = prepare_request(next_link)
124117

118+
_stream = False
125119
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
126-
request, stream=False, **kwargs
120+
request, stream=_stream, **kwargs
127121
)
128122
response = pipeline_response.http_response
129123

sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_usages_operations.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Code generated by Microsoft (R) AutoRest Code Generator.
77
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
88
# --------------------------------------------------------------------------
9-
import sys
109
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
1110
import urllib.parse
1211

@@ -30,10 +29,6 @@
3029
from ..._vendor import _convert_request
3130
from ...operations._usages_operations import build_list_request
3231

33-
if sys.version_info >= (3, 8):
34-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
35-
else:
36-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
3732
T = TypeVar("T")
3833
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
3934

@@ -72,9 +67,7 @@ def list(self, location: str, **kwargs: Any) -> AsyncIterable["_models.SignalRSe
7267
_headers = kwargs.pop("headers", {}) or {}
7368
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
7469

75-
api_version: Literal["2023-02-01"] = kwargs.pop(
76-
"api_version", _params.pop("api-version", self._config.api_version)
77-
)
70+
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
7871
cls: ClsType[_models.SignalRServiceUsageList] = kwargs.pop("cls", None)
7972

8073
error_map = {
@@ -127,8 +120,9 @@ async def extract_data(pipeline_response):
127120
async def get_next(next_link=None):
128121
request = prepare_request(next_link)
129122

123+
_stream = False
130124
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
131-
request, stream=False, **kwargs
125+
request, stream=_stream, **kwargs
132126
)
133127
response = pipeline_response.http_response
134128

0 commit comments

Comments
 (0)