Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[AutoPR iothub/resource-manager] [Hub Generated] Review request for M…
…icrosoft.Devices to add version stable/2019-03-22 (#6870)

* Generated from 059a962abef25f7e4ef8ec8de9952be52cb56d14

adding locations property

* Generated from 8ba1b37d546301bfa449e51717b855a2461b3ac2

Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json

Co-Authored-By: John Lian <[email protected]>

* Generated from 8ba1b37d546301bfa449e51717b855a2461b3ac2

Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json

Co-Authored-By: John Lian <[email protected]>

* Generated from 3ae1861609ea8cc0764ccc8d96e944294e18f072

Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json

Co-Authored-By: John Lian <[email protected]>

* Generated from bc9297416b01642c30b20a2531114a773269d870

Update specification/iothub/resource-manager/Microsoft.Devices/stable/2019-03-22/iothub.json

Co-Authored-By: John Lian <[email protected]>

* Generated from f05eef4a3235f304777a2a1489423c6bb11335e9

Update iothub.json
  • Loading branch information
AutorestCI authored Sep 5, 2019
commit 90d1589c76dce326e241fb2f31c1d56fbb4aa090
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 = '2019-03-22-preview'
self.api_version = '2019-03-22'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from ._models_py3 import CertificateWithNonceDescription
from ._models_py3 import CloudToDeviceProperties
from ._models_py3 import EndpointHealthData
from ._models_py3 import EnrichmentProperties
from ._models_py3 import ErrorDetails, ErrorDetailsException
from ._models_py3 import EventHubConsumerGroupInfo
from ._models_py3 import EventHubProperties
Expand All @@ -33,7 +32,6 @@
from ._models_py3 import IotHubLocationDescription
from ._models_py3 import IotHubNameAvailabilityInfo
from ._models_py3 import IotHubProperties
from ._models_py3 import IotHubPropertiesDeviceStreams
from ._models_py3 import IotHubQuotaMetricInfo
from ._models_py3 import IotHubSkuDescription
from ._models_py3 import IotHubSkuInfo
Expand Down Expand Up @@ -80,7 +78,6 @@
from ._models import CertificateWithNonceDescription
from ._models import CloudToDeviceProperties
from ._models import EndpointHealthData
from ._models import EnrichmentProperties
from ._models import ErrorDetails, ErrorDetailsException
from ._models import EventHubConsumerGroupInfo
from ._models import EventHubProperties
Expand All @@ -94,7 +91,6 @@
from ._models import IotHubLocationDescription
from ._models import IotHubNameAvailabilityInfo
from ._models import IotHubProperties
from ._models import IotHubPropertiesDeviceStreams
from ._models import IotHubQuotaMetricInfo
from ._models import IotHubSkuDescription
from ._models import IotHubSkuInfo
Expand Down Expand Up @@ -166,7 +162,6 @@
'CertificateWithNonceDescription',
'CloudToDeviceProperties',
'EndpointHealthData',
'EnrichmentProperties',
'ErrorDetails', 'ErrorDetailsException',
'EventHubConsumerGroupInfo',
'EventHubProperties',
Expand All @@ -180,7 +175,6 @@
'IotHubLocationDescription',
'IotHubNameAvailabilityInfo',
'IotHubProperties',
'IotHubPropertiesDeviceStreams',
'IotHubQuotaMetricInfo',
'IotHubSkuDescription',
'IotHubSkuInfo',
Expand Down
68 changes: 5 additions & 63 deletions sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,40 +330,6 @@ def __init__(self, **kwargs):
self.health_status = kwargs.get('health_status', None)


class EnrichmentProperties(Model):
"""The properties of an enrichment that your IoT hub applies to messages
delivered to endpoints.

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

:param key: Required. The key or name for the enrichment property.
:type key: str
:param value: Required. The value for the enrichment property.
:type value: str
:param endpoint_names: Required. The list of endpoints for which the
enrichment is applied to the message.
:type endpoint_names: list[str]
"""

_validation = {
'key': {'required': True},
'value': {'required': True},
'endpoint_names': {'required': True, 'min_items': 1},
}

_attribute_map = {
'key': {'key': 'key', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'endpoint_names': {'key': 'endpointNames', 'type': '[str]'},
}

def __init__(self, **kwargs):
super(EnrichmentProperties, self).__init__(**kwargs)
self.key = kwargs.get('key', None)
self.value = kwargs.get('value', None)
self.endpoint_names = kwargs.get('endpoint_names', None)


class ErrorDetails(Model):
"""Error details.

Expand Down Expand Up @@ -811,9 +777,12 @@ class IotHubLocationDescription(Model):
"""Public representation of one of the locations where a resource is
provisioned.

:param location: Azure Geo Regions
:param location: The name of the Azure region
:type location: str
:param role: Specific Role assigned to this location. Possible values
:param role: The role of the region, can be either primary or secondary.
The primary region is where the IoT hub is currently provisioned. The
secondary region is the the Azure disaster recovery (DR) paired region and
also the region where the IoT hub can failover to. Possible values
include: 'primary', 'secondary'
:type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType
"""
Expand Down Expand Up @@ -909,9 +878,6 @@ class IotHubProperties(Model):
:type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties
:param comments: IoT hub comments.
:type comments: str
: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 Down Expand Up @@ -940,7 +906,6 @@ class IotHubProperties(Model):
'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'},
'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'},
'comments': {'key': 'comments', 'type': 'str'},
'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'},
'features': {'key': 'features', 'type': 'str'},
'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'},
}
Expand All @@ -959,27 +924,10 @@ def __init__(self, **kwargs):
self.enable_file_upload_notifications = kwargs.get('enable_file_upload_notifications', None)
self.cloud_to_device = kwargs.get('cloud_to_device', None)
self.comments = kwargs.get('comments', None)
self.device_streams = kwargs.get('device_streams', None)
self.features = kwargs.get('features', None)
self.locations = None


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)


class IotHubQuotaMetricInfo(Model):
"""Quota metrics properties.

Expand Down Expand Up @@ -1615,25 +1563,19 @@ class RoutingProperties(Model):
set, the messages which do not meet any of the conditions specified in the
'routes' section get routed to the built-in eventhub endpoint.
:type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties
:param enrichments: The list of user-provided enrichments that the IoT hub
applies to messages to be delivered to built-in and custom endpoints. See:
https://aka.ms/iotmsgenrich
:type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties]
"""

_attribute_map = {
'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'},
'routes': {'key': 'routes', 'type': '[RouteProperties]'},
'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'},
'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'},
}

def __init__(self, **kwargs):
super(RoutingProperties, self).__init__(**kwargs)
self.endpoints = kwargs.get('endpoints', None)
self.routes = kwargs.get('routes', None)
self.fallback_route = kwargs.get('fallback_route', None)
self.enrichments = kwargs.get('enrichments', None)


class RoutingServiceBusQueueEndpointProperties(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,40 +330,6 @@ def __init__(self, *, endpoint_id: str=None, health_status=None, **kwargs) -> No
self.health_status = health_status


class EnrichmentProperties(Model):
"""The properties of an enrichment that your IoT hub applies to messages
delivered to endpoints.

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

:param key: Required. The key or name for the enrichment property.
:type key: str
:param value: Required. The value for the enrichment property.
:type value: str
:param endpoint_names: Required. The list of endpoints for which the
enrichment is applied to the message.
:type endpoint_names: list[str]
"""

_validation = {
'key': {'required': True},
'value': {'required': True},
'endpoint_names': {'required': True, 'min_items': 1},
}

_attribute_map = {
'key': {'key': 'key', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
'endpoint_names': {'key': 'endpointNames', 'type': '[str]'},
}

def __init__(self, *, key: str, value: str, endpoint_names, **kwargs) -> None:
super(EnrichmentProperties, self).__init__(**kwargs)
self.key = key
self.value = value
self.endpoint_names = endpoint_names


class ErrorDetails(Model):
"""Error details.

Expand Down Expand Up @@ -811,9 +777,12 @@ class IotHubLocationDescription(Model):
"""Public representation of one of the locations where a resource is
provisioned.

:param location: Azure Geo Regions
:param location: The name of the Azure region
:type location: str
:param role: Specific Role assigned to this location. Possible values
:param role: The role of the region, can be either primary or secondary.
The primary region is where the IoT hub is currently provisioned. The
secondary region is the the Azure disaster recovery (DR) paired region and
also the region where the IoT hub can failover to. Possible values
include: 'primary', 'secondary'
:type role: str or ~azure.mgmt.iothub.models.IotHubReplicaRoleType
"""
Expand Down Expand Up @@ -909,9 +878,6 @@ class IotHubProperties(Model):
:type cloud_to_device: ~azure.mgmt.iothub.models.CloudToDeviceProperties
:param comments: IoT hub comments.
:type comments: str
: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 Down Expand Up @@ -940,12 +906,11 @@ class IotHubProperties(Model):
'enable_file_upload_notifications': {'key': 'enableFileUploadNotifications', 'type': 'bool'},
'cloud_to_device': {'key': 'cloudToDevice', 'type': 'CloudToDeviceProperties'},
'comments': {'key': 'comments', 'type': 'str'},
'device_streams': {'key': 'deviceStreams', 'type': 'IotHubPropertiesDeviceStreams'},
'features': {'key': 'features', 'type': 'str'},
'locations': {'key': 'locations', 'type': '[IotHubLocationDescription]'},
}

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, device_streams=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, features=None, **kwargs) -> None:
super(IotHubProperties, self).__init__(**kwargs)
self.authorization_policies = authorization_policies
self.ip_filter_rules = ip_filter_rules
Expand All @@ -959,27 +924,10 @@ def __init__(self, *, authorization_policies=None, ip_filter_rules=None, event_h
self.enable_file_upload_notifications = enable_file_upload_notifications
self.cloud_to_device = cloud_to_device
self.comments = comments
self.device_streams = device_streams
self.features = features
self.locations = None


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


class IotHubQuotaMetricInfo(Model):
"""Quota metrics properties.

Expand Down Expand Up @@ -1615,25 +1563,19 @@ class RoutingProperties(Model):
set, the messages which do not meet any of the conditions specified in the
'routes' section get routed to the built-in eventhub endpoint.
:type fallback_route: ~azure.mgmt.iothub.models.FallbackRouteProperties
:param enrichments: The list of user-provided enrichments that the IoT hub
applies to messages to be delivered to built-in and custom endpoints. See:
https://aka.ms/iotmsgenrich
:type enrichments: list[~azure.mgmt.iothub.models.EnrichmentProperties]
"""

_attribute_map = {
'endpoints': {'key': 'endpoints', 'type': 'RoutingEndpoints'},
'routes': {'key': 'routes', 'type': '[RouteProperties]'},
'fallback_route': {'key': 'fallbackRoute', 'type': 'FallbackRouteProperties'},
'enrichments': {'key': 'enrichments', 'type': '[EnrichmentProperties]'},
}

def __init__(self, *, endpoints=None, routes=None, fallback_route=None, enrichments=None, **kwargs) -> None:
def __init__(self, *, endpoints=None, routes=None, fallback_route=None, **kwargs) -> None:
super(RoutingProperties, self).__init__(**kwargs)
self.endpoints = endpoints
self.routes = routes
self.fallback_route = fallback_route
self.enrichments = enrichments


class RoutingServiceBusQueueEndpointProperties(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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: "2019-03-22-preview".
:ivar api_version: The version of the API. Constant value: "2019-03-22".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-03-22-preview"
self.api_version = "2019-03-22"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class IotHubOperations(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: "2019-03-22-preview".
:ivar api_version: The version of the API. Constant value: "2019-03-22".
"""

models = models
Expand All @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-03-22-preview"
self.api_version = "2019-03-22"

self.config = config

Expand Down Expand Up @@ -84,13 +84,15 @@ def _manual_failover_initial(

def manual_failover(
self, iot_hub_name, resource_group_name, failover_region, custom_headers=None, raw=False, polling=True, **operation_config):
"""Manual Failover Fail over.
"""Manually initiate a failover for the IoT Hub to its secondary region.

Perform manual fail over of given hub.
Manually initiate a failover for the IoT Hub to its secondary region.
To learn more, see https://aka.ms/manualfailover.

:param iot_hub_name: IotHub to fail over
:param iot_hub_name: Name of the IoT hub to failover
:type iot_hub_name: str
:param resource_group_name: resource group which Iot Hub belongs to
:param resource_group_name: Name of the resource group containing the
IoT hub resource
:type resource_group_name: str
:param failover_region: Region the hub will be failed over to
:type failover_region: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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: "2019-03-22-preview".
:ivar api_version: The version of the API. Constant value: "2019-03-22".
"""

models = models
Expand All @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-03-22-preview"
self.api_version = "2019-03-22"

self.config = config

Expand Down
Loading