Skip to content

Commit 5487dd0

Browse files
author
SDKAuto
committed
CodeGen from PR 21683 in Azure/azure-rest-api-specs
Merge 1d999951e530d5ebac9d6c2253c422f9521172be into 63adf8a58565b729f70895b65aa7d1333b22d15f
1 parent 3ab4d2b commit 5487dd0

File tree

133 files changed

+6631
-1653
lines changed

Some content is hidden

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

133 files changed

+6631
-1653
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2+
"commit": "25be0dfa0713ea374fc92d972ebc5b9b786441d5",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
24
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@6.1.9",
6+
"@autorest/python@6.2.7",
57
"@autorest/[email protected]"
68
],
7-
"commit": "339675bcbc8172eacbe283470405e1e578632afc",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/app/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.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/app/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",
1010
"readme": "specification/app/resource-manager/readme.md"
1111
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313

1414
try:
1515
from ._patch import __all__ as _patch_all
16-
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
16+
from ._patch import * # pylint: disable=unused-wildcard-import
1717
except ImportError:
1818
_patch_all = []
1919
from ._patch import patch_sdk as _patch_sdk
2020

21-
__all__ = ["ContainerAppsAPIClient"]
21+
__all__ = [
22+
"ContainerAppsAPIClient",
23+
]
2224
__all__.extend([p for p in _patch_all if p not in __all__])
2325

2426
_patch_sdk()

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9+
import sys
910
from typing import Any, TYPE_CHECKING
1011

1112
from azure.core.configuration import Configuration
@@ -14,6 +15,11 @@
1415

1516
from ._version import VERSION
1617

18+
if sys.version_info >= (3, 8):
19+
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20+
else:
21+
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22+
1723
if TYPE_CHECKING:
1824
# pylint: disable=unused-import,ungrouped-imports
1925
from azure.core.credentials import TokenCredential
@@ -29,14 +35,14 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
2935
:type credential: ~azure.core.credentials.TokenCredential
3036
:param subscription_id: The ID of the target subscription. Required.
3137
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
33-
this default value may result in unsupported behavior.
38+
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
39+
default value may result in unsupported behavior.
3440
:paramtype api_version: str
3541
"""
3642

3743
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
3844
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
39-
api_version = kwargs.pop("api_version", "2022-06-01-preview") # type: str
45+
api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01")
4046

4147
if credential is None:
4248
raise ValueError("Parameter 'credential' must not be None.")
@@ -50,10 +56,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5056
kwargs.setdefault("sdk_moniker", "mgmt-appcontainers/{}".format(VERSION))
5157
self._configure(**kwargs)
5258

53-
def _configure(
54-
self, **kwargs # type: Any
55-
):
56-
# type: (...) -> None
59+
def _configure(self, **kwargs: Any) -> None:
5760
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
5861
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
5962
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)

sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/_container_apps_api_client.py

Lines changed: 45 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
1414

15-
from . import models
15+
from . import models as _models
1616
from ._configuration import ContainerAppsAPIClientConfiguration
1717
from ._serialization import Deserializer, Serializer
1818
from .operations import (
@@ -49,6 +49,25 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
4949
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
5050
:vartype container_apps_auth_configs:
5151
azure.mgmt.appcontainers.operations.ContainerAppsAuthConfigsOperations
52+
:ivar available_workload_profiles: AvailableWorkloadProfilesOperations operations
53+
:vartype available_workload_profiles:
54+
azure.mgmt.appcontainers.operations.AvailableWorkloadProfilesOperations
55+
:ivar billing_meters: BillingMetersOperations operations
56+
:vartype billing_meters: azure.mgmt.appcontainers.operations.BillingMetersOperations
57+
:ivar connected_environments: ConnectedEnvironmentsOperations operations
58+
:vartype connected_environments:
59+
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsOperations
60+
:ivar connected_environments_certificates: ConnectedEnvironmentsCertificatesOperations
61+
operations
62+
:vartype connected_environments_certificates:
63+
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsCertificatesOperations
64+
:ivar connected_environments_dapr_components: ConnectedEnvironmentsDaprComponentsOperations
65+
operations
66+
:vartype connected_environments_dapr_components:
67+
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsDaprComponentsOperations
68+
:ivar connected_environments_storages: ConnectedEnvironmentsStoragesOperations operations
69+
:vartype connected_environments_storages:
70+
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsStoragesOperations
5271
:ivar container_apps: ContainerAppsOperations operations
5372
:vartype container_apps: azure.mgmt.appcontainers.operations.ContainerAppsOperations
5473
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
@@ -57,8 +76,6 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
5776
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
5877
:vartype container_apps_revision_replicas:
5978
azure.mgmt.appcontainers.operations.ContainerAppsRevisionReplicasOperations
60-
:ivar dapr_components: DaprComponentsOperations operations
61-
:vartype dapr_components: azure.mgmt.appcontainers.operations.DaprComponentsOperations
6279
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
6380
:vartype container_apps_diagnostics:
6481
azure.mgmt.appcontainers.operations.ContainerAppsDiagnosticsOperations
@@ -77,39 +94,22 @@ class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyw
7794
:vartype certificates: azure.mgmt.appcontainers.operations.CertificatesOperations
7895
:ivar namespaces: NamespacesOperations operations
7996
:vartype namespaces: azure.mgmt.appcontainers.operations.NamespacesOperations
97+
:ivar dapr_components: DaprComponentsOperations operations
98+
:vartype dapr_components: azure.mgmt.appcontainers.operations.DaprComponentsOperations
8099
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
81100
:vartype managed_environments_storages:
82101
azure.mgmt.appcontainers.operations.ManagedEnvironmentsStoragesOperations
83102
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
84103
:vartype container_apps_source_controls:
85104
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
86-
:ivar connected_environments: ConnectedEnvironmentsOperations operations
87-
:vartype connected_environments:
88-
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsOperations
89-
:ivar connected_environments_certificates: ConnectedEnvironmentsCertificatesOperations
90-
operations
91-
:vartype connected_environments_certificates:
92-
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsCertificatesOperations
93-
:ivar connected_environments_dapr_components: ConnectedEnvironmentsDaprComponentsOperations
94-
operations
95-
:vartype connected_environments_dapr_components:
96-
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsDaprComponentsOperations
97-
:ivar connected_environments_storages: ConnectedEnvironmentsStoragesOperations operations
98-
:vartype connected_environments_storages:
99-
azure.mgmt.appcontainers.operations.ConnectedEnvironmentsStoragesOperations
100-
:ivar available_workload_profiles: AvailableWorkloadProfilesOperations operations
101-
:vartype available_workload_profiles:
102-
azure.mgmt.appcontainers.operations.AvailableWorkloadProfilesOperations
103-
:ivar billing_meters: BillingMetersOperations operations
104-
:vartype billing_meters: azure.mgmt.appcontainers.operations.BillingMetersOperations
105105
:param credential: Credential needed for the client to connect to Azure. Required.
106106
:type credential: ~azure.core.credentials.TokenCredential
107107
:param subscription_id: The ID of the target subscription. Required.
108108
:type subscription_id: str
109109
:param base_url: Service URL. Default value is "https://management.azure.com".
110110
:type base_url: str
111-
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
112-
this default value may result in unsupported behavior.
111+
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
112+
default value may result in unsupported behavior.
113113
:paramtype api_version: str
114114
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
115115
Retry-After header is present.
@@ -127,21 +127,36 @@ def __init__(
127127
)
128128
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
129129

130-
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
130+
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
131131
self._serialize = Serializer(client_models)
132132
self._deserialize = Deserializer(client_models)
133133
self._serialize.client_side_validation = False
134134
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(
135135
self._client, self._config, self._serialize, self._deserialize
136136
)
137+
self.available_workload_profiles = AvailableWorkloadProfilesOperations(
138+
self._client, self._config, self._serialize, self._deserialize
139+
)
140+
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)
141+
self.connected_environments = ConnectedEnvironmentsOperations(
142+
self._client, self._config, self._serialize, self._deserialize
143+
)
144+
self.connected_environments_certificates = ConnectedEnvironmentsCertificatesOperations(
145+
self._client, self._config, self._serialize, self._deserialize
146+
)
147+
self.connected_environments_dapr_components = ConnectedEnvironmentsDaprComponentsOperations(
148+
self._client, self._config, self._serialize, self._deserialize
149+
)
150+
self.connected_environments_storages = ConnectedEnvironmentsStoragesOperations(
151+
self._client, self._config, self._serialize, self._deserialize
152+
)
137153
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
138154
self.container_apps_revisions = ContainerAppsRevisionsOperations(
139155
self._client, self._config, self._serialize, self._deserialize
140156
)
141157
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(
142158
self._client, self._config, self._serialize, self._deserialize
143159
)
144-
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
145160
self.container_apps_diagnostics = ContainerAppsDiagnosticsOperations(
146161
self._client, self._config, self._serialize, self._deserialize
147162
)
@@ -157,28 +172,13 @@ def __init__(
157172
)
158173
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
159174
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
175+
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
160176
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(
161177
self._client, self._config, self._serialize, self._deserialize
162178
)
163179
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(
164180
self._client, self._config, self._serialize, self._deserialize
165181
)
166-
self.connected_environments = ConnectedEnvironmentsOperations(
167-
self._client, self._config, self._serialize, self._deserialize
168-
)
169-
self.connected_environments_certificates = ConnectedEnvironmentsCertificatesOperations(
170-
self._client, self._config, self._serialize, self._deserialize
171-
)
172-
self.connected_environments_dapr_components = ConnectedEnvironmentsDaprComponentsOperations(
173-
self._client, self._config, self._serialize, self._deserialize
174-
)
175-
self.connected_environments_storages = ConnectedEnvironmentsStoragesOperations(
176-
self._client, self._config, self._serialize, self._deserialize
177-
)
178-
self.available_workload_profiles = AvailableWorkloadProfilesOperations(
179-
self._client, self._config, self._serialize, self._deserialize
180-
)
181-
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)
182182

183183
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
184184
"""Runs the network request through the client's chained policies.
@@ -202,15 +202,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
202202
request_copy.url = self._client.format_url(request_copy.url)
203203
return self._client.send_request(request_copy, **kwargs)
204204

205-
def close(self):
206-
# type: () -> None
205+
def close(self) -> None:
207206
self._client.close()
208207

209-
def __enter__(self):
210-
# type: () -> ContainerAppsAPIClient
208+
def __enter__(self) -> "ContainerAppsAPIClient":
211209
self._client.__enter__()
212210
return self
213211

214-
def __exit__(self, *exc_details):
215-
# type: (Any) -> None
212+
def __exit__(self, *exc_details) -> None:
216213
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)