From 3313c8cda67be153ecd81fe9a9407173072eb4d0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 27 Sep 2018 05:13:15 +0000 Subject: [PATCH 01/10] Generated from ddbb8ffb2dd676863a74cd5d44748fbd93a93025 Update models to align with expected responses --- .../azure/mgmt/iotcentral/models/__init__.py | 20 +++-- ...ility_info.py => app_availability_info.py} | 23 +++--- ...fo_py3.py => app_availability_info_py3.py} | 25 +++--- .../mgmt/iotcentral/models/error_details.py | 25 +----- .../iotcentral/models/error_details_py3.py | 27 ++----- .../iotcentral/models/error_response_body.py | 49 ++++++++++++ .../models/error_response_body_py3.py | 49 ++++++++++++ .../models/iot_central_client_enums.py | 6 -- ..._inputs.py => name_availability_inputs.py} | 11 ++- ...py3.py => name_availability_inputs_py3.py} | 13 ++- .../models/subdomain_availability_inputs.py | 40 ++++++++++ .../subdomain_availability_inputs_py3.py | 40 ++++++++++ .../iotcentral/operations/apps_operations.py | 80 +++++++++++++++++-- 13 files changed, 313 insertions(+), 95 deletions(-) rename azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/{app_name_availability_info.py => app_availability_info.py} (68%) rename azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/{app_name_availability_info_py3.py => app_availability_info_py3.py} (66%) create mode 100644 azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body.py create mode 100644 azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body_py3.py rename azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/{operation_inputs.py => name_availability_inputs.py} (70%) rename azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/{operation_inputs_py3.py => name_availability_inputs_py3.py} (66%) create mode 100644 azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py create mode 100644 azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py index dc2d42d83462..c99bfcefd75e 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py @@ -14,26 +14,29 @@ from .app_py3 import App from .app_patch_py3 import AppPatch from .resource_py3 import Resource + from .error_response_body_py3 import ErrorResponseBody from .error_details_py3 import ErrorDetails, ErrorDetailsException from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation - from .operation_inputs_py3 import OperationInputs - from .app_name_availability_info_py3 import AppNameAvailabilityInfo + from .name_availability_inputs_py3 import NameAvailabilityInputs + from .subdomain_availability_inputs_py3 import SubdomainAvailabilityInputs + from .app_availability_info_py3 import AppAvailabilityInfo except (SyntaxError, ImportError): from .app_sku_info import AppSkuInfo from .app import App from .app_patch import AppPatch from .resource import Resource + from .error_response_body import ErrorResponseBody from .error_details import ErrorDetails, ErrorDetailsException from .operation_display import OperationDisplay from .operation import Operation - from .operation_inputs import OperationInputs - from .app_name_availability_info import AppNameAvailabilityInfo + from .name_availability_inputs import NameAvailabilityInputs + from .subdomain_availability_inputs import SubdomainAvailabilityInputs + from .app_availability_info import AppAvailabilityInfo from .app_paged import AppPaged from .operation_paged import OperationPaged from .iot_central_client_enums import ( AppSku, - AppNameUnavailabilityReason, ) __all__ = [ @@ -41,13 +44,14 @@ 'App', 'AppPatch', 'Resource', + 'ErrorResponseBody', 'ErrorDetails', 'ErrorDetailsException', 'OperationDisplay', 'Operation', - 'OperationInputs', - 'AppNameAvailabilityInfo', + 'NameAvailabilityInputs', + 'SubdomainAvailabilityInputs', + 'AppAvailabilityInfo', 'AppPaged', 'OperationPaged', 'AppSku', - 'AppNameUnavailabilityReason', ] diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info.py similarity index 68% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info.py index 5121fecc7259..b690919a286d 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info.py @@ -12,9 +12,9 @@ from msrest.serialization import Model -class AppNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT Central application name is - available. +class AppAvailabilityInfo(Model): + """The properties indicating whether a given IoT Central application name or + subdomain is available. Variables are only populated by the server, and will be ignored when sending a request. @@ -22,27 +22,26 @@ class AppNameAvailabilityInfo(Model): :ivar name_available: The value which indicates whether the provided name is available. :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iotcentral.models.AppNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str + :ivar reason: The reason for unavailability. + :vartype reason: str + :ivar message: The detailed reason message. + :vartype message: str """ _validation = { 'name_available': {'readonly': True}, 'reason': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'AppNameUnavailabilityReason'}, + 'reason': {'key': 'reason', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } def __init__(self, **kwargs): - super(AppNameAvailabilityInfo, self).__init__(**kwargs) + super(AppAvailabilityInfo, self).__init__(**kwargs) self.name_available = None self.reason = None - self.message = kwargs.get('message', None) + self.message = None diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info_py3.py similarity index 66% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info_py3.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info_py3.py index 7549acd0baee..64c94d994ad1 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_name_availability_info_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/app_availability_info_py3.py @@ -12,9 +12,9 @@ from msrest.serialization import Model -class AppNameAvailabilityInfo(Model): - """The properties indicating whether a given IoT Central application name is - available. +class AppAvailabilityInfo(Model): + """The properties indicating whether a given IoT Central application name or + subdomain is available. Variables are only populated by the server, and will be ignored when sending a request. @@ -22,27 +22,26 @@ class AppNameAvailabilityInfo(Model): :ivar name_available: The value which indicates whether the provided name is available. :vartype name_available: bool - :ivar reason: The reason for unavailability. Possible values include: - 'Invalid', 'AlreadyExists' - :vartype reason: str or - ~azure.mgmt.iotcentral.models.AppNameUnavailabilityReason - :param message: The detailed reason message. - :type message: str + :ivar reason: The reason for unavailability. + :vartype reason: str + :ivar message: The detailed reason message. + :vartype message: str """ _validation = { 'name_available': {'readonly': True}, 'reason': {'readonly': True}, + 'message': {'readonly': True}, } _attribute_map = { 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'AppNameUnavailabilityReason'}, + 'reason': {'key': 'reason', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, *, message: str=None, **kwargs) -> None: - super(AppNameAvailabilityInfo, self).__init__(**kwargs) + def __init__(self, **kwargs) -> None: + super(AppAvailabilityInfo, self).__init__(**kwargs) self.name_available = None self.reason = None - self.message = message + self.message = None diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py index a4886654fbff..1adef6c638f8 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py @@ -16,34 +16,17 @@ class ErrorDetails(Model): """Error details. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The target of the particular error. - :vartype target: str + :param error: + :type error: ~azure.mgmt.iotcentral.models.ErrorResponseBody """ - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, } def __init__(self, **kwargs): super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None + self.error = kwargs.get('error', None) class ErrorDetailsException(HttpOperationError): diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py index c219c199294e..90afa0bd3cfa 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py @@ -16,34 +16,17 @@ class ErrorDetails(Model): """Error details. - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The target of the particular error. - :vartype target: str + :param error: + :type error: ~azure.mgmt.iotcentral.models.ErrorResponseBody """ - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - } - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, error=None, **kwargs) -> None: super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None + self.error = error class ErrorDetailsException(HttpOperationError): diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body.py new file mode 100644 index 000000000000..2eb41a34cfe7 --- /dev/null +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body.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 ErrorResponseBody(Model): + """Details of error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, **kwargs): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = kwargs.get('details', None) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body_py3.py new file mode 100644 index 000000000000..1e7115c11cb7 --- /dev/null +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_response_body_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 ErrorResponseBody(Model): + """Details of error response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorResponseBody]'}, + } + + def __init__(self, *, details=None, **kwargs) -> None: + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = details diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py index 91780df77e5f..8883b672464f 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/iot_central_client_enums.py @@ -16,9 +16,3 @@ class AppSku(str, Enum): f1 = "F1" s1 = "S1" - - -class AppNameUnavailabilityReason(str, Enum): - - invalid = "Invalid" - already_exists = "AlreadyExists" diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py similarity index 70% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py index 71bb28eb8639..c62854af1305 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class OperationInputs(Model): +class NameAvailabilityInputs(Model): """Input values. All required parameters must be populated in order to send to Azure. @@ -20,16 +20,21 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str """ _validation = { - 'name': {'required': True}, + 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs): - super(OperationInputs, self).__init__(**kwargs) + super(NameAvailabilityInputs, self).__init__(**kwargs) self.name = kwargs.get('name', None) + self.type = kwargs.get('type', "IoTApps") diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py similarity index 66% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py index e99d4a561bc4..1cc36e750036 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class OperationInputs(Model): +class NameAvailabilityInputs(Model): """Input values. All required parameters must be populated in order to send to Azure. @@ -20,16 +20,21 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str """ _validation = { - 'name': {'required': True}, + 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str, **kwargs) -> None: - super(OperationInputs, self).__init__(**kwargs) + def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None: + super(NameAvailabilityInputs, self).__init__(**kwargs) self.name = name + self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py new file mode 100644 index 000000000000..c231555f0932 --- /dev/null +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.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 SubdomainAvailabilityInputs(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param subdomain: Required. The subdomain of the IoT Central application + instance to check. + :type subdomain: str + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str + """ + + _validation = { + 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + } + + _attribute_map = { + 'subdomain': {'key': 'subdomain', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SubdomainAvailabilityInputs, self).__init__(**kwargs) + self.subdomain = kwargs.get('subdomain', None) + self.type = kwargs.get('type', "IoTApps") diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py new file mode 100644 index 000000000000..d473e7abf824 --- /dev/null +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_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 SubdomainAvailabilityInputs(Model): + """Input values. + + All required parameters must be populated in order to send to Azure. + + :param subdomain: Required. The subdomain of the IoT Central application + instance to check. + :type subdomain: str + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str + """ + + _validation = { + 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + } + + _attribute_map = { + 'subdomain': {'key': 'subdomain', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, subdomain: str, type: str="IoTApps", **kwargs) -> None: + super(SubdomainAvailabilityInputs, self).__init__(**kwargs) + self.subdomain = subdomain + self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py index 55a0ccce7828..1486a4982a48 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py @@ -521,24 +521,26 @@ def internal_paging(next_link=None, raw=False): list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps'} def check_name_availability( - self, name, custom_headers=None, raw=False, **operation_config): + self, name, type="IoTApps", custom_headers=None, raw=False, **operation_config): """Check if an IoT Central application name is available. :param name: The name of the IoT Central application instance to check. :type name: str + :param type: The type of the IoT Central resource to query. + :type type: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: AppNameAvailabilityInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.iotcentral.models.AppNameAvailabilityInfo or + :return: AppAvailabilityInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iotcentral.models.AppAvailabilityInfo or ~msrest.pipeline.ClientRawResponse :raises: :class:`ErrorDetailsException` """ - operation_inputs = models.OperationInputs(name=name) + name_availability_inputs = models.NameAvailabilityInputs(name=name, type=type) # Construct URL url = self.check_name_availability.metadata['url'] @@ -563,7 +565,7 @@ def check_name_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(operation_inputs, 'OperationInputs') + body_content = self._serialize.body(name_availability_inputs, 'NameAvailabilityInputs') # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -575,7 +577,7 @@ def check_name_availability( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AppNameAvailabilityInfo', response) + deserialized = self._deserialize('AppAvailabilityInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -583,3 +585,69 @@ def check_name_availability( return deserialized check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability'} + + def check_subdomain_availability( + self, subdomain, type="IoTApps", custom_headers=None, raw=False, **operation_config): + """Check if an IoT Central application subdomain is available. + + :param subdomain: The subdomain of the IoT Central application + instance to check. + :type subdomain: str + :param type: The type of the IoT Central resource to query. + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AppAvailabilityInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.iotcentral.models.AppAvailabilityInfo or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + subdomain_availability_inputs = models.SubdomainAvailabilityInputs(subdomain=subdomain, type=type) + + # Construct URL + url = self.check_subdomain_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(subdomain_availability_inputs, 'SubdomainAvailabilityInputs') + + # Construct and send request + request = self._client.post(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.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppAvailabilityInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_subdomain_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability'} From 0ebe26b557b9199296e4e622d3a58ed34e5c4efa Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Thu, 27 Sep 2018 05:18:30 +0000 Subject: [PATCH 02/10] Packaging update of azure-mgmt-iotcentral --- azure-mgmt-iotcentral/MANIFEST.in | 1 - azure-mgmt-iotcentral/azure/__init__.py | 2 +- azure-mgmt-iotcentral/azure/mgmt/__init__.py | 2 +- azure-mgmt-iotcentral/azure_bdist_wheel.py | 54 -------------------- azure-mgmt-iotcentral/setup.cfg | 1 - azure-mgmt-iotcentral/setup.py | 17 +++--- 6 files changed, 11 insertions(+), 66 deletions(-) delete mode 100644 azure-mgmt-iotcentral/azure_bdist_wheel.py diff --git a/azure-mgmt-iotcentral/MANIFEST.in b/azure-mgmt-iotcentral/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-iotcentral/MANIFEST.in +++ b/azure-mgmt-iotcentral/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-iotcentral/azure/__init__.py b/azure-mgmt-iotcentral/azure/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-iotcentral/azure/__init__.py +++ b/azure-mgmt-iotcentral/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-iotcentral/azure/mgmt/__init__.py b/azure-mgmt-iotcentral/azure/mgmt/__init__.py index 849489fca33c..0260537a02bb 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/__init__.py +++ b/azure-mgmt-iotcentral/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-iotcentral/azure_bdist_wheel.py b/azure-mgmt-iotcentral/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-iotcentral/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -#-------------------------------------------------------------------------- - -from distutils import log as logger -import os.path - -from wheel.bdist_wheel import bdist_wheel -class azure_bdist_wheel(bdist_wheel): - """The purpose of this class is to build wheel a little differently than the sdist, - without requiring to build the wheel from the sdist (i.e. you can build the wheel - directly from source). - """ - - description = "Create an Azure wheel distribution" - - user_options = bdist_wheel.user_options + \ - [('azure-namespace-package=', None, - "Name of the deepest nspkg used")] - - def initialize_options(self): - bdist_wheel.initialize_options(self) - self.azure_namespace_package = None - - def finalize_options(self): - bdist_wheel.finalize_options(self) - if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): - raise ValueError("azure_namespace_package must finish by -nspkg") - - def run(self): - if not self.distribution.install_requires: - self.distribution.install_requires = [] - self.distribution.install_requires.append( - "{}>=2.0.0".format(self.azure_namespace_package)) - bdist_wheel.run(self) - - def write_record(self, bdist_dir, distinfo_dir): - if self.azure_namespace_package: - # Split and remove last part, assuming it's "nspkg" - subparts = self.azure_namespace_package.split('-')[0:-1] - folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] - for azure_sub_package in folder_with_init: - init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') - if os.path.isfile(init_file): - logger.info("manually remove {} while building the wheel".format(init_file)) - os.remove(init_file) - else: - raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) - bdist_wheel.write_record(self, bdist_dir, distinfo_dir) -cmdclass = { - 'bdist_wheel': azure_bdist_wheel, -} diff --git a/azure-mgmt-iotcentral/setup.cfg b/azure-mgmt-iotcentral/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-iotcentral/setup.cfg +++ b/azure-mgmt-iotcentral/setup.cfg @@ -1,3 +1,2 @@ [bdist_wheel] universal=1 -azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-iotcentral/setup.py b/azure-mgmt-iotcentral/setup.py index 2bab09e942b9..632e3aab0ccb 100644 --- a/azure-mgmt-iotcentral/setup.py +++ b/azure-mgmt-iotcentral/setup.py @@ -10,12 +10,6 @@ import os.path from io import open from setuptools import find_packages, setup -try: - from azure_bdist_wheel import cmdclass -except ImportError: - from distutils import log as logger - logger.warn("Wheel is not available, disabling bdist_wheel hook") - cmdclass = {} # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-iotcentral" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } ) From 47818a6a4ef4d8885f911a11844b462fca2b974a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 27 Sep 2018 06:48:28 +0000 Subject: [PATCH 03/10] Generated from 09b4a4594660bc1c21dc7122a3784f64867a041e Fix build errors --- .../mgmt/iotcentral/models/name_availability_inputs.py | 7 ++----- .../iotcentral/models/name_availability_inputs_py3.py | 9 +++------ .../iotcentral/models/subdomain_availability_inputs.py | 8 +++----- .../models/subdomain_availability_inputs_py3.py | 10 ++++------ .../mgmt/iotcentral/operations/apps_operations.py | 4 ++-- 5 files changed, 14 insertions(+), 24 deletions(-) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py index c62854af1305..9275d6d60245 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py @@ -15,10 +15,7 @@ class NameAvailabilityInputs(Model): """Input values. - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the IoT Central application instance to - check. + :param name: The name of the IoT Central application instance to check. :type name: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -26,7 +23,7 @@ class NameAvailabilityInputs(Model): """ _validation = { - 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + 'name': {'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py index 1cc36e750036..9a67e24ca18a 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py @@ -15,10 +15,7 @@ class NameAvailabilityInputs(Model): """Input values. - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the IoT Central application instance to - check. + :param name: The name of the IoT Central application instance to check. :type name: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -26,7 +23,7 @@ class NameAvailabilityInputs(Model): """ _validation = { - 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + 'name': {'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { @@ -34,7 +31,7 @@ class NameAvailabilityInputs(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None: + def __init__(self, *, name: str=None, type: str="IoTApps", **kwargs) -> None: super(NameAvailabilityInputs, self).__init__(**kwargs) self.name = name self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py index c231555f0932..d7364347bb3f 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py @@ -15,10 +15,8 @@ class SubdomainAvailabilityInputs(Model): """Input values. - All required parameters must be populated in order to send to Azure. - - :param subdomain: Required. The subdomain of the IoT Central application - instance to check. + :param subdomain: The subdomain of the IoT Central application instance to + check. :type subdomain: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -26,7 +24,7 @@ class SubdomainAvailabilityInputs(Model): """ _validation = { - 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + 'subdomain': {'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py index d473e7abf824..cba407c136b0 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py @@ -15,10 +15,8 @@ class SubdomainAvailabilityInputs(Model): """Input values. - All required parameters must be populated in order to send to Azure. - - :param subdomain: Required. The subdomain of the IoT Central application - instance to check. + :param subdomain: The subdomain of the IoT Central application instance to + check. :type subdomain: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -26,7 +24,7 @@ class SubdomainAvailabilityInputs(Model): """ _validation = { - 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + 'subdomain': {'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { @@ -34,7 +32,7 @@ class SubdomainAvailabilityInputs(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, subdomain: str, type: str="IoTApps", **kwargs) -> None: + def __init__(self, *, subdomain: str=None, type: str="IoTApps", **kwargs) -> None: super(SubdomainAvailabilityInputs, self).__init__(**kwargs) self.subdomain = subdomain self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py index 1486a4982a48..32c1dc3073db 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py @@ -521,7 +521,7 @@ def internal_paging(next_link=None, raw=False): list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps'} def check_name_availability( - self, name, type="IoTApps", custom_headers=None, raw=False, **operation_config): + self, name=None, type="IoTApps", custom_headers=None, raw=False, **operation_config): """Check if an IoT Central application name is available. :param name: The name of the IoT Central application instance to @@ -587,7 +587,7 @@ def check_name_availability( check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability'} def check_subdomain_availability( - self, subdomain, type="IoTApps", custom_headers=None, raw=False, **operation_config): + self, subdomain=None, type="IoTApps", custom_headers=None, raw=False, **operation_config): """Check if an IoT Central application subdomain is available. :param subdomain: The subdomain of the IoT Central application From 3f20f7a0af06ea2f43a3a26ad542e27462db65be Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 27 Sep 2018 06:55:29 +0000 Subject: [PATCH 04/10] Generated from 1c89739e3a40c9bf7a6f40e86367d50e6b88f776 Add required field to definitions --- .../mgmt/iotcentral/models/name_availability_inputs.py | 7 +++++-- .../iotcentral/models/name_availability_inputs_py3.py | 9 ++++++--- .../iotcentral/models/subdomain_availability_inputs.py | 8 +++++--- .../models/subdomain_availability_inputs_py3.py | 10 ++++++---- .../mgmt/iotcentral/operations/apps_operations.py | 4 ++-- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py index 9275d6d60245..c62854af1305 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py @@ -15,7 +15,10 @@ class NameAvailabilityInputs(Model): """Input values. - :param name: The name of the IoT Central application instance to check. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the IoT Central application instance to + check. :type name: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -23,7 +26,7 @@ class NameAvailabilityInputs(Model): """ _validation = { - 'name': {'pattern': r'^[a-z0-9-]{1,63}$'}, + 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py index 9a67e24ca18a..1cc36e750036 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py @@ -15,7 +15,10 @@ class NameAvailabilityInputs(Model): """Input values. - :param name: The name of the IoT Central application instance to check. + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the IoT Central application instance to + check. :type name: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -23,7 +26,7 @@ class NameAvailabilityInputs(Model): """ _validation = { - 'name': {'pattern': r'^[a-z0-9-]{1,63}$'}, + 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { @@ -31,7 +34,7 @@ class NameAvailabilityInputs(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str=None, type: str="IoTApps", **kwargs) -> None: + def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None: super(NameAvailabilityInputs, self).__init__(**kwargs) self.name = name self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py index d7364347bb3f..c231555f0932 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py @@ -15,8 +15,10 @@ class SubdomainAvailabilityInputs(Model): """Input values. - :param subdomain: The subdomain of the IoT Central application instance to - check. + All required parameters must be populated in order to send to Azure. + + :param subdomain: Required. The subdomain of the IoT Central application + instance to check. :type subdomain: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -24,7 +26,7 @@ class SubdomainAvailabilityInputs(Model): """ _validation = { - 'subdomain': {'pattern': r'^[a-z0-9-]{1,63}$'}, + 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py index cba407c136b0..d473e7abf824 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py @@ -15,8 +15,10 @@ class SubdomainAvailabilityInputs(Model): """Input values. - :param subdomain: The subdomain of the IoT Central application instance to - check. + All required parameters must be populated in order to send to Azure. + + :param subdomain: Required. The subdomain of the IoT Central application + instance to check. :type subdomain: str :param type: The type of the IoT Central resource to query. Default value: "IoTApps" . @@ -24,7 +26,7 @@ class SubdomainAvailabilityInputs(Model): """ _validation = { - 'subdomain': {'pattern': r'^[a-z0-9-]{1,63}$'}, + 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, } _attribute_map = { @@ -32,7 +34,7 @@ class SubdomainAvailabilityInputs(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, subdomain: str=None, type: str="IoTApps", **kwargs) -> None: + def __init__(self, *, subdomain: str, type: str="IoTApps", **kwargs) -> None: super(SubdomainAvailabilityInputs, self).__init__(**kwargs) self.subdomain = subdomain self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py index 32c1dc3073db..1486a4982a48 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py @@ -521,7 +521,7 @@ def internal_paging(next_link=None, raw=False): list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps'} def check_name_availability( - self, name=None, type="IoTApps", custom_headers=None, raw=False, **operation_config): + self, name, type="IoTApps", custom_headers=None, raw=False, **operation_config): """Check if an IoT Central application name is available. :param name: The name of the IoT Central application instance to @@ -587,7 +587,7 @@ def check_name_availability( check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability'} def check_subdomain_availability( - self, subdomain=None, type="IoTApps", custom_headers=None, raw=False, **operation_config): + self, subdomain, type="IoTApps", custom_headers=None, raw=False, **operation_config): """Check if an IoT Central application subdomain is available. :param subdomain: The subdomain of the IoT Central application From 0781e0f67f51402fae988b8e9532565b24d6c5a2 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 27 Sep 2018 23:08:52 +0000 Subject: [PATCH 05/10] Generated from 92118d9753329c57349608f197514100d250974a Revert model name change. --- .../azure/mgmt/iotcentral/models/__init__.py | 9 ++--- ...lability_inputs.py => operation_inputs.py} | 4 +- ..._inputs_py3.py => operation_inputs_py3.py} | 4 +- .../models/subdomain_availability_inputs.py | 40 ------------------- .../subdomain_availability_inputs_py3.py | 40 ------------------- .../iotcentral/operations/apps_operations.py | 16 ++++---- 6 files changed, 15 insertions(+), 98 deletions(-) rename azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/{name_availability_inputs.py => operation_inputs.py} (92%) rename azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/{name_availability_inputs_py3.py => operation_inputs_py3.py} (92%) delete mode 100644 azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py delete mode 100644 azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py index c99bfcefd75e..2819b4e949e1 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py @@ -18,8 +18,7 @@ from .error_details_py3 import ErrorDetails, ErrorDetailsException from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation - from .name_availability_inputs_py3 import NameAvailabilityInputs - from .subdomain_availability_inputs_py3 import SubdomainAvailabilityInputs + from .operation_inputs_py3 import OperationInputs from .app_availability_info_py3 import AppAvailabilityInfo except (SyntaxError, ImportError): from .app_sku_info import AppSkuInfo @@ -30,8 +29,7 @@ from .error_details import ErrorDetails, ErrorDetailsException from .operation_display import OperationDisplay from .operation import Operation - from .name_availability_inputs import NameAvailabilityInputs - from .subdomain_availability_inputs import SubdomainAvailabilityInputs + from .operation_inputs import OperationInputs from .app_availability_info import AppAvailabilityInfo from .app_paged import AppPaged from .operation_paged import OperationPaged @@ -48,8 +46,7 @@ 'ErrorDetails', 'ErrorDetailsException', 'OperationDisplay', 'Operation', - 'NameAvailabilityInputs', - 'SubdomainAvailabilityInputs', + 'OperationInputs', 'AppAvailabilityInfo', 'AppPaged', 'OperationPaged', diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py similarity index 92% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py index c62854af1305..e04c6fb8a4ad 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class NameAvailabilityInputs(Model): +class OperationInputs(Model): """Input values. All required parameters must be populated in order to send to Azure. @@ -35,6 +35,6 @@ class NameAvailabilityInputs(Model): } def __init__(self, **kwargs): - super(NameAvailabilityInputs, self).__init__(**kwargs) + super(OperationInputs, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.type = kwargs.get('type', "IoTApps") diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py similarity index 92% rename from azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py rename to azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py index 1cc36e750036..b5ac59194737 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/name_availability_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py @@ -12,7 +12,7 @@ from msrest.serialization import Model -class NameAvailabilityInputs(Model): +class OperationInputs(Model): """Input values. All required parameters must be populated in order to send to Azure. @@ -35,6 +35,6 @@ class NameAvailabilityInputs(Model): } def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None: - super(NameAvailabilityInputs, self).__init__(**kwargs) + super(OperationInputs, self).__init__(**kwargs) self.name = name self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py deleted file mode 100644 index c231555f0932..000000000000 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SubdomainAvailabilityInputs(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param subdomain: Required. The subdomain of the IoT Central application - instance to check. - :type subdomain: str - :param type: The type of the IoT Central resource to query. Default value: - "IoTApps" . - :type type: str - """ - - _validation = { - 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, - } - - _attribute_map = { - 'subdomain': {'key': 'subdomain', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SubdomainAvailabilityInputs, self).__init__(**kwargs) - self.subdomain = kwargs.get('subdomain', None) - self.type = kwargs.get('type', "IoTApps") diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py deleted file mode 100644 index d473e7abf824..000000000000 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/subdomain_availability_inputs_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 SubdomainAvailabilityInputs(Model): - """Input values. - - All required parameters must be populated in order to send to Azure. - - :param subdomain: Required. The subdomain of the IoT Central application - instance to check. - :type subdomain: str - :param type: The type of the IoT Central resource to query. Default value: - "IoTApps" . - :type type: str - """ - - _validation = { - 'subdomain': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, - } - - _attribute_map = { - 'subdomain': {'key': 'subdomain', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, subdomain: str, type: str="IoTApps", **kwargs) -> None: - super(SubdomainAvailabilityInputs, self).__init__(**kwargs) - self.subdomain = subdomain - self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py index 1486a4982a48..72c8f74b58ad 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py @@ -540,7 +540,7 @@ def check_name_availability( :raises: :class:`ErrorDetailsException` """ - name_availability_inputs = models.NameAvailabilityInputs(name=name, type=type) + operation_inputs = models.OperationInputs(name=name, type=type) # Construct URL url = self.check_name_availability.metadata['url'] @@ -565,7 +565,7 @@ def check_name_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(name_availability_inputs, 'NameAvailabilityInputs') + body_content = self._serialize.body(operation_inputs, 'OperationInputs') # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) @@ -587,12 +587,12 @@ def check_name_availability( check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkNameAvailability'} def check_subdomain_availability( - self, subdomain, type="IoTApps", custom_headers=None, raw=False, **operation_config): + self, name, type="IoTApps", custom_headers=None, raw=False, **operation_config): """Check if an IoT Central application subdomain is available. - :param subdomain: The subdomain of the IoT Central application - instance to check. - :type subdomain: str + :param name: The name of the IoT Central application instance to + check. + :type name: str :param type: The type of the IoT Central resource to query. :type type: str :param dict custom_headers: headers that will be added to the request @@ -606,7 +606,7 @@ def check_subdomain_availability( :raises: :class:`ErrorDetailsException` """ - subdomain_availability_inputs = models.SubdomainAvailabilityInputs(subdomain=subdomain, type=type) + operation_inputs = models.OperationInputs(name=name, type=type) # Construct URL url = self.check_subdomain_availability.metadata['url'] @@ -631,7 +631,7 @@ def check_subdomain_availability( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(subdomain_availability_inputs, 'SubdomainAvailabilityInputs') + body_content = self._serialize.body(operation_inputs, 'OperationInputs') # Construct and send request request = self._client.post(url, query_parameters, header_parameters, body_content) From 6e7b5bbf96eb95de7e70c1f155d7e6870443c6b1 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 2 Oct 2018 22:08:49 +0000 Subject: [PATCH 06/10] Generated from f0df5982f4b75520b1b163b84ea33c9a81d6e79b add x-ms-client-flatten to errorSchema --- .../mgmt/iotcentral/models/error_details.py | 29 ++++++++++++++--- .../iotcentral/models/error_details_py3.py | 31 ++++++++++++++++--- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py index 1adef6c638f8..b7f72f1b01b8 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details.py @@ -16,17 +16,38 @@ class ErrorDetails(Model): """Error details. - :param error: - :type error: ~azure.mgmt.iotcentral.models.ErrorResponseBody + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'target': {'key': 'error.target', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[ErrorResponseBody]'}, } def __init__(self, **kwargs): super(ErrorDetails, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + self.code = None + self.message = None + self.target = None + self.details = kwargs.get('details', None) class ErrorDetailsException(HttpOperationError): diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py index 90afa0bd3cfa..fadfc552be75 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/error_details_py3.py @@ -16,17 +16,38 @@ class ErrorDetails(Model): """Error details. - :param error: - :type error: ~azure.mgmt.iotcentral.models.ErrorResponseBody + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The target of the particular error. + :vartype target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody] """ + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + 'code': {'key': 'error.code', 'type': 'str'}, + 'message': {'key': 'error.message', 'type': 'str'}, + 'target': {'key': 'error.target', 'type': 'str'}, + 'details': {'key': 'error.details', 'type': '[ErrorResponseBody]'}, } - def __init__(self, *, error=None, **kwargs) -> None: + def __init__(self, *, details=None, **kwargs) -> None: super(ErrorDetails, self).__init__(**kwargs) - self.error = error + self.code = None + self.message = None + self.target = None + self.details = details class ErrorDetailsException(HttpOperationError): From 075f89798382b1e182935f864c09ffacd67c78dc Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 16 Oct 2018 01:39:29 +0000 Subject: [PATCH 07/10] Generated from 08b88d3a11055327409eafebcdac134e797bd38b Test default required field for .net SDK --- .../azure/mgmt/iotcentral/models/operation_inputs.py | 5 +++-- .../azure/mgmt/iotcentral/models/operation_inputs_py3.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py index e04c6fb8a4ad..e9712efb8836 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py @@ -20,13 +20,14 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. Default value: - "IoTApps" . + :param type: Required. The type of the IoT Central resource to query. + Default value: "IoTApps" . :type type: str """ _validation = { 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + 'type': {'required': True}, } _attribute_map = { diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py index b5ac59194737..1af07f812e54 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py @@ -20,13 +20,14 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. Default value: - "IoTApps" . + :param type: Required. The type of the IoT Central resource to query. + Default value: "IoTApps" . :type type: str """ _validation = { 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, + 'type': {'required': True}, } _attribute_map = { From a97b7d774f2df44508b71d03cd6f86cc28e81827 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Tue, 16 Oct 2018 01:43:59 +0000 Subject: [PATCH 08/10] Packaging update of azure-mgmt-iotcentral --- azure-mgmt-iotcentral/MANIFEST.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-mgmt-iotcentral/MANIFEST.in b/azure-mgmt-iotcentral/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-iotcentral/MANIFEST.in +++ b/azure-mgmt-iotcentral/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + From a39d4f3102dba5a3ac9729b6e2b72f33ce59c8b6 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 16 Oct 2018 01:59:59 +0000 Subject: [PATCH 09/10] Generated from 3089cb519400047ddfeaffa5fac50c5f1c7a3c85 test enum default --- .../azure/mgmt/iotcentral/models/operation_inputs.py | 7 +++---- .../mgmt/iotcentral/models/operation_inputs_py3.py | 9 ++++----- .../mgmt/iotcentral/operations/apps_operations.py | 10 ++++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py index e9712efb8836..cce435bb327e 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py @@ -20,14 +20,13 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str - :param type: Required. The type of the IoT Central resource to query. - Default value: "IoTApps" . - :type type: str + :param type: The type of the IoT Central resource to query. Possible + values include: 'IoTApps'. Default value: "IoTApps" . + :type type: str or ~azure.mgmt.iotcentral.models.enum """ _validation = { 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, - 'type': {'required': True}, } _attribute_map = { diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py index 1af07f812e54..bc593d2d5cb7 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py @@ -20,14 +20,13 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str - :param type: Required. The type of the IoT Central resource to query. - Default value: "IoTApps" . - :type type: str + :param type: The type of the IoT Central resource to query. Possible + values include: 'IoTApps'. Default value: "IoTApps" . + :type type: str or ~azure.mgmt.iotcentral.models.enum """ _validation = { 'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'}, - 'type': {'required': True}, } _attribute_map = { @@ -35,7 +34,7 @@ class OperationInputs(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None: + def __init__(self, *, name: str, type="IoTApps", **kwargs) -> None: super(OperationInputs, self).__init__(**kwargs) self.name = name self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py index 72c8f74b58ad..aca28776d03e 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py @@ -527,8 +527,9 @@ def check_name_availability( :param name: The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. - :type type: str + :param type: The type of the IoT Central resource to query. Possible + values include: 'IoTApps' + :type type: str or ~azure.mgmt.iotcentral.models.enum :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -593,8 +594,9 @@ def check_subdomain_availability( :param name: The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. - :type type: str + :param type: The type of the IoT Central resource to query. Possible + values include: 'IoTApps' + :type type: str or ~azure.mgmt.iotcentral.models.enum :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response From 088c74367ed6f8775486af9c44754c1946e518bd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 16 Oct 2018 02:02:41 +0000 Subject: [PATCH 10/10] Generated from f878943d61f7e1cd88a4c5ff31a56c73e3ec0a00 revert test changes --- .../azure/mgmt/iotcentral/models/operation_inputs.py | 6 +++--- .../mgmt/iotcentral/models/operation_inputs_py3.py | 8 ++++---- .../mgmt/iotcentral/operations/apps_operations.py | 10 ++++------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py index cce435bb327e..e04c6fb8a4ad 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs.py @@ -20,9 +20,9 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. Possible - values include: 'IoTApps'. Default value: "IoTApps" . - :type type: str or ~azure.mgmt.iotcentral.models.enum + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str """ _validation = { diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py index bc593d2d5cb7..b5ac59194737 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/operation_inputs_py3.py @@ -20,9 +20,9 @@ class OperationInputs(Model): :param name: Required. The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. Possible - values include: 'IoTApps'. Default value: "IoTApps" . - :type type: str or ~azure.mgmt.iotcentral.models.enum + :param type: The type of the IoT Central resource to query. Default value: + "IoTApps" . + :type type: str """ _validation = { @@ -34,7 +34,7 @@ class OperationInputs(Model): 'type': {'key': 'type', 'type': 'str'}, } - def __init__(self, *, name: str, type="IoTApps", **kwargs) -> None: + def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None: super(OperationInputs, self).__init__(**kwargs) self.name = name self.type = type diff --git a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py index aca28776d03e..72c8f74b58ad 100644 --- a/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py +++ b/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/apps_operations.py @@ -527,9 +527,8 @@ def check_name_availability( :param name: The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. Possible - values include: 'IoTApps' - :type type: str or ~azure.mgmt.iotcentral.models.enum + :param type: The type of the IoT Central resource to query. + :type type: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -594,9 +593,8 @@ def check_subdomain_availability( :param name: The name of the IoT Central application instance to check. :type name: str - :param type: The type of the IoT Central resource to query. Possible - values include: 'IoTApps' - :type type: str or ~azure.mgmt.iotcentral.models.enum + :param type: The type of the IoT Central resource to query. + :type type: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response