Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(
super(IotHubClient, 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-04-01'
self.api_version = '2018-12-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from .feedback_properties_py3 import FeedbackProperties
from .cloud_to_device_properties_py3 import CloudToDeviceProperties
from .operations_monitoring_properties_py3 import OperationsMonitoringProperties
from .iot_hub_properties_device_streams_py3 import IotHubPropertiesDeviceStreams
from .iot_hub_properties_py3 import IotHubProperties
from .iot_hub_sku_info_py3 import IotHubSkuInfo
from .iot_hub_description_py3 import IotHubDescription
Expand Down Expand Up @@ -91,6 +92,7 @@
from .feedback_properties import FeedbackProperties
from .cloud_to_device_properties import CloudToDeviceProperties
from .operations_monitoring_properties import OperationsMonitoringProperties
from .iot_hub_properties_device_streams import IotHubPropertiesDeviceStreams
from .iot_hub_properties import IotHubProperties
from .iot_hub_sku_info import IotHubSkuInfo
from .iot_hub_description import IotHubDescription
Expand Down Expand Up @@ -174,6 +176,7 @@
'FeedbackProperties',
'CloudToDeviceProperties',
'OperationsMonitoringProperties',
'IotHubPropertiesDeviceStreams',
'IotHubProperties',
'IotHubSkuInfo',
'IotHubDescription',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class IotHubProperties(Model):
:type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule]
:ivar provisioning_state: The provisioning state.
:vartype provisioning_state: str
:ivar state: The hub state.
:ivar state: Thehub state state.
:vartype state: str
:ivar host_name: The name of the host.
:vartype host_name: str
Expand Down Expand Up @@ -60,6 +60,9 @@ class IotHubProperties(Model):
:param operations_monitoring_properties:
:type operations_monitoring_properties:
~azure.mgmt.iothub.models.OperationsMonitoringProperties
:param device_streams: The device streams properties of iothub.
:type device_streams:
~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams
:param features: The capabilities and features enabled for the IoT hub.
Possible values include: 'None', 'DeviceManagement'
:type features: str or ~azure.mgmt.iothub.models.Capabilities
Expand All @@ -85,6 +88,7 @@ class IotHubProperties(Model):
'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'},
'comments': {'key': 'comments', 'type': 'str'},
'operations_monitoring_properties': {'key': 'operationsMonitoringProperties', 'type': 'OperationsMonitoringProperties'},
'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'},
'features': {'key': 'features', 'type': 'str'},
}

Expand All @@ -103,4 +107,5 @@ def __init__(self, **kwargs):
self.cloud_to_device = kwargs.get('cloud_to_device', None)
self.comments = kwargs.get('comments', None)
self.operations_monitoring_properties = kwargs.get('operations_monitoring_properties', None)
self.device_streams = kwargs.get('device_streams', None)
self.features = kwargs.get('features', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class IotHubPropertiesDeviceStreams(Model):
"""The device streams properties of iothub.

:param streaming_endpoints: List of Device Streams Endpoints.
:type streaming_endpoints: list[str]
"""

_attribute_map = {
'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs)
self.streaming_endpoints = kwargs.get('streaming_endpoints', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class IotHubPropertiesDeviceStreams(Model):
"""The device streams properties of iothub.

:param streaming_endpoints: List of Device Streams Endpoints.
:type streaming_endpoints: list[str]
"""

_attribute_map = {
'streaming_endpoints': {'key': 'streamingEndpoints', 'type': '[str]'},
}

def __init__(self, *, streaming_endpoints=None, **kwargs) -> None:
super(IotHubPropertiesDeviceStreams, self).__init__(**kwargs)
self.streaming_endpoints = streaming_endpoints
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class IotHubProperties(Model):
:type ip_filter_rules: list[~azure.mgmt.iothub.models.IpFilterRule]
:ivar provisioning_state: The provisioning state.
:vartype provisioning_state: str
:ivar state: The hub state.
:ivar state: Thehub state state.
:vartype state: str
:ivar host_name: The name of the host.
:vartype host_name: str
Expand Down Expand Up @@ -60,6 +60,9 @@ class IotHubProperties(Model):
:param operations_monitoring_properties:
:type operations_monitoring_properties:
~azure.mgmt.iothub.models.OperationsMonitoringProperties
:param device_streams: The device streams properties of iothub.
:type device_streams:
~azure.mgmt.iothub.models.IotHubPropertiesDeviceStreams
:param features: The capabilities and features enabled for the IoT hub.
Possible values include: 'None', 'DeviceManagement'
:type features: str or ~azure.mgmt.iothub.models.Capabilities
Expand All @@ -85,10 +88,11 @@ class IotHubProperties(Model):
'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'},
'comments': {'key': 'comments', 'type': 'str'},
'operations_monitoring_properties': {'key': 'operationsMonitoringProperties', 'type': 'OperationsMonitoringProperties'},
'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'},
'features': {'key': 'features', 'type': 'str'},
}

def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, operations_monitoring_properties=None, features=None, **kwargs) -> None:
def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_hub_endpoints=None, routing=None, storage_endpoints=None, messaging_endpoints=None, enable_file_upload_notifications: bool=None, cloud_to_device=None, comments: str=None, operations_monitoring_properties=None, device_streams=None, features=None, **kwargs) -> None:
super(IotHubProperties, self).__init__(**kwargs)
self.authorization_policies = authorization_policies
self.ip_filter_rules = ip_filter_rules
Expand All @@ -103,4 +107,5 @@ def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_h
self.cloud_to_device = cloud_to_device
self.comments = comments
self.operations_monitoring_properties = operations_monitoring_properties
self.device_streams = device_streams
self.features = features
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,27 @@ class OperationDisplay(Model):
:vartype resource: str
:ivar operation: Name of the operation
:vartype operation: str
:ivar description: Description of the operation
:vartype description: str
"""

_validation = {
'provider': {'readonly': True},
'resource': {'readonly': True},
'operation': {'readonly': True},
'description': {'readonly': True},
}

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OperationDisplay, self).__init__(**kwargs)
self.provider = None
self.resource = None
self.operation = None
self.description = None
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,27 @@ class OperationDisplay(Model):
:vartype resource: str
:ivar operation: Name of the operation
:vartype operation: str
:ivar description: Description of the operation
:vartype description: str
"""

_validation = {
'provider': {'readonly': True},
'resource': {'readonly': True},
'operation': {'readonly': True},
'description': {'readonly': True},
}

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(OperationDisplay, self).__init__(**kwargs)
self.provider = None
self.resource = None
self.operation = None
self.description = None
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RoutingStorageContainerProperties(Model):
524288000(500MB). Default value is 314572800(300MB).
:type max_chunk_size_in_bytes: int
:param encoding: Encoding that is used to serialize messages to blobs.
Supported values are 'avro' and 'avroDeflate'. Default value is 'avro'.
Supported values are 'avro' and 'avrodeflate'. Default value is 'avro'.
:type encoding: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RoutingStorageContainerProperties(Model):
524288000(500MB). Default value is 314572800(300MB).
:type max_chunk_size_in_bytes: int
:param encoding: Encoding that is used to serialize messages to blobs.
Supported values are 'avro' and 'avroDeflate'. Default value is 'avro'.
Supported values are 'avro' and 'avrodeflate'. Default value is 'avro'.
:type encoding: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
class RoutingTwinProperties(Model):
"""RoutingTwinProperties.

:param desired_properties: Twin desired properties
:type desired_properties: object
:param reported_properties: Twin desired properties
:type reported_properties: object
:param desired: Twin desired properties
:type desired: object
:param reported: Twin desired properties
:type reported: object
"""

_attribute_map = {
'desired_properties': {'key': 'desiredProperties', 'type': 'object'},
'reported_properties': {'key': 'reportedProperties', 'type': 'object'},
'desired': {'key': 'desired', 'type': 'object'},
'reported': {'key': 'reported', 'type': 'object'},
}

def __init__(self, **kwargs):
super(RoutingTwinProperties, self).__init__(**kwargs)
self.desired_properties = kwargs.get('desired_properties', None)
self.reported_properties = kwargs.get('reported_properties', None)
self.desired = kwargs.get('desired', None)
self.reported = kwargs.get('reported', None)
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
class RoutingTwinProperties(Model):
"""RoutingTwinProperties.

:param desired_properties: Twin desired properties
:type desired_properties: object
:param reported_properties: Twin desired properties
:type reported_properties: object
:param desired: Twin desired properties
:type desired: object
:param reported: Twin desired properties
:type reported: object
"""

_attribute_map = {
'desired_properties': {'key': 'desiredProperties', 'type': 'object'},
'reported_properties': {'key': 'reportedProperties', 'type': 'object'},
'desired': {'key': 'desired', 'type': 'object'},
'reported': {'key': 'reported', 'type': 'object'},
}

def __init__(self, *, desired_properties=None, reported_properties=None, **kwargs) -> None:
def __init__(self, *, desired=None, reported=None, **kwargs) -> None:
super(RoutingTwinProperties, self).__init__(**kwargs)
self.desired_properties = desired_properties
self.reported_properties = reported_properties
self.desired = desired
self.reported = reported
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StorageEndpointProperties(Model):

All required parameters must be populated in order to send to Azure.

:param sas_ttl_as_iso8601: The period of time for which the SAS URI
:param sas_ttl_as_iso8601: The period of time for which the the SAS URI
generated by IoT Hub for file upload is valid. See:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
:type sas_ttl_as_iso8601: timedelta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StorageEndpointProperties(Model):

All required parameters must be populated in order to send to Azure.

:param sas_ttl_as_iso8601: The period of time for which the SAS URI
:param sas_ttl_as_iso8601: The period of time for which the the SAS URI
generated by IoT Hub for file upload is valid. See:
https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
:type sas_ttl_as_iso8601: timedelta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CertificatesOperations(object):
: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-04-01".
:ivar api_version: The version of the API. Constant value: "2018-12-01-preview".
"""

models = models
Expand All @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-04-01"
self.api_version = "2018-12-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class IotHubResourceOperations(object):
: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-04-01".
:ivar api_version: The version of the API. Constant value: "2018-12-01-preview".
"""

models = models
Expand All @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-04-01"
self.api_version = "2018-12-01-preview"

self.config = config

Expand Down
4 changes: 2 additions & 2 deletions azure-mgmt-iothub/azure/mgmt/iothub/operations/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Operations(object):
: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-04-01".
:ivar api_version: The version of the API. Constant value: "2018-12-01-preview".
"""

models = models
Expand All @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-04-01"
self.api_version = "2018-12-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ResourceProviderCommonOperations(object):
: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-04-01".
:ivar api_version: The version of the API. Constant value: "2018-12-01-preview".
"""

models = models
Expand All @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-04-01"
self.api_version = "2018-12-01-preview"

self.config = config

Expand Down