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
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "2f17a9028f33fe80cf1ae62642fe9ed63c0a17f7",
"commit": "ee26135e53a40b7ea7b014f3c43f43f29c8a151d",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.4.0",
"@autorest/python@6.4.8",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/applicationinsights/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/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/applicationinsights/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.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/applicationinsights/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, _SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2022-04-01'
DEFAULT_API_VERSION = '2022-06-15'
_PROFILE_TAG = "azure.mgmt.applicationinsights.ApplicationInsightsManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -77,9 +77,9 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, _SDKClient):
'operations': '2015-05-01',
'proactive_detection_configurations': '2015-05-01',
'web_test_locations': '2015-05-01',
'web_tests': '2015-05-01',
'work_item_configurations': '2015-05-01',
'workbook_templates': '2020-11-20',
'workbooks': '2022-04-01',
}},
_PROFILE_TAG + " latest"
)
Expand Down Expand Up @@ -122,6 +122,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2021-08-01: :mod:`v2021_08_01.models<azure.mgmt.applicationinsights.v2021_08_01.models>`
* 2021-10-14: :mod:`v2021_10.models<azure.mgmt.applicationinsights.v2021_10.models>`
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.applicationinsights.v2022_04_01.models>`
* 2022-06-15: :mod:`v2022_06_15.models<azure.mgmt.applicationinsights.v2022_06_15.models>`
"""
if api_version == '2015-05-01':
from .v2015_05_01 import models
Expand Down Expand Up @@ -165,6 +166,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-06-15':
from .v2022_06_15 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -480,12 +484,15 @@ def web_tests(self):

* 2015-05-01: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2015_05_01.operations.WebTestsOperations>`
* 2018-05-01-preview: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2018_05_01_preview.operations.WebTestsOperations>`
* 2022-06-15: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2022_06_15.operations.WebTestsOperations>`
"""
api_version = self._get_api_version('web_tests')
if api_version == '2015-05-01':
from .v2015_05_01.operations import WebTestsOperations as OperationClass
elif api_version == '2018-05-01-preview':
from .v2018_05_01_preview.operations import WebTestsOperations as OperationClass
elif api_version == '2022-06-15':
from .v2022_06_15.operations import WebTestsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'web_tests'".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
@@ -1,10 +1,8 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------

VERSION = "4.0.0b1"

VERSION = "0.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, _SDKClient):
:type profile: azure.profiles.KnownProfiles
"""

DEFAULT_API_VERSION = '2022-04-01'
DEFAULT_API_VERSION = '2022-06-15'
_PROFILE_TAG = "azure.mgmt.applicationinsights.ApplicationInsightsManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
Expand All @@ -77,9 +77,9 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, _SDKClient):
'operations': '2015-05-01',
'proactive_detection_configurations': '2015-05-01',
'web_test_locations': '2015-05-01',
'web_tests': '2015-05-01',
'work_item_configurations': '2015-05-01',
'workbook_templates': '2020-11-20',
'workbooks': '2022-04-01',
}},
_PROFILE_TAG + " latest"
)
Expand Down Expand Up @@ -122,6 +122,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2021-08-01: :mod:`v2021_08_01.models<azure.mgmt.applicationinsights.v2021_08_01.models>`
* 2021-10-14: :mod:`v2021_10.models<azure.mgmt.applicationinsights.v2021_10.models>`
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.applicationinsights.v2022_04_01.models>`
* 2022-06-15: :mod:`v2022_06_15.models<azure.mgmt.applicationinsights.v2022_06_15.models>`
"""
if api_version == '2015-05-01':
from ..v2015_05_01 import models
Expand Down Expand Up @@ -165,6 +166,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-06-15':
from ..v2022_06_15 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -480,12 +484,15 @@ def web_tests(self):

* 2015-05-01: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2015_05_01.aio.operations.WebTestsOperations>`
* 2018-05-01-preview: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2018_05_01_preview.aio.operations.WebTestsOperations>`
* 2022-06-15: :class:`WebTestsOperations<azure.mgmt.applicationinsights.v2022_06_15.aio.operations.WebTestsOperations>`
"""
api_version = self._get_api_version('web_tests')
if api_version == '2015-05-01':
from ..v2015_05_01.aio.operations import WebTestsOperations as OperationClass
elif api_version == '2018-05-01-preview':
from ..v2018_05_01_preview.aio.operations import WebTestsOperations as OperationClass
elif api_version == '2022-06-15':
from ..v2022_06_15.aio.operations import WebTestsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'web_tests'".format(api_version))
self._config.api_version = api_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
from .v2021_03_08.models import *
from .v2021_10.models import *
from .v2022_04_01.models import *
from .v2022_06_15.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __init__(
self._config = ApplicationInsightsManagementClientConfiguration(
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 ApplicationInsightsManagementClientConfiguration(Configuration): # pylint

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(ApplicationInsightsManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2015-05-01"] = kwargs.pop("api_version", "2015-05-01")
api_version: str = kwargs.pop("api_version", "2015-05-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
@@ -1,31 +1,20 @@
# coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# --------------------------------------------------------------------------
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""Customize generated code here.

Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level


# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
pass
"""Do not remove from this file.

`patch_sdk` is a last resort escape hatch that allows you to do customizations
you can't accomplish using the techniques described in
https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
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 = "4.0.0b1"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(
self._config = ApplicationInsightsManagementClientConfiguration(
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 ApplicationInsightsManagementClientConfiguration(Configuration): # pylint

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(ApplicationInsightsManagementClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2015-05-01"] = kwargs.pop("api_version", "2015-05-01")
api_version: str = kwargs.pop("api_version", "2015-05-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
@@ -1,31 +1,20 @@
# coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# --------------------------------------------------------------------------
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""Customize generated code here.

Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
from typing import List

__all__: List[str] = [] # Add all objects you want publicly available to users at this package level


# This file is used for handwritten extensions to the generated code. Example:
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
def patch_sdk():
pass
"""Do not remove from this file.

`patch_sdk` is a last resort escape hatch that allows you to do customizations
you can't accomplish using the techniques described in
https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
Loading