22# --------------------------------------------------------------------------
33# Copyright (c) Microsoft Corporation. All rights reserved.
44# Licensed under the MIT License. See License.txt in the project root for license information.
5- # Code generated by Microsoft (R) Python Code Generator.
5+ # Code generated by Microsoft (R) AutoRest Code Generator.
66# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77# --------------------------------------------------------------------------
88
1515from azure .mgmt .core import ARMPipelineClient
1616from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
1717
18- from ._configuration import ComputeScheduleMgmtClientConfiguration
18+ from . import models as _models
19+ from ._configuration import MicrosoftComputeScheduleConfiguration
1920from ._serialization import Deserializer , Serializer
2021from .operations import Operations , ScheduledActionsOperations
2122
2223if TYPE_CHECKING :
2324 from azure .core .credentials import TokenCredential
2425
2526
26- class ComputeScheduleMgmtClient :
27+ class MicrosoftComputeSchedule :
2728 """Microsoft.ComputeSchedule Resource Provider management API.
2829
2930 :ivar operations: Operations operations
3031 :vartype operations: azure.mgmt.computeschedule.operations.Operations
3132 :ivar scheduled_actions: ScheduledActionsOperations operations
3233 :vartype scheduled_actions: azure.mgmt.computeschedule.operations.ScheduledActionsOperations
33- :param credential: Credential used to authenticate requests to the service . Required.
34+ :param credential: Credential needed for the client to connect to Azure . Required.
3435 :type credential: ~azure.core.credentials.TokenCredential
3536 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3637 :type subscription_id: str
37- :param base_url: Service host . Default value is "https://management.azure.com".
38+ :param base_url: Service URL . Default value is "https://management.azure.com".
3839 :type base_url: str
39- :keyword api_version: The API version to use for this operation . Default value is "2024-10-01".
40- Note that overriding this default value may result in unsupported behavior.
40+ :keyword api_version: Api Version . Default value is "2024-10-01". Note that overriding this
41+ default value may result in unsupported behavior.
4142 :paramtype api_version: str
4243 """
4344
@@ -48,9 +49,8 @@ def __init__(
4849 base_url : str = "https://management.azure.com" ,
4950 ** kwargs : Any
5051 ) -> None :
51- _endpoint = "{endpoint}"
52- self ._config = ComputeScheduleMgmtClientConfiguration (
53- credential = credential , subscription_id = subscription_id , base_url = base_url , ** kwargs
52+ self ._config = MicrosoftComputeScheduleConfiguration (
53+ credential = credential , subscription_id = subscription_id , ** kwargs
5454 )
5555 _policies = kwargs .pop ("policies" , None )
5656 if _policies is None :
@@ -70,23 +70,24 @@ def __init__(
7070 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
7171 self ._config .http_logging_policy ,
7272 ]
73- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = _endpoint , policies = _policies , ** kwargs )
73+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
7474
75- self ._serialize = Serializer ()
76- self ._deserialize = Deserializer ()
75+ client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
76+ self ._serialize = Serializer (client_models )
77+ self ._deserialize = Deserializer (client_models )
7778 self ._serialize .client_side_validation = False
7879 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
7980 self .scheduled_actions = ScheduledActionsOperations (
8081 self ._client , self ._config , self ._serialize , self ._deserialize
8182 )
8283
83- def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
84+ def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
8485 """Runs the network request through the client's chained policies.
8586
8687 >>> from azure.core.rest import HttpRequest
8788 >>> request = HttpRequest("GET", "https://www.example.org/")
8889 <HttpRequest [GET], url: 'https://www.example.org/'>
89- >>> response = client.send_request (request)
90+ >>> response = client._send_request (request)
9091 <HttpResponse: 200 OK>
9192
9293 For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -99,11 +100,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
99100 """
100101
101102 request_copy = deepcopy (request )
102- path_format_arguments = {
103- "endpoint" : self ._serialize .url ("self._config.base_url" , self ._config .base_url , "str" , skip_quote = True ),
104- }
105-
106- request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
103+ request_copy .url = self ._client .format_url (request_copy .url )
107104 return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
108105
109106 def close (self ) -> None :
0 commit comments