diff --git a/lib/services/iothub/lib/models/index.d.ts b/lib/services/iothub/lib/models/index.d.ts index f6cc69f384..576d26e862 100644 --- a/lib/services/iothub/lib/models/index.d.ts +++ b/lib/services/iothub/lib/models/index.d.ts @@ -1159,6 +1159,34 @@ export interface RoutingMessage { systemProperties?: { [propertyName: string]: string }; } +/** + * @class + * Initializes a new instance of the RoutingTwinProperties class. + * @constructor + * @member {object} [desiredProperties] Twin desired properties + * @member {object} [reportedProperties] Twin desired properties + */ +export interface RoutingTwinProperties { + desiredProperties?: any; + reportedProperties?: 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.desiredProperties] Twin desired properties + * @member {object} [properties.reportedProperties] Twin desired properties + */ +export interface RoutingTwin { + tags?: any; + properties?: RoutingTwinProperties; +} + /** * @class * Initializes a new instance of the TestAllRoutesInput class. @@ -1172,10 +1200,17 @@ 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.desiredProperties] Twin desired properties + * @member {object} [twin.properties.reportedProperties] Twin desired + * properties */ export interface TestAllRoutesInput { routingSource?: string; message?: RoutingMessage; + twin?: RoutingTwin; } /** @@ -1245,10 +1280,17 @@ 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.desiredProperties] Twin desired properties + * @member {object} [twin.properties.reportedProperties] Twin desired + * properties */ export interface TestRouteInput { message?: RoutingMessage; route: RouteProperties; + twin?: RoutingTwin; } /** diff --git a/lib/services/iothub/lib/models/index.js b/lib/services/iothub/lib/models/index.js index f38cce6532..2eb1273103 100644 --- a/lib/services/iothub/lib/models/index.js +++ b/lib/services/iothub/lib/models/index.js @@ -62,6 +62,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'); diff --git a/lib/services/iothub/lib/models/routingTwin.js b/lib/services/iothub/lib/models/routingTwin.js new file mode 100644 index 0000000000..2af307f503 --- /dev/null +++ b/lib/services/iothub/lib/models/routingTwin.js @@ -0,0 +1,63 @@ +/* + * 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'; + +/** + * Twin reference input parameter. This is an optional parameter + * + */ +class RoutingTwin { + /** + * Create a RoutingTwin. + * @member {object} [tags] Twin Tags + * @member {object} [properties] + * @member {object} [properties.desiredProperties] Twin desired properties + * @member {object} [properties.reportedProperties] Twin desired properties + */ + constructor() { + } + + /** + * Defines the metadata of RoutingTwin + * + * @returns {object} metadata of RoutingTwin + * + */ + mapper() { + return { + required: false, + serializedName: 'RoutingTwin', + type: { + name: 'Composite', + className: 'RoutingTwin', + modelProperties: { + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Object' + } + }, + properties: { + required: false, + serializedName: 'properties', + type: { + name: 'Composite', + className: 'RoutingTwinProperties' + } + } + } + } + }; + } +} + +module.exports = RoutingTwin; diff --git a/lib/services/iothub/lib/models/routingTwinProperties.js b/lib/services/iothub/lib/models/routingTwinProperties.js new file mode 100644 index 0000000000..07927c0a14 --- /dev/null +++ b/lib/services/iothub/lib/models/routingTwinProperties.js @@ -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'; + +/** + * Class representing a RoutingTwinProperties. + */ +class RoutingTwinProperties { + /** + * Create a RoutingTwinProperties. + * @member {object} [desiredProperties] Twin desired properties + * @member {object} [reportedProperties] Twin desired properties + */ + constructor() { + } + + /** + * Defines the metadata of RoutingTwinProperties + * + * @returns {object} metadata of RoutingTwinProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'RoutingTwin_properties', + type: { + name: 'Composite', + className: 'RoutingTwinProperties', + modelProperties: { + desiredProperties: { + required: false, + serializedName: 'desiredProperties', + type: { + name: 'Object' + } + }, + reportedProperties: { + required: false, + serializedName: 'reportedProperties', + type: { + name: 'Object' + } + } + } + } + }; + } +} + +module.exports = RoutingTwinProperties; diff --git a/lib/services/iothub/lib/models/testAllRoutesInput.js b/lib/services/iothub/lib/models/testAllRoutesInput.js index fd7786303c..3b698304cc 100644 --- a/lib/services/iothub/lib/models/testAllRoutesInput.js +++ b/lib/services/iothub/lib/models/testAllRoutesInput.js @@ -24,6 +24,13 @@ class TestAllRoutesInput { * @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.desiredProperties] Twin desired + * properties + * @member {object} [twin.properties.reportedProperties] Twin desired + * properties */ constructor() { } @@ -56,6 +63,14 @@ class TestAllRoutesInput { name: 'Composite', className: 'RoutingMessage' } + }, + twin: { + required: false, + serializedName: 'twin', + type: { + name: 'Composite', + className: 'RoutingTwin' + } } } } diff --git a/lib/services/iothub/lib/models/testRouteInput.js b/lib/services/iothub/lib/models/testRouteInput.js index f230d80df0..5d06df55a8 100644 --- a/lib/services/iothub/lib/models/testRouteInput.js +++ b/lib/services/iothub/lib/models/testRouteInput.js @@ -38,6 +38,13 @@ class TestRouteInput { * endpoint 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.desiredProperties] Twin desired + * properties + * @member {object} [twin.properties.reportedProperties] Twin desired + * properties */ constructor() { } @@ -71,6 +78,14 @@ class TestRouteInput { name: 'Composite', className: 'RouteProperties' } + }, + twin: { + required: false, + serializedName: 'twin', + type: { + name: 'Composite', + className: 'RoutingTwin' + } } } } diff --git a/lib/services/iothub/lib/operations/index.d.ts b/lib/services/iothub/lib/operations/index.d.ts index 06f2c43e9d..c7a85ba780 100644 --- a/lib/services/iothub/lib/operations/index.d.ts +++ b/lib/services/iothub/lib/operations/index.d.ts @@ -1619,6 +1619,18 @@ export interface IotHubResource { * * @param {object} [input.message.systemProperties] System properties * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -1655,6 +1667,18 @@ export interface IotHubResource { * * @param {object} [input.message.systemProperties] System properties * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -1729,6 +1753,18 @@ export interface IotHubResource { * @param {boolean} input.route.isEnabled Used to specify whether a route is * enabled. * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -1784,6 +1820,18 @@ export interface IotHubResource { * @param {boolean} input.route.isEnabled Used to specify whether a route is * enabled. * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to diff --git a/lib/services/iothub/lib/operations/iotHubResource.js b/lib/services/iothub/lib/operations/iotHubResource.js index 7fcdfc131f..d1d76ec7c2 100644 --- a/lib/services/iothub/lib/operations/iotHubResource.js +++ b/lib/services/iothub/lib/operations/iotHubResource.js @@ -2567,6 +2567,18 @@ function _checkNameAvailability(name, options, callback) { * * @param {object} [input.message.systemProperties] System properties * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -2765,6 +2777,18 @@ function _testAllRoutes(input, iotHubName, resourceGroupName, options, callback) * @param {boolean} input.route.isEnabled Used to specify whether a route is * enabled. * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -7339,6 +7363,18 @@ class IotHubResource { * * @param {object} [input.message.systemProperties] System properties * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -7387,6 +7423,18 @@ class IotHubResource { * * @param {object} [input.message.systemProperties] System properties * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -7476,6 +7524,18 @@ class IotHubResource { * @param {boolean} input.route.isEnabled Used to specify whether a route is * enabled. * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to @@ -7543,6 +7603,18 @@ class IotHubResource { * @param {boolean} input.route.isEnabled Used to specify whether a route is * enabled. * + * @param {object} [input.twin] Routing Twin Reference + * + * @param {object} [input.twin.tags] Twin Tags + * + * @param {object} [input.twin.properties] + * + * @param {object} [input.twin.properties.desiredProperties] Twin desired + * properties + * + * @param {object} [input.twin.properties.reportedProperties] Twin desired + * properties + * * @param {string} iotHubName IotHub to be tested * * @param {string} resourceGroupName resource group which Iot Hub belongs to diff --git a/lib/services/iothub/package.json b/lib/services/iothub/package.json index ebb1bc6c7c..e22dc0a2c4 100644 --- a/lib/services/iothub/package.json +++ b/lib/services/iothub/package.json @@ -14,7 +14,7 @@ "license": "MIT", "main": "./lib/iotHubClient.js", "types": "./lib/iotHubClient.d.ts", - "homepage": "https://github.com/azure/azure-sdk-for-node/tree/master/lib/services/iothub", + "homepage": "https://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-node.git"