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
2223if TYPE_CHECKING :
23- # pylint: disable=unused-import,ungrouped-imports
2424 from azure .core .credentials import TokenCredential
2525
2626
27- class TrustedSigningMgmtClient : # pylint: disable=client-accepts-api-version-keyword
27+ class CodeSigningManagementClient :
2828 """Code Signing resource provider api.
2929
3030 :ivar operations: Operations operations
@@ -35,15 +35,14 @@ class TrustedSigningMgmtClient: # pylint: disable=client-accepts-api-version-ke
3535 :ivar certificate_profiles: CertificateProfilesOperations operations
3636 :vartype certificate_profiles:
3737 azure.mgmt.trustedsigning.operations.CertificateProfilesOperations
38- :param credential: Credential used to authenticate requests to the service . Required.
38+ :param credential: Credential needed for the client to connect to Azure . Required.
3939 :type credential: ~azure.core.credentials.TokenCredential
4040 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4141 :type subscription_id: str
42- :param base_url: Service host . Default value is "https://management.azure.com".
42+ :param base_url: Service URL . Default value is "https://management.azure.com".
4343 :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.
44+ :keyword api_version: Api Version. Default value is "2025-03-30". Note that overriding this
45+ default value may result in unsupported behavior.
4746 :paramtype api_version: str
4847 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4948 Retry-After header is present.
@@ -56,9 +55,8 @@ def __init__(
5655 base_url : str = "https://management.azure.com" ,
5756 ** kwargs : Any
5857 ) -> None :
59- _endpoint = "{endpoint}"
60- self ._config = TrustedSigningMgmtClientConfiguration (
61- credential = credential , subscription_id = subscription_id , base_url = base_url , ** kwargs
58+ self ._config = CodeSigningManagementClientConfiguration (
59+ credential = credential , subscription_id = subscription_id , ** kwargs
6260 )
6361 _policies = kwargs .pop ("policies" , None )
6462 if _policies is None :
@@ -78,10 +76,11 @@ def __init__(
7876 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
7977 self ._config .http_logging_policy ,
8078 ]
81- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = _endpoint , policies = _policies , ** kwargs )
79+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
8280
83- self ._serialize = Serializer ()
84- self ._deserialize = Deserializer ()
81+ client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
82+ self ._serialize = Serializer (client_models )
83+ self ._deserialize = Deserializer (client_models )
8584 self ._serialize .client_side_validation = False
8685 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
8786 self .code_signing_accounts = CodeSigningAccountsOperations (
@@ -91,13 +90,13 @@ def __init__(
9190 self ._client , self ._config , self ._serialize , self ._deserialize
9291 )
9392
94- def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
93+ def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
9594 """Runs the network request through the client's chained policies.
9695
9796 >>> from azure.core.rest import HttpRequest
9897 >>> request = HttpRequest("GET", "https://www.example.org/")
9998 <HttpRequest [GET], url: 'https://www.example.org/'>
100- >>> response = client.send_request (request)
99+ >>> response = client._send_request (request)
101100 <HttpResponse: 200 OK>
102101
103102 For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -110,11 +109,7 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
110109 """
111110
112111 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 )
112+ request_copy .url = self ._client .format_url (request_copy .url )
118113 return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
119114
120115 def close (self ) -> None :
0 commit comments