Skip to content

Commit 61075ee

Browse files
author
SDKAuto
committed
CodeGen from PR 20411 in Azure/azure-rest-api-specs
Merge 2813c434987a3e92926580bcdbea0f42019be0b5 into fba4c8b7491aad28744bdd67ab031cc7d6bfe7a3
1 parent 1698f32 commit 61075ee

File tree

56 files changed

+19308
-6280
lines changed

Some content is hidden

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

56 files changed

+19308
-6280
lines changed

sdk/app/azure-mgmt-app/_meta.json

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.8.4",
33
"use": [
4-
"@autorest/python@5.12.0",
5-
"@autorest/modelerfour@4.19.3"
4+
"@autorest/python@6.0.1",
5+
"@autorest/modelerfour@4.23.5"
66
],
7-
"commit": "4ac6be1b22f88bfbb6ca3e294e73538bcac90b49",
7+
"commit": "a13c8d436a989b0942a798836777d30a53f3866d",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/app/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/app/resource-manager/readme.md --models-mode=msrest --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.0.1 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
1010
"readme": "specification/app/resource-manager/readme.md"
1111
}

sdk/app/azure-mgmt-app/azure/mgmt/app/__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/app/azure-mgmt-app/azure/mgmt/app/_configuration.py

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,50 +19,51 @@
1919
from azure.core.credentials import TokenCredential
2020

2121

22-
class ContainerAppsAPIClientConfiguration(Configuration):
22+
class ContainerAppsAPIClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2323
"""Configuration for ContainerAppsAPIClient.
2424
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-06-01-preview". Note that overriding
33+
this default value may result in unsupported behavior.
34+
:paramtype api_version: str
3235
"""
3336

34-
def __init__(
35-
self,
36-
credential: "TokenCredential",
37-
subscription_id: str,
38-
**kwargs: Any
39-
) -> None:
37+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4038
super(ContainerAppsAPIClientConfiguration, self).__init__(**kwargs)
39+
api_version = kwargs.pop("api_version", "2022-06-01-preview") # type: str
40+
4141
if credential is None:
4242
raise ValueError("Parameter 'credential' must not be None.")
4343
if subscription_id is None:
4444
raise ValueError("Parameter 'subscription_id' must not be None.")
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2022-01-01-preview"
49-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
50-
kwargs.setdefault('sdk_moniker', 'mgmt-app/{}'.format(VERSION))
48+
self.api_version = api_version
49+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
50+
kwargs.setdefault("sdk_moniker", "mgmt-app/{}".format(VERSION))
5151
self._configure(**kwargs)
5252

5353
def _configure(
54-
self,
55-
**kwargs # type: Any
54+
self, **kwargs # type: Any
5655
):
5756
# type: (...) -> None
58-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
59-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
60-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
61-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
62-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
63-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
64-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
65-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
66-
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")
6766
if self.credential and not self.authentication_policy:
68-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
67+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
68+
self.credential, *self.credential_scopes, **kwargs
69+
)

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

Lines changed: 118 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,100 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, Optional, TYPE_CHECKING
10+
from typing import Any, TYPE_CHECKING
1111

1212
from azure.core.rest import HttpRequest, HttpResponse
1313
from azure.mgmt.core import ARMPipelineClient
14-
from msrest import Deserializer, Serializer
1514

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

2039
if TYPE_CHECKING:
2140
# pylint: disable=unused-import,ungrouped-imports
2241
from azure.core.credentials import TokenCredential
2342

24-
class ContainerAppsAPIClient:
43+
44+
class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2545
"""ContainerAppsAPIClient.
2646
47+
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
48+
:vartype container_apps_auth_configs:
49+
azure.mgmt.app.operations.ContainerAppsAuthConfigsOperations
2750
:ivar container_apps: ContainerAppsOperations operations
28-
:vartype container_apps: container_apps_api_client.operations.ContainerAppsOperations
51+
:vartype container_apps: azure.mgmt.app.operations.ContainerAppsOperations
2952
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
30-
:vartype container_apps_revisions:
31-
container_apps_api_client.operations.ContainerAppsRevisionsOperations
53+
:vartype container_apps_revisions: azure.mgmt.app.operations.ContainerAppsRevisionsOperations
3254
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
3355
:vartype container_apps_revision_replicas:
34-
container_apps_api_client.operations.ContainerAppsRevisionReplicasOperations
56+
azure.mgmt.app.operations.ContainerAppsRevisionReplicasOperations
57+
:ivar dapr_components: DaprComponentsOperations operations
58+
:vartype dapr_components: azure.mgmt.app.operations.DaprComponentsOperations
59+
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
60+
:vartype container_apps_diagnostics:
61+
azure.mgmt.app.operations.ContainerAppsDiagnosticsOperations
62+
:ivar managed_environment_diagnostics: ManagedEnvironmentDiagnosticsOperations operations
63+
:vartype managed_environment_diagnostics:
64+
azure.mgmt.app.operations.ManagedEnvironmentDiagnosticsOperations
65+
:ivar managed_environments_diagnostics: ManagedEnvironmentsDiagnosticsOperations operations
66+
:vartype managed_environments_diagnostics:
67+
azure.mgmt.app.operations.ManagedEnvironmentsDiagnosticsOperations
68+
:ivar operations: Operations operations
69+
:vartype operations: azure.mgmt.app.operations.Operations
3570
:ivar managed_environments: ManagedEnvironmentsOperations operations
36-
:vartype managed_environments:
37-
container_apps_api_client.operations.ManagedEnvironmentsOperations
71+
:vartype managed_environments: azure.mgmt.app.operations.ManagedEnvironmentsOperations
3872
:ivar certificates: CertificatesOperations operations
39-
:vartype certificates: container_apps_api_client.operations.CertificatesOperations
40-
:ivar operations: Operations operations
41-
:vartype operations: container_apps_api_client.operations.Operations
42-
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
43-
:vartype container_apps_source_controls:
44-
container_apps_api_client.operations.ContainerAppsSourceControlsOperations
45-
:ivar dapr_components: DaprComponentsOperations operations
46-
:vartype dapr_components: container_apps_api_client.operations.DaprComponentsOperations
47-
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
48-
:vartype container_apps_auth_configs:
49-
container_apps_api_client.operations.ContainerAppsAuthConfigsOperations
73+
:vartype certificates: azure.mgmt.app.operations.CertificatesOperations
74+
:ivar namespaces: NamespacesOperations operations
75+
:vartype namespaces: azure.mgmt.app.operations.NamespacesOperations
5076
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
5177
:vartype managed_environments_storages:
52-
container_apps_api_client.operations.ManagedEnvironmentsStoragesOperations
53-
:param credential: Credential needed for the client to connect to Azure.
78+
azure.mgmt.app.operations.ManagedEnvironmentsStoragesOperations
79+
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
80+
:vartype container_apps_source_controls:
81+
azure.mgmt.app.operations.ContainerAppsSourceControlsOperations
82+
:ivar connected_environments: ConnectedEnvironmentsOperations operations
83+
:vartype connected_environments: azure.mgmt.app.operations.ConnectedEnvironmentsOperations
84+
:ivar connected_environments_certificates: ConnectedEnvironmentsCertificatesOperations
85+
operations
86+
:vartype connected_environments_certificates:
87+
azure.mgmt.app.operations.ConnectedEnvironmentsCertificatesOperations
88+
:ivar connected_environments_dapr_components: ConnectedEnvironmentsDaprComponentsOperations
89+
operations
90+
:vartype connected_environments_dapr_components:
91+
azure.mgmt.app.operations.ConnectedEnvironmentsDaprComponentsOperations
92+
:ivar connected_environments_storages: ConnectedEnvironmentsStoragesOperations operations
93+
:vartype connected_environments_storages:
94+
azure.mgmt.app.operations.ConnectedEnvironmentsStoragesOperations
95+
:param credential: Credential needed for the client to connect to Azure. Required.
5496
:type credential: ~azure.core.credentials.TokenCredential
55-
:param subscription_id: The ID of the target subscription.
97+
:param subscription_id: The ID of the target subscription. Required.
5698
:type subscription_id: str
57-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
99+
:param base_url: Service URL. Default value is "https://management.azure.com".
58100
:type base_url: str
101+
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
102+
this default value may result in unsupported behavior.
103+
:paramtype api_version: str
59104
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
60105
Retry-After header is present.
61106
"""
@@ -67,30 +112,61 @@ def __init__(
67112
base_url: str = "https://management.azure.com",
68113
**kwargs: Any
69114
) -> None:
70-
self._config = ContainerAppsAPIClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
115+
self._config = ContainerAppsAPIClientConfiguration(
116+
credential=credential, subscription_id=subscription_id, **kwargs
117+
)
71118
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
72119

73120
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
74121
self._serialize = Serializer(client_models)
75122
self._deserialize = Deserializer(client_models)
76123
self._serialize.client_side_validation = False
124+
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(
125+
self._client, self._config, self._serialize, self._deserialize
126+
)
77127
self.container_apps = ContainerAppsOperations(self._client, self._config, self._serialize, self._deserialize)
78-
self.container_apps_revisions = ContainerAppsRevisionsOperations(self._client, self._config, self._serialize, self._deserialize)
79-
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(self._client, self._config, self._serialize, self._deserialize)
80-
self.managed_environments = ManagedEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize)
81-
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
82-
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
83-
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(self._client, self._config, self._serialize, self._deserialize)
128+
self.container_apps_revisions = ContainerAppsRevisionsOperations(
129+
self._client, self._config, self._serialize, self._deserialize
130+
)
131+
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(
132+
self._client, self._config, self._serialize, self._deserialize
133+
)
84134
self.dapr_components = DaprComponentsOperations(self._client, self._config, self._serialize, self._deserialize)
85-
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(self._client, self._config, self._serialize, self._deserialize)
86-
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(self._client, self._config, self._serialize, self._deserialize)
87-
88-
89-
def _send_request(
90-
self,
91-
request, # type: HttpRequest
92-
**kwargs: Any
93-
) -> HttpResponse:
135+
self.container_apps_diagnostics = ContainerAppsDiagnosticsOperations(
136+
self._client, self._config, self._serialize, self._deserialize
137+
)
138+
self.managed_environment_diagnostics = ManagedEnvironmentDiagnosticsOperations(
139+
self._client, self._config, self._serialize, self._deserialize
140+
)
141+
self.managed_environments_diagnostics = ManagedEnvironmentsDiagnosticsOperations(
142+
self._client, self._config, self._serialize, self._deserialize
143+
)
144+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
145+
self.managed_environments = ManagedEnvironmentsOperations(
146+
self._client, self._config, self._serialize, self._deserialize
147+
)
148+
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
149+
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
150+
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(
151+
self._client, self._config, self._serialize, self._deserialize
152+
)
153+
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(
154+
self._client, self._config, self._serialize, self._deserialize
155+
)
156+
self.connected_environments = ConnectedEnvironmentsOperations(
157+
self._client, self._config, self._serialize, self._deserialize
158+
)
159+
self.connected_environments_certificates = ConnectedEnvironmentsCertificatesOperations(
160+
self._client, self._config, self._serialize, self._deserialize
161+
)
162+
self.connected_environments_dapr_components = ConnectedEnvironmentsDaprComponentsOperations(
163+
self._client, self._config, self._serialize, self._deserialize
164+
)
165+
self.connected_environments_storages = ConnectedEnvironmentsStoragesOperations(
166+
self._client, self._config, self._serialize, self._deserialize
167+
)
168+
169+
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
94170
"""Runs the network request through the client's chained policies.
95171
96172
>>> from azure.core.rest import HttpRequest
@@ -99,7 +175,7 @@ def _send_request(
99175
>>> response = client._send_request(request)
100176
<HttpResponse: 200 OK>
101177
102-
For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
178+
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
103179
104180
:param request: The network request you want to make. Required.
105181
:type request: ~azure.core.rest.HttpRequest

sdk/app/azure-mgmt-app/azure/mgmt/app/_patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
# This file is used for handwritten extensions to the generated code. Example:
2929
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3030
def patch_sdk():
31-
pass
31+
pass

0 commit comments

Comments
 (0)