Skip to content

Commit

Permalink
CodeGen from PR 20839 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 4b0f04d08b3661e5014c6665656f756d24ae8b53 into 8021313f4e40586531a026e4554a0777c15fb94d
  • Loading branch information
SDKAuto committed Feb 3, 2023
1 parent 791643c commit 7e05835
Show file tree
Hide file tree
Showing 263 changed files with 41,425 additions and 30,293 deletions.
12 changes: 6 additions & 6 deletions sdk/keyvault/azure-mgmt-keyvault/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"commit": "784d47cdd6144c00d30ac1babc33a0537f06180f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@5.16.0",
"@autorest/modelerfour@4.19.3"
"@autorest/python@6.2.16",
"@autorest/modelerfour@4.24.3"
],
"commit": "1b3b9c1dd4d2c875997ea0b392dc71418fb1f28d",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/[email protected] --use=@autorest/[email protected] --version=3.7.2",
"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/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
"readme": "specification/keyvault/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
patch_sdk()
except ImportError:
pass

from ._version import VERSION

__version__ = VERSION
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from typing import TYPE_CHECKING
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
Expand All @@ -18,8 +18,6 @@

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

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

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
**kwargs # type: Any
credential: "TokenCredential",
subscription_id: str,
**kwargs: Any
):
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
Expand All @@ -55,9 +52,8 @@ def __init__(

def _configure(
self,
**kwargs # type: Any
**kwargs: Any
):
# type: (...) -> None
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,17 @@
# regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from msrest import Deserializer, Serializer
from typing import Any, Optional, TYPE_CHECKING

from azure.mgmt.core import ARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

from ._configuration import KeyVaultManagementClientConfiguration
from ._serialization import Deserializer, Serializer

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any, Optional

from azure.core.credentials import TokenCredential

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

def __init__(
self,
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
credential: "TokenCredential",
subscription_id: str,
api_version: Optional[str]=None,
base_url: str = "https://management.azure.com",
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
self._config = KeyVaultManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
Expand Down Expand Up @@ -147,6 +144,7 @@ def keys(self):
from .v2022_07_01.operations import KeysOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'keys'".format(api_version))
self._config.api_version = api_version
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

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

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

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

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

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

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

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

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

def close(self):
Expand Down
Loading

0 comments on commit 7e05835

Please sign in to comment.