From 841f6f987db97f423706b5b398d0ada7a3696f1b Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 10 Sep 2020 21:10:25 +0000 Subject: [PATCH] Generated from 85f25371897c1e0bbcce5c3271b085e85876fa9b --- .../iothubprovisioningservices/__init__.py | 7 +- .../_configuration.py | 48 + .../{iot_dps_client.py => _iot_dps_client.py} | 50 +- .../models/__init__.py | 162 ++- ...ient_enums.py => _iot_dps_client_enums.py} | 27 + .../models/_models.py | 1080 +++++++++++++++++ .../models/_models_py3.py | 1080 +++++++++++++++++ .../models/_paged_models.py | 66 + .../models/async_operation_result.py | 32 - .../models/async_operation_result_py3.py | 32 - .../models/certificate_body_description.py | 29 - .../certificate_body_description_py3.py | 29 - .../models/certificate_list_description.py | 29 - .../certificate_list_description_py3.py | 29 - .../models/certificate_properties.py | 60 - .../models/certificate_properties_py3.py | 60 - .../models/certificate_response.py | 55 - .../models/certificate_response_py3.py | 55 - .../models/error_details.py | 63 - .../models/error_details_py3.py | 63 - .../models/error_messsage.py | 36 - .../models/error_messsage_py3.py | 36 - .../models/iot_dps_properties_description.py | 80 -- .../iot_dps_properties_description_py3.py | 80 -- .../models/iot_dps_sku_definition.py | 28 - .../models/iot_dps_sku_definition_paged.py | 27 - .../models/iot_dps_sku_definition_py3.py | 28 - .../models/iot_dps_sku_info.py | 43 - .../models/iot_dps_sku_info_py3.py | 43 - .../models/iot_hub_definition_description.py | 56 - .../iot_hub_definition_description_py3.py | 56 - .../models/name_availability_info.py | 38 - .../models/name_availability_info_py3.py | 38 - .../models/operation.py | 41 - .../models/operation_display.py | 45 - .../models/operation_display_py3.py | 45 - .../models/operation_inputs.py | 34 - .../models/operation_inputs_py3.py | 34 - .../models/operation_paged.py | 27 - .../models/operation_py3.py | 41 - .../provisioning_service_description.py | 69 -- .../provisioning_service_description_paged.py | 27 - .../provisioning_service_description_py3.py | 69 -- .../models/resource.py | 56 - .../models/resource_py3.py | 56 - ...rization_rule_access_rights_description.py | 50 - ...on_rule_access_rights_description_paged.py | 27 - ...tion_rule_access_rights_description_py3.py | 50 - .../models/tags_resource.py | 29 - .../models/tags_resource_py3.py | 29 - .../models/verification_code_request.py | 29 - .../models/verification_code_request_py3.py | 29 - .../models/verification_code_response.py | 55 - .../verification_code_response_properties.py | 53 - ...rification_code_response_properties_py3.py | 53 - .../models/verification_code_response_py3.py | 55 - .../operations/__init__.py | 6 +- ...ions.py => _dps_certificate_operations.py} | 48 +- ...ons.py => _iot_dps_resource_operations.py} | 616 +++++++++- .../{operations.py => _operations.py} | 27 +- 60 files changed, 3003 insertions(+), 2342 deletions(-) create mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_configuration.py rename sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/{iot_dps_client.py => _iot_dps_client.py} (57%) rename sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/{iot_dps_client_enums.py => _iot_dps_client_enums.py} (77%) create mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models.py create mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models_py3.py create mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_paged_models.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_paged.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties_py3.py delete mode 100644 sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_py3.py rename sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/{dps_certificate_operations.py => _dps_certificate_operations.py} (95%) rename sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/{iot_dps_resource_operations.py => _iot_dps_resource_operations.py} (59%) rename sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/{operations.py => _operations.py} (82%) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/__init__.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/__init__.py index 908617c53e25..58106cbe3f33 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/__init__.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .iot_dps_client import IotDpsClient -from .version import VERSION +from ._configuration import IotDpsClientConfiguration +from ._iot_dps_client import IotDpsClient +__all__ = ['IotDpsClient', 'IotDpsClientConfiguration'] -__all__ = ['IotDpsClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_configuration.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_configuration.py new file mode 100644 index 000000000000..3aafe980b767 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class IotDpsClientConfiguration(AzureConfiguration): + """Configuration for IotDpsClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription identifier. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(IotDpsClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-iothubprovisioningservices/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/iot_dps_client.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_iot_dps_client.py similarity index 57% rename from sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/iot_dps_client.py rename to sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_iot_dps_client.py index c5adb4f0be3e..a24be9d14027 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/iot_dps_client.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/_iot_dps_client.py @@ -9,49 +9,17 @@ # 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 -from .operations.operations import Operations -from .operations.dps_certificate_operations import DpsCertificateOperations -from .operations.iot_dps_resource_operations import IotDpsResourceOperations -from . import models - - -class IotDpsClientConfiguration(AzureConfiguration): - """Configuration for IotDpsClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: The subscription identifier. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(IotDpsClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-iothubprovisioningservices/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import IotDpsClientConfiguration +from .operations import Operations +from .operations import DpsCertificateOperations +from .operations import IotDpsResourceOperations +from . import models -class IotDpsClient(object): +class IotDpsClient(SDKClient): """API for using the Azure IoT Hub Device Provisioning Service features. :ivar config: Configuration for client. @@ -76,10 +44,10 @@ def __init__( self, credentials, subscription_id, base_url=None): self.config = IotDpsClientConfiguration(credentials, subscription_id, base_url) - self._client = ServiceClient(self.config.credentials, self.config) + super(IotDpsClient, 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 = '2018-01-22' + self.api_version = '2020-09-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/__init__.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/__init__.py index 6bfa525ee9ab..5f29d105bde3 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/__init__.py @@ -10,58 +10,82 @@ # -------------------------------------------------------------------------- try: - from .error_messsage_py3 import ErrorMesssage - from .async_operation_result_py3 import AsyncOperationResult - from .certificate_properties_py3 import CertificateProperties - from .certificate_response_py3 import CertificateResponse - from .certificate_list_description_py3 import CertificateListDescription - from .certificate_body_description_py3 import CertificateBodyDescription - from .iot_dps_sku_info_py3 import IotDpsSkuInfo - from .iot_hub_definition_description_py3 import IotHubDefinitionDescription - from .shared_access_signature_authorization_rule_access_rights_description_py3 import SharedAccessSignatureAuthorizationRuleAccessRightsDescription - from .iot_dps_properties_description_py3 import IotDpsPropertiesDescription - from .provisioning_service_description_py3 import ProvisioningServiceDescription - from .resource_py3 import Resource - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .error_details_py3 import ErrorDetails, ErrorDetailsException - from .iot_dps_sku_definition_py3 import IotDpsSkuDefinition - from .operation_inputs_py3 import OperationInputs - from .name_availability_info_py3 import NameAvailabilityInfo - from .tags_resource_py3 import TagsResource - from .verification_code_response_properties_py3 import VerificationCodeResponseProperties - from .verification_code_response_py3 import VerificationCodeResponse - from .verification_code_request_py3 import VerificationCodeRequest + from ._models_py3 import AsyncOperationResult + from ._models_py3 import CertificateBodyDescription + from ._models_py3 import CertificateListDescription + from ._models_py3 import CertificateProperties + from ._models_py3 import CertificateResponse + from ._models_py3 import EncryptionPropertiesDescription + from ._models_py3 import ErrorDetails, ErrorDetailsException + from ._models_py3 import ErrorMesssage + from ._models_py3 import GroupIdInformation + from ._models_py3 import GroupIdInformationProperties + from ._models_py3 import IotDpsPropertiesDescription + from ._models_py3 import IotDpsSkuDefinition + from ._models_py3 import IotDpsSkuInfo + from ._models_py3 import IotHubDefinitionDescription + from ._models_py3 import IpFilterRule + from ._models_py3 import KeyVaultKeyProperties + from ._models_py3 import NameAvailabilityInfo + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationInputs + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionProperties + from ._models_py3 import PrivateLinkResources + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProvisioningServiceDescription + from ._models_py3 import Resource + from ._models_py3 import SharedAccessSignatureAuthorizationRuleAccessRightsDescription + from ._models_py3 import TagsResource + from ._models_py3 import VerificationCodeRequest + from ._models_py3 import VerificationCodeResponse + from ._models_py3 import VerificationCodeResponseProperties except (SyntaxError, ImportError): - from .error_messsage import ErrorMesssage - from .async_operation_result import AsyncOperationResult - from .certificate_properties import CertificateProperties - from .certificate_response import CertificateResponse - from .certificate_list_description import CertificateListDescription - from .certificate_body_description import CertificateBodyDescription - from .iot_dps_sku_info import IotDpsSkuInfo - from .iot_hub_definition_description import IotHubDefinitionDescription - from .shared_access_signature_authorization_rule_access_rights_description import SharedAccessSignatureAuthorizationRuleAccessRightsDescription - from .iot_dps_properties_description import IotDpsPropertiesDescription - from .provisioning_service_description import ProvisioningServiceDescription - from .resource import Resource - from .operation_display import OperationDisplay - from .operation import Operation - from .error_details import ErrorDetails, ErrorDetailsException - from .iot_dps_sku_definition import IotDpsSkuDefinition - from .operation_inputs import OperationInputs - from .name_availability_info import NameAvailabilityInfo - from .tags_resource import TagsResource - from .verification_code_response_properties import VerificationCodeResponseProperties - from .verification_code_response import VerificationCodeResponse - from .verification_code_request import VerificationCodeRequest -from .operation_paged import OperationPaged -from .provisioning_service_description_paged import ProvisioningServiceDescriptionPaged -from .iot_dps_sku_definition_paged import IotDpsSkuDefinitionPaged -from .shared_access_signature_authorization_rule_access_rights_description_paged import SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged -from .iot_dps_client_enums import ( + from ._models import AsyncOperationResult + from ._models import CertificateBodyDescription + from ._models import CertificateListDescription + from ._models import CertificateProperties + from ._models import CertificateResponse + from ._models import EncryptionPropertiesDescription + from ._models import ErrorDetails, ErrorDetailsException + from ._models import ErrorMesssage + from ._models import GroupIdInformation + from ._models import GroupIdInformationProperties + from ._models import IotDpsPropertiesDescription + from ._models import IotDpsSkuDefinition + from ._models import IotDpsSkuInfo + from ._models import IotHubDefinitionDescription + from ._models import IpFilterRule + from ._models import KeyVaultKeyProperties + from ._models import NameAvailabilityInfo + from ._models import Operation + from ._models import OperationDisplay + from ._models import OperationInputs + from ._models import PrivateEndpoint + from ._models import PrivateEndpointConnection + from ._models import PrivateEndpointConnectionProperties + from ._models import PrivateLinkResources + from ._models import PrivateLinkServiceConnectionState + from ._models import ProvisioningServiceDescription + from ._models import Resource + from ._models import SharedAccessSignatureAuthorizationRuleAccessRightsDescription + from ._models import TagsResource + from ._models import VerificationCodeRequest + from ._models import VerificationCodeResponse + from ._models import VerificationCodeResponseProperties +from ._paged_models import IotDpsSkuDefinitionPaged +from ._paged_models import OperationPaged +from ._paged_models import ProvisioningServiceDescriptionPaged +from ._paged_models import SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged +from ._iot_dps_client_enums import ( IotDpsSku, State, + PublicNetworkAccess, + IpFilterActionType, + IpFilterTargetType, + PrivateLinkServiceConnectionStatus, AllocationPolicy, AccessRightsDescription, NameUnavailabilityReason, @@ -69,34 +93,48 @@ ) __all__ = [ - 'ErrorMesssage', 'AsyncOperationResult', + 'CertificateBodyDescription', + 'CertificateListDescription', 'CertificateProperties', 'CertificateResponse', - 'CertificateListDescription', - 'CertificateBodyDescription', + 'EncryptionPropertiesDescription', + 'ErrorDetails', 'ErrorDetailsException', + 'ErrorMesssage', + 'GroupIdInformation', + 'GroupIdInformationProperties', + 'IotDpsPropertiesDescription', + 'IotDpsSkuDefinition', 'IotDpsSkuInfo', 'IotHubDefinitionDescription', - 'SharedAccessSignatureAuthorizationRuleAccessRightsDescription', - 'IotDpsPropertiesDescription', - 'ProvisioningServiceDescription', - 'Resource', - 'OperationDisplay', + 'IpFilterRule', + 'KeyVaultKeyProperties', + 'NameAvailabilityInfo', 'Operation', - 'ErrorDetails', 'ErrorDetailsException', - 'IotDpsSkuDefinition', + 'OperationDisplay', 'OperationInputs', - 'NameAvailabilityInfo', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionProperties', + 'PrivateLinkResources', + 'PrivateLinkServiceConnectionState', + 'ProvisioningServiceDescription', + 'Resource', + 'SharedAccessSignatureAuthorizationRuleAccessRightsDescription', 'TagsResource', - 'VerificationCodeResponseProperties', - 'VerificationCodeResponse', 'VerificationCodeRequest', + 'VerificationCodeResponse', + 'VerificationCodeResponseProperties', 'OperationPaged', 'ProvisioningServiceDescriptionPaged', 'IotDpsSkuDefinitionPaged', 'SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged', 'IotDpsSku', 'State', + 'PublicNetworkAccess', + 'IpFilterActionType', + 'IpFilterTargetType', + 'PrivateLinkServiceConnectionStatus', 'AllocationPolicy', 'AccessRightsDescription', 'NameUnavailabilityReason', diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_client_enums.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_iot_dps_client_enums.py similarity index 77% rename from sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_client_enums.py rename to sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_iot_dps_client_enums.py index dd0012dda30c..fe9615b8a491 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_client_enums.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_iot_dps_client_enums.py @@ -33,6 +33,33 @@ class State(str, Enum): failover_failed = "FailoverFailed" +class PublicNetworkAccess(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class IpFilterActionType(str, Enum): + + accept = "Accept" + reject = "Reject" + + +class IpFilterTargetType(str, Enum): + + all = "all" + service_api = "serviceApi" + device_api = "deviceApi" + + +class PrivateLinkServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + class AllocationPolicy(str, Enum): hashed = "Hashed" diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models.py new file mode 100644 index 000000000000..4999f26a7dde --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models.py @@ -0,0 +1,1080 @@ +# 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 AsyncOperationResult(Model): + """Result of a long running operation. + + :param status: current status of a long running operation. + :type status: str + :param error: Error message containing code, description and details + :type error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMesssage + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorMesssage'}, + } + + def __init__(self, **kwargs): + super(AsyncOperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error = kwargs.get('error', None) + + +class CertificateBodyDescription(Model): + """The JSON-serialized X509 Certificate. + + :param certificate: Base-64 representation of the X509 leaf certificate + .cer file or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateBodyDescription, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + + +class CertificateListDescription(Model): + """The JSON-serialized array of Certificate objects. + + :param value: The array of Certificate objects. + :type value: + list[~azure.mgmt.iothubprovisioningservices.models.CertificateResponse] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateResponse]'}, + } + + def __init__(self, **kwargs): + super(CertificateListDescription, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class CertificateProperties(Model): + """The description of an X509 CA Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's creation date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + } + + def __init__(self, **kwargs): + super(CertificateProperties, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + + +class CertificateResponse(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: properties of a certificate + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.CertificateProperties + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CertificateResponse, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class EncryptionPropertiesDescription(Model): + """The encryption properties for the IoT DPS instance. + + :param key_source: The source of the key. + :type key_source: str + :param key_vault_properties: The properties of the KeyVault key. + :type key_vault_properties: + list[~azure.mgmt.iothubprovisioningservices.models.KeyVaultKeyProperties] + """ + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': '[KeyVaultKeyProperties]'}, + } + + def __init__(self, **kwargs): + super(EncryptionPropertiesDescription, self).__init__(**kwargs) + self.key_source = kwargs.get('key_source', None) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + + +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 http_status_code: The HTTP status code. + :vartype http_status_code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: str + """ + + _validation = { + 'code': {'readonly': True}, + 'http_status_code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.http_status_code = None + self.message = None + self.details = None + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class ErrorMesssage(Model): + """Error response containing message and code. + + :param code: standard error code + :type code: str + :param message: standard error description + :type message: str + :param details: detailed summary of error + :type details: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorMesssage, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class GroupIdInformation(Model): + """The group information for creating a private endpoint on a provisioning + service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param properties: Required. The properties for a group information object + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.GroupIdInformationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'GroupIdInformationProperties'}, + } + + def __init__(self, **kwargs): + super(GroupIdInformation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class GroupIdInformationProperties(Model): + """The properties for a group information object. + + :param group_id: The group id + :type group_id: str + :param required_members: The required members for a specific group id + :type required_members: list[str] + :param required_zone_names: The required DNS zones for a specific group id + :type required_zone_names: list[str] + """ + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(GroupIdInformationProperties, self).__init__(**kwargs) + self.group_id = kwargs.get('group_id', None) + self.required_members = kwargs.get('required_members', None) + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class IotDpsPropertiesDescription(Model): + """the service specific properties of a provisioning service, including keys, + linked iot hubs, current state, and system generated properties such as + hostname and idScope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param state: Current state of the provisioning service. Possible values + include: 'Activating', 'Active', 'Deleting', 'Deleted', + 'ActivationFailed', 'DeletionFailed', 'Transitioning', 'Suspending', + 'Suspended', 'Resuming', 'FailingOver', 'FailoverFailed' + :type state: str or ~azure.mgmt.iothubprovisioningservices.models.State + :param encryption: The encryption properties for the IoT DPS instance. + :type encryption: + ~azure.mgmt.iothubprovisioningservices.models.EncryptionPropertiesDescription + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.iothubprovisioningservices.models.PublicNetworkAccess + :param ip_filter_rules: The IP filter rules. + :type ip_filter_rules: + list[~azure.mgmt.iothubprovisioningservices.models.IpFilterRule] + :param private_endpoint_connections: Private endpoint connections created + on this IotHub + :type private_endpoint_connections: + list[~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection] + :param provisioning_state: The ARM provisioning state of the provisioning + service. + :type provisioning_state: str + :param iot_hubs: List of IoT hubs associated with this provisioning + service. + :type iot_hubs: + list[~azure.mgmt.iothubprovisioningservices.models.IotHubDefinitionDescription] + :param allocation_policy: Allocation policy to be used by this + provisioning service. Possible values include: 'Hashed', 'GeoLatency', + 'Static' + :type allocation_policy: str or + ~azure.mgmt.iothubprovisioningservices.models.AllocationPolicy + :ivar service_operations_host_name: Service endpoint for provisioning + service. + :vartype service_operations_host_name: str + :ivar device_provisioning_host_name: Device endpoint for this provisioning + service. + :vartype device_provisioning_host_name: str + :ivar id_scope: Unique identifier of this provisioning service. + :vartype id_scope: str + :param authorization_policies: List of authorization keys for a + provisioning service. + :type authorization_policies: + list[~azure.mgmt.iothubprovisioningservices.models.SharedAccessSignatureAuthorizationRuleAccessRightsDescription] + """ + + _validation = { + 'service_operations_host_name': {'readonly': True}, + 'device_provisioning_host_name': {'readonly': True}, + 'id_scope': {'readonly': True}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'encryption': {'key': 'encryption', 'type': 'EncryptionPropertiesDescription'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'iot_hubs': {'key': 'iotHubs', 'type': '[IotHubDefinitionDescription]'}, + 'allocation_policy': {'key': 'allocationPolicy', 'type': 'str'}, + 'service_operations_host_name': {'key': 'serviceOperationsHostName', 'type': 'str'}, + 'device_provisioning_host_name': {'key': 'deviceProvisioningHostName', 'type': 'str'}, + 'id_scope': {'key': 'idScope', 'type': 'str'}, + 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRuleAccessRightsDescription]'}, + } + + def __init__(self, **kwargs): + super(IotDpsPropertiesDescription, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.encryption = kwargs.get('encryption', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.ip_filter_rules = kwargs.get('ip_filter_rules', None) + self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.allocation_policy = kwargs.get('allocation_policy', None) + self.service_operations_host_name = None + self.device_provisioning_host_name = None + self.id_scope = None + self.authorization_policies = kwargs.get('authorization_policies', None) + + +class IotDpsSkuDefinition(Model): + """Available SKUs of tier and units. + + :param name: Sku name. Possible values include: 'S1' + :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IotDpsSkuDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class IotDpsSkuInfo(Model): + """List of possible provisioning service SKUs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Sku name. Possible values include: 'S1' + :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku + :ivar tier: Pricing tier name of the provisioning service. + :vartype tier: str + :param capacity: The number of units to provision + :type capacity: long + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(IotDpsSkuInfo, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + self.capacity = kwargs.get('capacity', None) + + +class IotHubDefinitionDescription(Model): + """Description of the IoT hub. + + 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 apply_allocation_policy: flag for applying allocationPolicy or not + for a given iot hub. + :type apply_allocation_policy: bool + :param allocation_weight: weight to apply for a given iot h. + :type allocation_weight: int + :ivar name: Host name of the IoT hub. + :vartype name: str + :param connection_string: Required. Connection string of the IoT hub. + :type connection_string: str + :param location: Required. ARM region of the IoT hub. + :type location: str + """ + + _validation = { + 'name': {'readonly': True}, + 'connection_string': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'apply_allocation_policy': {'key': 'applyAllocationPolicy', 'type': 'bool'}, + 'allocation_weight': {'key': 'allocationWeight', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IotHubDefinitionDescription, self).__init__(**kwargs) + self.apply_allocation_policy = kwargs.get('apply_allocation_policy', None) + self.allocation_weight = kwargs.get('allocation_weight', None) + self.name = None + self.connection_string = kwargs.get('connection_string', None) + self.location = kwargs.get('location', None) + + +class IpFilterRule(Model): + """The IP filter rules for a provisioning Service. + + All required parameters must be populated in order to send to Azure. + + :param filter_name: Required. The name of the IP filter rule. + :type filter_name: str + :param action: Required. The desired action for requests captured by this + rule. Possible values include: 'Accept', 'Reject' + :type action: str or + ~azure.mgmt.iothubprovisioningservices.models.IpFilterActionType + :param ip_mask: Required. A string that contains the IP address range in + CIDR notation for the rule. + :type ip_mask: str + :param target: Target for requests captured by this rule. Possible values + include: 'all', 'serviceApi', 'deviceApi' + :type target: str or + ~azure.mgmt.iothubprovisioningservices.models.IpFilterTargetType + """ + + _validation = { + 'filter_name': {'required': True}, + 'action': {'required': True}, + 'ip_mask': {'required': True}, + } + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'IpFilterActionType'}, + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'IpFilterTargetType'}, + } + + def __init__(self, **kwargs): + super(IpFilterRule, self).__init__(**kwargs) + self.filter_name = kwargs.get('filter_name', None) + self.action = kwargs.get('action', None) + self.ip_mask = kwargs.get('ip_mask', None) + self.target = kwargs.get('target', None) + + +class KeyVaultKeyProperties(Model): + """The properties of the KeyVault key. + + :param key_identifier: The identifier of the key. + :type key_identifier: str + """ + + _attribute_map = { + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(KeyVaultKeyProperties, self).__init__(**kwargs) + self.key_identifier = kwargs.get('key_identifier', None) + + +class NameAvailabilityInfo(Model): + """Description of name availability. + + :param name_available: specifies if a name is available or not + :type name_available: bool + :param reason: specifies the reason a name is unavailable. Possible values + include: 'Invalid', 'AlreadyExists' + :type reason: str or + ~azure.mgmt.iothubprovisioningservices.models.NameUnavailabilityReason + :param message: message containing a detailed reason name is unavailable + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class Operation(Model): + """Provisioning Service REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :param display: The object that represents the operation. + :type display: + ~azure.mgmt.iothubprovisioningservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Devices. + :vartype provider: str + :ivar resource: Resource Type: ProvisioningServices. + :vartype resource: str + :ivar operation: Name of the operation. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class OperationInputs(Model): + """Input values for operation results call. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Provisioning Service to check. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationInputs, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class PrivateEndpoint(Model): + """The private endpoint property of a private endpoint connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Model): + """The private endpoint connection of a provisioning service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param properties: Required. The properties of a private endpoint + connection + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class PrivateEndpointConnectionProperties(Model): + """The properties of a private endpoint connection. + + All required parameters must be populated in order to send to Azure. + + :param private_endpoint: The private endpoint property of a private + endpoint connection + :type private_endpoint: + ~azure.mgmt.iothubprovisioningservices.models.PrivateEndpoint + :param private_link_service_connection_state: Required. The current state + of a private endpoint connection + :type private_link_service_connection_state: + ~azure.mgmt.iothubprovisioningservices.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'private_link_service_connection_state': {'required': True}, + } + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateLinkResources(Model): + """The available private link resources for a provisioning service. + + :param value: The list of available private link resources for a + provisioning service + :type value: + list[~azure.mgmt.iothubprovisioningservices.models.GroupIdInformation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GroupIdInformation]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResources, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(Model): + """The current state of a private endpoint connection. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The status of a private endpoint connection. + Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.iothubprovisioningservices.models.PrivateLinkServiceConnectionStatus + :param description: Required. The description for the current state of a + private endpoint connection + :type description: str + :param actions_required: Actions required for a private endpoint + connection + :type actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class Resource(Model): + """The common properties of an 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ProvisioningServiceDescription(Resource): + """The description of the provisioning service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: The Etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal ETag + convention. + :type etag: str + :param properties: Required. Service specific properties for a + provisioning service + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.IotDpsPropertiesDescription + :param sku: Required. Sku info for a provisioning Service. + :type sku: ~azure.mgmt.iothubprovisioningservices.models.IotDpsSkuInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IotDpsPropertiesDescription'}, + 'sku': {'key': 'sku', 'type': 'IotDpsSkuInfo'}, + } + + def __init__(self, **kwargs): + super(ProvisioningServiceDescription, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.properties = kwargs.get('properties', None) + self.sku = kwargs.get('sku', None) + + +class SharedAccessSignatureAuthorizationRuleAccessRightsDescription(Model): + """Description of the shared access key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. Name of the key. + :type key_name: str + :param primary_key: Primary SAS key value. + :type primary_key: str + :param secondary_key: Secondary SAS key value. + :type secondary_key: str + :param rights: Required. Rights that this key has. Possible values + include: 'ServiceConfig', 'EnrollmentRead', 'EnrollmentWrite', + 'DeviceConnect', 'RegistrationStatusRead', 'RegistrationStatusWrite' + :type rights: str or + ~azure.mgmt.iothubprovisioningservices.models.AccessRightsDescription + """ + + _validation = { + 'key_name': {'required': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'rights': {'key': 'rights', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SharedAccessSignatureAuthorizationRuleAccessRightsDescription, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.primary_key = kwargs.get('primary_key', None) + self.secondary_key = kwargs.get('secondary_key', None) + self.rights = kwargs.get('rights', None) + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on a Provisioning Service instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TagsResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class VerificationCodeRequest(Model): + """The JSON-serialized leaf certificate. + + :param certificate: base-64 representation of X509 certificate .cer file + or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VerificationCodeRequest, self).__init__(**kwargs) + self.certificate = kwargs.get('certificate', None) + + +class VerificationCodeResponse(Model): + """Description of the response of the verification code. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of certificate. + :vartype name: str + :ivar etag: Request etag. + :vartype etag: str + :ivar id: The resource identifier. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :param properties: + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.VerificationCodeResponseProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VerificationCodeResponseProperties'}, + } + + def __init__(self, **kwargs): + super(VerificationCodeResponse, self).__init__(**kwargs) + self.name = None + self.etag = None + self.id = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class VerificationCodeResponseProperties(Model): + """VerificationCodeResponseProperties. + + :param verification_code: Verification code. + :type verification_code: str + :param subject: Certificate subject. + :type subject: str + :param expiry: Code expiry. + :type expiry: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param is_verified: Indicate if the certificate is verified by owner of + private key. + :type is_verified: bool + :param created: Certificate created time. + :type created: str + :param updated: Certificate updated time. + :type updated: str + """ + + _attribute_map = { + 'verification_code': {'key': 'verificationCode', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'str'}, + 'updated': {'key': 'updated', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VerificationCodeResponseProperties, self).__init__(**kwargs) + self.verification_code = kwargs.get('verification_code', None) + self.subject = kwargs.get('subject', None) + self.expiry = kwargs.get('expiry', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.is_verified = kwargs.get('is_verified', None) + self.created = kwargs.get('created', None) + self.updated = kwargs.get('updated', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models_py3.py new file mode 100644 index 000000000000..bf1d94bfff05 --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_models_py3.py @@ -0,0 +1,1080 @@ +# 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 AsyncOperationResult(Model): + """Result of a long running operation. + + :param status: current status of a long running operation. + :type status: str + :param error: Error message containing code, description and details + :type error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMesssage + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorMesssage'}, + } + + def __init__(self, *, status: str=None, error=None, **kwargs) -> None: + super(AsyncOperationResult, self).__init__(**kwargs) + self.status = status + self.error = error + + +class CertificateBodyDescription(Model): + """The JSON-serialized X509 Certificate. + + :param certificate: Base-64 representation of the X509 leaf certificate + .cer file or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(CertificateBodyDescription, self).__init__(**kwargs) + self.certificate = certificate + + +class CertificateListDescription(Model): + """The JSON-serialized array of Certificate objects. + + :param value: The array of Certificate objects. + :type value: + list[~azure.mgmt.iothubprovisioningservices.models.CertificateResponse] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CertificateResponse]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(CertificateListDescription, self).__init__(**kwargs) + self.value = value + + +class CertificateProperties(Model): + """The description of an X509 CA Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar subject: The certificate's subject name. + :vartype subject: str + :ivar expiry: The certificate's expiration date and time. + :vartype expiry: datetime + :ivar thumbprint: The certificate's thumbprint. + :vartype thumbprint: str + :ivar is_verified: Determines whether certificate has been verified. + :vartype is_verified: bool + :ivar created: The certificate's creation date and time. + :vartype created: datetime + :ivar updated: The certificate's last update date and time. + :vartype updated: datetime + """ + + _validation = { + 'subject': {'readonly': True}, + 'expiry': {'readonly': True}, + 'thumbprint': {'readonly': True}, + 'is_verified': {'readonly': True}, + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'rfc-1123'}, + 'updated': {'key': 'updated', 'type': 'rfc-1123'}, + } + + def __init__(self, **kwargs) -> None: + super(CertificateProperties, self).__init__(**kwargs) + self.subject = None + self.expiry = None + self.thumbprint = None + self.is_verified = None + self.created = None + self.updated = None + + +class CertificateResponse(Model): + """The X509 Certificate. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param properties: properties of a certificate + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.CertificateProperties + :ivar id: The resource identifier. + :vartype id: str + :ivar name: The name of the certificate. + :vartype name: str + :ivar etag: The entity tag. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(CertificateResponse, self).__init__(**kwargs) + self.properties = properties + self.id = None + self.name = None + self.etag = None + self.type = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class EncryptionPropertiesDescription(Model): + """The encryption properties for the IoT DPS instance. + + :param key_source: The source of the key. + :type key_source: str + :param key_vault_properties: The properties of the KeyVault key. + :type key_vault_properties: + list[~azure.mgmt.iothubprovisioningservices.models.KeyVaultKeyProperties] + """ + + _attribute_map = { + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': '[KeyVaultKeyProperties]'}, + } + + def __init__(self, *, key_source: str=None, key_vault_properties=None, **kwargs) -> None: + super(EncryptionPropertiesDescription, self).__init__(**kwargs) + self.key_source = key_source + self.key_vault_properties = key_vault_properties + + +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 http_status_code: The HTTP status code. + :vartype http_status_code: str + :ivar message: The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: str + """ + + _validation = { + 'code': {'readonly': True}, + 'http_status_code': {'readonly': True}, + 'message': {'readonly': True}, + 'details': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ErrorDetails, self).__init__(**kwargs) + self.code = None + self.http_status_code = None + self.message = None + self.details = None + + +class ErrorDetailsException(HttpOperationError): + """Server responsed with exception of type: 'ErrorDetails'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) + + +class ErrorMesssage(Model): + """Error response containing message and code. + + :param code: standard error code + :type code: str + :param message: standard error description + :type message: str + :param details: detailed summary of error + :type details: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, details: str=None, **kwargs) -> None: + super(ErrorMesssage, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class GroupIdInformation(Model): + """The group information for creating a private endpoint on a provisioning + service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param properties: Required. The properties for a group information object + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.GroupIdInformationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'GroupIdInformationProperties'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(GroupIdInformation, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class GroupIdInformationProperties(Model): + """The properties for a group information object. + + :param group_id: The group id + :type group_id: str + :param required_members: The required members for a specific group id + :type required_members: list[str] + :param required_zone_names: The required DNS zones for a specific group id + :type required_zone_names: list[str] + """ + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__(self, *, group_id: str=None, required_members=None, required_zone_names=None, **kwargs) -> None: + super(GroupIdInformationProperties, self).__init__(**kwargs) + self.group_id = group_id + self.required_members = required_members + self.required_zone_names = required_zone_names + + +class IotDpsPropertiesDescription(Model): + """the service specific properties of a provisioning service, including keys, + linked iot hubs, current state, and system generated properties such as + hostname and idScope. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param state: Current state of the provisioning service. Possible values + include: 'Activating', 'Active', 'Deleting', 'Deleted', + 'ActivationFailed', 'DeletionFailed', 'Transitioning', 'Suspending', + 'Suspended', 'Resuming', 'FailingOver', 'FailoverFailed' + :type state: str or ~azure.mgmt.iothubprovisioningservices.models.State + :param encryption: The encryption properties for the IoT DPS instance. + :type encryption: + ~azure.mgmt.iothubprovisioningservices.models.EncryptionPropertiesDescription + :param public_network_access: Whether requests from Public Network are + allowed. Possible values include: 'Enabled', 'Disabled' + :type public_network_access: str or + ~azure.mgmt.iothubprovisioningservices.models.PublicNetworkAccess + :param ip_filter_rules: The IP filter rules. + :type ip_filter_rules: + list[~azure.mgmt.iothubprovisioningservices.models.IpFilterRule] + :param private_endpoint_connections: Private endpoint connections created + on this IotHub + :type private_endpoint_connections: + list[~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection] + :param provisioning_state: The ARM provisioning state of the provisioning + service. + :type provisioning_state: str + :param iot_hubs: List of IoT hubs associated with this provisioning + service. + :type iot_hubs: + list[~azure.mgmt.iothubprovisioningservices.models.IotHubDefinitionDescription] + :param allocation_policy: Allocation policy to be used by this + provisioning service. Possible values include: 'Hashed', 'GeoLatency', + 'Static' + :type allocation_policy: str or + ~azure.mgmt.iothubprovisioningservices.models.AllocationPolicy + :ivar service_operations_host_name: Service endpoint for provisioning + service. + :vartype service_operations_host_name: str + :ivar device_provisioning_host_name: Device endpoint for this provisioning + service. + :vartype device_provisioning_host_name: str + :ivar id_scope: Unique identifier of this provisioning service. + :vartype id_scope: str + :param authorization_policies: List of authorization keys for a + provisioning service. + :type authorization_policies: + list[~azure.mgmt.iothubprovisioningservices.models.SharedAccessSignatureAuthorizationRuleAccessRightsDescription] + """ + + _validation = { + 'service_operations_host_name': {'readonly': True}, + 'device_provisioning_host_name': {'readonly': True}, + 'id_scope': {'readonly': True}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'encryption': {'key': 'encryption', 'type': 'EncryptionPropertiesDescription'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'ip_filter_rules': {'key': 'ipFilterRules', 'type': '[IpFilterRule]'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'iot_hubs': {'key': 'iotHubs', 'type': '[IotHubDefinitionDescription]'}, + 'allocation_policy': {'key': 'allocationPolicy', 'type': 'str'}, + 'service_operations_host_name': {'key': 'serviceOperationsHostName', 'type': 'str'}, + 'device_provisioning_host_name': {'key': 'deviceProvisioningHostName', 'type': 'str'}, + 'id_scope': {'key': 'idScope', 'type': 'str'}, + 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRuleAccessRightsDescription]'}, + } + + def __init__(self, *, state=None, encryption=None, public_network_access=None, ip_filter_rules=None, private_endpoint_connections=None, provisioning_state: str=None, iot_hubs=None, allocation_policy=None, authorization_policies=None, **kwargs) -> None: + super(IotDpsPropertiesDescription, self).__init__(**kwargs) + self.state = state + self.encryption = encryption + self.public_network_access = public_network_access + self.ip_filter_rules = ip_filter_rules + self.private_endpoint_connections = private_endpoint_connections + self.provisioning_state = provisioning_state + self.iot_hubs = iot_hubs + self.allocation_policy = allocation_policy + self.service_operations_host_name = None + self.device_provisioning_host_name = None + self.id_scope = None + self.authorization_policies = authorization_policies + + +class IotDpsSkuDefinition(Model): + """Available SKUs of tier and units. + + :param name: Sku name. Possible values include: 'S1' + :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(IotDpsSkuDefinition, self).__init__(**kwargs) + self.name = name + + +class IotDpsSkuInfo(Model): + """List of possible provisioning service SKUs. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: Sku name. Possible values include: 'S1' + :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku + :ivar tier: Pricing tier name of the provisioning service. + :vartype tier: str + :param capacity: The number of units to provision + :type capacity: long + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'long'}, + } + + def __init__(self, *, name=None, capacity: int=None, **kwargs) -> None: + super(IotDpsSkuInfo, self).__init__(**kwargs) + self.name = name + self.tier = None + self.capacity = capacity + + +class IotHubDefinitionDescription(Model): + """Description of the IoT hub. + + 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 apply_allocation_policy: flag for applying allocationPolicy or not + for a given iot hub. + :type apply_allocation_policy: bool + :param allocation_weight: weight to apply for a given iot h. + :type allocation_weight: int + :ivar name: Host name of the IoT hub. + :vartype name: str + :param connection_string: Required. Connection string of the IoT hub. + :type connection_string: str + :param location: Required. ARM region of the IoT hub. + :type location: str + """ + + _validation = { + 'name': {'readonly': True}, + 'connection_string': {'required': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'apply_allocation_policy': {'key': 'applyAllocationPolicy', 'type': 'bool'}, + 'allocation_weight': {'key': 'allocationWeight', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, connection_string: str, location: str, apply_allocation_policy: bool=None, allocation_weight: int=None, **kwargs) -> None: + super(IotHubDefinitionDescription, self).__init__(**kwargs) + self.apply_allocation_policy = apply_allocation_policy + self.allocation_weight = allocation_weight + self.name = None + self.connection_string = connection_string + self.location = location + + +class IpFilterRule(Model): + """The IP filter rules for a provisioning Service. + + All required parameters must be populated in order to send to Azure. + + :param filter_name: Required. The name of the IP filter rule. + :type filter_name: str + :param action: Required. The desired action for requests captured by this + rule. Possible values include: 'Accept', 'Reject' + :type action: str or + ~azure.mgmt.iothubprovisioningservices.models.IpFilterActionType + :param ip_mask: Required. A string that contains the IP address range in + CIDR notation for the rule. + :type ip_mask: str + :param target: Target for requests captured by this rule. Possible values + include: 'all', 'serviceApi', 'deviceApi' + :type target: str or + ~azure.mgmt.iothubprovisioningservices.models.IpFilterTargetType + """ + + _validation = { + 'filter_name': {'required': True}, + 'action': {'required': True}, + 'ip_mask': {'required': True}, + } + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'IpFilterActionType'}, + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'IpFilterTargetType'}, + } + + def __init__(self, *, filter_name: str, action, ip_mask: str, target=None, **kwargs) -> None: + super(IpFilterRule, self).__init__(**kwargs) + self.filter_name = filter_name + self.action = action + self.ip_mask = ip_mask + self.target = target + + +class KeyVaultKeyProperties(Model): + """The properties of the KeyVault key. + + :param key_identifier: The identifier of the key. + :type key_identifier: str + """ + + _attribute_map = { + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + } + + def __init__(self, *, key_identifier: str=None, **kwargs) -> None: + super(KeyVaultKeyProperties, self).__init__(**kwargs) + self.key_identifier = key_identifier + + +class NameAvailabilityInfo(Model): + """Description of name availability. + + :param name_available: specifies if a name is available or not + :type name_available: bool + :param reason: specifies the reason a name is unavailable. Possible values + include: 'Invalid', 'AlreadyExists' + :type reason: str or + ~azure.mgmt.iothubprovisioningservices.models.NameUnavailabilityReason + :param message: message containing a detailed reason name is unavailable + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, name_available: bool=None, reason=None, message: str=None, **kwargs) -> None: + super(NameAvailabilityInfo, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class Operation(Model): + """Provisioning Service REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Operation name: {provider}/{resource}/{read | write | action | + delete} + :vartype name: str + :param display: The object that represents the operation. + :type display: + ~azure.mgmt.iothubprovisioningservices.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Service provider: Microsoft Devices. + :vartype provider: str + :ivar resource: Resource Type: ProvisioningServices. + :vartype resource: str + :ivar operation: Name of the operation. + :vartype operation: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + + +class OperationInputs(Model): + """Input values for operation results call. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Provisioning Service to check. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(OperationInputs, self).__init__(**kwargs) + self.name = name + + +class PrivateEndpoint(Model): + """The private endpoint property of a private endpoint connection. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The resource identifier. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Model): + """The private endpoint connection of a provisioning service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param properties: Required. The properties of a private endpoint + connection + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnectionProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__(self, *, properties, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class PrivateEndpointConnectionProperties(Model): + """The properties of a private endpoint connection. + + All required parameters must be populated in order to send to Azure. + + :param private_endpoint: The private endpoint property of a private + endpoint connection + :type private_endpoint: + ~azure.mgmt.iothubprovisioningservices.models.PrivateEndpoint + :param private_link_service_connection_state: Required. The current state + of a private endpoint connection + :type private_link_service_connection_state: + ~azure.mgmt.iothubprovisioningservices.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'private_link_service_connection_state': {'required': True}, + } + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__(self, *, private_link_service_connection_state, private_endpoint=None, **kwargs) -> None: + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkResources(Model): + """The available private link resources for a provisioning service. + + :param value: The list of available private link resources for a + provisioning service + :type value: + list[~azure.mgmt.iothubprovisioningservices.models.GroupIdInformation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GroupIdInformation]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(PrivateLinkResources, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(Model): + """The current state of a private endpoint connection. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The status of a private endpoint connection. + Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.iothubprovisioningservices.models.PrivateLinkServiceConnectionStatus + :param description: Required. The description for the current state of a + private endpoint connection + :type description: str + :param actions_required: Actions required for a private endpoint + connection + :type actions_required: str + """ + + _validation = { + 'status': {'required': True}, + 'description': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status, description: str, actions_required: str=None, **kwargs) -> None: + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class Resource(Model): + """The common properties of an 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', '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.type = None + self.location = location + self.tags = tags + + +class ProvisioningServiceDescription(Resource): + """The description of the provisioning service. + + 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: The resource identifier. + :vartype id: str + :ivar name: The resource name. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :param location: Required. The resource location. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param etag: The Etag field is *not* required. If it is provided in the + response body, it must also be provided as a header per the normal ETag + convention. + :type etag: str + :param properties: Required. Service specific properties for a + provisioning service + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.IotDpsPropertiesDescription + :param sku: Required. Sku info for a provisioning Service. + :type sku: ~azure.mgmt.iothubprovisioningservices.models.IotDpsSkuInfo + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'properties': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'IotDpsPropertiesDescription'}, + 'sku': {'key': 'sku', 'type': 'IotDpsSkuInfo'}, + } + + def __init__(self, *, location: str, properties, sku, tags=None, etag: str=None, **kwargs) -> None: + super(ProvisioningServiceDescription, self).__init__(location=location, tags=tags, **kwargs) + self.etag = etag + self.properties = properties + self.sku = sku + + +class SharedAccessSignatureAuthorizationRuleAccessRightsDescription(Model): + """Description of the shared access key. + + All required parameters must be populated in order to send to Azure. + + :param key_name: Required. Name of the key. + :type key_name: str + :param primary_key: Primary SAS key value. + :type primary_key: str + :param secondary_key: Secondary SAS key value. + :type secondary_key: str + :param rights: Required. Rights that this key has. Possible values + include: 'ServiceConfig', 'EnrollmentRead', 'EnrollmentWrite', + 'DeviceConnect', 'RegistrationStatusRead', 'RegistrationStatusWrite' + :type rights: str or + ~azure.mgmt.iothubprovisioningservices.models.AccessRightsDescription + """ + + _validation = { + 'key_name': {'required': True}, + 'rights': {'required': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'rights': {'key': 'rights', 'type': 'str'}, + } + + def __init__(self, *, key_name: str, rights, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: + super(SharedAccessSignatureAuthorizationRuleAccessRightsDescription, self).__init__(**kwargs) + self.key_name = key_name + self.primary_key = primary_key + self.secondary_key = secondary_key + self.rights = rights + + +class TagsResource(Model): + """A container holding only the Tags for a resource, allowing the user to + update the tags on a Provisioning Service instance. + + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.tags = tags + + +class VerificationCodeRequest(Model): + """The JSON-serialized leaf certificate. + + :param certificate: base-64 representation of X509 certificate .cer file + or just .pem file content. + :type certificate: str + """ + + _attribute_map = { + 'certificate': {'key': 'certificate', 'type': 'str'}, + } + + def __init__(self, *, certificate: str=None, **kwargs) -> None: + super(VerificationCodeRequest, self).__init__(**kwargs) + self.certificate = certificate + + +class VerificationCodeResponse(Model): + """Description of the response of the verification code. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of certificate. + :vartype name: str + :ivar etag: Request etag. + :vartype etag: str + :ivar id: The resource identifier. + :vartype id: str + :ivar type: The resource type. + :vartype type: str + :param properties: + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.VerificationCodeResponseProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VerificationCodeResponseProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(VerificationCodeResponse, self).__init__(**kwargs) + self.name = None + self.etag = None + self.id = None + self.type = None + self.properties = properties + + +class VerificationCodeResponseProperties(Model): + """VerificationCodeResponseProperties. + + :param verification_code: Verification code. + :type verification_code: str + :param subject: Certificate subject. + :type subject: str + :param expiry: Code expiry. + :type expiry: str + :param thumbprint: Certificate thumbprint. + :type thumbprint: str + :param is_verified: Indicate if the certificate is verified by owner of + private key. + :type is_verified: bool + :param created: Certificate created time. + :type created: str + :param updated: Certificate updated time. + :type updated: str + """ + + _attribute_map = { + 'verification_code': {'key': 'verificationCode', 'type': 'str'}, + 'subject': {'key': 'subject', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'is_verified': {'key': 'isVerified', 'type': 'bool'}, + 'created': {'key': 'created', 'type': 'str'}, + 'updated': {'key': 'updated', 'type': 'str'}, + } + + def __init__(self, *, verification_code: str=None, subject: str=None, expiry: str=None, thumbprint: str=None, is_verified: bool=None, created: str=None, updated: str=None, **kwargs) -> None: + super(VerificationCodeResponseProperties, self).__init__(**kwargs) + self.verification_code = verification_code + self.subject = subject + self.expiry = expiry + self.thumbprint = thumbprint + self.is_verified = is_verified + self.created = created + self.updated = updated diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_paged_models.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_paged_models.py new file mode 100644 index 000000000000..a43497d90f8c --- /dev/null +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class ProvisioningServiceDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProvisioningServiceDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProvisioningServiceDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(ProvisioningServiceDescriptionPaged, self).__init__(*args, **kwargs) +class IotDpsSkuDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`IotDpsSkuDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[IotDpsSkuDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(IotDpsSkuDefinitionPaged, self).__init__(*args, **kwargs) +class SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`SharedAccessSignatureAuthorizationRuleAccessRightsDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SharedAccessSignatureAuthorizationRuleAccessRightsDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result.py deleted file mode 100644 index d220a92098f5..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result.py +++ /dev/null @@ -1,32 +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 AsyncOperationResult(Model): - """Result of a long running operation. - - :param status: current status of a long running operation. - :type status: str - :param error: Error message containing code, description and details - :type error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMesssage - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorMesssage'}, - } - - def __init__(self, **kwargs): - super(AsyncOperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.error = kwargs.get('error', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result_py3.py deleted file mode 100644 index d4365e11a55b..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/async_operation_result_py3.py +++ /dev/null @@ -1,32 +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 AsyncOperationResult(Model): - """Result of a long running operation. - - :param status: current status of a long running operation. - :type status: str - :param error: Error message containing code, description and details - :type error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMesssage - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorMesssage'}, - } - - def __init__(self, *, status: str=None, error=None, **kwargs) -> None: - super(AsyncOperationResult, self).__init__(**kwargs) - self.status = status - self.error = error diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description.py deleted file mode 100644 index a35e4c3fa2dd..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description.py +++ /dev/null @@ -1,29 +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 CertificateBodyDescription(Model): - """The JSON-serialized X509 Certificate. - - :param certificate: Base-64 representation of the X509 leaf certificate - .cer file or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateBodyDescription, self).__init__(**kwargs) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description_py3.py deleted file mode 100644 index 0383312e8b38..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_body_description_py3.py +++ /dev/null @@ -1,29 +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 CertificateBodyDescription(Model): - """The JSON-serialized X509 Certificate. - - :param certificate: Base-64 representation of the X509 leaf certificate - .cer file or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(CertificateBodyDescription, self).__init__(**kwargs) - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description.py deleted file mode 100644 index e48e46d87abc..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description.py +++ /dev/null @@ -1,29 +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 CertificateListDescription(Model): - """The JSON-serialized array of Certificate objects. - - :param value: The array of Certificate objects. - :type value: - list[~azure.mgmt.iothubprovisioningservices.models.CertificateResponse] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CertificateResponse]'}, - } - - def __init__(self, **kwargs): - super(CertificateListDescription, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description_py3.py deleted file mode 100644 index 3c86d0ce38e6..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_list_description_py3.py +++ /dev/null @@ -1,29 +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 CertificateListDescription(Model): - """The JSON-serialized array of Certificate objects. - - :param value: The array of Certificate objects. - :type value: - list[~azure.mgmt.iothubprovisioningservices.models.CertificateResponse] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CertificateResponse]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(CertificateListDescription, self).__init__(**kwargs) - self.value = value diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties.py deleted file mode 100644 index d38a4e83a28c..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties.py +++ /dev/null @@ -1,60 +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 CertificateProperties(Model): - """The description of an X509 CA Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's creation date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - } - - def __init__(self, **kwargs): - super(CertificateProperties, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties_py3.py deleted file mode 100644 index c7bdf10c5550..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_properties_py3.py +++ /dev/null @@ -1,60 +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 CertificateProperties(Model): - """The description of an X509 CA Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar subject: The certificate's subject name. - :vartype subject: str - :ivar expiry: The certificate's expiration date and time. - :vartype expiry: datetime - :ivar thumbprint: The certificate's thumbprint. - :vartype thumbprint: str - :ivar is_verified: Determines whether certificate has been verified. - :vartype is_verified: bool - :ivar created: The certificate's creation date and time. - :vartype created: datetime - :ivar updated: The certificate's last update date and time. - :vartype updated: datetime - """ - - _validation = { - 'subject': {'readonly': True}, - 'expiry': {'readonly': True}, - 'thumbprint': {'readonly': True}, - 'is_verified': {'readonly': True}, - 'created': {'readonly': True}, - 'updated': {'readonly': True}, - } - - _attribute_map = { - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'rfc-1123'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'rfc-1123'}, - 'updated': {'key': 'updated', 'type': 'rfc-1123'}, - } - - def __init__(self, **kwargs) -> None: - super(CertificateProperties, self).__init__(**kwargs) - self.subject = None - self.expiry = None - self.thumbprint = None - self.is_verified = None - self.created = None - self.updated = None diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response.py deleted file mode 100644 index 6a4ff8db3d87..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response.py +++ /dev/null @@ -1,55 +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 CertificateResponse(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: properties of a certificate - :type properties: - ~azure.mgmt.iothubprovisioningservices.models.CertificateProperties - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CertificateResponse, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response_py3.py deleted file mode 100644 index a551bc58c285..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/certificate_response_py3.py +++ /dev/null @@ -1,55 +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 CertificateResponse(Model): - """The X509 Certificate. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param properties: properties of a certificate - :type properties: - ~azure.mgmt.iothubprovisioningservices.models.CertificateProperties - :ivar id: The resource identifier. - :vartype id: str - :ivar name: The name of the certificate. - :vartype name: str - :ivar etag: The entity tag. - :vartype etag: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'CertificateProperties'}, - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(CertificateResponse, self).__init__(**kwargs) - self.properties = properties - self.id = None - self.name = None - self.etag = None - self.type = None diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details.py deleted file mode 100644 index 77a408028562..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details.py +++ /dev/null @@ -1,63 +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 -from msrest.exceptions import HttpOperationError - - -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 http_status_code: The HTTP status code. - :vartype http_status_code: str - :ivar message: The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: str - """ - - _validation = { - 'code': {'readonly': True}, - 'http_status_code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.http_status_code = None - self.message = None - self.details = None - - -class ErrorDetailsException(HttpOperationError): - """Server responsed with exception of type: 'ErrorDetails'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details_py3.py deleted file mode 100644 index a78684fab905..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_details_py3.py +++ /dev/null @@ -1,63 +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 -from msrest.exceptions import HttpOperationError - - -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 http_status_code: The HTTP status code. - :vartype http_status_code: str - :ivar message: The error message. - :vartype message: str - :ivar details: The error details. - :vartype details: str - """ - - _validation = { - 'code': {'readonly': True}, - 'http_status_code': {'readonly': True}, - 'message': {'readonly': True}, - 'details': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'http_status_code': {'key': 'httpStatusCode', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.http_status_code = None - self.message = None - self.details = None - - -class ErrorDetailsException(HttpOperationError): - """Server responsed with exception of type: 'ErrorDetails'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorDetailsException, self).__init__(deserialize, response, 'ErrorDetails', *args) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage.py deleted file mode 100644 index ecec0bf5636a..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage.py +++ /dev/null @@ -1,36 +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 ErrorMesssage(Model): - """Error response containing message and code. - - :param code: standard error code - :type code: str - :param message: standard error description - :type message: str - :param details: detailed summary of error - :type details: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorMesssage, 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/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage_py3.py deleted file mode 100644 index c430f625fe45..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/error_messsage_py3.py +++ /dev/null @@ -1,36 +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 ErrorMesssage(Model): - """Error response containing message and code. - - :param code: standard error code - :type code: str - :param message: standard error description - :type message: str - :param details: detailed summary of error - :type details: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, details: str=None, **kwargs) -> None: - super(ErrorMesssage, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description.py deleted file mode 100644 index 1dadb948a1ab..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description.py +++ /dev/null @@ -1,80 +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 IotDpsPropertiesDescription(Model): - """the service specific properties of a provisoning service, including keys, - linked iot hubs, current state, and system generated properties such as - hostname and idScope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param state: Current state of the provisioning service. Possible values - include: 'Activating', 'Active', 'Deleting', 'Deleted', - 'ActivationFailed', 'DeletionFailed', 'Transitioning', 'Suspending', - 'Suspended', 'Resuming', 'FailingOver', 'FailoverFailed' - :type state: str or ~azure.mgmt.iothubprovisioningservices.models.State - :param provisioning_state: The ARM provisioning state of the provisioning - service. - :type provisioning_state: str - :param iot_hubs: List of IoT hubs assosciated with this provisioning - service. - :type iot_hubs: - list[~azure.mgmt.iothubprovisioningservices.models.IotHubDefinitionDescription] - :param allocation_policy: Allocation policy to be used by this - provisioning service. Possible values include: 'Hashed', 'GeoLatency', - 'Static' - :type allocation_policy: str or - ~azure.mgmt.iothubprovisioningservices.models.AllocationPolicy - :ivar service_operations_host_name: Service endpoint for provisioning - service. - :vartype service_operations_host_name: str - :ivar device_provisioning_host_name: Device endpoint for this provisioning - service. - :vartype device_provisioning_host_name: str - :ivar id_scope: Unique identifier of this provisioning service. - :vartype id_scope: str - :param authorization_policies: List of authorization keys for a - provisioning service. - :type authorization_policies: - list[~azure.mgmt.iothubprovisioningservices.models.SharedAccessSignatureAuthorizationRuleAccessRightsDescription] - """ - - _validation = { - 'service_operations_host_name': {'readonly': True}, - 'device_provisioning_host_name': {'readonly': True}, - 'id_scope': {'readonly': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'iot_hubs': {'key': 'iotHubs', 'type': '[IotHubDefinitionDescription]'}, - 'allocation_policy': {'key': 'allocationPolicy', 'type': 'str'}, - 'service_operations_host_name': {'key': 'serviceOperationsHostName', 'type': 'str'}, - 'device_provisioning_host_name': {'key': 'deviceProvisioningHostName', 'type': 'str'}, - 'id_scope': {'key': 'idScope', 'type': 'str'}, - 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRuleAccessRightsDescription]'}, - } - - def __init__(self, **kwargs): - super(IotDpsPropertiesDescription, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.iot_hubs = kwargs.get('iot_hubs', None) - self.allocation_policy = kwargs.get('allocation_policy', None) - self.service_operations_host_name = None - self.device_provisioning_host_name = None - self.id_scope = None - self.authorization_policies = kwargs.get('authorization_policies', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description_py3.py deleted file mode 100644 index c8f57abf3473..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_properties_description_py3.py +++ /dev/null @@ -1,80 +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 IotDpsPropertiesDescription(Model): - """the service specific properties of a provisoning service, including keys, - linked iot hubs, current state, and system generated properties such as - hostname and idScope. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param state: Current state of the provisioning service. Possible values - include: 'Activating', 'Active', 'Deleting', 'Deleted', - 'ActivationFailed', 'DeletionFailed', 'Transitioning', 'Suspending', - 'Suspended', 'Resuming', 'FailingOver', 'FailoverFailed' - :type state: str or ~azure.mgmt.iothubprovisioningservices.models.State - :param provisioning_state: The ARM provisioning state of the provisioning - service. - :type provisioning_state: str - :param iot_hubs: List of IoT hubs assosciated with this provisioning - service. - :type iot_hubs: - list[~azure.mgmt.iothubprovisioningservices.models.IotHubDefinitionDescription] - :param allocation_policy: Allocation policy to be used by this - provisioning service. Possible values include: 'Hashed', 'GeoLatency', - 'Static' - :type allocation_policy: str or - ~azure.mgmt.iothubprovisioningservices.models.AllocationPolicy - :ivar service_operations_host_name: Service endpoint for provisioning - service. - :vartype service_operations_host_name: str - :ivar device_provisioning_host_name: Device endpoint for this provisioning - service. - :vartype device_provisioning_host_name: str - :ivar id_scope: Unique identifier of this provisioning service. - :vartype id_scope: str - :param authorization_policies: List of authorization keys for a - provisioning service. - :type authorization_policies: - list[~azure.mgmt.iothubprovisioningservices.models.SharedAccessSignatureAuthorizationRuleAccessRightsDescription] - """ - - _validation = { - 'service_operations_host_name': {'readonly': True}, - 'device_provisioning_host_name': {'readonly': True}, - 'id_scope': {'readonly': True}, - } - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'iot_hubs': {'key': 'iotHubs', 'type': '[IotHubDefinitionDescription]'}, - 'allocation_policy': {'key': 'allocationPolicy', 'type': 'str'}, - 'service_operations_host_name': {'key': 'serviceOperationsHostName', 'type': 'str'}, - 'device_provisioning_host_name': {'key': 'deviceProvisioningHostName', 'type': 'str'}, - 'id_scope': {'key': 'idScope', 'type': 'str'}, - 'authorization_policies': {'key': 'authorizationPolicies', 'type': '[SharedAccessSignatureAuthorizationRuleAccessRightsDescription]'}, - } - - def __init__(self, *, state=None, provisioning_state: str=None, iot_hubs=None, allocation_policy=None, authorization_policies=None, **kwargs) -> None: - super(IotDpsPropertiesDescription, self).__init__(**kwargs) - self.state = state - self.provisioning_state = provisioning_state - self.iot_hubs = iot_hubs - self.allocation_policy = allocation_policy - self.service_operations_host_name = None - self.device_provisioning_host_name = None - self.id_scope = None - self.authorization_policies = authorization_policies diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition.py deleted file mode 100644 index 02960e4abff9..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition.py +++ /dev/null @@ -1,28 +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 IotDpsSkuDefinition(Model): - """Available Sku's of tier and units. - - :param name: Sku name. Possible values include: 'S1' - :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IotDpsSkuDefinition, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_paged.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_paged.py deleted file mode 100644 index 981f1fb2599a..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class IotDpsSkuDefinitionPaged(Paged): - """ - A paging container for iterating over a list of :class:`IotDpsSkuDefinition ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[IotDpsSkuDefinition]'} - } - - def __init__(self, *args, **kwargs): - - super(IotDpsSkuDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_py3.py deleted file mode 100644 index e7b2c7c86a39..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_definition_py3.py +++ /dev/null @@ -1,28 +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 IotDpsSkuDefinition(Model): - """Available Sku's of tier and units. - - :param name: Sku name. Possible values include: 'S1' - :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(IotDpsSkuDefinition, self).__init__(**kwargs) - self.name = name diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info.py deleted file mode 100644 index a83fefe71efa..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info.py +++ /dev/null @@ -1,43 +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 IotDpsSkuInfo(Model): - """List of possible provisoning service SKUs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: Sku name. Possible values include: 'S1' - :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku - :ivar tier: Pricing tier name of the provisioning service. - :vartype tier: str - :param capacity: The number of units to provision - :type capacity: long - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(IotDpsSkuInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = None - self.capacity = kwargs.get('capacity', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info_py3.py deleted file mode 100644 index d1b9a9dbb967..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_dps_sku_info_py3.py +++ /dev/null @@ -1,43 +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 IotDpsSkuInfo(Model): - """List of possible provisoning service SKUs. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :param name: Sku name. Possible values include: 'S1' - :type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku - :ivar tier: Pricing tier name of the provisioning service. - :vartype tier: str - :param capacity: The number of units to provision - :type capacity: long - """ - - _validation = { - 'tier': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'long'}, - } - - def __init__(self, *, name=None, capacity: int=None, **kwargs) -> None: - super(IotDpsSkuInfo, self).__init__(**kwargs) - self.name = name - self.tier = None - self.capacity = capacity diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description.py deleted file mode 100644 index a5ec8e232bf0..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description.py +++ /dev/null @@ -1,56 +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 IotHubDefinitionDescription(Model): - """Description of the IoT hub. - - 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 apply_allocation_policy: flag for applying allocationPolicy or not - for a given iot hub. - :type apply_allocation_policy: bool - :param allocation_weight: weight to apply for a given iot h. - :type allocation_weight: int - :ivar name: Host name of the IoT hub. - :vartype name: str - :param connection_string: Required. Connection string og the IoT hub. - :type connection_string: str - :param location: Required. ARM region of the IoT hub. - :type location: str - """ - - _validation = { - 'name': {'readonly': True}, - 'connection_string': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'apply_allocation_policy': {'key': 'applyAllocationPolicy', 'type': 'bool'}, - 'allocation_weight': {'key': 'allocationWeight', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(IotHubDefinitionDescription, self).__init__(**kwargs) - self.apply_allocation_policy = kwargs.get('apply_allocation_policy', None) - self.allocation_weight = kwargs.get('allocation_weight', None) - self.name = None - self.connection_string = kwargs.get('connection_string', None) - self.location = kwargs.get('location', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description_py3.py deleted file mode 100644 index 939dcf435091..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/iot_hub_definition_description_py3.py +++ /dev/null @@ -1,56 +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 IotHubDefinitionDescription(Model): - """Description of the IoT hub. - - 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 apply_allocation_policy: flag for applying allocationPolicy or not - for a given iot hub. - :type apply_allocation_policy: bool - :param allocation_weight: weight to apply for a given iot h. - :type allocation_weight: int - :ivar name: Host name of the IoT hub. - :vartype name: str - :param connection_string: Required. Connection string og the IoT hub. - :type connection_string: str - :param location: Required. ARM region of the IoT hub. - :type location: str - """ - - _validation = { - 'name': {'readonly': True}, - 'connection_string': {'required': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'apply_allocation_policy': {'key': 'applyAllocationPolicy', 'type': 'bool'}, - 'allocation_weight': {'key': 'allocationWeight', 'type': 'int'}, - 'name': {'key': 'name', 'type': 'str'}, - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__(self, *, connection_string: str, location: str, apply_allocation_policy: bool=None, allocation_weight: int=None, **kwargs) -> None: - super(IotHubDefinitionDescription, self).__init__(**kwargs) - self.apply_allocation_policy = apply_allocation_policy - self.allocation_weight = allocation_weight - self.name = None - self.connection_string = connection_string - self.location = location diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info.py deleted file mode 100644 index 1238f282b280..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info.py +++ /dev/null @@ -1,38 +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 NameAvailabilityInfo(Model): - """Description of name availability. - - :param name_available: specifies if a name is available or not - :type name_available: bool - :param reason: specifies the reason a name is unavailable. Possible values - include: 'Invalid', 'AlreadyExists' - :type reason: str or - ~azure.mgmt.iothubprovisioningservices.models.NameUnavailabilityReason - :param message: message containing a etailed reason name is unavailable - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NameAvailabilityInfo, self).__init__(**kwargs) - self.name_available = kwargs.get('name_available', None) - self.reason = kwargs.get('reason', None) - self.message = kwargs.get('message', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info_py3.py deleted file mode 100644 index 3f0a3ba82210..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/name_availability_info_py3.py +++ /dev/null @@ -1,38 +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 NameAvailabilityInfo(Model): - """Description of name availability. - - :param name_available: specifies if a name is available or not - :type name_available: bool - :param reason: specifies the reason a name is unavailable. Possible values - include: 'Invalid', 'AlreadyExists' - :type reason: str or - ~azure.mgmt.iothubprovisioningservices.models.NameUnavailabilityReason - :param message: message containing a etailed reason name is unavailable - :type message: str - """ - - _attribute_map = { - 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, name_available: bool=None, reason=None, message: str=None, **kwargs) -> None: - super(NameAvailabilityInfo, self).__init__(**kwargs) - self.name_available = name_available - self.reason = reason - self.message = message diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation.py deleted file mode 100644 index 6ef6ac9cb76e..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation.py +++ /dev/null @@ -1,41 +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 Operation(Model): - """IoT Hub REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{read | write | action | - delete} - :vartype name: str - :param display: The object that represents the operation. - :type display: - ~azure.mgmt.iothubprovisioningservices.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = kwargs.get('display', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display.py deleted file mode 100644 index d198f80a81c1..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display.py +++ /dev/null @@ -1,45 +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 OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Devices. - :vartype provider: str - :ivar resource: Resource Type: ProvisioningServices. - :vartype resource: str - :ivar operation: Name of the operation. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display_py3.py deleted file mode 100644 index a1add8843a0a..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_display_py3.py +++ /dev/null @@ -1,45 +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 OperationDisplay(Model): - """The object that represents the operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar provider: Service provider: Microsoft Devices. - :vartype provider: str - :ivar resource: Resource Type: ProvisioningServices. - :vartype resource: str - :ivar operation: Name of the operation. - :vartype operation: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.resource = None - self.operation = None diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs.py deleted file mode 100644 index 09ee8b535542..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs.py +++ /dev/null @@ -1,34 +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 OperationInputs(Model): - """Input values for operation results call. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the Provisioning Service to check. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationInputs, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs_py3.py deleted file mode 100644 index f0e2e45af4f7..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_inputs_py3.py +++ /dev/null @@ -1,34 +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 OperationInputs(Model): - """Input values for operation results call. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the Provisioning Service to check. - :type name: str - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str, **kwargs) -> None: - super(OperationInputs, self).__init__(**kwargs) - self.name = name diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_paged.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_paged.py deleted file mode 100644 index 3f6c7fbeb755..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_py3.py deleted file mode 100644 index e25e19d1f294..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/operation_py3.py +++ /dev/null @@ -1,41 +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 Operation(Model): - """IoT Hub REST API operation. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Operation name: {provider}/{resource}/{read | write | action | - delete} - :vartype name: str - :param display: The object that represents the operation. - :type display: - ~azure.mgmt.iothubprovisioningservices.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = display diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description.py deleted file mode 100644 index 1cb1ca6d0178..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description.py +++ /dev/null @@ -1,69 +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 .resource import Resource - - -class ProvisioningServiceDescription(Resource): - """The description of the provisioning service. - - 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: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: The Etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal ETag - convention. - :type etag: str - :param properties: Required. Service specific properties for a - provisioning service - :type properties: - ~azure.mgmt.iothubprovisioningservices.models.IotDpsPropertiesDescription - :param sku: Required. Sku info for a provisioning Service. - :type sku: ~azure.mgmt.iothubprovisioningservices.models.IotDpsSkuInfo - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IotDpsPropertiesDescription'}, - 'sku': {'key': 'sku', 'type': 'IotDpsSkuInfo'}, - } - - def __init__(self, **kwargs): - super(ProvisioningServiceDescription, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.properties = kwargs.get('properties', None) - self.sku = kwargs.get('sku', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_paged.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_paged.py deleted file mode 100644 index 3f10e4fdb0d5..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class ProvisioningServiceDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`ProvisioningServiceDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ProvisioningServiceDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(ProvisioningServiceDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_py3.py deleted file mode 100644 index 6097e7818e5a..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/provisioning_service_description_py3.py +++ /dev/null @@ -1,69 +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 .resource import Resource - - -class ProvisioningServiceDescription(Resource): - """The description of the provisioning service. - - 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: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param etag: The Etag field is *not* required. If it is provided in the - response body, it must also be provided as a header per the normal ETag - convention. - :type etag: str - :param properties: Required. Service specific properties for a - provisioning service - :type properties: - ~azure.mgmt.iothubprovisioningservices.models.IotDpsPropertiesDescription - :param sku: Required. Sku info for a provisioning Service. - :type sku: ~azure.mgmt.iothubprovisioningservices.models.IotDpsSkuInfo - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'properties': {'required': True}, - 'sku': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'IotDpsPropertiesDescription'}, - 'sku': {'key': 'sku', 'type': 'IotDpsSkuInfo'}, - } - - def __init__(self, *, location: str, properties, sku, tags=None, etag: str=None, **kwargs) -> None: - super(ProvisioningServiceDescription, self).__init__(location=location, tags=tags, **kwargs) - self.etag = etag - self.properties = properties - self.sku = sku diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource.py deleted file mode 100644 index e03d78711115..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource.py +++ /dev/null @@ -1,56 +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 Resource(Model): - """The common properties of an 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: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource_py3.py deleted file mode 100644 index 436710184586..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/resource_py3.py +++ /dev/null @@ -1,56 +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 Resource(Model): - """The common properties of an 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: The resource identifier. - :vartype id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: Required. The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True, 'pattern': r'^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$'}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', '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.type = None - self.location = location - self.tags = tags diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description.py deleted file mode 100644 index d89bb6c46acf..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description.py +++ /dev/null @@ -1,50 +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 SharedAccessSignatureAuthorizationRuleAccessRightsDescription(Model): - """Description of the shared access key. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. Name of the key. - :type key_name: str - :param primary_key: Primary SAS key value. - :type primary_key: str - :param secondary_key: Secondary SAS key value. - :type secondary_key: str - :param rights: Required. Rights that this key has. Possible values - include: 'ServiceConfig', 'EnrollmentRead', 'EnrollmentWrite', - 'DeviceConnect', 'RegistrationStatusRead', 'RegistrationStatusWrite' - :type rights: str or - ~azure.mgmt.iothubprovisioningservices.models.AccessRightsDescription - """ - - _validation = { - 'key_name': {'required': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'rights': {'key': 'rights', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SharedAccessSignatureAuthorizationRuleAccessRightsDescription, self).__init__(**kwargs) - self.key_name = kwargs.get('key_name', None) - self.primary_key = kwargs.get('primary_key', None) - self.secondary_key = kwargs.get('secondary_key', None) - self.rights = kwargs.get('rights', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_paged.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_paged.py deleted file mode 100644 index 3223713a25e7..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged(Paged): - """ - A paging container for iterating over a list of :class:`SharedAccessSignatureAuthorizationRuleAccessRightsDescription ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SharedAccessSignatureAuthorizationRuleAccessRightsDescription]'} - } - - def __init__(self, *args, **kwargs): - - super(SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_py3.py deleted file mode 100644 index 36235ef85249..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/shared_access_signature_authorization_rule_access_rights_description_py3.py +++ /dev/null @@ -1,50 +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 SharedAccessSignatureAuthorizationRuleAccessRightsDescription(Model): - """Description of the shared access key. - - All required parameters must be populated in order to send to Azure. - - :param key_name: Required. Name of the key. - :type key_name: str - :param primary_key: Primary SAS key value. - :type primary_key: str - :param secondary_key: Secondary SAS key value. - :type secondary_key: str - :param rights: Required. Rights that this key has. Possible values - include: 'ServiceConfig', 'EnrollmentRead', 'EnrollmentWrite', - 'DeviceConnect', 'RegistrationStatusRead', 'RegistrationStatusWrite' - :type rights: str or - ~azure.mgmt.iothubprovisioningservices.models.AccessRightsDescription - """ - - _validation = { - 'key_name': {'required': True}, - 'rights': {'required': True}, - } - - _attribute_map = { - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - 'rights': {'key': 'rights', 'type': 'str'}, - } - - def __init__(self, *, key_name: str, rights, primary_key: str=None, secondary_key: str=None, **kwargs) -> None: - super(SharedAccessSignatureAuthorizationRuleAccessRightsDescription, self).__init__(**kwargs) - self.key_name = key_name - self.primary_key = primary_key - self.secondary_key = secondary_key - self.rights = rights diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource.py deleted file mode 100644 index 16f684053142..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource.py +++ /dev/null @@ -1,29 +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 TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on a Provisioning Service instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(TagsResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource_py3.py deleted file mode 100644 index 5afbce93d8c0..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/tags_resource_py3.py +++ /dev/null @@ -1,29 +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 TagsResource(Model): - """A container holding only the Tags for a resource, allowing the user to - update the tags on a Provisioning Service instance. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(TagsResource, self).__init__(**kwargs) - self.tags = tags diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request.py deleted file mode 100644 index 1602cc58f886..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request.py +++ /dev/null @@ -1,29 +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 VerificationCodeRequest(Model): - """The JSON-serialized leaf certificate. - - :param certificate: base-64 representation of X509 certificate .cer file - or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VerificationCodeRequest, self).__init__(**kwargs) - self.certificate = kwargs.get('certificate', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request_py3.py deleted file mode 100644 index 058544415d4b..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_request_py3.py +++ /dev/null @@ -1,29 +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 VerificationCodeRequest(Model): - """The JSON-serialized leaf certificate. - - :param certificate: base-64 representation of X509 certificate .cer file - or just .pem file content. - :type certificate: str - """ - - _attribute_map = { - 'certificate': {'key': 'certificate', 'type': 'str'}, - } - - def __init__(self, *, certificate: str=None, **kwargs) -> None: - super(VerificationCodeRequest, self).__init__(**kwargs) - self.certificate = certificate diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response.py deleted file mode 100644 index 39d2ae14a87f..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response.py +++ /dev/null @@ -1,55 +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 VerificationCodeResponse(Model): - """Description of the response of the verification code. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of certificate. - :vartype name: str - :ivar etag: Request etag. - :vartype etag: str - :ivar id: The resource identifier. - :vartype id: str - :ivar type: The resource type. - :vartype type: str - :param properties: - :type properties: - ~azure.mgmt.iothubprovisioningservices.models.VerificationCodeResponseProperties - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'VerificationCodeResponseProperties'}, - } - - def __init__(self, **kwargs): - super(VerificationCodeResponse, self).__init__(**kwargs) - self.name = None - self.etag = None - self.id = None - self.type = None - self.properties = kwargs.get('properties', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties.py deleted file mode 100644 index db5b81439493..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties.py +++ /dev/null @@ -1,53 +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 VerificationCodeResponseProperties(Model): - """VerificationCodeResponseProperties. - - :param verification_code: Verification code. - :type verification_code: str - :param subject: Certificate subject. - :type subject: str - :param expiry: Code expiry. - :type expiry: str - :param thumbprint: Certificate thumbprint. - :type thumbprint: str - :param is_verified: Indicate if the certificate is verified by owner of - private key. - :type is_verified: bool - :param created: Certificate created time. - :type created: str - :param updated: Certificate updated time. - :type updated: str - """ - - _attribute_map = { - 'verification_code': {'key': 'verificationCode', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'str'}, - 'updated': {'key': 'updated', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(VerificationCodeResponseProperties, self).__init__(**kwargs) - self.verification_code = kwargs.get('verification_code', None) - self.subject = kwargs.get('subject', None) - self.expiry = kwargs.get('expiry', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.is_verified = kwargs.get('is_verified', None) - self.created = kwargs.get('created', None) - self.updated = kwargs.get('updated', None) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties_py3.py deleted file mode 100644 index ed93c35fb395..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_properties_py3.py +++ /dev/null @@ -1,53 +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 VerificationCodeResponseProperties(Model): - """VerificationCodeResponseProperties. - - :param verification_code: Verification code. - :type verification_code: str - :param subject: Certificate subject. - :type subject: str - :param expiry: Code expiry. - :type expiry: str - :param thumbprint: Certificate thumbprint. - :type thumbprint: str - :param is_verified: Indicate if the certificate is verified by owner of - private key. - :type is_verified: bool - :param created: Certificate created time. - :type created: str - :param updated: Certificate updated time. - :type updated: str - """ - - _attribute_map = { - 'verification_code': {'key': 'verificationCode', 'type': 'str'}, - 'subject': {'key': 'subject', 'type': 'str'}, - 'expiry': {'key': 'expiry', 'type': 'str'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'is_verified': {'key': 'isVerified', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'str'}, - 'updated': {'key': 'updated', 'type': 'str'}, - } - - def __init__(self, *, verification_code: str=None, subject: str=None, expiry: str=None, thumbprint: str=None, is_verified: bool=None, created: str=None, updated: str=None, **kwargs) -> None: - super(VerificationCodeResponseProperties, self).__init__(**kwargs) - self.verification_code = verification_code - self.subject = subject - self.expiry = expiry - self.thumbprint = thumbprint - self.is_verified = is_verified - self.created = created - self.updated = updated diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_py3.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_py3.py deleted file mode 100644 index bf0ead104a47..000000000000 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/models/verification_code_response_py3.py +++ /dev/null @@ -1,55 +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 VerificationCodeResponse(Model): - """Description of the response of the verification code. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: Name of certificate. - :vartype name: str - :ivar etag: Request etag. - :vartype etag: str - :ivar id: The resource identifier. - :vartype id: str - :ivar type: The resource type. - :vartype type: str - :param properties: - :type properties: - ~azure.mgmt.iothubprovisioningservices.models.VerificationCodeResponseProperties - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'VerificationCodeResponseProperties'}, - } - - def __init__(self, *, properties=None, **kwargs) -> None: - super(VerificationCodeResponse, self).__init__(**kwargs) - self.name = None - self.etag = None - self.id = None - self.type = None - self.properties = properties diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/__init__.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/__init__.py index fb15e05ea1bd..951e8ea29e81 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/__init__.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .dps_certificate_operations import DpsCertificateOperations -from .iot_dps_resource_operations import IotDpsResourceOperations +from ._operations import Operations +from ._dps_certificate_operations import DpsCertificateOperations +from ._iot_dps_resource_operations import IotDpsResourceOperations __all__ = [ 'Operations', diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/dps_certificate_operations.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_dps_certificate_operations.py similarity index 95% rename from sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/dps_certificate_operations.py rename to sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_dps_certificate_operations.py index 92b173849272..5f2cf243109e 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/dps_certificate_operations.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_dps_certificate_operations.py @@ -18,11 +18,13 @@ class DpsCertificateOperations(object): """DpsCertificateOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-01-22". + :ivar api_version: The version of the API. Constant value: "2020-09-01-preview". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-22" + self.api_version = "2020-09-01-preview" self.config = config @@ -77,7 +79,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: @@ -88,14 +90,13 @@ 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, stream=False, **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.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CertificateResponse', response) @@ -156,6 +157,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()) @@ -170,15 +172,13 @@ def create_or_update( body_content = self._serialize.body(certificate_description, 'CertificateBodyDescription') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(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('CertificateResponse', response) @@ -193,7 +193,7 @@ def delete( self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, custom_headers=None, raw=False, **operation_config): """Delete the Provisioning Service Certificate. - Deletes the specified certificate assosciated with the Provisioning + Deletes the specified certificate associated with the Provisioning Service. :param resource_group_name: Resource group identifier. @@ -271,7 +271,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: @@ -281,8 +280,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: raise models.ErrorDetailsException(self._deserialize, response) @@ -328,7 +327,7 @@ def list( # 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: @@ -337,14 +336,13 @@ def list( 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, stream=False, **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.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CertificateListDescription', response) @@ -436,7 +434,7 @@ def generate_verification_code( # 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: @@ -446,14 +444,13 @@ def generate_verification_code( 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, stream=False, **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]: raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('VerificationCodeResponse', response) @@ -551,6 +548,7 @@ def verify_certificate( # 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()) @@ -564,15 +562,13 @@ def verify_certificate( body_content = self._serialize.body(request, 'VerificationCodeRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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('CertificateResponse', response) diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/iot_dps_resource_operations.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_iot_dps_resource_operations.py similarity index 59% rename from sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/iot_dps_resource_operations.py rename to sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_iot_dps_resource_operations.py index 05eb37ed4b3c..c5a57e229c1d 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/iot_dps_resource_operations.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_iot_dps_resource_operations.py @@ -21,11 +21,13 @@ class IotDpsResourceOperations(object): """IotDpsResourceOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-01-22". + :ivar api_version: The version of the API. Constant value: "2020-09-01-preview". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-22" + self.api_version = "2020-09-01-preview" self.config = config @@ -78,7 +80,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: @@ -87,14 +89,13 @@ 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, stream=False, **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.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('ProvisioningServiceDescription', response) @@ -123,6 +124,7 @@ def _create_or_update_initial( # 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()) @@ -135,9 +137,8 @@ def _create_or_update_initial( body_content = self._serialize.body(iot_dps_description, 'ProvisioningServiceDescription') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: raise models.ErrorDetailsException(self._deserialize, response) @@ -235,6 +236,7 @@ def _update_initial( # 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()) @@ -247,9 +249,8 @@ def _update_initial( body_content = self._serialize.body(provisioning_service_tags, 'TagsResource') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **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]: exp = CloudError(response) @@ -340,7 +341,6 @@ def _delete_initial( # 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: @@ -349,8 +349,8 @@ def _delete_initial( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 202, 204, 404]: raise models.ErrorDetailsException(self._deserialize, response) @@ -421,8 +421,7 @@ def list_by_subscription( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -441,7 +440,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: @@ -450,9 +449,13 @@ 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, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorDetailsException(self._deserialize, response) @@ -460,12 +463,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ProvisioningServiceDescriptionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ProvisioningServiceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ProvisioningServiceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Devices/provisioningServices'} @@ -487,8 +488,7 @@ def list_by_resource_group( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -508,7 +508,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: @@ -517,9 +517,13 @@ 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, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorDetailsException(self._deserialize, response) @@ -527,12 +531,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ProvisioningServiceDescriptionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.ProvisioningServiceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.ProvisioningServiceDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices'} @@ -582,7 +584,7 @@ def get_operation_result( # 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: @@ -591,14 +593,13 @@ def get_operation_result( 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, stream=False, **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.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AsyncOperationResult', response) @@ -630,8 +631,7 @@ def list_valid_skus( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_valid_skus.metadata['url'] @@ -652,7 +652,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: @@ -661,9 +661,13 @@ 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, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorDetailsException(self._deserialize, response) @@ -671,12 +675,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.IotDpsSkuDefinitionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.IotDpsSkuDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.IotDpsSkuDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_valid_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/skus'} @@ -717,6 +719,7 @@ def check_provisioning_service_name_availability( # 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()) @@ -729,15 +732,13 @@ def check_provisioning_service_name_availability( body_content = self._serialize.body(arguments, 'OperationInputs') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + 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('NameAvailabilityInfo', response) @@ -771,8 +772,7 @@ def list_keys( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_keys.metadata['url'] @@ -793,7 +793,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: @@ -802,9 +802,13 @@ 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.post(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorDetailsException(self._deserialize, response) @@ -812,12 +816,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/listkeys'} @@ -864,7 +866,7 @@ def list_keys_for_key_name( # 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: @@ -873,14 +875,13 @@ def list_keys_for_key_name( 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, stream=False, **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]: raise models.ErrorDetailsException(self._deserialize, response) deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SharedAccessSignatureAuthorizationRuleAccessRightsDescription', response) @@ -890,3 +891,484 @@ def list_keys_for_key_name( return deserialized list_keys_for_key_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/keys/{keyName}/listkeys'} + + def list_private_link_resources( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """List private link resources. + + List private link resources for the given provisioning service. + + :param resource_group_name: The name of the resource group that + contains the provisioning service. + :type resource_group_name: str + :param resource_name: The name of the provisioning service. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateLinkResources or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.iothubprovisioningservices.models.PrivateLinkResources or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.list_private_link_resources.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'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateLinkResources', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateLinkResources'} + + def get_private_link_resources( + self, resource_group_name, resource_name, group_id, custom_headers=None, raw=False, **operation_config): + """Get the specified private link resource. + + Get the specified private link resource for the given provisioning + service. + + :param resource_group_name: The name of the resource group that + contains the provisioning service. + :type resource_group_name: str + :param resource_name: The name of the provisioning service. + :type resource_name: str + :param group_id: The name of the private link resource + :type group_id: 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: GroupIdInformation or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.iothubprovisioningservices.models.GroupIdInformation or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get_private_link_resources.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'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'groupId': self._serialize.url("group_id", group_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' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GroupIdInformation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateLinkResources/{groupId}'} + + def list_private_endpoint_connections( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """List private endpoint connections. + + List private endpoint connection properties. + + :param resource_group_name: The name of the resource group that + contains the provisioning service. + :type resource_group_name: str + :param resource_name: The name of the provisioning service. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.list_private_endpoint_connections.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'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('[PrivateEndpointConnection]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections'} + + def get_private_endpoint_connection( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + """Get private endpoint connection. + + Get private endpoint connection properties. + + :param resource_group_name: The name of the resource group that + contains the provisioning service. + :type resource_group_name: str + :param resource_name: The name of the provisioning service. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection + :type private_endpoint_connection_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorDetailsException` + """ + # Construct URL + url = self.get_private_endpoint_connection.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'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _create_or_update_private_endpoint_connection_initial( + self, resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, **operation_config): + private_endpoint_connection = models.PrivateEndpointConnection(properties=properties) + + # Construct URL + url = self.create_or_update_private_endpoint_connection.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'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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(private_endpoint_connection, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_private_endpoint_connection( + self, resource_group_name, resource_name, private_endpoint_connection_name, properties, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update private endpoint connection. + + Create or update the status of a private endpoint connection with the + specified name. + + :param resource_group_name: The name of the resource group that + contains the provisioning service. + :type resource_group_name: str + :param resource_name: The name of the provisioning service. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection + :type private_endpoint_connection_name: str + :param properties: The properties of a private endpoint connection + :type properties: + ~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnectionProperties + :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 + PrivateEndpointConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._create_or_update_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.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_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + + def _delete_private_endpoint_connection_initial( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete_private_endpoint_connection.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'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorDetailsException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + if response.status_code == 202: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_private_endpoint_connection( + self, resource_group_name, resource_name, private_endpoint_connection_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete private endpoint connection. + + Delete private endpoint connection with the specified name. + + :param resource_group_name: The name of the resource group that + contains the provisioning service. + :type resource_group_name: str + :param resource_name: The name of the provisioning service. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection + :type private_endpoint_connection_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 + PrivateEndpointConnection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.iothubprovisioningservices.models.PrivateEndpointConnection]] + :raises: + :class:`ErrorDetailsException` + """ + raw_result = self._delete_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.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_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} diff --git a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/operations.py b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_operations.py similarity index 82% rename from sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/operations.py rename to sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_operations.py index d317e51009a8..466be0b40288 100644 --- a/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/operations.py +++ b/sdk/iothub/azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/_operations.py @@ -18,11 +18,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the API. Constant value: "2018-01-22". + :ivar api_version: The version of the API. Constant value: "2020-09-01-preview". """ models = models @@ -32,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-01-22" + self.api_version = "2020-09-01-preview" self.config = config @@ -51,8 +53,7 @@ def list( :raises: :class:`ErrorDetailsException` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -67,7 +68,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: @@ -76,9 +77,13 @@ 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, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise models.ErrorDetailsException(self._deserialize, response) @@ -86,12 +91,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Devices/operations'}