Skip to content

Commit

Permalink
CodeGen from PR 13862 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Update all schemas.md files (Azure#13862)
  • Loading branch information
SDKAuto committed Apr 9, 2021
1 parent 977bfe9 commit 941297b
Show file tree
Hide file tree
Showing 27 changed files with 6,584 additions and 79 deletions.
1 change: 1 addition & 0 deletions sdk/eventhub/azure-mgmt-eventhub/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/eventhub/azure-mgmt-eventhub/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "e9605b17939f7f9a74c78bcee61a6f0bb37a55e8",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/eventhub/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/eventhub/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2015-08-01: :mod:`v2015_08_01.models<azure.mgmt.eventhub.v2015_08_01.models>`
* 2017-04-01: :mod:`v2017_04_01.models<azure.mgmt.eventhub.v2017_04_01.models>`
* 2018-01-01-preview: :mod:`v2018_01_01_preview.models<azure.mgmt.eventhub.v2018_01_01_preview.models>`
* 2021-01-01-preview: :mod:`v2021_01_01_preview.models<azure.mgmt.eventhub.v2021_01_01_preview.models>`
"""
if api_version == '2015-08-01':
from .v2015_08_01 import models
Expand All @@ -85,6 +86,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview import models
return models
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -120,6 +124,7 @@ def consumer_groups(self):
* 2015-08-01: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2015_08_01.operations.ConsumerGroupsOperations>`
* 2017-04-01: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2017_04_01.operations.ConsumerGroupsOperations>`
* 2018-01-01-preview: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.ConsumerGroupsOperations>`
* 2021-01-01-preview: :class:`ConsumerGroupsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.ConsumerGroupsOperations>`
"""
api_version = self._get_api_version('consumer_groups')
if api_version == '2015-08-01':
Expand All @@ -128,6 +133,8 @@ def consumer_groups(self):
from .v2017_04_01.operations import ConsumerGroupsOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import ConsumerGroupsOperations as OperationClass
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview.operations import ConsumerGroupsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -138,12 +145,15 @@ def disaster_recovery_configs(self):
* 2017-04-01: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2017_04_01.operations.DisasterRecoveryConfigsOperations>`
* 2018-01-01-preview: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.DisasterRecoveryConfigsOperations>`
* 2021-01-01-preview: :class:`DisasterRecoveryConfigsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.DisasterRecoveryConfigsOperations>`
"""
api_version = self._get_api_version('disaster_recovery_configs')
if api_version == '2017-04-01':
from .v2017_04_01.operations import DisasterRecoveryConfigsOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -155,6 +165,7 @@ def event_hubs(self):
* 2015-08-01: :class:`EventHubsOperations<azure.mgmt.eventhub.v2015_08_01.operations.EventHubsOperations>`
* 2017-04-01: :class:`EventHubsOperations<azure.mgmt.eventhub.v2017_04_01.operations.EventHubsOperations>`
* 2018-01-01-preview: :class:`EventHubsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.EventHubsOperations>`
* 2021-01-01-preview: :class:`EventHubsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.EventHubsOperations>`
"""
api_version = self._get_api_version('event_hubs')
if api_version == '2015-08-01':
Expand All @@ -163,6 +174,8 @@ def event_hubs(self):
from .v2017_04_01.operations import EventHubsOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import EventHubsOperations as OperationClass
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview.operations import EventHubsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -174,6 +187,7 @@ def namespaces(self):
* 2015-08-01: :class:`NamespacesOperations<azure.mgmt.eventhub.v2015_08_01.operations.NamespacesOperations>`
* 2017-04-01: :class:`NamespacesOperations<azure.mgmt.eventhub.v2017_04_01.operations.NamespacesOperations>`
* 2018-01-01-preview: :class:`NamespacesOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.NamespacesOperations>`
* 2021-01-01-preview: :class:`NamespacesOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.NamespacesOperations>`
"""
api_version = self._get_api_version('namespaces')
if api_version == '2015-08-01':
Expand All @@ -182,6 +196,8 @@ def namespaces(self):
from .v2017_04_01.operations import NamespacesOperations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import NamespacesOperations as OperationClass
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview.operations import NamespacesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -193,6 +209,7 @@ def operations(self):
* 2015-08-01: :class:`Operations<azure.mgmt.eventhub.v2015_08_01.operations.Operations>`
* 2017-04-01: :class:`Operations<azure.mgmt.eventhub.v2017_04_01.operations.Operations>`
* 2018-01-01-preview: :class:`Operations<azure.mgmt.eventhub.v2018_01_01_preview.operations.Operations>`
* 2021-01-01-preview: :class:`Operations<azure.mgmt.eventhub.v2021_01_01_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2015-08-01':
Expand All @@ -201,6 +218,8 @@ def operations(self):
from .v2017_04_01.operations import Operations as OperationClass
elif api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import Operations as OperationClass
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -210,10 +229,13 @@ def private_endpoint_connections(self):
"""Instance depends on the API version:
* 2018-01-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-01-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -223,10 +245,13 @@ def private_link_resources(self):
"""Instance depends on the API version:
* 2018-01-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2018_01_01_preview.operations.PrivateLinkResourcesOperations>`
* 2021-01-01-preview: :class:`PrivateLinkResourcesOperations<azure.mgmt.eventhub.v2021_01_01_preview.operations.PrivateLinkResourcesOperations>`
"""
api_version = self._get_api_version('private_link_resources')
if api_version == '2018-01-01-preview':
from .v2018_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
elif api_version == '2021-01-01-preview':
from .v2021_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def __init__(
super(EventHubManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-01-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ConsumerGroupsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API Version. Constant value: "2017-04-01".
:ivar api_version: Client API Version. Constant value: "2018-01-01-preview".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2017-04-01"
self.api_version = "2018-01-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DisasterRecoveryConfigsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API Version. Constant value: "2017-04-01".
:ivar api_version: Client API Version. Constant value: "2018-01-01-preview".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2017-04-01"
self.api_version = "2018-01-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EventHubsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Client API Version. Constant value: "2017-04-01".
:ivar api_version: Client API Version. Constant value: "2018-01-01-preview".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2017-04-01"
self.api_version = "2018-01-01-preview"

self.config = config

Expand Down

0 comments on commit 941297b

Please sign in to comment.