Skip to content

Commit

Permalink
Generated from Azure#1615
Browse files Browse the repository at this point in the history
  • Loading branch information
AutorestCI authored and lmazuel committed Jan 4, 2018
1 parent 5ada3f4 commit e646a19
Show file tree
Hide file tree
Showing 46 changed files with 3,733 additions and 1 deletion.
9 changes: 9 additions & 0 deletions azure-mgmt-iothubprovisioningservices/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:
Release History
===============

0.1.0 (2018-01-04)
++++++++++++++++++

* Initial Release
2 changes: 2 additions & 0 deletions azure-mgmt-iothubprovisioningservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.rst
include azure_bdist_wheel.py
49 changes: 49 additions & 0 deletions azure-mgmt-iothubprovisioningservices/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure IoTHub Provisioning Services Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell
pip uninstall azure
Usage
=====

For code examples, see `IoTHub Provisioning Services
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-iothubprovisioningservices.html>`__
on readthedocs.org.


Provide Feedback
================

If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.
1 change: 1 addition & 0 deletions azure-mgmt-iothubprovisioningservices/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .iot_dps_client import IotDpsClient
from .version import VERSION

__all__ = ['IotDpsClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# 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.service_client import ServiceClient
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 .operations.dps_certificates_operations import DpsCertificatesOperations
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<msrestazure.azure_active_directory>`
: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


class IotDpsClient(object):
"""API for using the Azure IoT Hub Device Provisioning Service features.
:ivar config: Configuration for client.
:vartype config: IotDpsClientConfiguration
:ivar operations: Operations operations
:vartype operations: azure.mgmt.iothubprovisioningservices.operations.Operations
:ivar dps_certificate: DpsCertificate operations
:vartype dps_certificate: azure.mgmt.iothubprovisioningservices.operations.DpsCertificateOperations
:ivar iot_dps_resource: IotDpsResource operations
:vartype iot_dps_resource: azure.mgmt.iothubprovisioningservices.operations.IotDpsResourceOperations
:ivar dps_certificates: DpsCertificates operations
:vartype dps_certificates: azure.mgmt.iothubprovisioningservices.operations.DpsCertificatesOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
: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):

self.config = IotDpsClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2017-11-15'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.dps_certificate = DpsCertificateOperations(
self._client, self.config, self._serialize, self._deserialize)
self.iot_dps_resource = IotDpsResourceOperations(
self._client, self.config, self._serialize, self._deserialize)
self.dps_certificates = DpsCertificatesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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 .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 (
IotDpsSku,
State,
AllocationPolicy,
AccessRightsDescription,
NameUnavailabilityReason,
CertificatePurpose,
)

__all__ = [
'ErrorMesssage',
'AsyncOperationResult',
'CertificateProperties',
'CertificateResponse',
'CertificateListDescription',
'CertificateBodyDescription',
'IotDpsSkuInfo',
'IotHubDefinitionDescription',
'SharedAccessSignatureAuthorizationRuleAccessRightsDescription',
'IotDpsPropertiesDescription',
'ProvisioningServiceDescription',
'Resource',
'OperationDisplay',
'Operation',
'ErrorDetails', 'ErrorDetailsException',
'IotDpsSkuDefinition',
'OperationInputs',
'NameAvailabilityInfo',
'TagsResource',
'VerificationCodeResponseProperties',
'VerificationCodeResponse',
'VerificationCodeRequest',
'OperationPaged',
'ProvisioningServiceDescriptionPaged',
'IotDpsSkuDefinitionPaged',
'SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged',
'IotDpsSku',
'State',
'AllocationPolicy',
'AccessRightsDescription',
'NameUnavailabilityReason',
'CertificatePurpose',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class 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=None, error=None):
super(AsyncOperationResult, self).__init__()
self.status = status
self.error = error
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class 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=None):
super(CertificateBodyDescription, self).__init__()
self.certificate = certificate
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class 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):
super(CertificateListDescription, self).__init__()
self.value = value
Loading

0 comments on commit e646a19

Please sign in to comment.