99from copy import deepcopy
1010from typing import Any , TYPE_CHECKING
1111
12+ from azure .core .pipeline import policies
1213from azure .core .rest import HttpRequest , HttpResponse
1314from azure .mgmt .core import ARMPipelineClient
15+ from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
1416
1517from . import models as _models
1618from ._configuration import MobileNetworkManagementClientConfiguration
2628 PacketCoreControlPlaneVersionsOperations ,
2729 PacketCoreControlPlanesOperations ,
2830 PacketCoreDataPlanesOperations ,
31+ RoutingInfoOperations ,
2932 ServicesOperations ,
3033 SimGroupsOperations ,
3134 SimPoliciesOperations ,
@@ -61,6 +64,8 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
6164 :ivar packet_core_control_planes: PacketCoreControlPlanesOperations operations
6265 :vartype packet_core_control_planes:
6366 azure.mgmt.mobilenetwork.operations.PacketCoreControlPlanesOperations
67+ :ivar routing_info: RoutingInfoOperations operations
68+ :vartype routing_info: azure.mgmt.mobilenetwork.operations.RoutingInfoOperations
6469 :ivar packet_core_control_plane_versions: PacketCoreControlPlaneVersionsOperations operations
6570 :vartype packet_core_control_plane_versions:
6671 azure.mgmt.mobilenetwork.operations.PacketCoreControlPlaneVersionsOperations
@@ -90,7 +95,7 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
9095 :type subscription_id: str
9196 :param base_url: Service URL. Default value is "https://management.azure.com".
9297 :type base_url: str
93- :keyword api_version: Api Version. Default value is "2024-02 -01". Note that overriding this
98+ :keyword api_version: Api Version. Default value is "2024-04 -01". Note that overriding this
9499 default value may result in unsupported behavior.
95100 :paramtype api_version: str
96101 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -107,7 +112,25 @@ def __init__(
107112 self ._config = MobileNetworkManagementClientConfiguration (
108113 credential = credential , subscription_id = subscription_id , ** kwargs
109114 )
110- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , config = self ._config , ** kwargs )
115+ _policies = kwargs .pop ("policies" , None )
116+ if _policies is None :
117+ _policies = [
118+ policies .RequestIdPolicy (** kwargs ),
119+ self ._config .headers_policy ,
120+ self ._config .user_agent_policy ,
121+ self ._config .proxy_policy ,
122+ policies .ContentDecodePolicy (** kwargs ),
123+ ARMAutoResourceProviderRegistrationPolicy (),
124+ self ._config .redirect_policy ,
125+ self ._config .retry_policy ,
126+ self ._config .authentication_policy ,
127+ self ._config .custom_hook_policy ,
128+ self ._config .logging_policy ,
129+ policies .DistributedTracingPolicy (** kwargs ),
130+ policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
131+ self ._config .http_logging_policy ,
132+ ]
133+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
111134
112135 client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
113136 self ._serialize = Serializer (client_models )
@@ -126,6 +149,7 @@ def __init__(
126149 self .packet_core_control_planes = PacketCoreControlPlanesOperations (
127150 self ._client , self ._config , self ._serialize , self ._deserialize
128151 )
152+ self .routing_info = RoutingInfoOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
129153 self .packet_core_control_plane_versions = PacketCoreControlPlaneVersionsOperations (
130154 self ._client , self ._config , self ._serialize , self ._deserialize
131155 )
@@ -143,7 +167,7 @@ def __init__(
143167 )
144168 self .ue_information = UeInformationOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
145169
146- def _send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
170+ def _send_request (self , request : HttpRequest , * , stream : bool = False , * *kwargs : Any ) -> HttpResponse :
147171 """Runs the network request through the client's chained policies.
148172
149173 >>> from azure.core.rest import HttpRequest
@@ -163,7 +187,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
163187
164188 request_copy = deepcopy (request )
165189 request_copy .url = self ._client .format_url (request_copy .url )
166- return self ._client .send_request (request_copy , ** kwargs )
190+ return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
167191
168192 def close (self ) -> None :
169193 self ._client .close ()
0 commit comments