Skip to content

Commit

Permalink
CodeGen from PR 21190 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge df366bf36e74d697be580f4da0790a86d3c51abc into 166543cc0a1061e063c8db2e9bfeb3c57658eb1d
  • Loading branch information
SDKAuto committed Dec 6, 2022
1 parent a5ba93c commit 67effd7
Show file tree
Hide file tree
Showing 181 changed files with 8,616 additions and 1,934 deletions.
12 changes: 6 additions & 6 deletions sdk/media/azure-mgmt-media/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.8.4",
"commit": "cbabe4b07d2e7831e55cd5ac327f4d69318cf87e",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.1.5",
"@autorest/modelerfour@4.23.5"
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
],
"commit": "bc6b52f26f09cfc7085a8d5df109b54ba00843cc",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/mediaservices/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.8.4 --version-tolerant=False",
"autorest_command": "autorest specification/mediaservices/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] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/mediaservices/resource-manager/readme.md"
}
6 changes: 4 additions & 2 deletions sdk/media/azure-mgmt-media/azure/mgmt/media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@

try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
from ._patch import * # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["AzureMediaServices"]
__all__ = [
"AzureMediaServices",
]
__all__.extend([p for p in _patch_all if p not in __all__])

_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from azure.core.rest import HttpRequest, HttpResponse
from azure.mgmt.core import ARMPipelineClient

from . import models
from . import models as _models
from ._configuration import AzureMediaServicesConfiguration
from ._serialization import Deserializer, Serializer
from .operations import (
Expand Down Expand Up @@ -112,7 +112,7 @@ def __init__(
self._config = AzureMediaServicesConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
Expand Down Expand Up @@ -180,15 +180,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
request_copy.url = self._client.format_url(request_copy.url)
return self._client.send_request(request_copy, **kwargs)

def close(self):
# type: () -> None
def close(self) -> None:
self._client.close()

def __enter__(self):
# type: () -> AzureMediaServices
def __enter__(self) -> "AzureMediaServices":
self._client.__enter__()
return self

def __exit__(self, *exc_details):
# type: (Any) -> None
def __exit__(self, *exc_details) -> None:
self._client.__exit__(*exc_details)
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
kwargs.setdefault("sdk_moniker", "mgmt-media/{}".format(VERSION))
self._configure(**kwargs)

def _configure(
self, **kwargs # type: Any
):
# type: (...) -> None
def _configure(self, **kwargs: Any) -> None:
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
Expand Down
Loading

0 comments on commit 67effd7

Please sign in to comment.