Skip to content

Commit

Permalink
Generated from de66598d5b247c2309c05d25f06af83dd2d306b1
Browse files Browse the repository at this point in the history
Merge pull request #3 from FBettati/availableClusterCollection

Modify availableClusters API to have a valid ARM collection response
  • Loading branch information
AutorestCI committed Apr 22, 2019
1 parent 8ad93d5 commit ed150ae
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from .operation_py3 import Operation
from .cluster_sku_py3 import ClusterSku
from .cluster_py3 import Cluster
from .available_clusters_list_py3 import AvailableClustersList
from .cluster_quota_configuration_properties_py3 import ClusterQuotaConfigurationProperties
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .tracked_resource_py3 import TrackedResource
Expand All @@ -32,6 +33,7 @@
from .operation import Operation
from .cluster_sku import ClusterSku
from .cluster import Cluster
from .available_clusters_list import AvailableClustersList
from .cluster_quota_configuration_properties import ClusterQuotaConfigurationProperties
from .error_response import ErrorResponse, ErrorResponseException
from .tracked_resource import TrackedResource
Expand Down Expand Up @@ -63,6 +65,7 @@
'Operation',
'ClusterSku',
'Cluster',
'AvailableClustersList',
'ClusterQuotaConfigurationProperties',
'ErrorResponse', 'ErrorResponseException',
'TrackedResource',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AvailableClustersList(Model):
"""The response of the List Available Clusters operation.
:param value: The count of readily available and pre-provisioned Event
Hubs Clusters per region.
:type value: list[dict[str, int]]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[{int}]'},
}

def __init__(self, **kwargs):
super(AvailableClustersList, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AvailableClustersList(Model):
"""The response of the List Available Clusters operation.
:param value: The count of readily available and pre-provisioned Event
Hubs Clusters per region.
:type value: list[dict[str, int]]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[{int}]'},
}

def __init__(self, *, value=None, **kwargs) -> None:
super(AvailableClustersList, self).__init__(**kwargs)
self.value = value
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ def list_available_clusters(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: dict or ClientRawResponse if raw=true
:rtype: dict[str, int] or ~msrest.pipeline.ClientRawResponse
:return: AvailableClustersList or ClientRawResponse if raw=true
:rtype:
~azure.mgmt.eventhub.v2018_01_01_preview.models.AvailableClustersList
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorResponseException<azure.mgmt.eventhub.v2018_01_01_preview.models.ErrorResponseException>`
"""
Expand Down Expand Up @@ -80,7 +82,7 @@ def list_available_clusters(
deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('{int}', response)
deserialized = self._deserialize('AvailableClustersList', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
Expand Down

0 comments on commit ed150ae

Please sign in to comment.