12
12
from azure .core .rest import HttpRequest , HttpResponse
13
13
from azure .mgmt .core import ARMPipelineClient
14
14
15
- from . import models
15
+ from . import models as _models
16
16
from ._configuration import CdnManagementClientConfiguration
17
17
from ._serialization import Deserializer , Serializer
18
18
from .operations import (
38
38
RulesOperations ,
39
39
SecretsOperations ,
40
40
SecurityPoliciesOperations ,
41
- ValidateOperations ,
42
41
)
43
42
44
43
if TYPE_CHECKING :
@@ -71,8 +70,6 @@ class CdnManagementClient(
71
70
:vartype security_policies: azure.mgmt.cdn.operations.SecurityPoliciesOperations
72
71
:ivar secrets: SecretsOperations operations
73
72
:vartype secrets: azure.mgmt.cdn.operations.SecretsOperations
74
- :ivar validate: ValidateOperations operations
75
- :vartype validate: azure.mgmt.cdn.operations.ValidateOperations
76
73
:ivar log_analytics: LogAnalyticsOperations operations
77
74
:vartype log_analytics: azure.mgmt.cdn.operations.LogAnalyticsOperations
78
75
:ivar profiles: ProfilesOperations operations
@@ -101,7 +98,7 @@ class CdnManagementClient(
101
98
:type subscription_id: str
102
99
:param base_url: Service URL. Default value is "https://management.azure.com".
103
100
:type base_url: str
104
- :keyword api_version: Api Version. Default value is "2021-06 -01". Note that overriding this
101
+ :keyword api_version: Api Version. Default value is "2023-05 -01". Note that overriding this
105
102
default value may result in unsupported behavior.
106
103
:paramtype api_version: str
107
104
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -118,9 +115,9 @@ def __init__(
118
115
self ._config = CdnManagementClientConfiguration (
119
116
credential = credential , subscription_id = subscription_id , ** kwargs
120
117
)
121
- self ._client = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
118
+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
122
119
123
- client_models = {k : v for k , v in models .__dict__ .items () if isinstance (v , type )}
120
+ client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
124
121
self ._serialize = Serializer (client_models )
125
122
self ._deserialize = Deserializer (client_models )
126
123
self ._serialize .client_side_validation = False
@@ -140,7 +137,6 @@ def __init__(
140
137
self ._client , self ._config , self ._serialize , self ._deserialize
141
138
)
142
139
self .secrets = SecretsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
143
- self .validate = ValidateOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
144
140
self .log_analytics = LogAnalyticsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
145
141
self .profiles = ProfilesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
146
142
self .endpoints = EndpointsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
@@ -177,15 +173,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
177
173
request_copy .url = self ._client .format_url (request_copy .url )
178
174
return self ._client .send_request (request_copy , ** kwargs )
179
175
180
- def close (self ):
181
- # type: () -> None
176
+ def close (self ) -> None :
182
177
self ._client .close ()
183
178
184
- def __enter__ (self ):
185
- # type: () -> CdnManagementClient
179
+ def __enter__ (self ) -> "CdnManagementClient" :
186
180
self ._client .__enter__ ()
187
181
return self
188
182
189
- def __exit__ (self , * exc_details ):
190
- # type: (Any) -> None
183
+ def __exit__ (self , * exc_details : Any ) -> None :
191
184
self ._client .__exit__ (* exc_details )
0 commit comments