Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-authorization] [Hub Generated] Review request for Microsoft.Authorization to add version preview/2022-05-01-preview #3541

Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions sdk/authorization/azure-mgmt-authorization/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "d37b3db5ec88a9fc2afcae36bf8d2004b1c5b537",
"commit": "2d590bd9907e6e2f5948595814ea3e4f2d11d3ea",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.0",
"@autorest/python@6.6.0",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/authorization/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/python@6.4.0 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/authorization/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/python@6.6.0 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/authorization/resource-manager/readme.md"
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,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 @@ -1273,7 +1273,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 @@ -1297,7 +1297,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 @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "3.1.0b1"
VERSION = "0.1.0"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ def __init__(
self._config = AuthorizationManagementClientConfiguration(
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)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.classic_administrators = ClassicAdministratorsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-06-01"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
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 import TokenCredential
Expand All @@ -42,7 +36,7 @@ class AuthorizationManagementClientConfiguration(Configuration): # pylint: disa

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

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 @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "3.1.0b1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ def __init__(
self._config = AuthorizationManagementClientConfiguration(
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)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.classic_administrators = ClassicAdministratorsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-06-01"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
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 @@ -42,7 +36,7 @@ class AuthorizationManagementClientConfiguration(Configuration): # pylint: disa

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

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 @@ -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._classic_administrators_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 All @@ -56,6 +51,7 @@ def __init__(self, *args, **kwargs) -> None:
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")

@distributed_trace
def list(self, **kwargs: Any) -> AsyncIterable["_models.ClassicAdministrator"]:
Expand All @@ -71,7 +67,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ClassicAdministrator"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-06-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-01"))
cls: ClsType[_models.ClassicAdministratorListResult] = kwargs.pop("cls", None)

error_map = {
Expand Down Expand Up @@ -123,8 +119,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, Callable, Dict, Iterable, Optional, TypeVar
import urllib.parse

Expand All @@ -30,10 +29,6 @@
from ..._serialization import Serializer
from .._vendor import _convert_request, _format_url_section

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, HttpResponse], T, Dict[str, Any]], Any]]

Expand All @@ -45,7 +40,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-06-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-06-01"))
accept = _headers.pop("Accept", "application/json")

# Construct URL
Expand Down Expand Up @@ -85,6 +80,7 @@ def __init__(self, *args, **kwargs):
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
self._api_version = input_args.pop(0) if input_args else kwargs.pop("api_version")

@distributed_trace
def list(self, **kwargs: Any) -> Iterable["_models.ClassicAdministrator"]:
Expand All @@ -100,7 +96,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ClassicAdministrator"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2015-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-06-01"))
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._api_version or "2015-06-01"))
cls: ClsType[_models.ClassicAdministratorListResult] = kwargs.pop("cls", None)

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

_stream = False
pipeline_response: PipelineResponse = 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 @@ -73,27 +73,29 @@ def __init__(
self._config = AuthorizationManagementClientConfiguration(
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)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.permissions = PermissionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.permissions = PermissionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.role_definitions = RoleDefinitionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.provider_operations_metadata = ProviderOperationsMetadataOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.global_administrator = GlobalAdministratorOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.role_assignments = RoleAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.classic_administrators = ClassicAdministratorsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
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 import TokenCredential
Expand All @@ -42,7 +36,7 @@ class AuthorizationManagementClientConfiguration(Configuration): # pylint: disa

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(AuthorizationManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2015-07-01"] = kwargs.pop("api_version", "2015-07-01")
api_version: str = kwargs.pop("api_version", "2015-07-01")

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 @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "3.1.0b1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,29 @@ def __init__(
self._config = AuthorizationManagementClientConfiguration(
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)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.permissions = PermissionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.permissions = PermissionsOperations(
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.role_definitions = RoleDefinitionsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.provider_operations_metadata = ProviderOperationsMetadataOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.global_administrator = GlobalAdministratorOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.role_assignments = RoleAssignmentsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)
self.classic_administrators = ClassicAdministratorsOperations(
self._client, self._config, self._serialize, self._deserialize
self._client, self._config, self._serialize, self._deserialize, "2015-07-01"
)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
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 @@ -42,7 +36,7 @@ class AuthorizationManagementClientConfiguration(Configuration): # pylint: disa

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(AuthorizationManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2015-07-01"] = kwargs.pop("api_version", "2015-07-01")
api_version: str = kwargs.pop("api_version", "2015-07-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading