From 3168928ecce1f29bf0e06ca037878307a560e819 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 17 Jul 2019 19:01:27 +0000 Subject: [PATCH 1/3] Generated from 4c43cebbfc5e1ad57cc113ad7fea62f230ede2cd add show usages detial parameter --- .../_azure_machine_learning_workspaces.py | 7 +++++-- .../azure/mgmt/machinelearningservices/_configuration.py | 6 +++++- .../operations/_usages_operations.py | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py index e0a0e2c4d834..19234f6710c0 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py @@ -43,13 +43,16 @@ class AzureMachineLearningWorkspaces(SDKClient): object` :param subscription_id: Azure subscription identifier. :type subscription_id: str + :param expand_children: Specifies if detailed usages of child resources + are required. + :type expand_children: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, expand_children=None, base_url=None): - self.config = AzureMachineLearningWorkspacesConfiguration(credentials, subscription_id, base_url) + self.config = AzureMachineLearningWorkspacesConfiguration(credentials, subscription_id, expand_children, base_url) super(AzureMachineLearningWorkspaces, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py index 06a054e13cdb..dc699f38edfd 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py @@ -23,11 +23,14 @@ class AzureMachineLearningWorkspacesConfiguration(AzureConfiguration): object` :param subscription_id: Azure subscription identifier. :type subscription_id: str + :param expand_children: Specifies if detailed usages of child resources + are required. + :type expand_children: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, base_url=None): + self, credentials, subscription_id, expand_children=None, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") @@ -46,3 +49,4 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id + self.expand_children = expand_children diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py index 212fbc700f27..6e36b3d2bc6d 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py @@ -69,6 +69,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if self.config.expand_children is not None: + query_parameters['expandChildren'] = self._serialize.query("self.config.expand_children", self.config.expand_children, 'str') else: url = next_link From a6e1a416333e39eef5f245df3c21b1ea1f21e617 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 17 Jul 2019 19:16:42 +0000 Subject: [PATCH 2/3] Generated from 7072a22de7fdedf3b9f5bc8f7f79b4b93637d2ef add related mark for optioanl query parameter --- .../_azure_machine_learning_workspaces.py | 7 ++----- .../azure/mgmt/machinelearningservices/_configuration.py | 6 +----- .../operations/_usages_operations.py | 9 ++++++--- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py index 19234f6710c0..e0a0e2c4d834 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_azure_machine_learning_workspaces.py @@ -43,16 +43,13 @@ class AzureMachineLearningWorkspaces(SDKClient): object` :param subscription_id: Azure subscription identifier. :type subscription_id: str - :param expand_children: Specifies if detailed usages of child resources - are required. - :type expand_children: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, expand_children=None, base_url=None): + self, credentials, subscription_id, base_url=None): - self.config = AzureMachineLearningWorkspacesConfiguration(credentials, subscription_id, expand_children, base_url) + self.config = AzureMachineLearningWorkspacesConfiguration(credentials, subscription_id, base_url) super(AzureMachineLearningWorkspaces, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py index dc699f38edfd..06a054e13cdb 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/_configuration.py @@ -23,14 +23,11 @@ class AzureMachineLearningWorkspacesConfiguration(AzureConfiguration): object` :param subscription_id: Azure subscription identifier. :type subscription_id: str - :param expand_children: Specifies if detailed usages of child resources - are required. - :type expand_children: str :param str base_url: Service URL """ def __init__( - self, credentials, subscription_id, expand_children=None, base_url=None): + self, credentials, subscription_id, base_url=None): if credentials is None: raise ValueError("Parameter 'credentials' must not be None.") @@ -49,4 +46,3 @@ def __init__( self.credentials = credentials self.subscription_id = subscription_id - self.expand_children = expand_children diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py index 6e36b3d2bc6d..cbb16e658548 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py @@ -40,12 +40,15 @@ def __init__(self, client, config, serializer, deserializer): self.config = config def list( - self, location, custom_headers=None, raw=False, **operation_config): + self, location, expand_children=None, custom_headers=None, raw=False, **operation_config): """Gets the current usage information as well as limits for AML resources for given subscription and location. :param location: The location for which resource usage is queried. :type location: str + :param expand_children: Specifies if detailed usages of child + resources are required. + :type expand_children: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -69,8 +72,8 @@ def prepare_request(next_link=None): # Construct parameters query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if self.config.expand_children is not None: - query_parameters['expandChildren'] = self._serialize.query("self.config.expand_children", self.config.expand_children, 'str') + if expand_children is not None: + query_parameters['$expandChildren'] = self._serialize.query("expand_children", expand_children, 'str') else: url = next_link From dbb23356aaf6cc1b9f75a3b60ed870b532398daa Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 17 Jul 2019 19:38:37 +0000 Subject: [PATCH 3/3] Generated from 05289ebc4b2be9d8be80218d6bfab65a9848e77a remove doller sign from the custome parameter --- .../machinelearningservices/operations/_usages_operations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py index cbb16e658548..1b174175c3a5 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningservices/azure/mgmt/machinelearningservices/operations/_usages_operations.py @@ -73,7 +73,7 @@ def prepare_request(next_link=None): query_parameters = {} query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') if expand_children is not None: - query_parameters['$expandChildren'] = self._serialize.query("expand_children", expand_children, 'str') + query_parameters['expandChildren'] = self._serialize.query("expand_children", expand_children, 'str') else: url = next_link