From e58fc8f8ac62df4c724803f05355dc00a4149e28 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 22 Mar 2019 18:02:06 +0000 Subject: [PATCH 1/2] Generated from f8b65aefd7ae9e6a9ac9daf2b564d9980d668f5e Updated examples with real values --- .../adhybridhealthservice/models/__init__.py | 6 ++ .../models/connector_metadata.py | 33 ++++++++++ .../models/connector_metadata_details.py | 32 ++++++++++ .../models/connector_metadata_details_py3.py | 32 ++++++++++ .../models/connector_metadata_py3.py | 33 ++++++++++ .../operations/service_members_operations.py | 64 +++++++++++++++++++ 6 files changed, 200 insertions(+) create mode 100644 azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata.py create mode 100644 azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details.py create mode 100644 azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details_py3.py create mode 100644 azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_py3.py diff --git a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py index b3b472de9ce0..879bf9ddb6c8 100644 --- a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py +++ b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/__init__.py @@ -33,6 +33,8 @@ from .connector_py3 import Connector from .connector_connection_error_py3 import ConnectorConnectionError from .connector_connection_errors_py3 import ConnectorConnectionErrors + from .connector_metadata_details_py3 import ConnectorMetadataDetails + from .connector_metadata_py3 import ConnectorMetadata from .connector_object_error_py3 import ConnectorObjectError from .connector_object_errors_py3 import ConnectorObjectErrors from .credential_py3 import Credential @@ -100,6 +102,8 @@ from .connector import Connector from .connector_connection_error import ConnectorConnectionError from .connector_connection_errors import ConnectorConnectionErrors + from .connector_metadata_details import ConnectorMetadataDetails + from .connector_metadata import ConnectorMetadata from .connector_object_error import ConnectorObjectError from .connector_object_errors import ConnectorObjectErrors from .credential import Credential @@ -199,6 +203,8 @@ 'Connector', 'ConnectorConnectionError', 'ConnectorConnectionErrors', + 'ConnectorMetadataDetails', + 'ConnectorMetadata', 'ConnectorObjectError', 'ConnectorObjectErrors', 'Credential', diff --git a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata.py b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata.py new file mode 100644 index 000000000000..c31d8c9bbf98 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata.py @@ -0,0 +1,33 @@ +# 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 ConnectorMetadata(Model): + """Gets the list of connectors and run profile names. + + :param connectors: The list of connectors. + :type connectors: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorMetadataDetails] + :param run_profile_names: The list of run profile names. + :type run_profile_names: list[str] + """ + + _attribute_map = { + 'connectors': {'key': 'connectors', 'type': '[ConnectorMetadataDetails]'}, + 'run_profile_names': {'key': 'runProfileNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ConnectorMetadata, self).__init__(**kwargs) + self.connectors = kwargs.get('connectors', None) + self.run_profile_names = kwargs.get('run_profile_names', None) diff --git a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details.py b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details.py new file mode 100644 index 000000000000..d6b86fb96870 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details.py @@ -0,0 +1,32 @@ +# 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 ConnectorMetadataDetails(Model): + """Details of the connector. + + :param connector_id: The Connector Id. + :type connector_id: str + :param connector_display_name: The Connector Display Name + :type connector_display_name: str + """ + + _attribute_map = { + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'connector_display_name': {'key': 'connectorDisplayName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ConnectorMetadataDetails, self).__init__(**kwargs) + self.connector_id = kwargs.get('connector_id', None) + self.connector_display_name = kwargs.get('connector_display_name', None) diff --git a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details_py3.py b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details_py3.py new file mode 100644 index 000000000000..79fbf7c56f95 --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_details_py3.py @@ -0,0 +1,32 @@ +# 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 ConnectorMetadataDetails(Model): + """Details of the connector. + + :param connector_id: The Connector Id. + :type connector_id: str + :param connector_display_name: The Connector Display Name + :type connector_display_name: str + """ + + _attribute_map = { + 'connector_id': {'key': 'connectorId', 'type': 'str'}, + 'connector_display_name': {'key': 'connectorDisplayName', 'type': 'str'}, + } + + def __init__(self, *, connector_id: str=None, connector_display_name: str=None, **kwargs) -> None: + super(ConnectorMetadataDetails, self).__init__(**kwargs) + self.connector_id = connector_id + self.connector_display_name = connector_display_name diff --git a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_py3.py b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_py3.py new file mode 100644 index 000000000000..da5cb6577f1d --- /dev/null +++ b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/models/connector_metadata_py3.py @@ -0,0 +1,33 @@ +# 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 ConnectorMetadata(Model): + """Gets the list of connectors and run profile names. + + :param connectors: The list of connectors. + :type connectors: + list[~azure.mgmt.adhybridhealthservice.models.ConnectorMetadataDetails] + :param run_profile_names: The list of run profile names. + :type run_profile_names: list[str] + """ + + _attribute_map = { + 'connectors': {'key': 'connectors', 'type': '[ConnectorMetadataDetails]'}, + 'run_profile_names': {'key': 'runProfileNames', 'type': '[str]'}, + } + + def __init__(self, *, connectors=None, run_profile_names=None, **kwargs) -> None: + super(ConnectorMetadata, self).__init__(**kwargs) + self.connectors = connectors + self.run_profile_names = run_profile_names diff --git a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/service_members_operations.py b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/service_members_operations.py index f1eb557c892a..8f38abf8ccee 100644 --- a/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/service_members_operations.py +++ b/azure-mgmt-adhybridhealthservice/azure/mgmt/adhybridhealthservice/operations/service_members_operations.py @@ -936,3 +936,67 @@ def get_service_configuration( return deserialized get_service_configuration.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/serviceconfiguration'} + + def get_connector_metadata( + self, service_name, service_member_id, metric_name, custom_headers=None, raw=False, **operation_config): + """Gets the list of connectors and run profile names. + + :param service_name: The name of the service. + :type service_name: str + :param service_member_id: The service member id. + :type service_member_id: str + :param metric_name: The name of the metric. + :type metric_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ConnectorMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.adhybridhealthservice.models.ConnectorMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_connector_metadata.metadata['url'] + path_format_arguments = { + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'serviceMemberId': self._serialize.url("service_member_id", service_member_id, 'str'), + 'metricName': self._serialize.url("metric_name", metric_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ConnectorMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_connector_metadata.metadata = {'url': '/providers/Microsoft.ADHybridHealthService/services/{serviceName}/servicemembers/{serviceMemberId}/metrics/{metricName}'} From a23bd7d6f3e7c245f8bef9e30c99eb72cf2f4dd4 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Fri, 22 Mar 2019 18:05:10 +0000 Subject: [PATCH 2/2] Packaging update of azure-mgmt-adhybridhealthservice --- azure-mgmt-adhybridhealthservice/README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-mgmt-adhybridhealthservice/README.rst b/azure-mgmt-adhybridhealthservice/README.rst index d0429ebc7565..fc0ef08c31eb 100644 --- a/azure-mgmt-adhybridhealthservice/README.rst +++ b/azure-mgmt-adhybridhealthservice/README.rst @@ -28,3 +28,6 @@ Provide Feedback If you encounter any bugs or have suggestions, please file an issue in the `Issues `__ section of the project. + + +.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-adhybridhealthservice%2FREADME.png