From 680ec4b60b8d23d4dc55b869d7a1af44c9e667d3 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 29 May 2019 04:21:58 +0000 Subject: [PATCH] Generated from 59ad51ef08f75c5364cb927c46e63a8ccf27ddc9 chore: jsonfmt machinelearningcompute Ran `jsonfmt -w "specification/machinelearningcompute/**/*.json"` --- ...hine_learning_compute_management_client.py | 6 +- .../machinelearningcompute/models/__init__.py | 83 ++-- .../models/acs_cluster_properties.py | 23 +- .../models/acs_cluster_properties_py3.py | 87 ++++ .../models/app_insights_credentials.py | 8 +- .../models/app_insights_credentials_py3.py | 34 ++ .../models/app_insights_properties.py | 6 +- .../models/app_insights_properties_py3.py | 28 ++ .../models/auto_scale_configuration.py | 14 +- .../models/auto_scale_configuration_py3.py | 53 +++ .../models/available_operations.py | 6 +- .../models/available_operations_py3.py | 29 ++ ...tem_services_updates_available_response.py | 4 +- ...services_updates_available_response_py3.py | 37 ++ .../models/container_registry_credentials.py | 4 +- .../container_registry_credentials_py3.py | 52 +++ .../models/container_registry_properties.py | 6 +- .../container_registry_properties_py3.py | 30 ++ .../models/container_service_credentials.py | 4 +- .../container_service_credentials_py3.py | 49 +++ .../models/error_detail.py | 14 +- .../models/error_detail_py3.py | 39 ++ .../models/error_response.py | 16 +- .../models/error_response_py3.py | 43 ++ .../models/error_response_wrapper.py | 6 +- .../models/error_response_wrapper_py3.py | 41 ++ .../models/global_service_configuration.py | 16 +- .../global_service_configuration_py3.py | 49 +++ .../models/kubernetes_cluster_properties.py | 6 +- .../kubernetes_cluster_properties_py3.py | 29 ++ ...earning_compute_management_client_enums.py | 14 +- .../models/operationalization_cluster.py | 26 +- .../operationalization_cluster_credentials.py | 16 +- ...rationalization_cluster_credentials_py3.py | 56 +++ .../models/operationalization_cluster_py3.py | 115 ++++++ ...tionalization_cluster_update_parameters.py | 6 +- ...alization_cluster_update_parameters_py3.py | 32 ++ .../machinelearningcompute/models/resource.py | 12 +- .../models/resource_operation.py | 10 +- .../models/resource_operation_display.py | 12 +- .../models/resource_operation_display_py3.py | 40 ++ .../models/resource_operation_py3.py | 37 ++ .../models/resource_py3.py | 56 +++ .../models/service_auth_configuration.py | 22 +- .../models/service_auth_configuration_py3.py | 44 ++ .../models/service_principal_properties.py | 17 +- .../service_principal_properties_py3.py | 42 ++ .../models/ssl_configuration.py | 12 +- .../models/ssl_configuration_py3.py | 43 ++ .../models/storage_account_credentials.py | 4 +- .../models/storage_account_credentials_py3.py | 45 +++ .../models/storage_account_properties.py | 6 +- .../models/storage_account_properties_py3.py | 30 ++ .../models/system_service.py | 12 +- .../models/system_service_py3.py | 49 +++ .../models/update_system_services_response.py | 4 +- .../update_system_services_response_py3.py | 49 +++ .../machine_learning_compute_operations.py | 11 +- .../operationalization_clusters_operations.py | 380 ++++++++++-------- .../mgmt/machinelearningcompute/version.py | 2 +- 60 files changed, 1675 insertions(+), 351 deletions(-) create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service_py3.py create mode 100644 sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response_py3.py diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/machine_learning_compute_management_client.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/machine_learning_compute_management_client.py index b4abd89c3687..669abe92c2dd 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/machine_learning_compute_management_client.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/machine_learning_compute_management_client.py @@ -9,7 +9,7 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.service_client import ServiceClient +from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION @@ -50,7 +50,7 @@ def __init__( self.subscription_id = subscription_id -class MachineLearningComputeManagementClient(object): +class MachineLearningComputeManagementClient(SDKClient): """These APIs allow end users to operate on Azure Machine Learning Compute resources. They support the following operations:<ul><li>Create or update a cluster</li><li>Get a cluster</li><li>Patch a cluster</li><li>Delete a cluster</li><li>Get keys for a cluster</li><li>Check if updates are available for system services in a cluster</li><li>Update system services in a cluster</li><li>Get all clusters in a resource group</li><li>Get all clusters in a subscription</li></ul> :ivar config: Configuration for client. @@ -73,7 +73,7 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = MachineLearningComputeManagementClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(MachineLearningComputeManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2017-08-01-preview' diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py index 96c25076530d..9d5f9730a676 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py @@ -9,33 +9,62 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource -from .error_detail import ErrorDetail -from .error_response import ErrorResponse -from .error_response_wrapper import ErrorResponseWrapper, ErrorResponseWrapperException -from .storage_account_properties import StorageAccountProperties -from .container_registry_properties import ContainerRegistryProperties -from .service_principal_properties import ServicePrincipalProperties -from .kubernetes_cluster_properties import KubernetesClusterProperties -from .system_service import SystemService -from .acs_cluster_properties import AcsClusterProperties -from .app_insights_properties import AppInsightsProperties -from .ssl_configuration import SslConfiguration -from .service_auth_configuration import ServiceAuthConfiguration -from .auto_scale_configuration import AutoScaleConfiguration -from .global_service_configuration import GlobalServiceConfiguration -from .operationalization_cluster import OperationalizationCluster -from .operationalization_cluster_update_parameters import OperationalizationClusterUpdateParameters -from .storage_account_credentials import StorageAccountCredentials -from .container_registry_credentials import ContainerRegistryCredentials -from .container_service_credentials import ContainerServiceCredentials -from .app_insights_credentials import AppInsightsCredentials -from .operationalization_cluster_credentials import OperationalizationClusterCredentials -from .check_system_services_updates_available_response import CheckSystemServicesUpdatesAvailableResponse -from .update_system_services_response import UpdateSystemServicesResponse -from .resource_operation_display import ResourceOperationDisplay -from .resource_operation import ResourceOperation -from .available_operations import AvailableOperations +try: + from .resource_py3 import Resource + from .error_detail_py3 import ErrorDetail + from .error_response_py3 import ErrorResponse + from .error_response_wrapper_py3 import ErrorResponseWrapper, ErrorResponseWrapperException + from .storage_account_properties_py3 import StorageAccountProperties + from .container_registry_properties_py3 import ContainerRegistryProperties + from .service_principal_properties_py3 import ServicePrincipalProperties + from .kubernetes_cluster_properties_py3 import KubernetesClusterProperties + from .system_service_py3 import SystemService + from .acs_cluster_properties_py3 import AcsClusterProperties + from .app_insights_properties_py3 import AppInsightsProperties + from .ssl_configuration_py3 import SslConfiguration + from .service_auth_configuration_py3 import ServiceAuthConfiguration + from .auto_scale_configuration_py3 import AutoScaleConfiguration + from .global_service_configuration_py3 import GlobalServiceConfiguration + from .operationalization_cluster_py3 import OperationalizationCluster + from .operationalization_cluster_update_parameters_py3 import OperationalizationClusterUpdateParameters + from .storage_account_credentials_py3 import StorageAccountCredentials + from .container_registry_credentials_py3 import ContainerRegistryCredentials + from .container_service_credentials_py3 import ContainerServiceCredentials + from .app_insights_credentials_py3 import AppInsightsCredentials + from .operationalization_cluster_credentials_py3 import OperationalizationClusterCredentials + from .check_system_services_updates_available_response_py3 import CheckSystemServicesUpdatesAvailableResponse + from .update_system_services_response_py3 import UpdateSystemServicesResponse + from .resource_operation_display_py3 import ResourceOperationDisplay + from .resource_operation_py3 import ResourceOperation + from .available_operations_py3 import AvailableOperations +except (SyntaxError, ImportError): + from .resource import Resource + from .error_detail import ErrorDetail + from .error_response import ErrorResponse + from .error_response_wrapper import ErrorResponseWrapper, ErrorResponseWrapperException + from .storage_account_properties import StorageAccountProperties + from .container_registry_properties import ContainerRegistryProperties + from .service_principal_properties import ServicePrincipalProperties + from .kubernetes_cluster_properties import KubernetesClusterProperties + from .system_service import SystemService + from .acs_cluster_properties import AcsClusterProperties + from .app_insights_properties import AppInsightsProperties + from .ssl_configuration import SslConfiguration + from .service_auth_configuration import ServiceAuthConfiguration + from .auto_scale_configuration import AutoScaleConfiguration + from .global_service_configuration import GlobalServiceConfiguration + from .operationalization_cluster import OperationalizationCluster + from .operationalization_cluster_update_parameters import OperationalizationClusterUpdateParameters + from .storage_account_credentials import StorageAccountCredentials + from .container_registry_credentials import ContainerRegistryCredentials + from .container_service_credentials import ContainerServiceCredentials + from .app_insights_credentials import AppInsightsCredentials + from .operationalization_cluster_credentials import OperationalizationClusterCredentials + from .check_system_services_updates_available_response import CheckSystemServicesUpdatesAvailableResponse + from .update_system_services_response import UpdateSystemServicesResponse + from .resource_operation_display import ResourceOperationDisplay + from .resource_operation import ResourceOperation + from .available_operations import AvailableOperations from .operationalization_cluster_paged import OperationalizationClusterPaged from .machine_learning_compute_management_client_enums import ( OperationStatus, diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties.py index f8d4a8f81079..aa5799cd382e 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties.py @@ -18,10 +18,13 @@ class AcsClusterProperties(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar cluster_fqdn: The FQDN of the cluster. :vartype cluster_fqdn: str - :param orchestrator_type: Type of orchestrator. It cannot be changed once - the cluster is created. Possible values include: 'Kubernetes', 'None' + :param orchestrator_type: Required. Type of orchestrator. It cannot be + changed once the cluster is created. Possible values include: + 'Kubernetes', 'None' :type orchestrator_type: str or ~azure.mgmt.machinelearningcompute.models.OrchestratorType :param orchestrator_properties: Orchestrator specific properties @@ -73,12 +76,12 @@ class AcsClusterProperties(Model): 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, } - def __init__(self, orchestrator_type, orchestrator_properties=None, system_services=None, master_count=1, agent_count=2, agent_vm_size="Standard_D3_v2"): - super(AcsClusterProperties, self).__init__() + def __init__(self, **kwargs): + super(AcsClusterProperties, self).__init__(**kwargs) self.cluster_fqdn = None - self.orchestrator_type = orchestrator_type - self.orchestrator_properties = orchestrator_properties - self.system_services = system_services - self.master_count = master_count - self.agent_count = agent_count - self.agent_vm_size = agent_vm_size + self.orchestrator_type = kwargs.get('orchestrator_type', None) + self.orchestrator_properties = kwargs.get('orchestrator_properties', None) + self.system_services = kwargs.get('system_services', None) + self.master_count = kwargs.get('master_count', 1) + self.agent_count = kwargs.get('agent_count', 2) + self.agent_vm_size = kwargs.get('agent_vm_size', "Standard_D3_v2") diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties_py3.py new file mode 100644 index 000000000000..971665bef060 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/acs_cluster_properties_py3.py @@ -0,0 +1,87 @@ +# 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 AcsClusterProperties(Model): + """Information about the container service backing the cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar cluster_fqdn: The FQDN of the cluster. + :vartype cluster_fqdn: str + :param orchestrator_type: Required. Type of orchestrator. It cannot be + changed once the cluster is created. Possible values include: + 'Kubernetes', 'None' + :type orchestrator_type: str or + ~azure.mgmt.machinelearningcompute.models.OrchestratorType + :param orchestrator_properties: Orchestrator specific properties + :type orchestrator_properties: + ~azure.mgmt.machinelearningcompute.models.KubernetesClusterProperties + :param system_services: The system services deployed to the cluster + :type system_services: + list[~azure.mgmt.machinelearningcompute.models.SystemService] + :param master_count: The number of master nodes in the container service. + Default value: 1 . + :type master_count: int + :param agent_count: The number of agent nodes in the Container Service. + This can be changed to scale the cluster. Default value: 2 . + :type agent_count: int + :param agent_vm_size: The Azure VM size of the agent VM nodes. This cannot + be changed once the cluster is created. This list is non exhaustive; refer + to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes + for the possible VM sizes. Possible values include: 'Standard_A0', + 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', + 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', + 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2', + 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12', + 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', + 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2', + 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1', + 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5', + 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', + 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', + 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4', + 'Standard_GS5'. Default value: "Standard_D3_v2" . + :type agent_vm_size: str or + ~azure.mgmt.machinelearningcompute.models.AgentVMSizeTypes + """ + + _validation = { + 'cluster_fqdn': {'readonly': True}, + 'orchestrator_type': {'required': True}, + 'master_count': {'maximum': 5, 'minimum': 1}, + 'agent_count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'cluster_fqdn': {'key': 'clusterFqdn', 'type': 'str'}, + 'orchestrator_type': {'key': 'orchestratorType', 'type': 'str'}, + 'orchestrator_properties': {'key': 'orchestratorProperties', 'type': 'KubernetesClusterProperties'}, + 'system_services': {'key': 'systemServices', 'type': '[SystemService]'}, + 'master_count': {'key': 'masterCount', 'type': 'int'}, + 'agent_count': {'key': 'agentCount', 'type': 'int'}, + 'agent_vm_size': {'key': 'agentVmSize', 'type': 'str'}, + } + + def __init__(self, *, orchestrator_type, orchestrator_properties=None, system_services=None, master_count: int=1, agent_count: int=2, agent_vm_size="Standard_D3_v2", **kwargs) -> None: + super(AcsClusterProperties, self).__init__(**kwargs) + self.cluster_fqdn = None + self.orchestrator_type = orchestrator_type + self.orchestrator_properties = orchestrator_properties + self.system_services = system_services + self.master_count = master_count + self.agent_count = agent_count + self.agent_vm_size = agent_vm_size diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials.py index 1264ca4a79e7..a71656e69bc4 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials.py @@ -28,7 +28,7 @@ class AppInsightsCredentials(Model): 'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'}, } - def __init__(self, app_id=None, instrumentation_key=None): - super(AppInsightsCredentials, self).__init__() - self.app_id = app_id - self.instrumentation_key = instrumentation_key + def __init__(self, **kwargs): + super(AppInsightsCredentials, self).__init__(**kwargs) + self.app_id = kwargs.get('app_id', None) + self.instrumentation_key = kwargs.get('instrumentation_key', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials_py3.py new file mode 100644 index 000000000000..271ae3b5a88b --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_credentials_py3.py @@ -0,0 +1,34 @@ +# 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 AppInsightsCredentials(Model): + """AppInsights credentials. + + :param app_id: The AppInsights application ID. + :type app_id: str + :param instrumentation_key: The AppInsights instrumentation key. This is + not returned in response of GET/PUT on the resource. To see this please + call listKeys API. + :type instrumentation_key: str + """ + + _attribute_map = { + 'app_id': {'key': 'appId', 'type': 'str'}, + 'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'}, + } + + def __init__(self, *, app_id: str=None, instrumentation_key: str=None, **kwargs) -> None: + super(AppInsightsCredentials, self).__init__(**kwargs) + self.app_id = app_id + self.instrumentation_key = instrumentation_key diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties.py index d81fe3c3dd61..40040f7c1cb6 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties.py @@ -23,6 +23,6 @@ class AppInsightsProperties(Model): 'resource_id': {'key': 'resourceId', 'type': 'str'}, } - def __init__(self, resource_id=None): - super(AppInsightsProperties, self).__init__() - self.resource_id = resource_id + def __init__(self, **kwargs): + super(AppInsightsProperties, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties_py3.py new file mode 100644 index 000000000000..5f9131c739e3 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/app_insights_properties_py3.py @@ -0,0 +1,28 @@ +# 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 AppInsightsProperties(Model): + """Properties of App Insights. + + :param resource_id: ARM resource ID of the App Insights. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, **kwargs) -> None: + super(AppInsightsProperties, self).__init__(**kwargs) + self.resource_id = resource_id diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration.py index 8402fb98808f..fba9cefedad7 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration.py @@ -44,10 +44,10 @@ class AutoScaleConfiguration(Model): 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, } - def __init__(self, status="Disabled", min_replicas=1, max_replicas=100, target_utilization=None, refresh_period_in_seconds=None): - super(AutoScaleConfiguration, self).__init__() - self.status = status - self.min_replicas = min_replicas - self.max_replicas = max_replicas - self.target_utilization = target_utilization - self.refresh_period_in_seconds = refresh_period_in_seconds + def __init__(self, **kwargs): + super(AutoScaleConfiguration, self).__init__(**kwargs) + self.status = kwargs.get('status', "Disabled") + self.min_replicas = kwargs.get('min_replicas', 1) + self.max_replicas = kwargs.get('max_replicas', 100) + self.target_utilization = kwargs.get('target_utilization', None) + self.refresh_period_in_seconds = kwargs.get('refresh_period_in_seconds', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration_py3.py new file mode 100644 index 000000000000..5b88789b5969 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/auto_scale_configuration_py3.py @@ -0,0 +1,53 @@ +# 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 AutoScaleConfiguration(Model): + """AutoScale configuration properties. + + :param status: If auto-scale is enabled for all services. Each service can + turn it off individually. Possible values include: 'Enabled', 'Disabled'. + Default value: "Disabled" . + :type status: str or ~azure.mgmt.machinelearningcompute.models.Status + :param min_replicas: The minimum number of replicas for each service. + Default value: 1 . + :type min_replicas: int + :param max_replicas: The maximum number of replicas for each service. + Default value: 100 . + :type max_replicas: int + :param target_utilization: The target utilization. + :type target_utilization: float + :param refresh_period_in_seconds: Refresh period in seconds. + :type refresh_period_in_seconds: int + """ + + _validation = { + 'min_replicas': {'minimum': 1}, + 'max_replicas': {'minimum': 1}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'min_replicas': {'key': 'minReplicas', 'type': 'int'}, + 'max_replicas': {'key': 'maxReplicas', 'type': 'int'}, + 'target_utilization': {'key': 'targetUtilization', 'type': 'float'}, + 'refresh_period_in_seconds': {'key': 'refreshPeriodInSeconds', 'type': 'int'}, + } + + def __init__(self, *, status="Disabled", min_replicas: int=1, max_replicas: int=100, target_utilization: float=None, refresh_period_in_seconds: int=None, **kwargs) -> None: + super(AutoScaleConfiguration, self).__init__(**kwargs) + self.status = status + self.min_replicas = min_replicas + self.max_replicas = max_replicas + self.target_utilization = target_utilization + self.refresh_period_in_seconds = refresh_period_in_seconds diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations.py index 4d4db69b55d9..f1eef954d2d3 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations.py @@ -24,6 +24,6 @@ class AvailableOperations(Model): 'value': {'key': 'value', 'type': '[ResourceOperation]'}, } - def __init__(self, value=None): - super(AvailableOperations, self).__init__() - self.value = value + def __init__(self, **kwargs): + super(AvailableOperations, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations_py3.py new file mode 100644 index 000000000000..0c4035f516d8 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/available_operations_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 AvailableOperations(Model): + """Available operation list. + + :param value: An array of available operations. + :type value: + list[~azure.mgmt.machinelearningcompute.models.ResourceOperation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceOperation]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(AvailableOperations, self).__init__(**kwargs) + self.value = value diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response.py index d3474ae46d82..91cb9a6e792b 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response.py @@ -32,6 +32,6 @@ class CheckSystemServicesUpdatesAvailableResponse(Model): 'updates_available': {'key': 'updatesAvailable', 'type': 'str'}, } - def __init__(self): - super(CheckSystemServicesUpdatesAvailableResponse, self).__init__() + def __init__(self, **kwargs): + super(CheckSystemServicesUpdatesAvailableResponse, self).__init__(**kwargs) self.updates_available = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response_py3.py new file mode 100644 index 000000000000..20ab78fb1601 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/check_system_services_updates_available_response_py3.py @@ -0,0 +1,37 @@ +# 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 CheckSystemServicesUpdatesAvailableResponse(Model): + """Information about updates available for system services in a cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar updates_available: Yes if updates are available for the system + services, No if not. Possible values include: 'Yes', 'No' + :vartype updates_available: str or + ~azure.mgmt.machinelearningcompute.models.UpdatesAvailable + """ + + _validation = { + 'updates_available': {'readonly': True}, + } + + _attribute_map = { + 'updates_available': {'key': 'updatesAvailable', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckSystemServicesUpdatesAvailableResponse, self).__init__(**kwargs) + self.updates_available = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials.py index 897b6b87a03b..cef2d1744321 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials.py @@ -44,8 +44,8 @@ class ContainerRegistryCredentials(Model): 'username': {'key': 'username', 'type': 'str'}, } - def __init__(self): - super(ContainerRegistryCredentials, self).__init__() + def __init__(self, **kwargs): + super(ContainerRegistryCredentials, self).__init__(**kwargs) self.login_server = None self.password = None self.password2 = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials_py3.py new file mode 100644 index 000000000000..caab6a89c3c6 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_credentials_py3.py @@ -0,0 +1,52 @@ +# 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 ContainerRegistryCredentials(Model): + """Information about the Azure Container Registry which contains the images + deployed to the cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar login_server: The ACR login server name. User name is the first part + of the FQDN. + :vartype login_server: str + :ivar password: The ACR primary password. + :vartype password: str + :ivar password2: The ACR secondary password. + :vartype password2: str + :ivar username: The ACR login username. + :vartype username: str + """ + + _validation = { + 'login_server': {'readonly': True}, + 'password': {'readonly': True}, + 'password2': {'readonly': True}, + 'username': {'readonly': True}, + } + + _attribute_map = { + 'login_server': {'key': 'loginServer', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'password2': {'key': 'password2', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ContainerRegistryCredentials, self).__init__(**kwargs) + self.login_server = None + self.password = None + self.password2 = None + self.username = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties.py index 2430f4381e46..79c571b211b8 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties.py @@ -25,6 +25,6 @@ class ContainerRegistryProperties(Model): 'resource_id': {'key': 'resourceId', 'type': 'str'}, } - def __init__(self, resource_id=None): - super(ContainerRegistryProperties, self).__init__() - self.resource_id = resource_id + def __init__(self, **kwargs): + super(ContainerRegistryProperties, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties_py3.py new file mode 100644 index 000000000000..7d82982b81bd --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_registry_properties_py3.py @@ -0,0 +1,30 @@ +# 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 ContainerRegistryProperties(Model): + """Properties of Azure Container Registry. + + :param resource_id: ARM resource ID of the Azure Container Registry used + to store Docker images for web services in the cluster. If not provided + one will be created. This cannot be changed once the cluster is created. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, **kwargs) -> None: + super(ContainerRegistryProperties, self).__init__(**kwargs) + self.resource_id = resource_id diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials.py index 17a92a26e1f2..ecc128e676a4 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials.py @@ -42,8 +42,8 @@ class ContainerServiceCredentials(Model): 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, } - def __init__(self): - super(ContainerServiceCredentials, self).__init__() + def __init__(self, **kwargs): + super(ContainerServiceCredentials, self).__init__(**kwargs) self.acs_kube_config = None self.service_principal_configuration = None self.image_pull_secret_name = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials_py3.py new file mode 100644 index 000000000000..eb59e70d3d96 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/container_service_credentials_py3.py @@ -0,0 +1,49 @@ +# 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 ContainerServiceCredentials(Model): + """Information about the Azure Container Registry which contains the images + deployed to the cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar acs_kube_config: The ACS kube config file. + :vartype acs_kube_config: str + :ivar service_principal_configuration: Service principal configuration + used by Kubernetes. + :vartype service_principal_configuration: + ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties + :ivar image_pull_secret_name: The ACR image pull secret name which was + created in Kubernetes. + :vartype image_pull_secret_name: str + """ + + _validation = { + 'acs_kube_config': {'readonly': True}, + 'service_principal_configuration': {'readonly': True}, + 'image_pull_secret_name': {'readonly': True}, + } + + _attribute_map = { + 'acs_kube_config': {'key': 'acsKubeConfig', 'type': 'str'}, + 'service_principal_configuration': {'key': 'servicePrincipalConfiguration', 'type': 'ServicePrincipalProperties'}, + 'image_pull_secret_name': {'key': 'imagePullSecretName', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ContainerServiceCredentials, self).__init__(**kwargs) + self.acs_kube_config = None + self.service_principal_configuration = None + self.image_pull_secret_name = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail.py index c4821033453c..fa22ca734577 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail.py @@ -15,9 +15,11 @@ class ErrorDetail(Model): """Error detail information. - :param code: Error code. + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. :type code: str - :param message: Error message. + :param message: Required. Error message. :type message: str """ @@ -31,7 +33,7 @@ class ErrorDetail(Model): 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, code, message): - super(ErrorDetail, self).__init__() - self.code = code - self.message = message + def __init__(self, **kwargs): + super(ErrorDetail, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail_py3.py new file mode 100644 index 000000000000..aa5cb5c69036 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_detail_py3.py @@ -0,0 +1,39 @@ +# 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 ErrorDetail(Model): + """Error detail information. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str, message: str, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response.py index ee907cb3637f..1f5c46ba7cf9 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response.py @@ -15,9 +15,11 @@ class ErrorResponse(Model): """Error response information. - :param code: Error code. + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. :type code: str - :param message: Error message. + :param message: Required. Error message. :type message: str :param details: An array of error detail objects. :type details: list[~azure.mgmt.machinelearningcompute.models.ErrorDetail] @@ -34,8 +36,8 @@ class ErrorResponse(Model): 'details': {'key': 'details', 'type': '[ErrorDetail]'}, } - def __init__(self, code, message, details=None): - super(ErrorResponse, self).__init__() - self.code = code - self.message = message - self.details = details + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_py3.py new file mode 100644 index 000000000000..197076526f9d --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_py3.py @@ -0,0 +1,43 @@ +# 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 ErrorResponse(Model): + """Error response information. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. Error code. + :type code: str + :param message: Required. Error message. + :type message: str + :param details: An array of error detail objects. + :type details: list[~azure.mgmt.machinelearningcompute.models.ErrorDetail] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + } + + def __init__(self, *, code: str, message: str, details=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper.py index a68f9733cb93..9e7554eb925c 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper.py @@ -24,9 +24,9 @@ class ErrorResponseWrapper(Model): 'error': {'key': 'error', 'type': 'ErrorResponse'}, } - def __init__(self, error=None): - super(ErrorResponseWrapper, self).__init__() - self.error = error + def __init__(self, **kwargs): + super(ErrorResponseWrapper, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseWrapperException(HttpOperationError): diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper_py3.py new file mode 100644 index 000000000000..5080b1521306 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/error_response_wrapper_py3.py @@ -0,0 +1,41 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class ErrorResponseWrapper(Model): + """Wrapper for error response to follow ARM guidelines. + + :param error: The error response. + :type error: ~azure.mgmt.machinelearningcompute.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponseWrapper, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseWrapperException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponseWrapper'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseWrapperException, self).__init__(deserialize, response, 'ErrorResponseWrapper', *args) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration.py index 3b7cb3fcbdac..9800110478de 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration.py @@ -18,7 +18,7 @@ class GlobalServiceConfiguration(Model): :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] - :param etag: The configuartion ETag for updates. + :param etag: The configuration ETag for updates. :type etag: str :param ssl: The SSL configuration properties :type ssl: ~azure.mgmt.machinelearningcompute.models.SslConfiguration @@ -40,10 +40,10 @@ class GlobalServiceConfiguration(Model): 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleConfiguration'}, } - def __init__(self, additional_properties=None, etag=None, ssl=None, service_auth=None, auto_scale=None): - super(GlobalServiceConfiguration, self).__init__() - self.additional_properties = additional_properties - self.etag = etag - self.ssl = ssl - self.service_auth = service_auth - self.auto_scale = auto_scale + def __init__(self, **kwargs): + super(GlobalServiceConfiguration, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.etag = kwargs.get('etag', None) + self.ssl = kwargs.get('ssl', None) + self.service_auth = kwargs.get('service_auth', None) + self.auto_scale = kwargs.get('auto_scale', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration_py3.py new file mode 100644 index 000000000000..af989bb98c5b --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/global_service_configuration_py3.py @@ -0,0 +1,49 @@ +# 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 GlobalServiceConfiguration(Model): + """Global configuration for services in the cluster. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param etag: The configuration ETag for updates. + :type etag: str + :param ssl: The SSL configuration properties + :type ssl: ~azure.mgmt.machinelearningcompute.models.SslConfiguration + :param service_auth: Optional global authorization keys for all user + services deployed in cluster. These are used if the service does not have + auth keys. + :type service_auth: + ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration + :param auto_scale: The auto-scale configuration + :type auto_scale: + ~azure.mgmt.machinelearningcompute.models.AutoScaleConfiguration + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'ssl': {'key': 'ssl', 'type': 'SslConfiguration'}, + 'service_auth': {'key': 'serviceAuth', 'type': 'ServiceAuthConfiguration'}, + 'auto_scale': {'key': 'autoScale', 'type': 'AutoScaleConfiguration'}, + } + + def __init__(self, *, additional_properties=None, etag: str=None, ssl=None, service_auth=None, auto_scale=None, **kwargs) -> None: + super(GlobalServiceConfiguration, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.etag = etag + self.ssl = ssl + self.service_auth = service_auth + self.auto_scale = auto_scale diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties.py index 86365f909c61..38e091bb5b96 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties.py @@ -24,6 +24,6 @@ class KubernetesClusterProperties(Model): 'service_principal': {'key': 'servicePrincipal', 'type': 'ServicePrincipalProperties'}, } - def __init__(self, service_principal=None): - super(KubernetesClusterProperties, self).__init__() - self.service_principal = service_principal + def __init__(self, **kwargs): + super(KubernetesClusterProperties, self).__init__(**kwargs) + self.service_principal = kwargs.get('service_principal', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties_py3.py new file mode 100644 index 000000000000..4686daa815ca --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/kubernetes_cluster_properties_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 KubernetesClusterProperties(Model): + """Kubernetes cluster specific properties. + + :param service_principal: The Azure Service Principal used by Kubernetes + :type service_principal: + ~azure.mgmt.machinelearningcompute.models.ServicePrincipalProperties + """ + + _attribute_map = { + 'service_principal': {'key': 'servicePrincipal', 'type': 'ServicePrincipalProperties'}, + } + + def __init__(self, *, service_principal=None, **kwargs) -> None: + super(KubernetesClusterProperties, self).__init__(**kwargs) + self.service_principal = service_principal diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/machine_learning_compute_management_client_enums.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/machine_learning_compute_management_client_enums.py index 2e056a82f3e0..2ee098036d97 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/machine_learning_compute_management_client_enums.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/machine_learning_compute_management_client_enums.py @@ -12,7 +12,7 @@ from enum import Enum -class OperationStatus(Enum): +class OperationStatus(str, Enum): unknown = "Unknown" updating = "Updating" @@ -23,26 +23,26 @@ class OperationStatus(Enum): canceled = "Canceled" -class ClusterType(Enum): +class ClusterType(str, Enum): acs = "ACS" local = "Local" -class OrchestratorType(Enum): +class OrchestratorType(str, Enum): kubernetes = "Kubernetes" none = "None" -class SystemServiceType(Enum): +class SystemServiceType(str, Enum): none = "None" scoring_front_end = "ScoringFrontEnd" batch_front_end = "BatchFrontEnd" -class AgentVMSizeTypes(Enum): +class AgentVMSizeTypes(str, Enum): standard_a0 = "Standard_A0" standard_a1 = "Standard_A1" @@ -93,13 +93,13 @@ class AgentVMSizeTypes(Enum): standard_gs5 = "Standard_GS5" -class Status(Enum): +class Status(str, Enum): enabled = "Enabled" disabled = "Disabled" -class UpdatesAvailable(Enum): +class UpdatesAvailable(str, Enum): yes = "Yes" no = "No" diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster.py index 5784d7b9f145..cb7b9c248755 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster.py @@ -18,11 +18,13 @@ class OperationalizationCluster(Resource): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Specifies the resource ID. :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :param location: Specifies the location of the resource. + :param location: Required. Specifies the location of the resource. :type location: str :ivar type: Specifies the type of the resource. :vartype type: str @@ -44,8 +46,8 @@ class OperationalizationCluster(Resource): resource provider. :vartype provisioning_errors: list[~azure.mgmt.machinelearningcompute.models.ErrorResponseWrapper] - :param cluster_type: The cluster type. Possible values include: 'ACS', - 'Local' + :param cluster_type: Required. The cluster type. Possible values include: + 'ACS', 'Local' :type cluster_type: str or ~azure.mgmt.machinelearningcompute.models.ClusterType :param storage_account: Storage Account properties. @@ -98,16 +100,16 @@ class OperationalizationCluster(Resource): 'global_service_configuration': {'key': 'properties.globalServiceConfiguration', 'type': 'GlobalServiceConfiguration'}, } - def __init__(self, location, cluster_type, tags=None, description=None, storage_account=None, container_registry=None, container_service=None, app_insights=None, global_service_configuration=None): - super(OperationalizationCluster, self).__init__(location=location, tags=tags) - self.description = description + def __init__(self, **kwargs): + super(OperationalizationCluster, self).__init__(**kwargs) + self.description = kwargs.get('description', None) self.created_on = None self.modified_on = None self.provisioning_state = None self.provisioning_errors = None - self.cluster_type = cluster_type - self.storage_account = storage_account - self.container_registry = container_registry - self.container_service = container_service - self.app_insights = app_insights - self.global_service_configuration = global_service_configuration + self.cluster_type = kwargs.get('cluster_type', None) + self.storage_account = kwargs.get('storage_account', None) + self.container_registry = kwargs.get('container_registry', None) + self.container_service = kwargs.get('container_service', None) + self.app_insights = kwargs.get('app_insights', None) + self.global_service_configuration = kwargs.get('global_service_configuration', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials.py index 040f8147f505..6059135054fe 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials.py @@ -46,11 +46,11 @@ class OperationalizationClusterCredentials(Model): 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, } - def __init__(self, storage_account=None, container_registry=None, container_service=None, app_insights=None, service_auth_configuration=None, ssl_configuration=None): - super(OperationalizationClusterCredentials, self).__init__() - self.storage_account = storage_account - self.container_registry = container_registry - self.container_service = container_service - self.app_insights = app_insights - self.service_auth_configuration = service_auth_configuration - self.ssl_configuration = ssl_configuration + def __init__(self, **kwargs): + super(OperationalizationClusterCredentials, self).__init__(**kwargs) + self.storage_account = kwargs.get('storage_account', None) + self.container_registry = kwargs.get('container_registry', None) + self.container_service = kwargs.get('container_service', None) + self.app_insights = kwargs.get('app_insights', None) + self.service_auth_configuration = kwargs.get('service_auth_configuration', None) + self.ssl_configuration = kwargs.get('ssl_configuration', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials_py3.py new file mode 100644 index 000000000000..61cfe840c4dd --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_credentials_py3.py @@ -0,0 +1,56 @@ +# 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 OperationalizationClusterCredentials(Model): + """Credentials to resources in the cluster. + + :param storage_account: Credentials for the Storage Account. + :type storage_account: + ~azure.mgmt.machinelearningcompute.models.StorageAccountCredentials + :param container_registry: Credentials for Azure Container Registry. + :type container_registry: + ~azure.mgmt.machinelearningcompute.models.ContainerRegistryCredentials + :param container_service: Credentials for Azure Container Service. + :type container_service: + ~azure.mgmt.machinelearningcompute.models.ContainerServiceCredentials + :param app_insights: Credentials for Azure AppInsights. + :type app_insights: + ~azure.mgmt.machinelearningcompute.models.AppInsightsCredentials + :param service_auth_configuration: Global authorization keys for all user + services deployed in cluster. These are used if the service does not have + auth keys. + :type service_auth_configuration: + ~azure.mgmt.machinelearningcompute.models.ServiceAuthConfiguration + :param ssl_configuration: The SSL configuration for the services. + :type ssl_configuration: + ~azure.mgmt.machinelearningcompute.models.SslConfiguration + """ + + _attribute_map = { + 'storage_account': {'key': 'storageAccount', 'type': 'StorageAccountCredentials'}, + 'container_registry': {'key': 'containerRegistry', 'type': 'ContainerRegistryCredentials'}, + 'container_service': {'key': 'containerService', 'type': 'ContainerServiceCredentials'}, + 'app_insights': {'key': 'appInsights', 'type': 'AppInsightsCredentials'}, + 'service_auth_configuration': {'key': 'serviceAuthConfiguration', 'type': 'ServiceAuthConfiguration'}, + 'ssl_configuration': {'key': 'sslConfiguration', 'type': 'SslConfiguration'}, + } + + def __init__(self, *, storage_account=None, container_registry=None, container_service=None, app_insights=None, service_auth_configuration=None, ssl_configuration=None, **kwargs) -> None: + super(OperationalizationClusterCredentials, self).__init__(**kwargs) + self.storage_account = storage_account + self.container_registry = container_registry + self.container_service = container_service + self.app_insights = app_insights + self.service_auth_configuration = service_auth_configuration + self.ssl_configuration = ssl_configuration diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_py3.py new file mode 100644 index 000000000000..f8d6d08314a4 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_py3.py @@ -0,0 +1,115 @@ +# 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 .resource_py3 import Resource + + +class OperationalizationCluster(Resource): + """Instance of an Azure ML Operationalization Cluster resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: str + :param location: Required. Specifies the location of the resource. + :type location: str + :ivar type: Specifies the type of the resource. + :vartype type: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + :param description: The description of the cluster. + :type description: str + :ivar created_on: The date and time when the cluster was created. + :vartype created_on: datetime + :ivar modified_on: The date and time when the cluster was last modified. + :vartype modified_on: datetime + :ivar provisioning_state: The provision state of the cluster. Valid values + are Unknown, Updating, Provisioning, Succeeded, and Failed. Possible + values include: 'Unknown', 'Updating', 'Creating', 'Deleting', + 'Succeeded', 'Failed', 'Canceled' + :vartype provisioning_state: str or + ~azure.mgmt.machinelearningcompute.models.OperationStatus + :ivar provisioning_errors: List of provisioning errors reported by the + resource provider. + :vartype provisioning_errors: + list[~azure.mgmt.machinelearningcompute.models.ErrorResponseWrapper] + :param cluster_type: Required. The cluster type. Possible values include: + 'ACS', 'Local' + :type cluster_type: str or + ~azure.mgmt.machinelearningcompute.models.ClusterType + :param storage_account: Storage Account properties. + :type storage_account: + ~azure.mgmt.machinelearningcompute.models.StorageAccountProperties + :param container_registry: Container Registry properties. + :type container_registry: + ~azure.mgmt.machinelearningcompute.models.ContainerRegistryProperties + :param container_service: Parameters for the Azure Container Service + cluster. + :type container_service: + ~azure.mgmt.machinelearningcompute.models.AcsClusterProperties + :param app_insights: AppInsights configuration. + :type app_insights: + ~azure.mgmt.machinelearningcompute.models.AppInsightsProperties + :param global_service_configuration: Contains global configuration for the + web services in the cluster. + :type global_service_configuration: + ~azure.mgmt.machinelearningcompute.models.GlobalServiceConfiguration + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + 'created_on': {'readonly': True}, + 'modified_on': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_errors': {'readonly': True}, + 'cluster_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'created_on': {'key': 'properties.createdOn', 'type': 'iso-8601'}, + 'modified_on': {'key': 'properties.modifiedOn', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'provisioning_errors': {'key': 'properties.provisioningErrors', 'type': '[ErrorResponseWrapper]'}, + 'cluster_type': {'key': 'properties.clusterType', 'type': 'str'}, + 'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'}, + 'container_registry': {'key': 'properties.containerRegistry', 'type': 'ContainerRegistryProperties'}, + 'container_service': {'key': 'properties.containerService', 'type': 'AcsClusterProperties'}, + 'app_insights': {'key': 'properties.appInsights', 'type': 'AppInsightsProperties'}, + 'global_service_configuration': {'key': 'properties.globalServiceConfiguration', 'type': 'GlobalServiceConfiguration'}, + } + + def __init__(self, *, location: str, cluster_type, tags=None, description: str=None, storage_account=None, container_registry=None, container_service=None, app_insights=None, global_service_configuration=None, **kwargs) -> None: + super(OperationalizationCluster, self).__init__(location=location, tags=tags, **kwargs) + self.description = description + self.created_on = None + self.modified_on = None + self.provisioning_state = None + self.provisioning_errors = None + self.cluster_type = cluster_type + self.storage_account = storage_account + self.container_registry = container_registry + self.container_service = container_service + self.app_insights = app_insights + self.global_service_configuration = global_service_configuration diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters.py index 24189a178e7c..98e426b12dbc 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters.py @@ -27,6 +27,6 @@ class OperationalizationClusterUpdateParameters(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, tags=None): - super(OperationalizationClusterUpdateParameters, self).__init__() - self.tags = tags + def __init__(self, **kwargs): + super(OperationalizationClusterUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters_py3.py new file mode 100644 index 000000000000..e35038c4dff0 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/operationalization_cluster_update_parameters_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 OperationalizationClusterUpdateParameters(Model): + """Parameters for PATCH operation on an operationalization cluster. + + :param tags: Gets or sets a list of key value pairs that describe the + resource. These tags can be used in viewing and grouping this resource + (across resource groups). A maximum of 15 tags can be provided for a + resource. Each tag must have a key no greater in length than 128 + characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(OperationalizationClusterUpdateParameters, self).__init__(**kwargs) + self.tags = tags diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource.py index ac15798f2a5b..9d1b18b23ed2 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource.py @@ -18,11 +18,13 @@ class Resource(Model): Variables are only populated by the server, and will be ignored when sending a request. + All required parameters must be populated in order to send to Azure. + :ivar id: Specifies the resource ID. :vartype id: str :ivar name: Specifies the name of the resource. :vartype name: str - :param location: Specifies the location of the resource. + :param location: Required. Specifies the location of the resource. :type location: str :ivar type: Specifies the type of the resource. :vartype type: str @@ -45,10 +47,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, tags=None): - super(Resource, self).__init__() + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) self.id = None self.name = None - self.location = location + self.location = kwargs.get('location', None) self.type = None - self.tags = tags + self.tags = kwargs.get('tags', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation.py index e1f4cf1f2edf..df660e049bbe 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation.py @@ -30,8 +30,8 @@ class ResourceOperation(Model): 'origin': {'key': 'origin', 'type': 'str'}, } - def __init__(self, name=None, display=None, origin=None): - super(ResourceOperation, self).__init__() - self.name = name - self.display = display - self.origin = origin + def __init__(self, **kwargs): + super(ResourceOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display.py index 8b30e725dcc5..a622134ef09b 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display.py @@ -32,9 +32,9 @@ class ResourceOperationDisplay(Model): 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, provider=None, resource=None, operation=None, description=None): - super(ResourceOperationDisplay, self).__init__() - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description + def __init__(self, **kwargs): + super(ResourceOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display_py3.py new file mode 100644 index 000000000000..4c0159881f78 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_display_py3.py @@ -0,0 +1,40 @@ +# 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 ResourceOperationDisplay(Model): + """Display of the operation. + + :param provider: The resource provider name. + :type provider: str + :param resource: The resource name. + :type resource: str + :param operation: The operation. + :type operation: str + :param description: The description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(ResourceOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_py3.py new file mode 100644 index 000000000000..bbe87d130a77 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_operation_py3.py @@ -0,0 +1,37 @@ +# 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 ResourceOperation(Model): + """Resource operation. + + :param name: Name of this operation. + :type name: str + :param display: Display of the operation. + :type display: + ~azure.mgmt.machinelearningcompute.models.ResourceOperationDisplay + :param origin: The operation origin. + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display=None, origin: str=None, **kwargs) -> None: + super(ResourceOperation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_py3.py new file mode 100644 index 000000000000..8bb16b8595c8 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/resource_py3.py @@ -0,0 +1,56 @@ +# 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 Resource(Model): + """Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Specifies the resource ID. + :vartype id: str + :ivar name: Specifies the name of the resource. + :vartype name: str + :param location: Required. Specifies the location of the resource. + :type location: str + :ivar type: Specifies the type of the resource. + :vartype type: str + :param tags: Contains resource tags defined as key/value pairs. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'location': {'required': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.location = location + self.type = None + self.tags = tags diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration.py index 8730b561faad..b15ae18172f5 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration.py @@ -16,13 +16,15 @@ class ServiceAuthConfiguration(Model): """Global service auth configuration properties. These are the data-plane authorization keys and are used if a service doesn't define it's own. - :param primary_auth_key_hash: The primary auth key hash. This is not - returned in response of GET/PUT on the resource.. To see this please call - listKeys API. + All required parameters must be populated in order to send to Azure. + + :param primary_auth_key_hash: Required. The primary auth key hash. This is + not returned in response of GET/PUT on the resource.. To see this please + call listKeys API. :type primary_auth_key_hash: str - :param secondary_auth_key_hash: The secondary auth key hash. This is not - returned in response of GET/PUT on the resource.. To see this please call - listKeys API. + :param secondary_auth_key_hash: Required. The secondary auth key hash. + This is not returned in response of GET/PUT on the resource.. To see this + please call listKeys API. :type secondary_auth_key_hash: str """ @@ -36,7 +38,7 @@ class ServiceAuthConfiguration(Model): 'secondary_auth_key_hash': {'key': 'secondaryAuthKeyHash', 'type': 'str'}, } - def __init__(self, primary_auth_key_hash, secondary_auth_key_hash): - super(ServiceAuthConfiguration, self).__init__() - self.primary_auth_key_hash = primary_auth_key_hash - self.secondary_auth_key_hash = secondary_auth_key_hash + def __init__(self, **kwargs): + super(ServiceAuthConfiguration, self).__init__(**kwargs) + self.primary_auth_key_hash = kwargs.get('primary_auth_key_hash', None) + self.secondary_auth_key_hash = kwargs.get('secondary_auth_key_hash', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration_py3.py new file mode 100644 index 000000000000..f1252d415a1d --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_auth_configuration_py3.py @@ -0,0 +1,44 @@ +# 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 ServiceAuthConfiguration(Model): + """Global service auth configuration properties. These are the data-plane + authorization keys and are used if a service doesn't define it's own. + + All required parameters must be populated in order to send to Azure. + + :param primary_auth_key_hash: Required. The primary auth key hash. This is + not returned in response of GET/PUT on the resource.. To see this please + call listKeys API. + :type primary_auth_key_hash: str + :param secondary_auth_key_hash: Required. The secondary auth key hash. + This is not returned in response of GET/PUT on the resource.. To see this + please call listKeys API. + :type secondary_auth_key_hash: str + """ + + _validation = { + 'primary_auth_key_hash': {'required': True}, + 'secondary_auth_key_hash': {'required': True}, + } + + _attribute_map = { + 'primary_auth_key_hash': {'key': 'primaryAuthKeyHash', 'type': 'str'}, + 'secondary_auth_key_hash': {'key': 'secondaryAuthKeyHash', 'type': 'str'}, + } + + def __init__(self, *, primary_auth_key_hash: str, secondary_auth_key_hash: str, **kwargs) -> None: + super(ServiceAuthConfiguration, self).__init__(**kwargs) + self.primary_auth_key_hash = primary_auth_key_hash + self.secondary_auth_key_hash = secondary_auth_key_hash diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties.py index 52578edb688d..3633b99f5ca3 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties.py @@ -16,10 +16,13 @@ class ServicePrincipalProperties(Model): """The Azure service principal used by Kubernetes for configuring load balancers. - :param client_id: The service principal client ID + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The service principal client ID :type client_id: str - :param secret: The service principal secret. This is not returned in - response of GET/PUT on the resource. To see this please call listKeys. + :param secret: Required. The service principal secret. This is not + returned in response of GET/PUT on the resource. To see this please call + listKeys. :type secret: str """ @@ -33,7 +36,7 @@ class ServicePrincipalProperties(Model): 'secret': {'key': 'secret', 'type': 'str'}, } - def __init__(self, client_id, secret): - super(ServicePrincipalProperties, self).__init__() - self.client_id = client_id - self.secret = secret + def __init__(self, **kwargs): + super(ServicePrincipalProperties, self).__init__(**kwargs) + self.client_id = kwargs.get('client_id', None) + self.secret = kwargs.get('secret', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties_py3.py new file mode 100644 index 000000000000..1fc8af04a593 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/service_principal_properties_py3.py @@ -0,0 +1,42 @@ +# 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 ServicePrincipalProperties(Model): + """The Azure service principal used by Kubernetes for configuring load + balancers. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The service principal client ID + :type client_id: str + :param secret: Required. The service principal secret. This is not + returned in response of GET/PUT on the resource. To see this please call + listKeys. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + 'secret': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__(self, *, client_id: str, secret: str, **kwargs) -> None: + super(ServicePrincipalProperties, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration.py index 1225db4ffd2b..c5111b0065ca 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration.py @@ -35,9 +35,9 @@ class SslConfiguration(Model): 'cname': {'key': 'cname', 'type': 'str'}, } - def __init__(self, status="Enabled", cert=None, key=None, cname=None): - super(SslConfiguration, self).__init__() - self.status = status - self.cert = cert - self.key = key - self.cname = cname + def __init__(self, **kwargs): + super(SslConfiguration, self).__init__(**kwargs) + self.status = kwargs.get('status', "Enabled") + self.cert = kwargs.get('cert', None) + self.key = kwargs.get('key', None) + self.cname = kwargs.get('cname', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration_py3.py new file mode 100644 index 000000000000..f658e56f3836 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/ssl_configuration_py3.py @@ -0,0 +1,43 @@ +# 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 SslConfiguration(Model): + """SSL configuration. If configured data-plane calls to user services will be + exposed over SSL only. + + :param status: SSL status. Allowed values are Enabled and Disabled. + Possible values include: 'Enabled', 'Disabled'. Default value: "Enabled" . + :type status: str or ~azure.mgmt.machinelearningcompute.models.Status + :param cert: The SSL cert data in PEM format. + :type cert: str + :param key: The SSL key data in PEM format. This is not returned in + response of GET/PUT on the resource. To see this please call listKeys API. + :type key: str + :param cname: The CName of the certificate. + :type cname: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'cert': {'key': 'cert', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + 'cname': {'key': 'cname', 'type': 'str'}, + } + + def __init__(self, *, status="Enabled", cert: str=None, key: str=None, cname: str=None, **kwargs) -> None: + super(SslConfiguration, self).__init__(**kwargs) + self.status = status + self.cert = cert + self.key = key + self.cname = cname diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials.py index 8d08c07bc7a5..d5f3694a4bc9 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials.py @@ -38,8 +38,8 @@ class StorageAccountCredentials(Model): 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, } - def __init__(self): - super(StorageAccountCredentials, self).__init__() + def __init__(self, **kwargs): + super(StorageAccountCredentials, self).__init__(**kwargs) self.resource_id = None self.primary_key = None self.secondary_key = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials_py3.py new file mode 100644 index 000000000000..055cab0a02b6 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_credentials_py3.py @@ -0,0 +1,45 @@ +# 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 StorageAccountCredentials(Model): + """Access information for the storage account. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar resource_id: The ARM resource ID of the storage account. + :vartype resource_id: str + :ivar primary_key: The primary key of the storage account. + :vartype primary_key: str + :ivar secondary_key: The secondary key of the storage account. + :vartype secondary_key: str + """ + + _validation = { + 'resource_id': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(StorageAccountCredentials, self).__init__(**kwargs) + self.resource_id = None + self.primary_key = None + self.secondary_key = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties.py index 79f3a766b440..49b00edee07a 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties.py @@ -25,6 +25,6 @@ class StorageAccountProperties(Model): 'resource_id': {'key': 'resourceId', 'type': 'str'}, } - def __init__(self, resource_id=None): - super(StorageAccountProperties, self).__init__() - self.resource_id = resource_id + def __init__(self, **kwargs): + super(StorageAccountProperties, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties_py3.py new file mode 100644 index 000000000000..6ff550d4489c --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/storage_account_properties_py3.py @@ -0,0 +1,30 @@ +# 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 StorageAccountProperties(Model): + """Properties of Storage Account. + + :param resource_id: ARM resource ID of the Azure Storage Account to store + CLI specific files. If not provided one will be created. This cannot be + changed once the cluster is created. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__(self, *, resource_id: str=None, **kwargs) -> None: + super(StorageAccountProperties, self).__init__(**kwargs) + self.resource_id = resource_id diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service.py index a6d2975738e7..0af3cc6ef158 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service.py @@ -18,8 +18,10 @@ class SystemService(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param system_service_type: The system service type. Possible values - include: 'None', 'ScoringFrontEnd', 'BatchFrontEnd' + All required parameters must be populated in order to send to Azure. + + :param system_service_type: Required. The system service type. Possible + values include: 'None', 'ScoringFrontEnd', 'BatchFrontEnd' :type system_service_type: str or ~azure.mgmt.machinelearningcompute.models.SystemServiceType :ivar public_ip_address: The public IP address of the system service @@ -40,8 +42,8 @@ class SystemService(Model): 'version': {'key': 'version', 'type': 'str'}, } - def __init__(self, system_service_type): - super(SystemService, self).__init__() - self.system_service_type = system_service_type + def __init__(self, **kwargs): + super(SystemService, self).__init__(**kwargs) + self.system_service_type = kwargs.get('system_service_type', None) self.public_ip_address = None self.version = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service_py3.py new file mode 100644 index 000000000000..6408dd849845 --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/system_service_py3.py @@ -0,0 +1,49 @@ +# 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 SystemService(Model): + """Information about a system service deployed in the cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param system_service_type: Required. The system service type. Possible + values include: 'None', 'ScoringFrontEnd', 'BatchFrontEnd' + :type system_service_type: str or + ~azure.mgmt.machinelearningcompute.models.SystemServiceType + :ivar public_ip_address: The public IP address of the system service + :vartype public_ip_address: str + :ivar version: The state of the system service + :vartype version: str + """ + + _validation = { + 'system_service_type': {'required': True}, + 'public_ip_address': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'system_service_type': {'key': 'systemServiceType', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__(self, *, system_service_type, **kwargs) -> None: + super(SystemService, self).__init__(**kwargs) + self.system_service_type = system_service_type + self.public_ip_address = None + self.version = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response.py index d4321dd232db..63c99dcbc0d8 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response.py @@ -42,8 +42,8 @@ class UpdateSystemServicesResponse(Model): 'update_completed_on': {'key': 'updateCompletedOn', 'type': 'iso-8601'}, } - def __init__(self): - super(UpdateSystemServicesResponse, self).__init__() + def __init__(self, **kwargs): + super(UpdateSystemServicesResponse, self).__init__(**kwargs) self.update_status = None self.update_started_on = None self.update_completed_on = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response_py3.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response_py3.py new file mode 100644 index 000000000000..ca78a4f88cad --- /dev/null +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/update_system_services_response_py3.py @@ -0,0 +1,49 @@ +# 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 UpdateSystemServicesResponse(Model): + """Response of the update system services API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar update_status: Update status. Possible values include: 'Unknown', + 'Updating', 'Creating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' + :vartype update_status: str or + ~azure.mgmt.machinelearningcompute.models.OperationStatus + :ivar update_started_on: The date and time when the last system services + update was started. + :vartype update_started_on: datetime + :ivar update_completed_on: The date and time when the last system services + update completed. + :vartype update_completed_on: datetime + """ + + _validation = { + 'update_status': {'readonly': True}, + 'update_started_on': {'readonly': True}, + 'update_completed_on': {'readonly': True}, + } + + _attribute_map = { + 'update_status': {'key': 'updateStatus', 'type': 'str'}, + 'update_started_on': {'key': 'updateStartedOn', 'type': 'iso-8601'}, + 'update_completed_on': {'key': 'updateCompletedOn', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs) -> None: + super(UpdateSystemServicesResponse, self).__init__(**kwargs) + self.update_status = None + self.update_started_on = None + self.update_completed_on = None diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/machine_learning_compute_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/machine_learning_compute_operations.py index d2eb273bf3e2..806464668e75 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/machine_learning_compute_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/machine_learning_compute_operations.py @@ -22,7 +22,7 @@ class MachineLearningComputeOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The version of the Microsoft.MachineLearningCompute resource provider API to use. Constant value: "2017-08-01-preview". """ @@ -52,7 +52,7 @@ def list_available_operations( :raises: :class:`CloudError` """ # Construct URL - url = '/providers/Microsoft.MachineLearningCompute/operations' + url = self.list_available_operations.metadata['url'] # Construct parameters query_parameters = {} @@ -60,7 +60,7 @@ def list_available_operations( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -69,8 +69,8 @@ def list_available_operations( 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) - response = self._client.send(request, header_parameters, **operation_config) + 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) @@ -87,3 +87,4 @@ def list_available_operations( return client_raw_response return deserialized + list_available_operations.metadata = {'url': '/providers/Microsoft.MachineLearningCompute/operations'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/operationalization_clusters_operations.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/operationalization_clusters_operations.py index 5afa42f9ecb6..fc114c2efca0 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/operationalization_clusters_operations.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/operations/operationalization_clusters_operations.py @@ -12,7 +12,8 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -from msrestazure.azure_operation import AzureOperationPoller +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling from .. import models @@ -23,7 +24,7 @@ class OperationalizationClustersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The version of the Microsoft.MachineLearningCompute resource provider API to use. Constant value: "2017-08-01-preview". """ @@ -38,32 +39,11 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create_or_update( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): - """Create or update an operationalization cluster. - :param resource_group_name: Name of the resource group in which the - cluster is located. - :type resource_group_name: str - :param cluster_name: The name of the cluster. - :type cluster_name: str - :param parameters: Parameters supplied to create or update an - Operationalization cluster. - :type parameters: - ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns - OperationalizationCluster or ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster] - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseWrapperException` - """ + def _create_or_update_initial( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}' + url = self.create_or_update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -77,6 +57,7 @@ def create_or_update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -89,31 +70,64 @@ def create_or_update( body_content = self._serialize.body(parameters, 'OperationalizationCluster') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 201]: + raise models.ErrorResponseWrapperException(self._deserialize, response) - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('OperationalizationCluster', response) + if response.status_code == 201: + deserialized = self._deserialize('OperationalizationCluster', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 201]: - raise models.ErrorResponseWrapperException(self._deserialize, response) + return deserialized - deserialized = None + def create_or_update( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update an operationalization cluster. + + :param resource_group_name: Name of the resource group in which the + cluster is located. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param parameters: Parameters supplied to create or update an + Operationalization cluster. + :type parameters: + ~azure.mgmt.machinelearningcompute.models.OperationalizationCluster + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + OperationalizationCluster or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningcompute.models.OperationalizationCluster]] + :raises: + :class:`ErrorResponseWrapperException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - if response.status_code == 200: - deserialized = self._deserialize('OperationalizationCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('OperationalizationCluster', response) + def get_long_running_output(response): + deserialized = self._deserialize('OperationalizationCluster', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -121,16 +135,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} def get( self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): @@ -155,7 +167,7 @@ def get( :class:`ErrorResponseWrapperException` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}' + url = self.get.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -169,7 +181,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -178,8 +190,8 @@ def get( 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) - response = self._client.send(request, header_parameters, **operation_config) + 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]: raise models.ErrorResponseWrapperException(self._deserialize, response) @@ -194,6 +206,7 @@ def get( return client_raw_response return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} def update( self, resource_group_name, cluster_name, tags=None, custom_headers=None, raw=False, **operation_config): @@ -226,7 +239,7 @@ def update( parameters = models.OperationalizationClusterUpdateParameters(tags=tags) # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}' + url = self.update.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -240,6 +253,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -252,9 +266,8 @@ def update( body_content = self._serialize.body(parameters, 'OperationalizationClusterUpdateParameters') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorResponseWrapperException(self._deserialize, response) @@ -269,31 +282,13 @@ def update( return client_raw_response return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} - def delete( - self, resource_group_name, cluster_name, delete_all=None, custom_headers=None, raw=False, **operation_config): - """Deletes the specified cluster. - :param resource_group_name: Name of the resource group in which the - cluster is located. - :type resource_group_name: str - :param cluster_name: The name of the cluster. - :type cluster_name: str - :param delete_all: If true, deletes all resources associated with this - cluster. - :type delete_all: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseWrapperException` - """ + def _delete_initial( + self, resource_group_name, cluster_name, delete_all=None, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}' + url = self.delete.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -309,7 +304,6 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -318,24 +312,54 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): - - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - def get_long_running_status(status_link, headers=None): + if response.status_code not in [202, 204]: + raise models.ErrorResponseWrapperException(self._deserialize, response) - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if raw: + client_raw_response = ClientRawResponse(None, response) + header_dict = { + 'Location': 'str', + } + client_raw_response.add_headers(header_dict) + return client_raw_response - def get_long_running_output(response): + def delete( + self, resource_group_name, cluster_name, delete_all=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified cluster. - if response.status_code not in [202, 204]: - raise models.ErrorResponseWrapperException(self._deserialize, response) + :param resource_group_name: Name of the resource group in which the + cluster is located. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param delete_all: If true, deletes all resources associated with this + cluster. + :type delete_all: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseWrapperException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + delete_all=delete_all, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + def get_long_running_output(response): if raw: client_raw_response = ClientRawResponse(None, response) client_raw_response.add_headers({ @@ -343,16 +367,14 @@ def get_long_running_output(response): }) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}'} def list_keys( self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): @@ -378,7 +400,7 @@ def list_keys( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys' + url = self.list_keys.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -392,7 +414,7 @@ def list_keys( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -401,8 +423,8 @@ def list_keys( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -419,6 +441,7 @@ def list_keys( return client_raw_response return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/listKeys'} def check_system_services_updates_available( self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): @@ -442,7 +465,7 @@ def check_system_services_updates_available( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/checkSystemServicesUpdatesAvailable' + url = self.check_system_services_updates_available.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -456,7 +479,7 @@ def check_system_services_updates_available( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -465,8 +488,8 @@ def check_system_services_updates_available( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -483,28 +506,13 @@ def check_system_services_updates_available( return client_raw_response return deserialized + check_system_services_updates_available.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/checkSystemServicesUpdatesAvailable'} - def update_system_services( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """Updates system services in a cluster. - :param resource_group_name: Name of the resource group in which the - cluster is located. - :type resource_group_name: str - :param cluster_name: The name of the cluster. - :type cluster_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 - :return: An instance of AzureOperationPoller that returns - UpdateSystemServicesResponse or ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _update_system_services_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices' + url = self.update_system_services.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), @@ -518,7 +526,7 @@ def update_system_services( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -527,34 +535,66 @@ def update_system_services( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - def get_long_running_status(status_link, headers=None): + deserialized = None + header_dict = {} - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('UpdateSystemServicesResponse', response) + header_dict = { + 'Location': 'str', + } - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response.add_headers(header_dict) + return client_raw_response - if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + return deserialized - deserialized = None - header_dict = {} + def update_system_services( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Updates system services in a cluster. - if response.status_code == 200: - deserialized = self._deserialize('UpdateSystemServicesResponse', response) - header_dict = { - 'Location': 'str', - } + :param resource_group_name: Name of the resource group in which the + cluster is located. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + UpdateSystemServicesResponse or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.machinelearningcompute.models.UpdateSystemServicesResponse]] + :raises: :class:`CloudError` + """ + raw_result = self._update_system_services_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + header_dict = { + 'Location': 'str', + } + deserialized = self._deserialize('UpdateSystemServicesResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -563,16 +603,14 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( + lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update_system_services.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters/{clusterName}/updateSystemServices'} def list_by_resource_group( self, resource_group_name, skiptoken=None, custom_headers=None, raw=False, **operation_config): @@ -597,7 +635,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters' + url = self.list_by_resource_group.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') @@ -616,7 +654,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -625,9 +663,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, **operation_config) + 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) @@ -645,6 +682,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'} def list_by_subscription_id( self, skiptoken=None, custom_headers=None, raw=False, **operation_config): @@ -666,7 +704,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters' + url = self.list_by_subscription_id.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -684,7 +722,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + 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: @@ -693,9 +731,8 @@ def internal_paging(next_link=None, raw=False): 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) - response = self._client.send( - request, header_parameters, **operation_config) + 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) @@ -713,3 +750,4 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningCompute/operationalizationClusters'} diff --git a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py index e9983c0d8c01..266f5a486d79 100644 --- a/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py +++ b/sdk/machinelearning/azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.4.1" +VERSION = "0.5.0"