Skip to content

Commit

Permalink
CodeGen from PR 21685 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge a979dedbe5147846b325ce3914d561c5b5ebb94f into 95903ca4fc97a30c3ac4d535744b0087ebcd8a50
  • Loading branch information
SDKAuto committed Nov 29, 2022
1 parent ed6eaa7 commit f1b78ee
Show file tree
Hide file tree
Showing 258 changed files with 59,804 additions and 36,982 deletions.
12 changes: 6 additions & 6 deletions sdk/eventhub/azure-mgmt-eventhub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.7.2",
"commit": "72779a750cd3bb7b2e8f2467cb745e6e5441ddc1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@5.13.0",
"@autorest/modelerfour@4.19.3"
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
],
"commit": "f1cf4b44dc3abfcf9d9a514e2e6faa3ae8d11b4c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/eventhub/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"autorest_command": "autorest specification/eventhub/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",
"readme": "specification/eventhub/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 EventHubManagementClientConfiguration(Configuration):
Expand All @@ -28,19 +26,18 @@ class EventHubManagementClientConfiguration(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 that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
:param subscription_id: Subscription credentials that uniquely identify a 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 EventHubManagementClientConfiguration
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 EventHubManagementClient(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 that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
:param subscription_id: Subscription credentials that uniquely identify a 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 @@ -68,12 +65,12 @@ class EventHubManagementClient(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 = EventHubManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
Expand Down Expand Up @@ -132,6 +129,7 @@ def application_group(self):
from .v2022_01_01_preview.operations import ApplicationGroupOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'application_group'".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 @@ -154,6 +152,7 @@ def clusters(self):
from .v2022_01_01_preview.operations import ClustersOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'clusters'".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 @@ -176,6 +175,7 @@ def configuration(self):
from .v2022_01_01_preview.operations import ConfigurationOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'configuration'".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 @@ -207,6 +207,7 @@ def consumer_groups(self):
from .v2022_01_01_preview.operations import ConsumerGroupsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'consumer_groups'".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 @@ -235,6 +236,7 @@ def disaster_recovery_configs(self):
from .v2022_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'disaster_recovery_configs'".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 @@ -266,6 +268,7 @@ def event_hubs(self):
from .v2022_01_01_preview.operations import EventHubsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'event_hubs'".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 @@ -297,6 +300,7 @@ def namespaces(self):
from .v2022_01_01_preview.operations import NamespacesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'namespaces'".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 @@ -310,6 +314,7 @@ def network_security_perimeter_configuration(self):
from .v2022_01_01_preview.operations import NetworkSecurityPerimeterConfigurationOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'network_security_perimeter_configuration'".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 @@ -323,6 +328,7 @@ def network_security_perimeter_configurations(self):
from .v2022_01_01_preview.operations import NetworkSecurityPerimeterConfigurationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'network_security_perimeter_configurations'".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 @@ -354,6 +360,7 @@ def operations(self):
from .v2022_01_01_preview.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 All @@ -379,6 +386,7 @@ def private_endpoint_connections(self):
from .v2022_01_01_preview.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 All @@ -404,6 +412,7 @@ def private_link_resources(self):
from .v2022_01_01_preview.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 @@ -420,6 +429,7 @@ def regions(self):
from .v2018_01_01_preview.operations import RegionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'regions'".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 @@ -436,6 +446,7 @@ def schema_registry(self):
from .v2022_01_01_preview.operations import SchemaRegistryOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'schema_registry'".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 f1b78ee

Please sign in to comment.