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 TrustedSigningMgmtClientConfiguration
18+ from . import models as _models
19+ from ._configuration import CodeSigningManagementClientConfiguration
1920from ._serialization import Deserializer , Serializer
2021from .operations import CertificateProfilesOperations , CodeSigningAccountsOperations , Operations
2122
2425 from azure .core .credentials import TokenCredential
2526
2627
27- class TrustedSigningMgmtClient : # pylint: disable=client-accepts-api-version-keyword
28+ class CodeSigningManagementClient : # pylint: disable=client-accepts-api-version-keyword
2829 """Code Signing resource provider api.
2930
3031 :ivar operations: Operations operations
@@ -35,15 +36,14 @@ class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-ke
3536 :ivar certificate_profiles: CertificateProfilesOperations operations
3637 :vartype certificate_profiles:
3738 azure.mgmt.trustedsigning.operations.CertificateProfilesOperations
38- :param credential: Credential used to authenticate requests to the service . Required.
39+ :param credential: Credential needed for the client to connect to Azure . Required.
3940 :type credential: ~azure.core.credentials.TokenCredential
4041 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4142 :type subscription_id: str
42- :param base_url: Service host . Default value is "https://management.azure.com".
43+ :param base_url: Service URL . Default value is "https://management.azure.com".
4344 :type base_url: str
44- :keyword api_version: The API version to use for this operation. Default value is
45- "2024-02-05-preview". Note that overriding this default value may result in unsupported
46- behavior.
45+ :keyword api_version: Api Version. Default value is "2024-09-30-preview". Note that overriding
46+ this default value may result in unsupported behavior.
4747 :paramtype api_version: str
4848 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4949 Retry-After header is present.
@@ -56,9 +56,8 @@ def __init__(
5656 base_url : str = "https://management.azure.com" ,
5757 ** kwargs : Any
5858 ) -> None :
59- _endpoint = "{endpoint}"
60- self ._config = TrustedSigningMgmtClientConfiguration (
61- credential = credential , subscription_id = subscription_id , base_url = base_url , ** kwargs
59+ self ._config = CodeSigningManagementClientConfiguration (
60+ credential = credential , subscription_id = subscription_id , ** kwargs
6261 )
6362 _policies = kwargs .pop ("policies" , None )
6463 if _policies is None :
@@ -78,10 +77,11 @@ def __init__(
7877 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
7978 self ._config .http_logging_policy ,
8079 ]
81- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = _endpoint , policies = _policies , ** kwargs )
80+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
8281
83- self ._serialize = Serializer ()
84- self ._deserialize = Deserializer ()
82+ client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
83+ self ._serialize = Serializer (client_models )
84+ self ._deserialize = Deserializer (client_models )
8585 self ._serialize .client_side_validation = False
8686 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
8787 self .code_signing_accounts = CodeSigningAccountsOperations (
@@ -91,13 +91,13 @@ def __init__(
9191 self ._client , self ._config , self ._serialize , self ._deserialize
9292 )
9393
94- def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
94+ def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
9595 """Runs the network request through the client's chained policies.
9696
9797 >>> from azure.core.rest import HttpRequest
9898 >>> request = HttpRequest("GET", "https://www.example.org/")
9999 <HttpRequest [GET], url: 'https://www.example.org/'>
100- >>> response = client.send_request (request)
100+ >>> response = client._send_request (request)
101101 <HttpResponse: 200 OK>
102102
103103 For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -110,11 +110,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
110110 """
111111
112112 request_copy = deepcopy (request )
113- path_format_arguments = {
114- "endpoint" : self ._serialize .url ("self._config.base_url" , self ._config .base_url , "str" , skip_quote = True ),
115- }
116-
117- request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
113+ request_copy .url = self ._client .format_url (request_copy .url )
118114 return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
119115
120116 def close (self ) -> None :
0 commit comments