Skip to content

Commit 2f4de04

Browse files
author
SDKAuto
committed
CodeGen from PR 32104 in Azure/azure-rest-api-specs
Merge fbd6e3f9a4637d9e216d2130508baacf65688f33 into 4ae5cdc221660762336d5a899495b2b4941ea486
1 parent 735259d commit 2f4de04

File tree

168 files changed

+5713
-1212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+5713
-1212
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "665e7c3b6f26b148b3c05e55602621bc293cc0a4",
2+
"commit": "e72aa25e0fea46a35bc8a0ce2cb3a685f2c639eb",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.7",
6+
"@autorest/python@6.27.4",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/support/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.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/support/resource-manager/readme.md --generate-sample=True --generate-test=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.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/support/resource-manager/readme.md"
1111
}

sdk/support/azure-mgmt-support/azure/mgmt/support/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._microsoft_support import MicrosoftSupport
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._microsoft_support import MicrosoftSupport # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"MicrosoftSupport",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/support/azure-mgmt-support/azure/mgmt/support/_configuration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class MicrosoftSupportConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class MicrosoftSupportConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for MicrosoftSupport.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class MicrosoftSupportConfiguration: # pylint: disable=too-many-instance-attrib
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this
32-
default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
31+
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-04-01")
36+
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")

sdk/support/azure-mgmt-support/azure/mgmt/support/_microsoft_support.py

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -26,25 +27,39 @@
2627
FileWorkspacesOperations,
2728
FilesNoSubscriptionOperations,
2829
FilesOperations,
30+
LookUpResourceIdOperations,
2931
Operations,
32+
ProblemClassificationsNoSubscriptionOperations,
3033
ProblemClassificationsOperations,
34+
ServiceClassificationsNoSubscriptionOperations,
35+
ServiceClassificationsOperations,
3136
ServicesOperations,
3237
SupportTicketsNoSubscriptionOperations,
3338
SupportTicketsOperations,
3439
)
3540

3641
if TYPE_CHECKING:
37-
# pylint: disable=unused-import,ungrouped-imports
3842
from azure.core.credentials import TokenCredential
3943

4044

41-
class MicrosoftSupport: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
45+
class MicrosoftSupport: # pylint: disable=too-many-instance-attributes
4246
"""Microsoft Azure Support Resource Provider.
4347
4448
:ivar operations: Operations operations
4549
:vartype operations: azure.mgmt.support.operations.Operations
4650
:ivar services: ServicesOperations operations
4751
:vartype services: azure.mgmt.support.operations.ServicesOperations
52+
:ivar service_classifications_no_subscription: ServiceClassificationsNoSubscriptionOperations
53+
operations
54+
:vartype service_classifications_no_subscription:
55+
azure.mgmt.support.operations.ServiceClassificationsNoSubscriptionOperations
56+
:ivar service_classifications: ServiceClassificationsOperations operations
57+
:vartype service_classifications:
58+
azure.mgmt.support.operations.ServiceClassificationsOperations
59+
:ivar problem_classifications_no_subscription: ProblemClassificationsNoSubscriptionOperations
60+
operations
61+
:vartype problem_classifications_no_subscription:
62+
azure.mgmt.support.operations.ProblemClassificationsNoSubscriptionOperations
4863
:ivar problem_classifications: ProblemClassificationsOperations operations
4964
:vartype problem_classifications:
5065
azure.mgmt.support.operations.ProblemClassificationsOperations
@@ -72,14 +87,16 @@ class MicrosoftSupport: # pylint: disable=client-accepts-api-version-keyword,to
7287
:vartype files: azure.mgmt.support.operations.FilesOperations
7388
:ivar files_no_subscription: FilesNoSubscriptionOperations operations
7489
:vartype files_no_subscription: azure.mgmt.support.operations.FilesNoSubscriptionOperations
90+
:ivar look_up_resource_id: LookUpResourceIdOperations operations
91+
:vartype look_up_resource_id: azure.mgmt.support.operations.LookUpResourceIdOperations
7592
:param credential: Credential needed for the client to connect to Azure. Required.
7693
:type credential: ~azure.core.credentials.TokenCredential
7794
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
7895
:type subscription_id: str
7996
:param base_url: Service URL. Default value is "https://management.azure.com".
8097
:type base_url: str
81-
:keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this
82-
default value may result in unsupported behavior.
98+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
99+
this default value may result in unsupported behavior.
83100
:paramtype api_version: str
84101
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
85102
Retry-After header is present.
@@ -119,6 +136,15 @@ def __init__(
119136
self._serialize.client_side_validation = False
120137
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
121138
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
139+
self.service_classifications_no_subscription = ServiceClassificationsNoSubscriptionOperations(
140+
self._client, self._config, self._serialize, self._deserialize
141+
)
142+
self.service_classifications = ServiceClassificationsOperations(
143+
self._client, self._config, self._serialize, self._deserialize
144+
)
145+
self.problem_classifications_no_subscription = ProblemClassificationsNoSubscriptionOperations(
146+
self._client, self._config, self._serialize, self._deserialize
147+
)
122148
self.problem_classifications = ProblemClassificationsOperations(
123149
self._client, self._config, self._serialize, self._deserialize
124150
)
@@ -144,6 +170,9 @@ def __init__(
144170
self.files_no_subscription = FilesNoSubscriptionOperations(
145171
self._client, self._config, self._serialize, self._deserialize
146172
)
173+
self.look_up_resource_id = LookUpResourceIdOperations(
174+
self._client, self._config, self._serialize, self._deserialize
175+
)
147176

148177
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
149178
"""Runs the network request through the client's chained policies.
@@ -170,7 +199,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
170199
def close(self) -> None:
171200
self._client.close()
172201

173-
def __enter__(self) -> "MicrosoftSupport":
202+
def __enter__(self) -> Self:
174203
self._client.__enter__()
175204
return self
176205

0 commit comments

Comments
 (0)