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: 6 additions & 0 deletions sdk/communication/azure-communication-jobrouter/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"commit": "26af8eff710ea634da1b33fed369967d1c39b689",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/communication/Communication.JobRouter",
"@azure-tools/typespec-python": "0.36.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
# pylint: disable=wrong-import-position

from ._patch import JobRouterAdministrationClient
from ._patch import JobRouterClient
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from ._patch import * # pylint: disable=unused-wildcard-import

from ._client import JobRouterAdministrationClient # type: ignore
from ._client import JobRouterClient # type: ignore
from ._version import VERSION

__version__ = VERSION

try:
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
Expand All @@ -23,6 +29,6 @@
"JobRouterAdministrationClient",
"JobRouterClient",
]
__all__.extend([p for p in _patch_all if p not in __all__])
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

_patch_sdk()

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from copy import deepcopy
from typing import Any
from typing_extensions import Self

from azure.core import PipelineClient
from azure.core.pipeline import policies
Expand All @@ -18,9 +19,7 @@
from ._serialization import Deserializer, Serializer


class JobRouterAdministrationClient(
JobRouterAdministrationClientOperationsMixin
): # pylint: disable=client-accepts-api-version-keyword
class JobRouterAdministrationClient(JobRouterAdministrationClientOperationsMixin):
"""JobRouterAdministrationClient.

:param endpoint: Uri of your Communication resource. Required.
Expand Down Expand Up @@ -79,7 +78,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:

request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str"),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
Expand All @@ -88,15 +87,15 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "JobRouterAdministrationClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)


class JobRouterClient(JobRouterClientOperationsMixin): # pylint: disable=client-accepts-api-version-keyword
class JobRouterClient(JobRouterClientOperationsMixin):
"""JobRouterClient.

:param endpoint: Uri of your Communication resource. Required.
Expand Down Expand Up @@ -155,7 +154,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:

request_copy = deepcopy(request)
path_format_arguments = {
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str"),
}

request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
Expand All @@ -164,7 +163,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
def close(self) -> None:
self._client.close()

def __enter__(self) -> "JobRouterClient":
def __enter__(self) -> Self:
self._client.__enter__()
return self

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _configure(self, **kwargs: Any) -> None:
self.authentication_policy = kwargs.get("authentication_policy")


class JobRouterClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
class JobRouterClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for JobRouterClient.

Note that all parameters used to create this instance are saved as instance
Expand Down
Loading