Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Closed
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 lib/services/iothub/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion lib/services/iothub/lib/iotHubClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class IotHubClient extends ServiceClient {

super(credentials, options);

this.apiVersion = '2018-04-01';
this.apiVersion = '2018-12-01-preview';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
Expand Down
73 changes: 68 additions & 5 deletions lib/services/iothub/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ export interface RoutingEventHubProperties {
* written to storage. Value should be between 10485760(10MB) and
* 524288000(500MB). Default value is 314572800(300MB).
* @member {string} [encoding] Encoding that is used to serialize messages to
* blobs. Supported values are 'avro' and 'avrodeflate'. Default value is
* 'avro'.
* blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value
* is 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON'
*/
export interface RoutingStorageContainerProperties {
connectionString: string;
Expand Down Expand Up @@ -498,7 +498,7 @@ export interface RoutingProperties {
* The properties of the Azure Storage endpoint for file upload.
*
* @member {moment.duration} [sasTtlAsIso8601] The period of time for which the
* the SAS URI generated by IoT Hub for file upload is valid. See:
* 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.
* @member {string} connectionString The connection string for the Azure
* Storage account to which files are uploaded.
Expand Down Expand Up @@ -600,6 +600,18 @@ export interface OperationsMonitoringProperties {
events?: { [propertyName: string]: string };
}

/**
* @class
* Initializes a new instance of the IotHubPropertiesDeviceStreams class.
* @constructor
* The device streams properties of iothub.
*
* @member {array} [streamingEndpoints] List of Device Streams Endpoints.
*/
export interface IotHubPropertiesDeviceStreams {
streamingEndpoints?: string[];
}

/**
* @class
* Initializes a new instance of the IotHubProperties class.
Expand All @@ -610,7 +622,7 @@ export interface OperationsMonitoringProperties {
* use to secure a connection to the IoT hub.
* @member {array} [ipFilterRules] The IP filter rules.
* @member {string} [provisioningState] The provisioning state.
* @member {string} [state] Thehub state state.
* @member {string} [state] The hub state.
* @member {string} [hostName] The name of the host.
* @member {object} [eventHubEndpoints] The Event Hub-compatible endpoint
* properties. The possible keys to this dictionary are events and
Expand Down Expand Up @@ -682,6 +694,9 @@ export interface OperationsMonitoringProperties {
* @member {string} [comments] IoT hub comments.
* @member {object} [operationsMonitoringProperties]
* @member {object} [operationsMonitoringProperties.events]
* @member {object} [deviceStreams] The device streams properties of iothub.
* @member {array} [deviceStreams.streamingEndpoints] List of Device Streams
* Endpoints.
* @member {string} [features] The capabilities and features enabled for the
* IoT hub. Possible values include: 'None', 'DeviceManagement'
*/
Expand All @@ -699,6 +714,7 @@ export interface IotHubProperties {
cloudToDevice?: CloudToDeviceProperties;
comments?: string;
operationsMonitoringProperties?: OperationsMonitoringProperties;
deviceStreams?: IotHubPropertiesDeviceStreams;
features?: string;
}

Expand Down Expand Up @@ -755,7 +771,7 @@ export interface Resource extends BaseResource {
* policies you can use to secure a connection to the IoT hub.
* @member {array} [properties.ipFilterRules] The IP filter rules.
* @member {string} [properties.provisioningState] The provisioning state.
* @member {string} [properties.state] Thehub state state.
* @member {string} [properties.state] The hub state.
* @member {string} [properties.hostName] The name of the host.
* @member {object} [properties.eventHubEndpoints] The Event Hub-compatible
* endpoint properties. The possible keys to this dictionary are events and
Expand Down Expand Up @@ -831,6 +847,10 @@ export interface Resource extends BaseResource {
* @member {string} [properties.comments] IoT hub comments.
* @member {object} [properties.operationsMonitoringProperties]
* @member {object} [properties.operationsMonitoringProperties.events]
* @member {object} [properties.deviceStreams] The device streams properties of
* iothub.
* @member {array} [properties.deviceStreams.streamingEndpoints] List of Device
* Streams Endpoints.
* @member {string} [properties.features] The capabilities and features enabled
* for the IoT hub. Possible values include: 'None', 'DeviceManagement'
* @member {object} sku IotHub SKU info
Expand All @@ -857,11 +877,13 @@ export interface IotHubDescription extends Resource {
* @member {string} [provider] Service provider: Microsoft Devices
* @member {string} [resource] Resource Type: IotHubs
* @member {string} [operation] Name of the operation
* @member {string} [description] Description of the operation
*/
export interface OperationDisplay {
readonly provider?: string;
readonly resource?: string;
readonly operation?: string;
readonly description?: string;
}

/**
Expand All @@ -876,6 +898,7 @@ export interface OperationDisplay {
* @member {string} [display.provider] Service provider: Microsoft Devices
* @member {string} [display.resource] Resource Type: IotHubs
* @member {string} [display.operation] Name of the operation
* @member {string} [display.description] Description of the operation
*/
export interface Operation {
readonly name?: string;
Expand Down Expand Up @@ -1159,6 +1182,34 @@ export interface RoutingMessage {
systemProperties?: { [propertyName: string]: string };
}

/**
* @class
* Initializes a new instance of the RoutingTwinProperties class.
* @constructor
* @member {object} [desired] Twin desired properties
* @member {object} [reported] Twin desired properties
*/
export interface RoutingTwinProperties {
desired?: any;
reported?: any;
}

/**
* @class
* Initializes a new instance of the RoutingTwin class.
* @constructor
* Twin reference input parameter. This is an optional parameter
*
* @member {object} [tags] Twin Tags
* @member {object} [properties]
* @member {object} [properties.desired] Twin desired properties
* @member {object} [properties.reported] Twin desired properties
*/
export interface RoutingTwin {
tags?: any;
properties?: RoutingTwinProperties;
}

/**
* @class
* Initializes a new instance of the TestAllRoutesInput class.
Expand All @@ -1172,10 +1223,16 @@ export interface RoutingMessage {
* @member {string} [message.body] Body of routing message
* @member {object} [message.appProperties] App properties
* @member {object} [message.systemProperties] System properties
* @member {object} [twin] Routing Twin Reference
* @member {object} [twin.tags] Twin Tags
* @member {object} [twin.properties]
* @member {object} [twin.properties.desired] Twin desired properties
* @member {object} [twin.properties.reported] Twin desired properties
*/
export interface TestAllRoutesInput {
routingSource?: string;
message?: RoutingMessage;
twin?: RoutingTwin;
}

/**
Expand Down Expand Up @@ -1245,10 +1302,16 @@ export interface TestAllRoutesResult {
* is allowed.
* @member {boolean} [route.isEnabled] Used to specify whether a route is
* enabled.
* @member {object} [twin] Routing Twin Reference
* @member {object} [twin.tags] Twin Tags
* @member {object} [twin.properties]
* @member {object} [twin.properties.desired] Twin desired properties
* @member {object} [twin.properties.reported] Twin desired properties
*/
export interface TestRouteInput {
message?: RoutingMessage;
route: RouteProperties;
twin?: RoutingTwin;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions lib/services/iothub/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ exports.MessagingEndpointProperties = require('./messagingEndpointProperties');
exports.FeedbackProperties = require('./feedbackProperties');
exports.CloudToDeviceProperties = require('./cloudToDeviceProperties');
exports.OperationsMonitoringProperties = require('./operationsMonitoringProperties');
exports.IotHubPropertiesDeviceStreams = require('./iotHubPropertiesDeviceStreams');
exports.IotHubProperties = require('./iotHubProperties');
exports.IotHubSkuInfo = require('./iotHubSkuInfo');
exports.Resource = require('./resource');
Expand All @@ -62,6 +63,8 @@ exports.Name = require('./name');
exports.UserSubscriptionQuota = require('./userSubscriptionQuota');
exports.UserSubscriptionQuotaListResult = require('./userSubscriptionQuotaListResult');
exports.RoutingMessage = require('./routingMessage');
exports.RoutingTwinProperties = require('./routingTwinProperties');
exports.RoutingTwin = require('./routingTwin');
exports.TestAllRoutesInput = require('./testAllRoutesInput');
exports.MatchedRoute = require('./matchedRoute');
exports.TestAllRoutesResult = require('./testAllRoutesResult');
Expand Down
6 changes: 5 additions & 1 deletion lib/services/iothub/lib/models/iotHubDescription.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class IotHubDescription extends models['Resource'] {
* policies you can use to secure a connection to the IoT hub.
* @member {array} [properties.ipFilterRules] The IP filter rules.
* @member {string} [properties.provisioningState] The provisioning state.
* @member {string} [properties.state] Thehub state state.
* @member {string} [properties.state] The hub state.
* @member {string} [properties.hostName] The name of the host.
* @member {object} [properties.eventHubEndpoints] The Event Hub-compatible
* endpoint properties. The possible keys to this dictionary are events and
Expand Down Expand Up @@ -106,6 +106,10 @@ class IotHubDescription extends models['Resource'] {
* @member {string} [properties.comments] IoT hub comments.
* @member {object} [properties.operationsMonitoringProperties]
* @member {object} [properties.operationsMonitoringProperties.events]
* @member {object} [properties.deviceStreams] The device streams properties
* of iothub.
* @member {array} [properties.deviceStreams.streamingEndpoints] List of
* Device Streams Endpoints.
* @member {string} [properties.features] The capabilities and features
* enabled for the IoT hub. Possible values include: 'None',
* 'DeviceManagement'
Expand Down
13 changes: 12 additions & 1 deletion lib/services/iothub/lib/models/iotHubProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class IotHubProperties {
* use to secure a connection to the IoT hub.
* @member {array} [ipFilterRules] The IP filter rules.
* @member {string} [provisioningState] The provisioning state.
* @member {string} [state] Thehub state state.
* @member {string} [state] The hub state.
* @member {string} [hostName] The name of the host.
* @member {object} [eventHubEndpoints] The Event Hub-compatible endpoint
* properties. The possible keys to this dictionary are events and
Expand Down Expand Up @@ -95,6 +95,9 @@ class IotHubProperties {
* @member {string} [comments] IoT hub comments.
* @member {object} [operationsMonitoringProperties]
* @member {object} [operationsMonitoringProperties.events]
* @member {object} [deviceStreams] The device streams properties of iothub.
* @member {array} [deviceStreams.streamingEndpoints] List of Device Streams
* Endpoints.
* @member {string} [features] The capabilities and features enabled for the
* IoT hub. Possible values include: 'None', 'DeviceManagement'
*/
Expand Down Expand Up @@ -252,6 +255,14 @@ class IotHubProperties {
className: 'OperationsMonitoringProperties'
}
},
deviceStreams: {
required: false,
serializedName: 'deviceStreams',
type: {
name: 'Composite',
className: 'IotHubPropertiesDeviceStreams'
}
},
features: {
required: false,
serializedName: 'features',
Expand Down
59 changes: 59 additions & 0 deletions lib/services/iothub/lib/models/iotHubPropertiesDeviceStreams.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* 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.
*/

'use strict';

/**
* The device streams properties of iothub.
*
*/
class IotHubPropertiesDeviceStreams {
/**
* Create a IotHubPropertiesDeviceStreams.
* @member {array} [streamingEndpoints] List of Device Streams Endpoints.
*/
constructor() {
}

/**
* Defines the metadata of IotHubPropertiesDeviceStreams
*
* @returns {object} metadata of IotHubPropertiesDeviceStreams
*
*/
mapper() {
return {
required: false,
serializedName: 'IotHubProperties_deviceStreams',
type: {
name: 'Composite',
className: 'IotHubPropertiesDeviceStreams',
modelProperties: {
streamingEndpoints: {
required: false,
serializedName: 'streamingEndpoints',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
};
}
}

module.exports = IotHubPropertiesDeviceStreams;
1 change: 1 addition & 0 deletions lib/services/iothub/lib/models/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Operation {
* @member {string} [display.provider] Service provider: Microsoft Devices
* @member {string} [display.resource] Resource Type: IotHubs
* @member {string} [display.operation] Name of the operation
* @member {string} [display.description] Description of the operation
*/
constructor() {
}
Expand Down
9 changes: 9 additions & 0 deletions lib/services/iothub/lib/models/operationDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class OperationDisplay {
* @member {string} [provider] Service provider: Microsoft Devices
* @member {string} [resource] Resource Type: IotHubs
* @member {string} [operation] Name of the operation
* @member {string} [description] Description of the operation
*/
constructor() {
}
Expand Down Expand Up @@ -61,6 +62,14 @@ class OperationDisplay {
type: {
name: 'String'
}
},
description: {
required: false,
readOnly: true,
serializedName: 'description',
type: {
name: 'String'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class RoutingStorageContainerProperties {
* blob written to storage. Value should be between 10485760(10MB) and
* 524288000(500MB). Default value is 314572800(300MB).
* @member {string} [encoding] Encoding that is used to serialize messages to
* blobs. Supported values are 'avro' and 'avrodeflate'. Default value is
* 'avro'.
* blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default
* value is 'avro'. Possible values include: 'Avro', 'AvroDeflate', 'JSON'
*/
constructor() {
}
Expand Down
Loading