9
9
from copy import deepcopy
10
10
from typing import Any , TYPE_CHECKING
11
11
12
- from msrest import Deserializer , Serializer
13
-
14
12
from azure .core .rest import HttpRequest , HttpResponse
15
13
from azure .mgmt .core import ARMPipelineClient
16
14
17
15
from . import models
18
16
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
+ CertificatesOperations ,
20
+ ContainerAppsAuthConfigsOperations ,
21
+ ContainerAppsOperations ,
22
+ ContainerAppsRevisionReplicasOperations ,
23
+ ContainerAppsRevisionsOperations ,
24
+ ContainerAppsSourceControlsOperations ,
25
+ DaprComponentsOperations ,
26
+ ManagedEnvironmentsOperations ,
27
+ ManagedEnvironmentsStoragesOperations ,
28
+ NamespacesOperations ,
29
+ Operations ,
30
+ )
20
31
21
32
if TYPE_CHECKING :
22
33
# pylint: disable=unused-import,ungrouped-imports
23
34
from azure .core .credentials import TokenCredential
24
35
25
- class ContainerAppsAPIClient : # pylint: disable=too-many-instance-attributes
36
+
37
+ class ContainerAppsAPIClient : # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
26
38
"""ContainerAppsAPIClient.
27
39
28
40
:ivar container_apps_auth_configs: ContainerAppsAuthConfigsOperations operations
@@ -53,9 +65,9 @@ class ContainerAppsAPIClient: # pylint: disable=too-many-instance-attributes
53
65
:ivar container_apps_source_controls: ContainerAppsSourceControlsOperations operations
54
66
:vartype container_apps_source_controls:
55
67
azure.mgmt.appcontainers.operations.ContainerAppsSourceControlsOperations
56
- :param credential: Credential needed for the client to connect to Azure.
68
+ :param credential: Credential needed for the client to connect to Azure. Required.
57
69
:type credential: ~azure.core.credentials.TokenCredential
58
- :param subscription_id: The ID of the target subscription.
70
+ :param subscription_id: The ID of the target subscription. Required.
59
71
:type subscription_id: str
60
72
:param base_url: Service URL. Default value is "https://management.azure.com".
61
73
:type base_url: str
@@ -73,31 +85,40 @@ def __init__(
73
85
base_url : str = "https://management.azure.com" ,
74
86
** kwargs : Any
75
87
) -> None :
76
- self ._config = ContainerAppsAPIClientConfiguration (credential = credential , subscription_id = subscription_id , ** kwargs )
88
+ self ._config = ContainerAppsAPIClientConfiguration (
89
+ credential = credential , subscription_id = subscription_id , ** kwargs
90
+ )
77
91
self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
78
92
79
93
client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
80
94
self ._serialize = Serializer (client_models )
81
95
self ._deserialize = Deserializer (client_models )
82
96
self ._serialize .client_side_validation = False
83
- self .container_apps_auth_configs = ContainerAppsAuthConfigsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
97
+ self .container_apps_auth_configs = ContainerAppsAuthConfigsOperations (
98
+ self ._client , self ._config , self ._serialize , self ._deserialize
99
+ )
84
100
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 )
101
+ self .container_apps_revisions = ContainerAppsRevisionsOperations (
102
+ self ._client , self ._config , self ._serialize , self ._deserialize
103
+ )
104
+ self .container_apps_revision_replicas = ContainerAppsRevisionReplicasOperations (
105
+ self ._client , self ._config , self ._serialize , self ._deserialize
106
+ )
87
107
self .dapr_components = DaprComponentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
88
108
self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
89
- self .managed_environments = ManagedEnvironmentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
109
+ self .managed_environments = ManagedEnvironmentsOperations (
110
+ self ._client , self ._config , self ._serialize , self ._deserialize
111
+ )
90
112
self .certificates = CertificatesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
91
113
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 :
114
+ self .managed_environments_storages = ManagedEnvironmentsStoragesOperations (
115
+ self ._client , self ._config , self ._serialize , self ._deserialize
116
+ )
117
+ self .container_apps_source_controls = ContainerAppsSourceControlsOperations (
118
+ self ._client , self ._config , self ._serialize , self ._deserialize
119
+ )
120
+
121
+ def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
101
122
"""Runs the network request through the client's chained policies.
102
123
103
124
>>> from azure.core.rest import HttpRequest
@@ -106,7 +127,7 @@ def _send_request(
106
127
>>> response = client._send_request(request)
107
128
<HttpResponse: 200 OK>
108
129
109
- For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart
130
+ For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/ python/send_request
110
131
111
132
:param request: The network request you want to make. Required.
112
133
:type request: ~azure.core.rest.HttpRequest
0 commit comments