Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/webpubsub/azure-mgmt-webpubsub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "f6d16956a7d5b75e125a88d81d7bc9b6fecfd41a",
"commit": "82950b2c1860020cd1743681438d9c223768935c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/[email protected].0",
"@autorest/[email protected].12",
"@autorest/[email protected]"
],
"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",
"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",
"readme": "specification/webpubsub/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -33,17 +27,16 @@ class WebPubSubManagementClientConfiguration(Configuration): # pylint: disable=

:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

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

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
if xml_desc.get("attr", False):
if xml_ns:
ET.register_namespace(xml_prefix, xml_ns)
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
serialized.set(xml_name, new_attr) # type: ignore
continue
if xml_desc.get("text", False):
Expand Down Expand Up @@ -1271,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type):
xml_name = internal_type_xml_map.get("name", internal_type.__name__)
xml_ns = internal_type_xml_map.get("ns", None)
if xml_ns:
xml_name = "{}{}".format(xml_ns, xml_name)
xml_name = "{{{}}}{}".format(xml_ns, xml_name)
return xml_name


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

# If it's an attribute, that's simple
if xml_desc.get("attr", False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.1.0"
VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
WebPubSubOperations,
WebPubSubPrivateEndpointConnectionsOperations,
WebPubSubPrivateLinkResourcesOperations,
WebPubSubReplicasOperations,
WebPubSubSharedPrivateLinkResourcesOperations,
)

Expand Down Expand Up @@ -56,19 +57,20 @@ class WebPubSubManagementClient: # pylint: disable=client-accepts-api-version-k
:ivar web_pub_sub_private_link_resources: WebPubSubPrivateLinkResourcesOperations operations
:vartype web_pub_sub_private_link_resources:
azure.mgmt.webpubsub.operations.WebPubSubPrivateLinkResourcesOperations
:ivar web_pub_sub_replicas: WebPubSubReplicasOperations operations
:vartype web_pub_sub_replicas: azure.mgmt.webpubsub.operations.WebPubSubReplicasOperations
:ivar web_pub_sub_shared_private_link_resources: WebPubSubSharedPrivateLinkResourcesOperations
operations
:vartype web_pub_sub_shared_private_link_resources:
azure.mgmt.webpubsub.operations.WebPubSubSharedPrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -84,7 +86,7 @@ def __init__(
self._config = WebPubSubManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand All @@ -106,6 +108,9 @@ def __init__(
self.web_pub_sub_private_link_resources = WebPubSubPrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.web_pub_sub_replicas = WebPubSubReplicasOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.web_pub_sub_shared_private_link_resources = WebPubSubSharedPrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from .._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
Expand All @@ -33,17 +27,16 @@ class WebPubSubManagementClientConfiguration(Configuration): # pylint: disable=

:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

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

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
WebPubSubOperations,
WebPubSubPrivateEndpointConnectionsOperations,
WebPubSubPrivateLinkResourcesOperations,
WebPubSubReplicasOperations,
WebPubSubSharedPrivateLinkResourcesOperations,
)

Expand Down Expand Up @@ -56,19 +57,20 @@ class WebPubSubManagementClient: # pylint: disable=client-accepts-api-version-k
:ivar web_pub_sub_private_link_resources: WebPubSubPrivateLinkResourcesOperations operations
:vartype web_pub_sub_private_link_resources:
azure.mgmt.webpubsub.aio.operations.WebPubSubPrivateLinkResourcesOperations
:ivar web_pub_sub_replicas: WebPubSubReplicasOperations operations
:vartype web_pub_sub_replicas: azure.mgmt.webpubsub.aio.operations.WebPubSubReplicasOperations
:ivar web_pub_sub_shared_private_link_resources: WebPubSubSharedPrivateLinkResourcesOperations
operations
:vartype web_pub_sub_shared_private_link_resources:
azure.mgmt.webpubsub.aio.operations.WebPubSubSharedPrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Gets subscription Id which uniquely identify the Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-02-01". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand All @@ -84,7 +86,7 @@ def __init__(
self._config = WebPubSubManagementClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand All @@ -106,6 +108,9 @@ def __init__(
self.web_pub_sub_private_link_resources = WebPubSubPrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.web_pub_sub_replicas = WebPubSubReplicasOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.web_pub_sub_shared_private_link_resources = WebPubSubSharedPrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ._web_pub_sub_hubs_operations import WebPubSubHubsOperations
from ._web_pub_sub_private_endpoint_connections_operations import WebPubSubPrivateEndpointConnectionsOperations
from ._web_pub_sub_private_link_resources_operations import WebPubSubPrivateLinkResourcesOperations
from ._web_pub_sub_replicas_operations import WebPubSubReplicasOperations
from ._web_pub_sub_shared_private_link_resources_operations import WebPubSubSharedPrivateLinkResourcesOperations

from ._patch import __all__ as _patch_all
Expand All @@ -29,6 +30,7 @@
"WebPubSubHubsOperations",
"WebPubSubPrivateEndpointConnectionsOperations",
"WebPubSubPrivateLinkResourcesOperations",
"WebPubSubReplicasOperations",
"WebPubSubSharedPrivateLinkResourcesOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -30,10 +29,6 @@
from ..._vendor import _convert_request
from ...operations._operations import build_list_request

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

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

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

error_map = {
Expand Down Expand Up @@ -122,8 +115,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse

Expand All @@ -30,10 +29,6 @@
from ..._vendor import _convert_request
from ...operations._usages_operations import build_list_request

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

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

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

error_map = {
Expand Down Expand Up @@ -127,8 +120,9 @@ async def extract_data(pipeline_response):
async def get_next(next_link=None):
request = prepare_request(next_link)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
request, stream=_stream, **kwargs
)
response = pipeline_response.http_response

Expand Down
Loading