Skip to content

Commit 5f44796

Browse files
author
SDKAuto
committed
CodeGen from PR 20550 in Azure/azure-rest-api-specs
Merge bc41fb327a16415fe0b43e49d9043ef163cbfdd8 into c371e7c2cbe0254c24d347268bfc1e20f4b71fc0
1 parent bb0a830 commit 5f44796

File tree

59 files changed

+21281
-6228
lines changed

Some content is hidden

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

59 files changed

+21281
-6228
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.1.6",
5+
"@autorest/modelerfour@4.23.5"
66
],
7-
"commit": "4ac6be1b22f88bfbb6ca3e294e73538bcac90b49",
7+
"commit": "e4f2f8043c0289ec4624e0aad891cb829a1a7827",
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 --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.6 --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: 122 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,103 @@
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+
BillingMetersOperations,
20+
CertificatesOperations,
21+
ConnectedEnvironmentsCertificatesOperations,
22+
ConnectedEnvironmentsDaprComponentsOperations,
23+
ConnectedEnvironmentsOperations,
24+
ConnectedEnvironmentsStoragesOperations,
25+
ContainerAppsAuthConfigsOperations,
26+
ContainerAppsDiagnosticsOperations,
27+
ContainerAppsOperations,
28+
ContainerAppsRevisionReplicasOperations,
29+
ContainerAppsRevisionsOperations,
30+
ContainerAppsSourceControlsOperations,
31+
DaprComponentsOperations,
32+
ManagedEnvironmentDiagnosticsOperations,
33+
ManagedEnvironmentsDiagnosticsOperations,
34+
ManagedEnvironmentsOperations,
35+
ManagedEnvironmentsStoragesOperations,
36+
NamespacesOperations,
37+
Operations,
38+
)
1939

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

24-
class ContainerAppsAPIClient:
44+
45+
class ContainerAppsAPIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
2546
"""ContainerAppsAPIClient.
2647
48+
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
49+
:vartype container_apps_auth_configs:
50+
azure.mgmt.app.operations.ContainerAppsAuthConfigsOperations
2751
:ivar container_apps: ContainerAppsOperations operations
28-
:vartype container_apps: container_apps_api_client.operations.ContainerAppsOperations
52+
:vartype container_apps: azure.mgmt.app.operations.ContainerAppsOperations
2953
:ivar container_apps_revisions: ContainerAppsRevisionsOperations operations
30-
:vartype container_apps_revisions:
31-
container_apps_api_client.operations.ContainerAppsRevisionsOperations
54+
:vartype container_apps_revisions: azure.mgmt.app.operations.ContainerAppsRevisionsOperations
3255
:ivar container_apps_revision_replicas: ContainerAppsRevisionReplicasOperations operations
3356
:vartype container_apps_revision_replicas:
34-
container_apps_api_client.operations.ContainerAppsRevisionReplicasOperations
57+
azure.mgmt.app.operations.ContainerAppsRevisionReplicasOperations
58+
:ivar dapr_components: DaprComponentsOperations operations
59+
:vartype dapr_components: azure.mgmt.app.operations.DaprComponentsOperations
60+
:ivar container_apps_diagnostics: ContainerAppsDiagnosticsOperations operations
61+
:vartype container_apps_diagnostics:
62+
azure.mgmt.app.operations.ContainerAppsDiagnosticsOperations
63+
:ivar managed_environment_diagnostics: ManagedEnvironmentDiagnosticsOperations operations
64+
:vartype managed_environment_diagnostics:
65+
azure.mgmt.app.operations.ManagedEnvironmentDiagnosticsOperations
66+
:ivar managed_environments_diagnostics: ManagedEnvironmentsDiagnosticsOperations operations
67+
:vartype managed_environments_diagnostics:
68+
azure.mgmt.app.operations.ManagedEnvironmentsDiagnosticsOperations
69+
:ivar operations: Operations operations
70+
:vartype operations: azure.mgmt.app.operations.Operations
3571
:ivar managed_environments: ManagedEnvironmentsOperations operations
36-
:vartype managed_environments:
37-
container_apps_api_client.operations.ManagedEnvironmentsOperations
72+
:vartype managed_environments: azure.mgmt.app.operations.ManagedEnvironmentsOperations
3873
: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
74+
:vartype certificates: azure.mgmt.app.operations.CertificatesOperations
75+
:ivar namespaces: NamespacesOperations operations
76+
:vartype namespaces: azure.mgmt.app.operations.NamespacesOperations
5077
:ivar managed_environments_storages: ManagedEnvironmentsStoragesOperations operations
5178
:vartype managed_environments_storages:
52-
container_apps_api_client.operations.ManagedEnvironmentsStoragesOperations
53-
:param credential: Credential needed for the client to connect to Azure.
79+
azure.mgmt.app.operations.ManagedEnvironmentsStoragesOperations
80+
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
81+
:vartype container_apps_source_controls:
82+
azure.mgmt.app.operations.ContainerAppsSourceControlsOperations
83+
:ivar connected_environments: ConnectedEnvironmentsOperations operations
84+
:vartype connected_environments: azure.mgmt.app.operations.ConnectedEnvironmentsOperations
85+
:ivar connected_environments_certificates: ConnectedEnvironmentsCertificatesOperations
86+
operations
87+
:vartype connected_environments_certificates:
88+
azure.mgmt.app.operations.ConnectedEnvironmentsCertificatesOperations
89+
:ivar connected_environments_dapr_components: ConnectedEnvironmentsDaprComponentsOperations
90+
operations
91+
:vartype connected_environments_dapr_components:
92+
azure.mgmt.app.operations.ConnectedEnvironmentsDaprComponentsOperations
93+
:ivar connected_environments_storages: ConnectedEnvironmentsStoragesOperations operations
94+
:vartype connected_environments_storages:
95+
azure.mgmt.app.operations.ConnectedEnvironmentsStoragesOperations
96+
:ivar billing_meters: BillingMetersOperations operations
97+
:vartype billing_meters: azure.mgmt.app.operations.BillingMetersOperations
98+
:param credential: Credential needed for the client to connect to Azure. Required.
5499
:type credential: ~azure.core.credentials.TokenCredential
55-
:param subscription_id: The ID of the target subscription.
100+
:param subscription_id: The ID of the target subscription. Required.
56101
:type subscription_id: str
57-
:param base_url: Service URL. Default value is 'https://management.azure.com'.
102+
:param base_url: Service URL. Default value is "https://management.azure.com".
58103
:type base_url: str
104+
:keyword api_version: Api Version. Default value is "2022-06-01-preview". Note that overriding
105+
this default value may result in unsupported behavior.
106+
:paramtype api_version: str
59107
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
60108
Retry-After header is present.
61109
"""
@@ -67,30 +115,62 @@ def __init__(
67115
base_url: str = "https://management.azure.com",
68116
**kwargs: Any
69117
) -> None:
70-
self._config = ContainerAppsAPIClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
118+
self._config = ContainerAppsAPIClientConfiguration(
119+
credential=credential, subscription_id=subscription_id, **kwargs
120+
)
71121
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
72122

73123
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
74124
self._serialize = Serializer(client_models)
75125
self._deserialize = Deserializer(client_models)
76126
self._serialize.client_side_validation = False
127+
self.container_apps_auth_configs = ContainerAppsAuthConfigsOperations(
128+
self._client, self._config, self._serialize, self._deserialize
129+
)
77130
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)
131+
self.container_apps_revisions = ContainerAppsRevisionsOperations(
132+
self._client, self._config, self._serialize, self._deserialize
133+
)
134+
self.container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations(
135+
self._client, self._config, self._serialize, self._deserialize
136+
)
84137
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:
138+
self.container_apps_diagnostics = ContainerAppsDiagnosticsOperations(
139+
self._client, self._config, self._serialize, self._deserialize
140+
)
141+
self.managed_environment_diagnostics = ManagedEnvironmentDiagnosticsOperations(
142+
self._client, self._config, self._serialize, self._deserialize
143+
)
144+
self.managed_environments_diagnostics = ManagedEnvironmentsDiagnosticsOperations(
145+
self._client, self._config, self._serialize, self._deserialize
146+
)
147+
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
148+
self.managed_environments = ManagedEnvironmentsOperations(
149+
self._client, self._config, self._serialize, self._deserialize
150+
)
151+
self.certificates = CertificatesOperations(self._client, self._config, self._serialize, self._deserialize)
152+
self.namespaces = NamespacesOperations(self._client, self._config, self._serialize, self._deserialize)
153+
self.managed_environments_storages = ManagedEnvironmentsStoragesOperations(
154+
self._client, self._config, self._serialize, self._deserialize
155+
)
156+
self.container_apps_source_controls = ContainerAppsSourceControlsOperations(
157+
self._client, self._config, self._serialize, self._deserialize
158+
)
159+
self.connected_environments = ConnectedEnvironmentsOperations(
160+
self._client, self._config, self._serialize, self._deserialize
161+
)
162+
self.connected_environments_certificates = ConnectedEnvironmentsCertificatesOperations(
163+
self._client, self._config, self._serialize, self._deserialize
164+
)
165+
self.connected_environments_dapr_components = ConnectedEnvironmentsDaprComponentsOperations(
166+
self._client, self._config, self._serialize, self._deserialize
167+
)
168+
self.connected_environments_storages = ConnectedEnvironmentsStoragesOperations(
169+
self._client, self._config, self._serialize, self._deserialize
170+
)
171+
self.billing_meters = BillingMetersOperations(self._client, self._config, self._serialize, self._deserialize)
172+
173+
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
94174
"""Runs the network request through the client's chained policies.
95175
96176
>>> from azure.core.rest import HttpRequest
@@ -99,7 +179,7 @@ def _send_request(
99179
>>> response = client._send_request(request)
100180
<HttpResponse: 200 OK>
101181
102-
For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
182+
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
103183
104184
:param request: The network request you want to make. Required.
105185
:type request: ~azure.core.rest.HttpRequest

0 commit comments

Comments
 (0)