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
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": "3105240643e56a015129560c3e5758c284b2fc23",
"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/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/[email protected].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/[email protected].12 --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/authorization/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ class AuthorizationManagementClient(MultiApiClientMixin, _SDKClient):
'access_review_instances_assigned_for_my_approval': '2021-12-01-preview',
'access_review_schedule_definitions': '2021-12-01-preview',
'access_review_schedule_definitions_assigned_for_my_approval': '2021-12-01-preview',
'alert_configurations': '2021-12-01-preview',
'alert_definitions': '2021-12-01-preview',
'alert_incidents': '2021-12-01-preview',
'alert_operation': '2021-12-01-preview',
'alerts': '2021-12-01-preview',
'classic_administrators': '2015-07-01',
'eligible_child_resources': '2020-10-01',
'global_administrator': '2015-07-01',
Expand Down Expand Up @@ -149,6 +144,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2021-07-01-preview: :mod:`v2021_07_01_preview.models<azure.mgmt.authorization.v2021_07_01_preview.models>`
* 2021-12-01-preview: :mod:`v2021_12_01_preview.models<azure.mgmt.authorization.v2021_12_01_preview.models>`
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.authorization.v2022_04_01.models>`
* 2022-08-01-preview: :mod:`v2022_08_01_preview.models<azure.mgmt.authorization.v2022_08_01_preview.models>`
"""
if api_version == '2015-06-01':
from .v2015_06_01 import models
Expand Down Expand Up @@ -195,6 +191,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2022-04-01':
from .v2022_04_01 import models
return models
elif api_version == '2022-08-01-preview':
from .v2022_08_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -458,11 +457,11 @@ def access_review_schedule_definitions_assigned_for_my_approval(self):
def alert_configurations(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertConfigurationsOperations<azure.mgmt.authorization.v2021_12_01_preview.operations.AlertConfigurationsOperations>`
* 2022-08-01-preview: :class:`AlertConfigurationsOperations<azure.mgmt.authorization.v2022_08_01_preview.operations.AlertConfigurationsOperations>`
"""
api_version = self._get_api_version('alert_configurations')
if api_version == '2021-12-01-preview':
from .v2021_12_01_preview.operations import AlertConfigurationsOperations as OperationClass
if api_version == '2022-08-01-preview':
from .v2022_08_01_preview.operations import AlertConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_configurations'".format(api_version))
self._config.api_version = api_version
Expand All @@ -472,11 +471,11 @@ def alert_configurations(self):
def alert_definitions(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertDefinitionsOperations<azure.mgmt.authorization.v2021_12_01_preview.operations.AlertDefinitionsOperations>`
* 2022-08-01-preview: :class:`AlertDefinitionsOperations<azure.mgmt.authorization.v2022_08_01_preview.operations.AlertDefinitionsOperations>`
"""
api_version = self._get_api_version('alert_definitions')
if api_version == '2021-12-01-preview':
from .v2021_12_01_preview.operations import AlertDefinitionsOperations as OperationClass
if api_version == '2022-08-01-preview':
from .v2022_08_01_preview.operations import AlertDefinitionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_definitions'".format(api_version))
self._config.api_version = api_version
Expand All @@ -486,11 +485,11 @@ def alert_definitions(self):
def alert_incidents(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertIncidentsOperations<azure.mgmt.authorization.v2021_12_01_preview.operations.AlertIncidentsOperations>`
* 2022-08-01-preview: :class:`AlertIncidentsOperations<azure.mgmt.authorization.v2022_08_01_preview.operations.AlertIncidentsOperations>`
"""
api_version = self._get_api_version('alert_incidents')
if api_version == '2021-12-01-preview':
from .v2021_12_01_preview.operations import AlertIncidentsOperations as OperationClass
if api_version == '2022-08-01-preview':
from .v2022_08_01_preview.operations import AlertIncidentsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_incidents'".format(api_version))
self._config.api_version = api_version
Expand All @@ -500,11 +499,11 @@ def alert_incidents(self):
def alert_operation(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertOperationOperations<azure.mgmt.authorization.v2021_12_01_preview.operations.AlertOperationOperations>`
* 2022-08-01-preview: :class:`AlertOperationOperations<azure.mgmt.authorization.v2022_08_01_preview.operations.AlertOperationOperations>`
"""
api_version = self._get_api_version('alert_operation')
if api_version == '2021-12-01-preview':
from .v2021_12_01_preview.operations import AlertOperationOperations as OperationClass
if api_version == '2022-08-01-preview':
from .v2022_08_01_preview.operations import AlertOperationOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_operation'".format(api_version))
self._config.api_version = api_version
Expand All @@ -514,11 +513,11 @@ def alert_operation(self):
def alerts(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertsOperations<azure.mgmt.authorization.v2021_12_01_preview.operations.AlertsOperations>`
* 2022-08-01-preview: :class:`AlertsOperations<azure.mgmt.authorization.v2022_08_01_preview.operations.AlertsOperations>`
"""
api_version = self._get_api_version('alerts')
if api_version == '2021-12-01-preview':
from .v2021_12_01_preview.operations import AlertsOperations as OperationClass
if api_version == '2022-08-01-preview':
from .v2022_08_01_preview.operations import AlertsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alerts'".format(api_version))
self._config.api_version = api_version
Expand Down
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"
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ class AuthorizationManagementClient(MultiApiClientMixin, _SDKClient):
'access_review_instances_assigned_for_my_approval': '2021-12-01-preview',
'access_review_schedule_definitions': '2021-12-01-preview',
'access_review_schedule_definitions_assigned_for_my_approval': '2021-12-01-preview',
'alert_configurations': '2021-12-01-preview',
'alert_definitions': '2021-12-01-preview',
'alert_incidents': '2021-12-01-preview',
'alert_operation': '2021-12-01-preview',
'alerts': '2021-12-01-preview',
'classic_administrators': '2015-07-01',
'eligible_child_resources': '2020-10-01',
'global_administrator': '2015-07-01',
Expand Down Expand Up @@ -149,6 +144,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2021-07-01-preview: :mod:`v2021_07_01_preview.models<azure.mgmt.authorization.v2021_07_01_preview.models>`
* 2021-12-01-preview: :mod:`v2021_12_01_preview.models<azure.mgmt.authorization.v2021_12_01_preview.models>`
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.authorization.v2022_04_01.models>`
* 2022-08-01-preview: :mod:`v2022_08_01_preview.models<azure.mgmt.authorization.v2022_08_01_preview.models>`
"""
if api_version == '2015-06-01':
from ..v2015_06_01 import models
Expand Down Expand Up @@ -195,6 +191,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2022-04-01':
from ..v2022_04_01 import models
return models
elif api_version == '2022-08-01-preview':
from ..v2022_08_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -458,11 +457,11 @@ def access_review_schedule_definitions_assigned_for_my_approval(self):
def alert_configurations(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertConfigurationsOperations<azure.mgmt.authorization.v2021_12_01_preview.aio.operations.AlertConfigurationsOperations>`
* 2022-08-01-preview: :class:`AlertConfigurationsOperations<azure.mgmt.authorization.v2022_08_01_preview.aio.operations.AlertConfigurationsOperations>`
"""
api_version = self._get_api_version('alert_configurations')
if api_version == '2021-12-01-preview':
from ..v2021_12_01_preview.aio.operations import AlertConfigurationsOperations as OperationClass
if api_version == '2022-08-01-preview':
from ..v2022_08_01_preview.aio.operations import AlertConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_configurations'".format(api_version))
self._config.api_version = api_version
Expand All @@ -472,11 +471,11 @@ def alert_configurations(self):
def alert_definitions(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertDefinitionsOperations<azure.mgmt.authorization.v2021_12_01_preview.aio.operations.AlertDefinitionsOperations>`
* 2022-08-01-preview: :class:`AlertDefinitionsOperations<azure.mgmt.authorization.v2022_08_01_preview.aio.operations.AlertDefinitionsOperations>`
"""
api_version = self._get_api_version('alert_definitions')
if api_version == '2021-12-01-preview':
from ..v2021_12_01_preview.aio.operations import AlertDefinitionsOperations as OperationClass
if api_version == '2022-08-01-preview':
from ..v2022_08_01_preview.aio.operations import AlertDefinitionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_definitions'".format(api_version))
self._config.api_version = api_version
Expand All @@ -486,11 +485,11 @@ def alert_definitions(self):
def alert_incidents(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertIncidentsOperations<azure.mgmt.authorization.v2021_12_01_preview.aio.operations.AlertIncidentsOperations>`
* 2022-08-01-preview: :class:`AlertIncidentsOperations<azure.mgmt.authorization.v2022_08_01_preview.aio.operations.AlertIncidentsOperations>`
"""
api_version = self._get_api_version('alert_incidents')
if api_version == '2021-12-01-preview':
from ..v2021_12_01_preview.aio.operations import AlertIncidentsOperations as OperationClass
if api_version == '2022-08-01-preview':
from ..v2022_08_01_preview.aio.operations import AlertIncidentsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_incidents'".format(api_version))
self._config.api_version = api_version
Expand All @@ -500,11 +499,11 @@ def alert_incidents(self):
def alert_operation(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertOperationOperations<azure.mgmt.authorization.v2021_12_01_preview.aio.operations.AlertOperationOperations>`
* 2022-08-01-preview: :class:`AlertOperationOperations<azure.mgmt.authorization.v2022_08_01_preview.aio.operations.AlertOperationOperations>`
"""
api_version = self._get_api_version('alert_operation')
if api_version == '2021-12-01-preview':
from ..v2021_12_01_preview.aio.operations import AlertOperationOperations as OperationClass
if api_version == '2022-08-01-preview':
from ..v2022_08_01_preview.aio.operations import AlertOperationOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alert_operation'".format(api_version))
self._config.api_version = api_version
Expand All @@ -514,11 +513,11 @@ def alert_operation(self):
def alerts(self):
"""Instance depends on the API version:

* 2021-12-01-preview: :class:`AlertsOperations<azure.mgmt.authorization.v2021_12_01_preview.aio.operations.AlertsOperations>`
* 2022-08-01-preview: :class:`AlertsOperations<azure.mgmt.authorization.v2022_08_01_preview.aio.operations.AlertsOperations>`
"""
api_version = self._get_api_version('alerts')
if api_version == '2021-12-01-preview':
from ..v2021_12_01_preview.aio.operations import AlertsOperations as OperationClass
if api_version == '2022-08-01-preview':
from ..v2022_08_01_preview.aio.operations import AlertsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'alerts'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ 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)
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,7 +52,7 @@ 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)
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
Loading