From eb264531ced8225ca1f3a277b1cbc90316a29f8a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 22 Apr 2019 20:31:17 +0000 Subject: [PATCH 1/3] Generated from c4d8eb435374b6bec4bd00900ea55c37fe4d238b Support Update properties --- .../models/cognitive_services_account_update_parameters.py | 5 +++++ .../cognitive_services_account_update_parameters_py3.py | 7 ++++++- .../cognitiveservices/operations/accounts_operations.py | 7 +++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py index 5b78b1a13a91..c56cb6c16a70 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py @@ -23,14 +23,19 @@ class CognitiveServicesAccountUpdateParameters(Model): resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. :type tags: dict[str, str] + :param properties: Additional properties for Account. Only provided fileds + will be updated. + :type properties: object """ _attribute_map = { 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__(self, **kwargs): super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs) self.sku = kwargs.get('sku', None) self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py index 03cd5ba1328b..b9e9c1703587 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py @@ -23,14 +23,19 @@ class CognitiveServicesAccountUpdateParameters(Model): resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. :type tags: dict[str, str] + :param properties: Additional properties for Account. Only provided fileds + will be updated. + :type properties: object """ _attribute_map = { 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'object'}, } - def __init__(self, *, sku=None, tags=None, **kwargs) -> None: + def __init__(self, *, sku=None, tags=None, properties=None, **kwargs) -> None: super(CognitiveServicesAccountUpdateParameters, self).__init__(**kwargs) self.sku = sku self.tags = tags + self.properties = properties diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py index 64e01742ae3d..53be062eb8c0 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py @@ -110,7 +110,7 @@ def create( create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}'} def update( - self, resource_group_name, account_name, sku=None, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, account_name, sku=None, tags=None, properties=None, custom_headers=None, raw=False, **operation_config): """Updates a Cognitive Services account. :param resource_group_name: The name of the resource group within the @@ -126,6 +126,9 @@ def update( resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. :type tags: dict[str, str] + :param properties: Additional properties for Account. Only provided + fileds will be updated. + :type properties: object :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -137,7 +140,7 @@ def update( :raises: :class:`ErrorException` """ - parameters = models.CognitiveServicesAccountUpdateParameters(sku=sku, tags=tags) + parameters = models.CognitiveServicesAccountUpdateParameters(sku=sku, tags=tags, properties=properties) # Construct URL url = self.update.metadata['url'] From c4f67fcf70177fd638f383cd6b2a6e5d9546f620 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Mon, 22 Apr 2019 20:36:02 +0000 Subject: [PATCH 2/3] Packaging update of azure-mgmt-cognitiveservices --- azure-mgmt-cognitiveservices/MANIFEST.in | 1 + azure-mgmt-cognitiveservices/README.rst | 22 +++------------------- azure-mgmt-cognitiveservices/setup.py | 1 + 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/azure-mgmt-cognitiveservices/MANIFEST.in b/azure-mgmt-cognitiveservices/MANIFEST.in index 6ceb27f7a96e..e4884efef41b 100644 --- a/azure-mgmt-cognitiveservices/MANIFEST.in +++ b/azure-mgmt-cognitiveservices/MANIFEST.in @@ -1,3 +1,4 @@ +recursive-include tests *.py *.yaml include *.rst include azure/__init__.py include azure/mgmt/__init__.py diff --git a/azure-mgmt-cognitiveservices/README.rst b/azure-mgmt-cognitiveservices/README.rst index 70de0c6a776f..be54b05df719 100644 --- a/azure-mgmt-cognitiveservices/README.rst +++ b/azure-mgmt-cognitiveservices/README.rst @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see For a more complete set of Azure libraries, see the `azure `__ bundle package. -Compatibility -============= - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this package. - -You can check the version using pip: - -.. code:: shell - - pip freeze - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -.. code:: shell - - pip uninstall azure - - Usage ===== @@ -47,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-cognitiveservices%2FREADME.png diff --git a/azure-mgmt-cognitiveservices/setup.py b/azure-mgmt-cognitiveservices/setup.py index ff87dc89f78c..b92e8d4114aa 100644 --- a/azure-mgmt-cognitiveservices/setup.py +++ b/azure-mgmt-cognitiveservices/setup.py @@ -53,6 +53,7 @@ version=version, description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), long_description=readme + '\n\n' + history, + long_description_content_type='text/x-rst', license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', From 9c04e495b059094278991e592be182e24d49d5c8 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 23 Apr 2019 07:52:41 +0000 Subject: [PATCH 3/3] Generated from 90f73befd81d065883b594f8d9280062050f296e Update specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2017-04-18/cognitiveservices.json Co-Authored-By: yangyuan --- .../models/cognitive_services_account_update_parameters.py | 2 +- .../models/cognitive_services_account_update_parameters_py3.py | 2 +- .../mgmt/cognitiveservices/operations/accounts_operations.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py index c56cb6c16a70..96fd4967867b 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters.py @@ -23,7 +23,7 @@ class CognitiveServicesAccountUpdateParameters(Model): resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. :type tags: dict[str, str] - :param properties: Additional properties for Account. Only provided fileds + :param properties: Additional properties for Account. Only provided fields will be updated. :type properties: object """ diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py index b9e9c1703587..798e507da635 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/cognitive_services_account_update_parameters_py3.py @@ -23,7 +23,7 @@ class CognitiveServicesAccountUpdateParameters(Model): resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. :type tags: dict[str, str] - :param properties: Additional properties for Account. Only provided fileds + :param properties: Additional properties for Account. Only provided fields will be updated. :type properties: object """ diff --git a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py index 53be062eb8c0..9dbff4be3071 100644 --- a/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py +++ b/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/accounts_operations.py @@ -127,7 +127,7 @@ def update( value no greater than 256 characters. :type tags: dict[str, str] :param properties: Additional properties for Account. Only provided - fileds will be updated. + fields will be updated. :type properties: object :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the