Skip to content

Commit ed150ae

Browse files
committed
Generated from de66598d5b247c2309c05d25f06af83dd2d306b1
Merge pull request #3 from FBettati/availableClusterCollection Modify availableClusters API to have a valid ARM collection response
1 parent 8ad93d5 commit ed150ae

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from .operation_py3 import Operation
1515
from .cluster_sku_py3 import ClusterSku
1616
from .cluster_py3 import Cluster
17+
from .available_clusters_list_py3 import AvailableClustersList
1718
from .cluster_quota_configuration_properties_py3 import ClusterQuotaConfigurationProperties
1819
from .error_response_py3 import ErrorResponse, ErrorResponseException
1920
from .tracked_resource_py3 import TrackedResource
@@ -32,6 +33,7 @@
3233
from .operation import Operation
3334
from .cluster_sku import ClusterSku
3435
from .cluster import Cluster
36+
from .available_clusters_list import AvailableClustersList
3537
from .cluster_quota_configuration_properties import ClusterQuotaConfigurationProperties
3638
from .error_response import ErrorResponse, ErrorResponseException
3739
from .tracked_resource import TrackedResource
@@ -63,6 +65,7 @@
6365
'Operation',
6466
'ClusterSku',
6567
'Cluster',
68+
'AvailableClustersList',
6669
'ClusterQuotaConfigurationProperties',
6770
'ErrorResponse', 'ErrorResponseException',
6871
'TrackedResource',
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AvailableClustersList(Model):
16+
"""The response of the List Available Clusters operation.
17+
18+
:param value: The count of readily available and pre-provisioned Event
19+
Hubs Clusters per region.
20+
:type value: list[dict[str, int]]
21+
"""
22+
23+
_attribute_map = {
24+
'value': {'key': 'value', 'type': '[{int}]'},
25+
}
26+
27+
def __init__(self, **kwargs):
28+
super(AvailableClustersList, self).__init__(**kwargs)
29+
self.value = kwargs.get('value', None)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
from msrest.serialization import Model
13+
14+
15+
class AvailableClustersList(Model):
16+
"""The response of the List Available Clusters operation.
17+
18+
:param value: The count of readily available and pre-provisioned Event
19+
Hubs Clusters per region.
20+
:type value: list[dict[str, int]]
21+
"""
22+
23+
_attribute_map = {
24+
'value': {'key': 'value', 'type': '[{int}]'},
25+
}
26+
27+
def __init__(self, *, value=None, **kwargs) -> None:
28+
super(AvailableClustersList, self).__init__(**kwargs)
29+
self.value = value

azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/clusters_operations.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ def list_available_clusters(
4848
deserialized response
4949
:param operation_config: :ref:`Operation configuration
5050
overrides<msrest:optionsforoperations>`.
51-
:return: dict or ClientRawResponse if raw=true
52-
:rtype: dict[str, int] or ~msrest.pipeline.ClientRawResponse
51+
:return: AvailableClustersList or ClientRawResponse if raw=true
52+
:rtype:
53+
~azure.mgmt.eventhub.v2018_01_01_preview.models.AvailableClustersList
54+
or ~msrest.pipeline.ClientRawResponse
5355
:raises:
5456
:class:`ErrorResponseException<azure.mgmt.eventhub.v2018_01_01_preview.models.ErrorResponseException>`
5557
"""
@@ -80,7 +82,7 @@ def list_available_clusters(
8082
deserialized = None
8183

8284
if response.status_code == 200:
83-
deserialized = self._deserialize('{int}', response)
85+
deserialized = self._deserialize('AvailableClustersList', response)
8486

8587
if raw:
8688
client_raw_response = ClientRawResponse(deserialized, response)

0 commit comments

Comments
 (0)