Skip to content

Commit bd743e9

Browse files
author
SDKAuto
committed
CodeGen from PR 21671 in Azure/azure-rest-api-specs
Merge 42e9e42c7e6f14609e31f348e88dda4b93258f06 into 8bbdaa16bf2523c166b7933439e63ed945596a8b
1 parent f786343 commit bd743e9

File tree

263 files changed

+40629
-29805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+40629
-29805
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.7.2",
2+
"commit": "a549217abaca46db0e8c4240ba4447f59a98917f",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.9.2",
35
"use": [
4-
"@autorest/python@5.16.0",
5-
"@autorest/modelerfour@4.19.3"
6+
"@autorest/python@6.2.7",
7+
"@autorest/modelerfour@4.24.3"
68
],
7-
"commit": "1b3b9c1dd4d2c875997ea0b392dc71418fb1f28d",
8-
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/keyvault/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/keyvault/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/keyvault/resource-manager/readme.md"
1111
}

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
patch_sdk()
1515
except ImportError:
1616
pass
17+
18+
from ._version import VERSION
19+
20+
__version__ = VERSION

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import TYPE_CHECKING
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
@@ -18,8 +18,6 @@
1818

1919
if TYPE_CHECKING:
2020
# pylint: disable=unused-import,ungrouped-imports
21-
from typing import Any
22-
2321
from azure.core.credentials import TokenCredential
2422

2523
class KeyVaultManagementClientConfiguration(Configuration):
@@ -28,19 +26,18 @@ class KeyVaultManagementClientConfiguration(Configuration):
2826
Note that all parameters used to create this instance are saved as instance
2927
attributes.
3028
31-
:param credential: Credential needed for the client to connect to Azure.
29+
:param credential: Credential needed for the client to connect to Azure. Required.
3230
:type credential: ~azure.core.credentials.TokenCredential
33-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
31+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.
3432
:type subscription_id: str
3533
"""
3634

3735
def __init__(
3836
self,
39-
credential, # type: "TokenCredential"
40-
subscription_id, # type: str
41-
**kwargs # type: Any
37+
credential: "TokenCredential",
38+
subscription_id: str,
39+
**kwargs: Any
4240
):
43-
# type: (...) -> None
4441
if credential is None:
4542
raise ValueError("Parameter 'credential' must not be None.")
4643
if subscription_id is None:
@@ -55,9 +52,8 @@ def __init__(
5552

5653
def _configure(
5754
self,
58-
**kwargs # type: Any
55+
**kwargs: Any
5956
):
60-
# type: (...) -> None
6157
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
6258
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
6359
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)

sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from typing import TYPE_CHECKING
13-
14-
from msrest import Deserializer, Serializer
12+
from typing import Any, Optional, TYPE_CHECKING
1513

1614
from azure.mgmt.core import ARMPipelineClient
1715
from azure.profiles import KnownProfiles, ProfileDefinition
1816
from azure.profiles.multiapiclient import MultiApiClientMixin
1917

2018
from ._configuration import KeyVaultManagementClientConfiguration
19+
from ._serialization import Deserializer, Serializer
2120

2221
if TYPE_CHECKING:
2322
# pylint: disable=unused-import,ungrouped-imports
24-
from typing import Any, Optional
25-
2623
from azure.core.credentials import TokenCredential
2724

2825
class _SDKClient(object):
@@ -43,9 +40,9 @@ class KeyVaultManagementClient(MultiApiClientMixin, _SDKClient):
4340
The api-version parameter sets the default API version if the operation
4441
group is not described in the profile.
4542
46-
:param credential: Credential needed for the client to connect to Azure.
43+
:param credential: Credential needed for the client to connect to Azure. Required.
4744
:type credential: ~azure.core.credentials.TokenCredential
48-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
45+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.
4946
:type subscription_id: str
5047
:param api_version: API version to use if no profile is provided, or if missing in profile.
5148
:type api_version: str
@@ -67,12 +64,12 @@ class KeyVaultManagementClient(MultiApiClientMixin, _SDKClient):
6764

6865
def __init__(
6966
self,
70-
credential, # type: "TokenCredential"
71-
subscription_id, # type: str
72-
api_version=None, # type: Optional[str]
73-
base_url="https://management.azure.com", # type: str
74-
profile=KnownProfiles.default, # type: KnownProfiles
75-
**kwargs # type: Any
67+
credential: "TokenCredential",
68+
subscription_id: str,
69+
api_version: Optional[str]=None,
70+
base_url: str = "https://management.azure.com",
71+
profile: KnownProfiles=KnownProfiles.default,
72+
**kwargs: Any
7673
):
7774
self._config = KeyVaultManagementClientConfiguration(credential, subscription_id, **kwargs)
7875
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
@@ -147,6 +144,7 @@ def keys(self):
147144
from .v2022_07_01.operations import KeysOperations as OperationClass
148145
else:
149146
raise ValueError("API version {} does not have operation group 'keys'".format(api_version))
147+
self._config.api_version = api_version
150148
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
151149

152150
@property
@@ -172,6 +170,7 @@ def managed_hsms(self):
172170
from .v2022_07_01.operations import ManagedHsmsOperations as OperationClass
173171
else:
174172
raise ValueError("API version {} does not have operation group 'managed_hsms'".format(api_version))
173+
self._config.api_version = api_version
175174
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
176175

177176
@property
@@ -194,6 +193,7 @@ def mhsm_private_endpoint_connections(self):
194193
from .v2022_07_01.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass
195194
else:
196195
raise ValueError("API version {} does not have operation group 'mhsm_private_endpoint_connections'".format(api_version))
196+
self._config.api_version = api_version
197197
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
198198

199199
@property
@@ -216,6 +216,7 @@ def mhsm_private_link_resources(self):
216216
from .v2022_07_01.operations import MHSMPrivateLinkResourcesOperations as OperationClass
217217
else:
218218
raise ValueError("API version {} does not have operation group 'mhsm_private_link_resources'".format(api_version))
219+
self._config.api_version = api_version
219220
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
220221

221222
@property
@@ -250,6 +251,7 @@ def operations(self):
250251
from .v2022_07_01.operations import Operations as OperationClass
251252
else:
252253
raise ValueError("API version {} does not have operation group 'operations'".format(api_version))
254+
self._config.api_version = api_version
253255
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
254256

255257
@property
@@ -281,6 +283,7 @@ def private_endpoint_connections(self):
281283
from .v2022_07_01.operations import PrivateEndpointConnectionsOperations as OperationClass
282284
else:
283285
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
286+
self._config.api_version = api_version
284287
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
285288

286289
@property
@@ -312,6 +315,7 @@ def private_link_resources(self):
312315
from .v2022_07_01.operations import PrivateLinkResourcesOperations as OperationClass
313316
else:
314317
raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version))
318+
self._config.api_version = api_version
315319
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
316320

317321
@property
@@ -334,6 +338,7 @@ def secrets(self):
334338
from .v2022_07_01.operations import SecretsOperations as OperationClass
335339
else:
336340
raise ValueError("API version {} does not have operation group 'secrets'".format(api_version))
341+
self._config.api_version = api_version
337342
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
338343

339344
@property
@@ -368,6 +373,7 @@ def vaults(self):
368373
from .v2022_07_01.operations import VaultsOperations as OperationClass
369374
else:
370375
raise ValueError("API version {} does not have operation group 'vaults'".format(api_version))
376+
self._config.api_version = api_version
371377
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
372378

373379
def close(self):

0 commit comments

Comments
 (0)