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) AutoRest Code Generator.
5+ # Code generated by Microsoft (R) Python Code Generator.
66# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77# --------------------------------------------------------------------------
88
99from copy import deepcopy
1010from typing import Any , TYPE_CHECKING
11+ from typing_extensions import Self
1112
1213from azure .core .pipeline import policies
1314from azure .core .rest import HttpRequest , HttpResponse
1415from azure .mgmt .core import ARMPipelineClient
1516from azure .mgmt .core .policies import ARMAutoResourceProviderRegistrationPolicy
1617
17- from . import models as _models
1818from ._configuration import OracleDatabaseMgmtClientConfiguration
1919from ._serialization import Deserializer , Serializer
2020from .operations import (
3030 DbSystemShapesOperations ,
3131 DnsPrivateViewsOperations ,
3232 DnsPrivateZonesOperations ,
33+ ExadbVmClustersOperations ,
34+ ExascaleDbNodesOperations ,
35+ ExascaleDbStorageVaultsOperations ,
36+ FlexComponentsOperations ,
37+ GiMinorVersionsOperations ,
3338 GiVersionsOperations ,
39+ ListActionsOperations ,
3440 Operations ,
3541 OracleSubscriptionsOperations ,
3642 SystemVersionsOperations ,
3743 VirtualNetworkAddressesOperations ,
3844)
3945
4046if TYPE_CHECKING :
41- # pylint: disable=unused-import,ungrouped-imports
4247 from azure .core .credentials import TokenCredential
4348
4449
45- class OracleDatabaseMgmtClient : # pylint: disable=client-accepts-api-version-keyword, too-many-instance-attributes
50+ class OracleDatabaseMgmtClient : # pylint: disable=too-many-instance-attributes
4651 """OracleDatabaseMgmtClient.
4752
4853 :ivar operations: Operations operations
4954 :vartype operations: azure.mgmt.oracledatabase.operations.Operations
50- :ivar autonomous_databases: AutonomousDatabasesOperations operations
51- :vartype autonomous_databases:
52- azure.mgmt.oracledatabase.operations.AutonomousDatabasesOperations
5355 :ivar cloud_exadata_infrastructures: CloudExadataInfrastructuresOperations operations
5456 :vartype cloud_exadata_infrastructures:
5557 azure.mgmt.oracledatabase.operations.CloudExadataInfrastructuresOperations
58+ :ivar list_actions: ListActionsOperations operations
59+ :vartype list_actions: azure.mgmt.oracledatabase.operations.ListActionsOperations
60+ :ivar db_servers: DbServersOperations operations
61+ :vartype db_servers: azure.mgmt.oracledatabase.operations.DbServersOperations
5662 :ivar cloud_vm_clusters: CloudVmClustersOperations operations
5763 :vartype cloud_vm_clusters: azure.mgmt.oracledatabase.operations.CloudVmClustersOperations
64+ :ivar virtual_network_addresses: VirtualNetworkAddressesOperations operations
65+ :vartype virtual_network_addresses:
66+ azure.mgmt.oracledatabase.operations.VirtualNetworkAddressesOperations
67+ :ivar system_versions: SystemVersionsOperations operations
68+ :vartype system_versions: azure.mgmt.oracledatabase.operations.SystemVersionsOperations
69+ :ivar oracle_subscriptions: OracleSubscriptionsOperations operations
70+ :vartype oracle_subscriptions:
71+ azure.mgmt.oracledatabase.operations.OracleSubscriptionsOperations
72+ :ivar db_nodes: DbNodesOperations operations
73+ :vartype db_nodes: azure.mgmt.oracledatabase.operations.DbNodesOperations
74+ :ivar gi_versions: GiVersionsOperations operations
75+ :vartype gi_versions: azure.mgmt.oracledatabase.operations.GiVersionsOperations
76+ :ivar gi_minor_versions: GiMinorVersionsOperations operations
77+ :vartype gi_minor_versions: azure.mgmt.oracledatabase.operations.GiMinorVersionsOperations
78+ :ivar db_system_shapes: DbSystemShapesOperations operations
79+ :vartype db_system_shapes: azure.mgmt.oracledatabase.operations.DbSystemShapesOperations
80+ :ivar dns_private_views: DnsPrivateViewsOperations operations
81+ :vartype dns_private_views: azure.mgmt.oracledatabase.operations.DnsPrivateViewsOperations
82+ :ivar dns_private_zones: DnsPrivateZonesOperations operations
83+ :vartype dns_private_zones: azure.mgmt.oracledatabase.operations.DnsPrivateZonesOperations
84+ :ivar flex_components: FlexComponentsOperations operations
85+ :vartype flex_components: azure.mgmt.oracledatabase.operations.FlexComponentsOperations
86+ :ivar autonomous_databases: AutonomousDatabasesOperations operations
87+ :vartype autonomous_databases:
88+ azure.mgmt.oracledatabase.operations.AutonomousDatabasesOperations
89+ :ivar autonomous_database_backups: AutonomousDatabaseBackupsOperations operations
90+ :vartype autonomous_database_backups:
91+ azure.mgmt.oracledatabase.operations.AutonomousDatabaseBackupsOperations
5892 :ivar autonomous_database_character_sets: AutonomousDatabaseCharacterSetsOperations operations
5993 :vartype autonomous_database_character_sets:
6094 azure.mgmt.oracledatabase.operations.AutonomousDatabaseCharacterSetsOperations
@@ -65,37 +99,21 @@ class OracleDatabaseMgmtClient: # pylint: disable=client-accepts-api-version-ke
6599 :ivar autonomous_database_versions: AutonomousDatabaseVersionsOperations operations
66100 :vartype autonomous_database_versions:
67101 azure.mgmt.oracledatabase.operations.AutonomousDatabaseVersionsOperations
68- :ivar db_system_shapes: DbSystemShapesOperations operations
69- :vartype db_system_shapes: azure.mgmt.oracledatabase.operations.DbSystemShapesOperations
70- :ivar dns_private_views: DnsPrivateViewsOperations operations
71- :vartype dns_private_views: azure.mgmt.oracledatabase.operations.DnsPrivateViewsOperations
72- :ivar dns_private_zones: DnsPrivateZonesOperations operations
73- :vartype dns_private_zones: azure.mgmt.oracledatabase.operations.DnsPrivateZonesOperations
74- :ivar gi_versions: GiVersionsOperations operations
75- :vartype gi_versions: azure.mgmt.oracledatabase.operations.GiVersionsOperations
76- :ivar system_versions: SystemVersionsOperations operations
77- :vartype system_versions: azure.mgmt.oracledatabase.operations.SystemVersionsOperations
78- :ivar oracle_subscriptions: OracleSubscriptionsOperations operations
79- :vartype oracle_subscriptions:
80- azure.mgmt.oracledatabase.operations.OracleSubscriptionsOperations
81- :ivar autonomous_database_backups: AutonomousDatabaseBackupsOperations operations
82- :vartype autonomous_database_backups:
83- azure.mgmt.oracledatabase.operations.AutonomousDatabaseBackupsOperations
84- :ivar db_servers: DbServersOperations operations
85- :vartype db_servers: azure.mgmt.oracledatabase.operations.DbServersOperations
86- :ivar db_nodes: DbNodesOperations operations
87- :vartype db_nodes: azure.mgmt.oracledatabase.operations.DbNodesOperations
88- :ivar virtual_network_addresses: VirtualNetworkAddressesOperations operations
89- :vartype virtual_network_addresses:
90- azure.mgmt.oracledatabase.operations.VirtualNetworkAddressesOperations
91- :param credential: Credential needed for the client to connect to Azure. Required.
102+ :ivar exadb_vm_clusters: ExadbVmClustersOperations operations
103+ :vartype exadb_vm_clusters: azure.mgmt.oracledatabase.operations.ExadbVmClustersOperations
104+ :ivar exascale_db_nodes: ExascaleDbNodesOperations operations
105+ :vartype exascale_db_nodes: azure.mgmt.oracledatabase.operations.ExascaleDbNodesOperations
106+ :ivar exascale_db_storage_vaults: ExascaleDbStorageVaultsOperations operations
107+ :vartype exascale_db_storage_vaults:
108+ azure.mgmt.oracledatabase.operations.ExascaleDbStorageVaultsOperations
109+ :param credential: Credential used to authenticate requests to the service. Required.
92110 :type credential: ~azure.core.credentials.TokenCredential
93111 :param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
94112 :type subscription_id: str
95- :param base_url: Service URL . Default value is "https://management.azure.com".
113+ :param base_url: Service host . Default value is "https://management.azure.com".
96114 :type base_url: str
97- :keyword api_version: Api Version . Default value is "2023-09 -01". Note that overriding this
98- default value may result in unsupported behavior.
115+ :keyword api_version: The API version to use for this operation . Default value is "2025-03 -01".
116+ Note that overriding this default value may result in unsupported behavior.
99117 :paramtype api_version: str
100118 :keyword int polling_interval: Default waiting time between two polls for LRO operations if no
101119 Retry-After header is present.
@@ -108,8 +126,9 @@ def __init__(
108126 base_url : str = "https://management.azure.com" ,
109127 ** kwargs : Any
110128 ) -> None :
129+ _endpoint = "{endpoint}"
111130 self ._config = OracleDatabaseMgmtClientConfiguration (
112- credential = credential , subscription_id = subscription_id , ** kwargs
131+ credential = credential , subscription_id = subscription_id , base_url = base_url , ** kwargs
113132 )
114133 _policies = kwargs .pop ("policies" , None )
115134 if _policies is None :
@@ -129,29 +148,30 @@ def __init__(
129148 policies .SensitiveHeaderCleanupPolicy (** kwargs ) if self ._config .redirect_policy else None ,
130149 self ._config .http_logging_policy ,
131150 ]
132- self ._client : ARMPipelineClient = ARMPipelineClient (base_url = base_url , policies = _policies , ** kwargs )
151+ self ._client : ARMPipelineClient = ARMPipelineClient (base_url = _endpoint , policies = _policies , ** kwargs )
133152
134- client_models = {k : v for k , v in _models .__dict__ .items () if isinstance (v , type )}
135- self ._serialize = Serializer (client_models )
136- self ._deserialize = Deserializer (client_models )
153+ self ._serialize = Serializer ()
154+ self ._deserialize = Deserializer ()
137155 self ._serialize .client_side_validation = False
138156 self .operations = Operations (self ._client , self ._config , self ._serialize , self ._deserialize )
139- self .autonomous_databases = AutonomousDatabasesOperations (
140- self ._client , self ._config , self ._serialize , self ._deserialize
141- )
142157 self .cloud_exadata_infrastructures = CloudExadataInfrastructuresOperations (
143158 self ._client , self ._config , self ._serialize , self ._deserialize
144159 )
160+ self .list_actions = ListActionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
161+ self .db_servers = DbServersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
145162 self .cloud_vm_clusters = CloudVmClustersOperations (
146163 self ._client , self ._config , self ._serialize , self ._deserialize
147164 )
148- self .autonomous_database_character_sets = AutonomousDatabaseCharacterSetsOperations (
165+ self .virtual_network_addresses = VirtualNetworkAddressesOperations (
149166 self ._client , self ._config , self ._serialize , self ._deserialize
150167 )
151- self .autonomous_database_national_character_sets = AutonomousDatabaseNationalCharacterSetsOperations (
168+ self .system_versions = SystemVersionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
169+ self .oracle_subscriptions = OracleSubscriptionsOperations (
152170 self ._client , self ._config , self ._serialize , self ._deserialize
153171 )
154- self .autonomous_database_versions = AutonomousDatabaseVersionsOperations (
172+ self .db_nodes = DbNodesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
173+ self .gi_versions = GiVersionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
174+ self .gi_minor_versions = GiMinorVersionsOperations (
155175 self ._client , self ._config , self ._serialize , self ._deserialize
156176 )
157177 self .db_system_shapes = DbSystemShapesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
@@ -161,27 +181,39 @@ def __init__(
161181 self .dns_private_zones = DnsPrivateZonesOperations (
162182 self ._client , self ._config , self ._serialize , self ._deserialize
163183 )
164- self .gi_versions = GiVersionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
165- self .system_versions = SystemVersionsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
166- self .oracle_subscriptions = OracleSubscriptionsOperations (
184+ self .flex_components = FlexComponentsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
185+ self .autonomous_databases = AutonomousDatabasesOperations (
167186 self ._client , self ._config , self ._serialize , self ._deserialize
168187 )
169188 self .autonomous_database_backups = AutonomousDatabaseBackupsOperations (
170189 self ._client , self ._config , self ._serialize , self ._deserialize
171190 )
172- self .db_servers = DbServersOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
173- self .db_nodes = DbNodesOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
174- self .virtual_network_addresses = VirtualNetworkAddressesOperations (
191+ self .autonomous_database_character_sets = AutonomousDatabaseCharacterSetsOperations (
192+ self ._client , self ._config , self ._serialize , self ._deserialize
193+ )
194+ self .autonomous_database_national_character_sets = AutonomousDatabaseNationalCharacterSetsOperations (
195+ self ._client , self ._config , self ._serialize , self ._deserialize
196+ )
197+ self .autonomous_database_versions = AutonomousDatabaseVersionsOperations (
198+ self ._client , self ._config , self ._serialize , self ._deserialize
199+ )
200+ self .exadb_vm_clusters = ExadbVmClustersOperations (
201+ self ._client , self ._config , self ._serialize , self ._deserialize
202+ )
203+ self .exascale_db_nodes = ExascaleDbNodesOperations (
204+ self ._client , self ._config , self ._serialize , self ._deserialize
205+ )
206+ self .exascale_db_storage_vaults = ExascaleDbStorageVaultsOperations (
175207 self ._client , self ._config , self ._serialize , self ._deserialize
176208 )
177209
178- def _send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
210+ def send_request (self , request : HttpRequest , * , stream : bool = False , ** kwargs : Any ) -> HttpResponse :
179211 """Runs the network request through the client's chained policies.
180212
181213 >>> from azure.core.rest import HttpRequest
182214 >>> request = HttpRequest("GET", "https://www.example.org/")
183215 <HttpRequest [GET], url: 'https://www.example.org/'>
184- >>> response = client._send_request (request)
216+ >>> response = client.send_request (request)
185217 <HttpResponse: 200 OK>
186218
187219 For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -194,13 +226,17 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
194226 """
195227
196228 request_copy = deepcopy (request )
197- request_copy .url = self ._client .format_url (request_copy .url )
229+ path_format_arguments = {
230+ "endpoint" : self ._serialize .url ("self._config.base_url" , self ._config .base_url , "str" , skip_quote = True ),
231+ }
232+
233+ request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
198234 return self ._client .send_request (request_copy , stream = stream , ** kwargs ) # type: ignore
199235
200236 def close (self ) -> None :
201237 self ._client .close ()
202238
203- def __enter__ (self ) -> "OracleDatabaseMgmtClient" :
239+ def __enter__ (self ) -> Self :
204240 self ._client .__enter__ ()
205241 return self
206242
0 commit comments