From ed150ae08dbb945dade4e5745814b528cc8de10d Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 22 Apr 2019 21:27:30 +0000 Subject: [PATCH] Generated from de66598d5b247c2309c05d25f06af83dd2d306b1 Merge pull request #3 from FBettati/availableClusterCollection Modify availableClusters API to have a valid ARM collection response --- .../v2018_01_01_preview/models/__init__.py | 3 ++ .../models/available_clusters_list.py | 29 +++++++++++++++++++ .../models/available_clusters_list_py3.py | 29 +++++++++++++++++++ .../operations/clusters_operations.py | 8 +++-- 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list.py create mode 100644 azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list_py3.py diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py index 60e86253e128..acacaf9a3281 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/__init__.py @@ -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 @@ -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 @@ -63,6 +65,7 @@ 'Operation', 'ClusterSku', 'Cluster', + 'AvailableClustersList', 'ClusterQuotaConfigurationProperties', 'ErrorResponse', 'ErrorResponseException', 'TrackedResource', diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list.py new file mode 100644 index 000000000000..b3abbf8f4469 --- /dev/null +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list.py @@ -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) diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list_py3.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list_py3.py new file mode 100644 index 000000000000..4df27efffa53 --- /dev/null +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/available_clusters_list_py3.py @@ -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 diff --git a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/clusters_operations.py b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/clusters_operations.py index d7f719a72a6c..24d25b0ec3eb 100644 --- a/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/clusters_operations.py +++ b/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/operations/clusters_operations.py @@ -48,8 +48,10 @@ def list_available_clusters( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :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` """ @@ -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)