Skip to content

Commit 63c2515

Browse files
author
SDKAuto
committed
CodeGen from PR 21037 in Azure/azure-rest-api-specs
Merge 53de88dd57632e2e40240a9bafd5a420b3cf6e55 into e8c6875f27c041292848c6b6f072e9387575e5ad
1 parent 288ecf9 commit 63c2515

File tree

61 files changed

+20538
-6221
lines changed

Some content is hidden

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

61 files changed

+20538
-6221
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.7.2",
2+
"autorest": "3.9.2",
33
"use": [
4-
"@autorest/python@5.13.0",
5-
"@autorest/modelerfour@4.19.3"
4+
"@autorest/python@6.1.9",
5+
"@autorest/modelerfour@4.24.3"
66
],
7-
"commit": "32143b0f5f230ee2601e3c5d1990188666a5058d",
7+
"commit": "aef4a37b36dfd378a1defbcdb5df333121d8a064",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/app/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/app/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.9 --use=@autorest/modelerfour@4.24.3 --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: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@
1010
from ._version import VERSION
1111

1212
__version__ = VERSION
13-
__all__ = ['ContainerAppsAPIClient']
1413

15-
# `._patch.py` is used for handwritten extensions to the generated code
16-
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17-
from ._patch import patch_sdk
18-
patch_sdk()
14+
try:
15+
from ._patch import __all__ as _patch_all
16+
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
17+
except ImportError:
18+
_patch_all = []
19+
from ._patch import patch_sdk as _patch_sdk
20+
21+
__all__ = ["ContainerAppsAPIClient"]
22+
__all__.extend([p for p in _patch_all if p not in __all__])
23+
24+
_patch_sdk()

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

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,18 @@ class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too
2525
Note that all parameters used to create this instance are saved as instance
2626
attributes.
2727
28-
:param credential: Credential needed for the client to connect to Azure.
28+
:param credential: Credential needed for the client to connect to Azure. Required.
2929
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: The ID of the target subscription.
30+
:param subscription_id: The ID of the target subscription. Required.
3131
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2022-03-01". Note that overriding this
33-
default value may result in unsupported behavior.
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.
3434
:paramtype api_version: str
3535
"""
3636

37-
def __init__(
38-
self,
39-
credential: "TokenCredential",
40-
subscription_id: str,
41-
**kwargs: Any
42-
) -> None:
37+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4338
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
44-
api_version = kwargs.pop('api_version', "2022-03-01") # type: str
39+
api_version = kwargs.pop("api_version", "2022-06-01-preview") # type: str
4540

4641
if credential is None:
4742
raise ValueError("Parameter 'credential' must not be None.")
@@ -51,23 +46,24 @@ def __init__(
5146
self.credential = credential
5247
self.subscription_id = subscription_id
5348
self.api_version = api_version
54-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
55-
kwargs.setdefault('sdk_moniker', 'mgmt-appcontainers/{}'.format(VERSION))
49+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
50+
kwargs.setdefault("sdk_moniker", "mgmt-appcontainers/{}".format(VERSION))
5651
self._configure(**kwargs)
5752

5853
def _configure(
59-
self,
60-
**kwargs # type: Any
54+
self, **kwargs # type: Any
6155
):
6256
# type: (...) -> None
63-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
64-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
65-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
66-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
67-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
68-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
69-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
70-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
71-
self.authentication_policy = kwargs.get('authentication_policy')
57+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
58+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
59+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
60+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
61+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
62+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
63+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
64+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
65+
self.authentication_policy = kwargs.get("authentication_policy")
7266
if self.credential and not self.authentication_policy:
73-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
68+
self.credential, *self.credential_scopes, **kwargs
69+
)

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

Lines changed: 106 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,41 @@
99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
1111

12-
from msrest import Deserializer, Serializer
13-
1412
from azure.core.rest import HttpRequest, HttpResponse
1513
from azure.mgmt.core import ARMPipelineClient
1614

1715
from . import models
1816
from ._configuration import ContainerAppsAPIClientConfiguration
19-
from .operations import CertificatesOperations, ContainerAppsAuthConfigsOperations, ContainerAppsOperations, ContainerAppsRevisionReplicasOperations, ContainerAppsRevisionsOperations, ContainerAppsSourceControlsOperations, DaprComponentsOperations, ManagedEnvironmentsOperations, ManagedEnvironmentsStoragesOperations, NamespacesOperations, Operations
17+
from ._serialization import Deserializer, Serializer
18+
from .operations import (
19+
AvailableWorkloadProfilesOperations,
20+
BillingMetersOperations,
21+
CertificatesOperations,
22+
ConnectedEnvironmentsCertificatesOperations,
23+
ConnectedEnvironmentsDaprComponentsOperations,
24+
ConnectedEnvironmentsOperations,
25+
ConnectedEnvironmentsStoragesOperations,
26+
ContainerAppsAuthConfigsOperations,
27+
ContainerAppsDiagnosticsOperations,
28+
ContainerAppsOperations,
29+
ContainerAppsRevisionReplicasOperations,
30+
ContainerAppsRevisionsOperations,
31+
ContainerAppsSourceControlsOperations,
32+
DaprComponentsOperations,
33+
ManagedEnvironmentDiagnosticsOperations,
34+
ManagedEnvironmentsDiagnosticsOperations,
35+
ManagedEnvironmentsOperations,
36+
ManagedEnvironmentsStoragesOperations,
37+
NamespacesOperations,
38+
Operations,
39+
)
2040

2141
if TYPE_CHECKING:
2242
# pylint: disable=unused-import,ungrouped-imports
2343
from azure.core.credentials import TokenCredential
2444

25-
class ContainerAppsAPIClient: # pylint: disable=too-many-instance-attributes
45+
46+
class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2647
"""ContainerAppsAPIClient.
2748
2849
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
@@ -38,6 +59,15 @@ class ContainerAppsAPIClient: # pylint: disable=too-many-instance-attributes
3859
azure.mgmt.appcontainers.operations.ContainerAppsRevisionReplicasOperations
3960
:ivar dapr_components: DaprComponentsOperations operations
4061
:vartype dapr_components: azure.mgmt.appcontainers.operations.DaprComponentsOperations
62+
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
63+
:vartype container_apps_diagnostics:
64+
azure.mgmt.appcontainers.operations.ContainerAppsDiagnosticsOperations
65+
:ivar managed_environment_diagnostics: ManagedEnvironmentDiagnosticsOperations operations
66+
:vartype managed_environment_diagnostics:
67+
azure.mgmt.appcontainers.operations.ManagedEnvironmentDiagnosticsOperations
68+
:ivar managed_environments_diagnostics: ManagedEnvironmentsDiagnosticsOperations operations
69+
:vartype managed_environments_diagnostics:
70+
azure.mgmt.appcontainers.operations.ManagedEnvironmentsDiagnosticsOperations
4171
:ivar operations: Operations operations
4272
:vartype operations: azure.mgmt.appcontainers.operations.Operations
4373
:ivar managed_environments: ManagedEnvironmentsOperations operations
@@ -53,14 +83,33 @@ class ContainerAppsAPIClient: # pylint: disable=too-many-instance-attributes
5383
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
5484
:vartype container_apps_source_controls:
5585
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
56-
:param credential: Credential needed for the client to connect to Azure.
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
105+
:param credential: Credential needed for the client to connect to Azure. Required.
57106
:type credential: ~azure.core.credentials.TokenCredential
58-
:param subscription_id: The ID of the target subscription.
107+
:param subscription_id: The ID of the target subscription. Required.
59108
:type subscription_id: str
60109
:param base_url: Service URL. Default value is "https://management.azure.com".
61110
:type base_url: str
62-
:keyword api_version: Api Version. Default value is "2022-03-01". Note that overriding this
63-
default value may result in unsupported behavior.
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.
64113
:paramtype api_version: str
65114
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
66115
Retry-After header is present.
@@ -73,31 +122,65 @@ def __init__(
73122
base_url: str = "https://management.azure.com",
74123
**kwargs: Any
75124
) -> None:
76-
self._config = ContainerAppsAPIClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
125+
self._config = ContainerAppsAPIClientConfiguration(
126+
credential=credential, subscription_id=subscription_id, **kwargs
127+
)
77128
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
78129

79130
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
80131
self._serialize = Serializer(client_models)
81132
self._deserialize = Deserializer(client_models)
82133
self._serialize.client_side_validation = False
83-
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize)
134+
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(
135+
self._client, self._config, self._serialize, self._deserialize
136+
)
84137
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
85-
self.container_apps_revisions = ContainerAppsRevisionsOperations(self._client, self._config, self._serialize, self._deserialize)
86-
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(self._client, self._config, self._serialize, self._deserialize)
138+
self.container_apps_revisions = ContainerAppsRevisionsOperations(
139+
self._client, self._config, self._serialize, self._deserialize
140+
)
141+
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(
142+
self._client, self._config, self._serialize, self._deserialize
143+
)
87144
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
145+
self.container_apps_diagnostics = ContainerAppsDiagnosticsOperations(
146+
self._client, self._config, self._serialize, self._deserialize
147+
)
148+
self.managed_environment_diagnostics = ManagedEnvironmentDiagnosticsOperations(
149+
self._client, self._config, self._serialize, self._deserialize
150+
)
151+
self.managed_environments_diagnostics = ManagedEnvironmentsDiagnosticsOperations(
152+
self._client, self._config, self._serialize, self._deserialize
153+
)
88154
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
89-
self.managed_environments = ManagedEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize)
155+
self.managed_environments = ManagedEnvironmentsOperations(
156+
self._client, self._config, self._serialize, self._deserialize
157+
)
90158
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
91159
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
92-
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(self._client, self._config, self._serialize, self._deserialize)
93-
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize)
94-
95-
96-
def _send_request(
97-
self,
98-
request: HttpRequest,
99-
**kwargs: Any
100-
) -> HttpResponse:
160+
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(
161+
self._client, self._config, self._serialize, self._deserialize
162+
)
163+
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(
164+
self._client, self._config, self._serialize, self._deserialize
165+
)
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)
182+
183+
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
101184
"""Runs the network request through the client's chained policies.
102185
103186
>>> from azure.core.rest import HttpRequest
@@ -106,7 +189,7 @@ def _send_request(
106189
>>> response = client._send_request(request)
107190
<HttpResponse: 200 OK>
108191
109-
For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
192+
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
110193
111194
:param request: The network request you want to make. Required.
112195
:type request: ~azure.core.rest.HttpRequest

0 commit comments

Comments
 (0)