From 9a4495e573b9d5e97e5d57477fa4768e462bb4d9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 26 Apr 2018 14:26:19 -0700 Subject: [PATCH 1/7] Generated from c67230b9d400baa1f6e88f8643fb8a716172dbc0 (#2799) EventGrid Py conf to 1.0.0 --- lib/services/eventgrid/LICENSE.txt | 42 ++++++++++++++--------------- lib/services/eventgrid/package.json | 7 ++--- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/lib/services/eventgrid/LICENSE.txt b/lib/services/eventgrid/LICENSE.txt index a70e8cf660..5431ba98b9 100644 --- a/lib/services/eventgrid/LICENSE.txt +++ b/lib/services/eventgrid/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 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 -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +Copyright (c) 2018 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 +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/eventgrid/package.json b/lib/services/eventgrid/package.json index 3ce0ca85b2..9fa027ae47 100644 --- a/lib/services/eventgrid/package.json +++ b/lib/services/eventgrid/package.json @@ -4,13 +4,10 @@ "description": "EventGridClient Library with typescript type definitions for node", "version": "1.1.0", "dependencies": { - "ms-rest": "^2.3.3", + "ms-rest": "^2.3.2", "ms-rest-azure": "^2.5.5" }, - "keywords": [ - "node", - "azure" - ], + "keywords": [ "node", "azure" ], "license": "MIT", "main": "./lib/eventGridClient.js", "types": "./lib/eventGridClient.d.ts", From 76e8dc720505b3eb6605b716b3171c921d3aab9a Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 16 May 2018 12:12:30 -0700 Subject: [PATCH 2/7] Generated from a7ae120aeccf96b91aeeb0a9cba5428cd39f5352 (#2862) Added subscription validation response. --- lib/services/eventgrid/lib/models/index.d.ts | 114 ++++++++++++++++++ lib/services/eventgrid/lib/models/index.js | 5 + ...ssagesAvailableWithNoListenersEventData.js | 100 +++++++++++++++ ...ssagesAvailableWithNoListenersEventData.js | 100 +++++++++++++++ .../models/subscriptionDeletedEventData.js | 55 +++++++++ .../models/subscriptionValidationEventData.js | 72 +++++++++++ .../models/subscriptionValidationResponse.js | 57 +++++++++ lib/services/eventgrid/package.json | 7 +- 8 files changed, 508 insertions(+), 2 deletions(-) create mode 100644 lib/services/eventgrid/lib/models/serviceBusActiveMessagesAvailableWithNoListenersEventData.js create mode 100644 lib/services/eventgrid/lib/models/serviceBusDeadletterMessagesAvailableWithNoListenersEventData.js create mode 100644 lib/services/eventgrid/lib/models/subscriptionDeletedEventData.js create mode 100644 lib/services/eventgrid/lib/models/subscriptionValidationEventData.js create mode 100644 lib/services/eventgrid/lib/models/subscriptionValidationResponse.js diff --git a/lib/services/eventgrid/lib/models/index.d.ts b/lib/services/eventgrid/lib/models/index.d.ts index bfc20efbd7..72cf56b774 100644 --- a/lib/services/eventgrid/lib/models/index.d.ts +++ b/lib/services/eventgrid/lib/models/index.d.ts @@ -367,6 +367,60 @@ export interface EventGridEvent { dataVersion: string; } +/** + * @class + * Initializes a new instance of the SubscriptionValidationEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionValidationEvent. + * + * @member {string} [validationCode] The validation code sent by Azure Event + * Grid to validate an event subscription. To complete the validation + * handshake, the subscriber must either respond with this validation code as + * part of the validation response, or perform a GET request on the + * validationUrl (available starting version 2018-05-01-preview). + * @member {string} [validationUrl] The validation URL sent by Azure Event Grid + * (available starting version 2018-05-01-preview). To complete the validation + * handshake, the subscriber must either respond with the validationCode as + * part of the validation response, or perform a GET request on the + * validationUrl (available starting version 2018-05-01-preview). + */ +export interface SubscriptionValidationEventData { + readonly validationCode?: string; + readonly validationUrl?: string; +} + +/** + * @class + * Initializes a new instance of the SubscriptionValidationResponse class. + * @constructor + * To complete an event subscription validation handshake, a subscriber can use + * either the validationCode or the validationUrl received in a + * SubscriptionValidationEvent. When the validationCode is used, the + * SubscriptionValidationResponse can be used to build the response. + * + * @member {string} [validationResponse] The validation response sent by the + * subscriber to Azure Event Grid to complete the validation of an event + * subscription. + */ +export interface SubscriptionValidationResponse { + validationResponse?: string; +} + +/** + * @class + * Initializes a new instance of the SubscriptionDeletedEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionDeletedEvent. + * + * @member {string} [eventSubscriptionId] The Azure resource ID of the deleted + * event subscription. + */ +export interface SubscriptionDeletedEventData { + readonly eventSubscriptionId?: string; +} + /** * @class * Initializes a new instance of the DeviceLifeCycleEventProperties class. @@ -755,3 +809,63 @@ export interface ContainerRegistryEventSource { instanceID?: string; } +/** + * @class + * Initializes a new instance of the ServiceBusActiveMessagesAvailableWithNoListenersEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + * + * @member {string} [namespaceName] The namespace name of the + * Microsoft.ServiceBus resource. + * @member {string} [requestUri] The endpoint of the Microsoft.ServiceBus + * resource. + * @member {string} [entityType] The entity type of the Microsoft.ServiceBus + * resource. Could be one of 'queue' or 'subscriber'. + * @member {string} [queueName] The name of the Microsoft.ServiceBus queue. If + * the entity type is of type 'subscriber', then this value will be null. + * @member {string} [topicName] The name of the Microsoft.ServiceBus topic. If + * the entity type is of type 'queue', then this value will be null. + * @member {string} [subscriptionName] The name of the Microsoft.ServiceBus + * topic's subscription. If the entity type is of type 'queue', then this value + * will be null. + */ +export interface ServiceBusActiveMessagesAvailableWithNoListenersEventData { + namespaceName?: string; + requestUri?: string; + entityType?: string; + queueName?: string; + topicName?: string; + subscriptionName?: string; +} + +/** + * @class + * Initializes a new instance of the ServiceBusDeadletterMessagesAvailableWithNoListenersEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + * + * @member {string} [namespaceName] The namespace name of the + * Microsoft.ServiceBus resource. + * @member {string} [requestUri] The endpoint of the Microsoft.ServiceBus + * resource. + * @member {string} [entityType] The entity type of the Microsoft.ServiceBus + * resource. Could be one of 'queue' or 'subscriber'. + * @member {string} [queueName] The name of the Microsoft.ServiceBus queue. If + * the entity type is of type 'subscriber', then this value will be null. + * @member {string} [topicName] The name of the Microsoft.ServiceBus topic. If + * the entity type is of type 'queue', then this value will be null. + * @member {string} [subscriptionName] The name of the Microsoft.ServiceBus + * topic's subscription. If the entity type is of type 'queue', then this value + * will be null. + */ +export interface ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { + namespaceName?: string; + requestUri?: string; + entityType?: string; + queueName?: string; + topicName?: string; + subscriptionName?: string; +} + diff --git a/lib/services/eventgrid/lib/models/index.js b/lib/services/eventgrid/lib/models/index.js index 3eff0eeee4..65ca8111ba 100644 --- a/lib/services/eventgrid/lib/models/index.js +++ b/lib/services/eventgrid/lib/models/index.js @@ -28,6 +28,9 @@ exports.ResourceDeleteSuccessData = require('./resourceDeleteSuccessData'); exports.ResourceDeleteFailureData = require('./resourceDeleteFailureData'); exports.ResourceDeleteCancelData = require('./resourceDeleteCancelData'); exports.EventGridEvent = require('./eventGridEvent'); +exports.SubscriptionValidationEventData = require('./subscriptionValidationEventData'); +exports.SubscriptionValidationResponse = require('./subscriptionValidationResponse'); +exports.SubscriptionDeletedEventData = require('./subscriptionDeletedEventData'); exports.DeviceLifeCycleEventProperties = require('./deviceLifeCycleEventProperties'); exports.IotHubDeviceCreatedEventData = require('./iotHubDeviceCreatedEventData'); exports.IotHubDeviceDeletedEventData = require('./iotHubDeviceDeletedEventData'); @@ -43,3 +46,5 @@ exports.ContainerRegistryEventTarget = require('./containerRegistryEventTarget') exports.ContainerRegistryEventRequest = require('./containerRegistryEventRequest'); exports.ContainerRegistryEventActor = require('./containerRegistryEventActor'); exports.ContainerRegistryEventSource = require('./containerRegistryEventSource'); +exports.ServiceBusActiveMessagesAvailableWithNoListenersEventData = require('./serviceBusActiveMessagesAvailableWithNoListenersEventData'); +exports.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData = require('./serviceBusDeadletterMessagesAvailableWithNoListenersEventData'); diff --git a/lib/services/eventgrid/lib/models/serviceBusActiveMessagesAvailableWithNoListenersEventData.js b/lib/services/eventgrid/lib/models/serviceBusActiveMessagesAvailableWithNoListenersEventData.js new file mode 100644 index 0000000000..bc2be17d6d --- /dev/null +++ b/lib/services/eventgrid/lib/models/serviceBusActiveMessagesAvailableWithNoListenersEventData.js @@ -0,0 +1,100 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners event. + * + */ +class ServiceBusActiveMessagesAvailableWithNoListenersEventData { + /** + * Create a ServiceBusActiveMessagesAvailableWithNoListenersEventData. + * @member {string} [namespaceName] The namespace name of the + * Microsoft.ServiceBus resource. + * @member {string} [requestUri] The endpoint of the Microsoft.ServiceBus + * resource. + * @member {string} [entityType] The entity type of the Microsoft.ServiceBus + * resource. Could be one of 'queue' or 'subscriber'. + * @member {string} [queueName] The name of the Microsoft.ServiceBus queue. + * If the entity type is of type 'subscriber', then this value will be null. + * @member {string} [topicName] The name of the Microsoft.ServiceBus topic. + * If the entity type is of type 'queue', then this value will be null. + * @member {string} [subscriptionName] The name of the Microsoft.ServiceBus + * topic's subscription. If the entity type is of type 'queue', then this + * value will be null. + */ + constructor() { + } + + /** + * Defines the metadata of ServiceBusActiveMessagesAvailableWithNoListenersEventData + * + * @returns {object} metadata of ServiceBusActiveMessagesAvailableWithNoListenersEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + type: { + name: 'Composite', + className: 'ServiceBusActiveMessagesAvailableWithNoListenersEventData', + modelProperties: { + namespaceName: { + required: false, + serializedName: 'namespaceName', + type: { + name: 'String' + } + }, + requestUri: { + required: false, + serializedName: 'requestUri', + type: { + name: 'String' + } + }, + entityType: { + required: false, + serializedName: 'entityType', + type: { + name: 'String' + } + }, + queueName: { + required: false, + serializedName: 'queueName', + type: { + name: 'String' + } + }, + topicName: { + required: false, + serializedName: 'topicName', + type: { + name: 'String' + } + }, + subscriptionName: { + required: false, + serializedName: 'subscriptionName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceBusActiveMessagesAvailableWithNoListenersEventData; diff --git a/lib/services/eventgrid/lib/models/serviceBusDeadletterMessagesAvailableWithNoListenersEventData.js b/lib/services/eventgrid/lib/models/serviceBusDeadletterMessagesAvailableWithNoListenersEventData.js new file mode 100644 index 0000000000..3231725544 --- /dev/null +++ b/lib/services/eventgrid/lib/models/serviceBusDeadletterMessagesAvailableWithNoListenersEventData.js @@ -0,0 +1,100 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListenersEvent event. + * + */ +class ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { + /** + * Create a ServiceBusDeadletterMessagesAvailableWithNoListenersEventData. + * @member {string} [namespaceName] The namespace name of the + * Microsoft.ServiceBus resource. + * @member {string} [requestUri] The endpoint of the Microsoft.ServiceBus + * resource. + * @member {string} [entityType] The entity type of the Microsoft.ServiceBus + * resource. Could be one of 'queue' or 'subscriber'. + * @member {string} [queueName] The name of the Microsoft.ServiceBus queue. + * If the entity type is of type 'subscriber', then this value will be null. + * @member {string} [topicName] The name of the Microsoft.ServiceBus topic. + * If the entity type is of type 'queue', then this value will be null. + * @member {string} [subscriptionName] The name of the Microsoft.ServiceBus + * topic's subscription. If the entity type is of type 'queue', then this + * value will be null. + */ + constructor() { + } + + /** + * Defines the metadata of ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + * + * @returns {object} metadata of ServiceBusDeadletterMessagesAvailableWithNoListenersEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', + type: { + name: 'Composite', + className: 'ServiceBusDeadletterMessagesAvailableWithNoListenersEventData', + modelProperties: { + namespaceName: { + required: false, + serializedName: 'namespaceName', + type: { + name: 'String' + } + }, + requestUri: { + required: false, + serializedName: 'requestUri', + type: { + name: 'String' + } + }, + entityType: { + required: false, + serializedName: 'entityType', + type: { + name: 'String' + } + }, + queueName: { + required: false, + serializedName: 'queueName', + type: { + name: 'String' + } + }, + topicName: { + required: false, + serializedName: 'topicName', + type: { + name: 'String' + } + }, + subscriptionName: { + required: false, + serializedName: 'subscriptionName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceBusDeadletterMessagesAvailableWithNoListenersEventData; diff --git a/lib/services/eventgrid/lib/models/subscriptionDeletedEventData.js b/lib/services/eventgrid/lib/models/subscriptionDeletedEventData.js new file mode 100644 index 0000000000..4c68cd7422 --- /dev/null +++ b/lib/services/eventgrid/lib/models/subscriptionDeletedEventData.js @@ -0,0 +1,55 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionDeletedEvent. + * + */ +class SubscriptionDeletedEventData { + /** + * Create a SubscriptionDeletedEventData. + * @member {string} [eventSubscriptionId] The Azure resource ID of the + * deleted event subscription. + */ + constructor() { + } + + /** + * Defines the metadata of SubscriptionDeletedEventData + * + * @returns {object} metadata of SubscriptionDeletedEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'SubscriptionDeletedEventData', + type: { + name: 'Composite', + className: 'SubscriptionDeletedEventData', + modelProperties: { + eventSubscriptionId: { + required: false, + readOnly: true, + serializedName: 'eventSubscriptionId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SubscriptionDeletedEventData; diff --git a/lib/services/eventgrid/lib/models/subscriptionValidationEventData.js b/lib/services/eventgrid/lib/models/subscriptionValidationEventData.js new file mode 100644 index 0000000000..f5a15131d5 --- /dev/null +++ b/lib/services/eventgrid/lib/models/subscriptionValidationEventData.js @@ -0,0 +1,72 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.EventGrid.SubscriptionValidationEvent. + * + */ +class SubscriptionValidationEventData { + /** + * Create a SubscriptionValidationEventData. + * @member {string} [validationCode] The validation code sent by Azure Event + * Grid to validate an event subscription. To complete the validation + * handshake, the subscriber must either respond with this validation code as + * part of the validation response, or perform a GET request on the + * validationUrl (available starting version 2018-05-01-preview). + * @member {string} [validationUrl] The validation URL sent by Azure Event + * Grid (available starting version 2018-05-01-preview). To complete the + * validation handshake, the subscriber must either respond with the + * validationCode as part of the validation response, or perform a GET + * request on the validationUrl (available starting version + * 2018-05-01-preview). + */ + constructor() { + } + + /** + * Defines the metadata of SubscriptionValidationEventData + * + * @returns {object} metadata of SubscriptionValidationEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'SubscriptionValidationEventData', + type: { + name: 'Composite', + className: 'SubscriptionValidationEventData', + modelProperties: { + validationCode: { + required: false, + readOnly: true, + serializedName: 'validationCode', + type: { + name: 'String' + } + }, + validationUrl: { + required: false, + readOnly: true, + serializedName: 'validationUrl', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SubscriptionValidationEventData; diff --git a/lib/services/eventgrid/lib/models/subscriptionValidationResponse.js b/lib/services/eventgrid/lib/models/subscriptionValidationResponse.js new file mode 100644 index 0000000000..61235d648d --- /dev/null +++ b/lib/services/eventgrid/lib/models/subscriptionValidationResponse.js @@ -0,0 +1,57 @@ +/* + * 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'; + +/** + * To complete an event subscription validation handshake, a subscriber can use + * either the validationCode or the validationUrl received in a + * SubscriptionValidationEvent. When the validationCode is used, the + * SubscriptionValidationResponse can be used to build the response. + * + */ +class SubscriptionValidationResponse { + /** + * Create a SubscriptionValidationResponse. + * @member {string} [validationResponse] The validation response sent by the + * subscriber to Azure Event Grid to complete the validation of an event + * subscription. + */ + constructor() { + } + + /** + * Defines the metadata of SubscriptionValidationResponse + * + * @returns {object} metadata of SubscriptionValidationResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'SubscriptionValidationResponse', + type: { + name: 'Composite', + className: 'SubscriptionValidationResponse', + modelProperties: { + validationResponse: { + required: false, + serializedName: 'validationResponse', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = SubscriptionValidationResponse; diff --git a/lib/services/eventgrid/package.json b/lib/services/eventgrid/package.json index 9fa027ae47..3ce0ca85b2 100644 --- a/lib/services/eventgrid/package.json +++ b/lib/services/eventgrid/package.json @@ -4,10 +4,13 @@ "description": "EventGridClient Library with typescript type definitions for node", "version": "1.1.0", "dependencies": { - "ms-rest": "^2.3.2", + "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" }, - "keywords": [ "node", "azure" ], + "keywords": [ + "node", + "azure" + ], "license": "MIT", "main": "./lib/eventGridClient.js", "types": "./lib/eventGridClient.d.ts", From fc69b71546c11c4d9a2bbccd83a0cf755cb11e73 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 18 May 2018 13:56:20 -0700 Subject: [PATCH 3/7] Generated from 074682bf5a1904c479dbe62300145863c169ba0a (#2880) Media Services Event Grid schema updates (2) --- lib/services/eventgrid/lib/models/index.d.ts | 19 ++++++ lib/services/eventgrid/lib/models/index.js | 1 + .../models/mediaJobStateChangeEventData.js | 67 +++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js diff --git a/lib/services/eventgrid/lib/models/index.d.ts b/lib/services/eventgrid/lib/models/index.d.ts index 72cf56b774..4681de328b 100644 --- a/lib/services/eventgrid/lib/models/index.d.ts +++ b/lib/services/eventgrid/lib/models/index.d.ts @@ -869,3 +869,22 @@ export interface ServiceBusDeadletterMessagesAvailableWithNoListenersEventData { subscriptionName?: string; } +/** + * @class + * Initializes a new instance of the MediaJobStateChangeEventData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Media.JobStateChange event. + * + * @member {string} [previousState] The previous state of the Job. Possible + * values include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + * 'Queued', 'Scheduled' + * @member {string} [state] The new state of the Job. Possible values include: + * 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', 'Queued', + * 'Scheduled' + */ +export interface MediaJobStateChangeEventData { + readonly previousState?: string; + readonly state?: string; +} + diff --git a/lib/services/eventgrid/lib/models/index.js b/lib/services/eventgrid/lib/models/index.js index 65ca8111ba..9c2d712ab8 100644 --- a/lib/services/eventgrid/lib/models/index.js +++ b/lib/services/eventgrid/lib/models/index.js @@ -48,3 +48,4 @@ exports.ContainerRegistryEventActor = require('./containerRegistryEventActor'); exports.ContainerRegistryEventSource = require('./containerRegistryEventSource'); exports.ServiceBusActiveMessagesAvailableWithNoListenersEventData = require('./serviceBusActiveMessagesAvailableWithNoListenersEventData'); exports.ServiceBusDeadletterMessagesAvailableWithNoListenersEventData = require('./serviceBusDeadletterMessagesAvailableWithNoListenersEventData'); +exports.MediaJobStateChangeEventData = require('./mediaJobStateChangeEventData'); diff --git a/lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js b/lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js new file mode 100644 index 0000000000..eab93e83ab --- /dev/null +++ b/lib/services/eventgrid/lib/models/mediaJobStateChangeEventData.js @@ -0,0 +1,67 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Media.JobStateChange event. + * + */ +class MediaJobStateChangeEventData { + /** + * Create a MediaJobStateChangeEventData. + * @member {string} [previousState] The previous state of the Job. Possible + * values include: 'Canceled', 'Canceling', 'Error', 'Finished', + * 'Processing', 'Queued', 'Scheduled' + * @member {string} [state] The new state of the Job. Possible values + * include: 'Canceled', 'Canceling', 'Error', 'Finished', 'Processing', + * 'Queued', 'Scheduled' + */ + constructor() { + } + + /** + * Defines the metadata of MediaJobStateChangeEventData + * + * @returns {object} metadata of MediaJobStateChangeEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'MediaJobStateChangeEventData', + type: { + name: 'Composite', + className: 'MediaJobStateChangeEventData', + modelProperties: { + previousState: { + required: false, + readOnly: true, + serializedName: 'previousState', + type: { + name: 'String' + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = MediaJobStateChangeEventData; From 68fac80fb50eb76fdc48a4f5a81f3cc1d9822a85 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 4 Jun 2018 11:21:41 -0700 Subject: [PATCH 4/7] Generated from 1d9c31e6e708e24c113c484de31e535fb77e9124 (#2937) Replacing # with # --- .../eventgrid/lib/models/deviceLifeCycleEventProperties.js | 2 +- lib/services/eventgrid/lib/models/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js b/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js index 11f8200caa..a02e3019bc 100644 --- a/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js +++ b/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js @@ -23,7 +23,7 @@ class DeviceLifeCycleEventProperties { * @member {string} [deviceId] The unique identifier of the device. This * case-sensitive string can be up to 128 characters long, and supports ASCII * 7-bit alphanumeric characters plus the following special characters: - : . - * + % _ # * ? ! ( ) , = @ ; $ '. + * + % _ # * ? ! ( ) , = @ ; $ '. * @member {string} [hubName] Name of the IoT Hub where the device was * created or deleted. * @member {string} [opType] The event type specified for this operation by diff --git a/lib/services/eventgrid/lib/models/index.d.ts b/lib/services/eventgrid/lib/models/index.d.ts index 4681de328b..9a1c9d0941 100644 --- a/lib/services/eventgrid/lib/models/index.d.ts +++ b/lib/services/eventgrid/lib/models/index.d.ts @@ -431,7 +431,7 @@ export interface SubscriptionDeletedEventData { * @member {string} [deviceId] The unique identifier of the device. This * case-sensitive string can be up to 128 characters long, and supports ASCII * 7-bit alphanumeric characters plus the following special characters: - : . + - * % _ # * ? ! ( ) , = @ ; $ '. + * % _ # * ? ! ( ) , = @ ; $ '. * @member {string} [hubName] Name of the IoT Hub where the device was created * or deleted. * @member {string} [opType] The event type specified for this operation by the From 4108cf8fc25e6da2d1851de5a0ac9f41fc96c24e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 23 Jul 2018 10:37:46 -0700 Subject: [PATCH 5/7] Generated from 7f85cd9eb76ab96bab808b151e23dc230ad7a0d0 (#3206) Fix typos --- .../models/deviceConnectionStateEventInfo.js | 55 +++++++++++ .../deviceConnectionStateEventProperties.js | 93 +++++++++++++++++++ .../models/deviceLifeCycleEventProperties.js | 20 +--- .../eventgrid/lib/models/deviceTwinInfo.js | 2 +- lib/services/eventgrid/lib/models/index.d.ts | 77 +++++++++++++-- lib/services/eventgrid/lib/models/index.js | 4 + .../models/iotHubDeviceConnectedEventData.js | 77 +++++++++++++++ .../models/iotHubDeviceCreatedEventData.js | 14 --- .../models/iotHubDeviceDeletedEventData.js | 14 --- .../iotHubDeviceDisconnectedEventData.js | 77 +++++++++++++++ 10 files changed, 377 insertions(+), 56 deletions(-) create mode 100644 lib/services/eventgrid/lib/models/deviceConnectionStateEventInfo.js create mode 100644 lib/services/eventgrid/lib/models/deviceConnectionStateEventProperties.js create mode 100644 lib/services/eventgrid/lib/models/iotHubDeviceConnectedEventData.js create mode 100644 lib/services/eventgrid/lib/models/iotHubDeviceDisconnectedEventData.js diff --git a/lib/services/eventgrid/lib/models/deviceConnectionStateEventInfo.js b/lib/services/eventgrid/lib/models/deviceConnectionStateEventInfo.js new file mode 100644 index 0000000000..9536de0ec3 --- /dev/null +++ b/lib/services/eventgrid/lib/models/deviceConnectionStateEventInfo.js @@ -0,0 +1,55 @@ +/* + * 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'; + +/** + * Information about the device connection state event. + * + */ +class DeviceConnectionStateEventInfo { + /** + * Create a DeviceConnectionStateEventInfo. + * @member {string} [sequenceNumber] Sequence number is string representation + * of a hexadecimal number. string compare can be used to identify the larger + * number because both in ASCII and HEX numbers come after alphabets. If you + * are converting the string to hex, then the number is a 256 bit number. + */ + constructor() { + } + + /** + * Defines the metadata of DeviceConnectionStateEventInfo + * + * @returns {object} metadata of DeviceConnectionStateEventInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'DeviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo', + modelProperties: { + sequenceNumber: { + required: false, + serializedName: 'sequenceNumber', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DeviceConnectionStateEventInfo; diff --git a/lib/services/eventgrid/lib/models/deviceConnectionStateEventProperties.js b/lib/services/eventgrid/lib/models/deviceConnectionStateEventProperties.js new file mode 100644 index 0000000000..02407c51e4 --- /dev/null +++ b/lib/services/eventgrid/lib/models/deviceConnectionStateEventProperties.js @@ -0,0 +1,93 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Schema of the Data property of an EventGridEvent for a device connection + * state event (DeviceConnected, DeviceDisconnected). + * + */ +class DeviceConnectionStateEventProperties { + /** + * Create a DeviceConnectionStateEventProperties. + * @member {string} [deviceId] The unique identifier of the device. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + * + % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [moduleId] The unique identifier of the module. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + * + % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [hubName] Name of the IoT Hub where the device was + * created or deleted. + * @member {object} [deviceConnectionStateEventInfo] Information about the + * device connection state event. + * @member {string} [deviceConnectionStateEventInfo.sequenceNumber] Sequence + * number is string representation of a hexadecimal number. string compare + * can be used to identify the larger number because both in ASCII and HEX + * numbers come after alphabets. If you are converting the string to hex, + * then the number is a 256 bit number. + */ + constructor() { + } + + /** + * Defines the metadata of DeviceConnectionStateEventProperties + * + * @returns {object} metadata of DeviceConnectionStateEventProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'DeviceConnectionStateEventProperties', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventProperties', + modelProperties: { + deviceId: { + required: false, + serializedName: 'deviceId', + type: { + name: 'String' + } + }, + moduleId: { + required: false, + serializedName: 'moduleId', + type: { + name: 'String' + } + }, + hubName: { + required: false, + serializedName: 'hubName', + type: { + name: 'String' + } + }, + deviceConnectionStateEventInfo: { + required: false, + serializedName: 'deviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo' + } + } + } + } + }; + } +} + +module.exports = DeviceConnectionStateEventProperties; diff --git a/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js b/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js index a02e3019bc..ad7a5c654d 100644 --- a/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js +++ b/lib/services/eventgrid/lib/models/deviceLifeCycleEventProperties.js @@ -26,12 +26,8 @@ class DeviceLifeCycleEventProperties { * + % _ # * ? ! ( ) , = @ ; $ '. * @member {string} [hubName] Name of the IoT Hub where the device was * created or deleted. - * @member {string} [opType] The event type specified for this operation by - * the IoT Hub. - * @member {string} [operationTimestamp] The ISO8601 timestamp of the - * operation. * @member {object} [twin] Information about the device twin, which is the - * cloud represenation of application device metadata. + * cloud representation of application device metadata. * @member {string} [twin.authenticationType] Authentication type used for * this device: either SAS, SelfSigned, or CertificateAuthority. * @member {number} [twin.cloudToDeviceMessageCount] Count of cloud to device @@ -109,20 +105,6 @@ class DeviceLifeCycleEventProperties { name: 'String' } }, - opType: { - required: false, - serializedName: 'opType', - type: { - name: 'String' - } - }, - operationTimestamp: { - required: false, - serializedName: 'operationTimestamp', - type: { - name: 'String' - } - }, twin: { required: false, serializedName: 'twin', diff --git a/lib/services/eventgrid/lib/models/deviceTwinInfo.js b/lib/services/eventgrid/lib/models/deviceTwinInfo.js index 9059d9782b..d8a18d5e0a 100644 --- a/lib/services/eventgrid/lib/models/deviceTwinInfo.js +++ b/lib/services/eventgrid/lib/models/deviceTwinInfo.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * Information about the device twin, which is the cloud represenation of + * Information about the device twin, which is the cloud representation of * application device metadata. * */ diff --git a/lib/services/eventgrid/lib/models/index.d.ts b/lib/services/eventgrid/lib/models/index.d.ts index 9a1c9d0941..40491ac44a 100644 --- a/lib/services/eventgrid/lib/models/index.d.ts +++ b/lib/services/eventgrid/lib/models/index.d.ts @@ -434,12 +434,8 @@ export interface SubscriptionDeletedEventData { * % _ # * ? ! ( ) , = @ ; $ '. * @member {string} [hubName] Name of the IoT Hub where the device was created * or deleted. - * @member {string} [opType] The event type specified for this operation by the - * IoT Hub. - * @member {string} [operationTimestamp] The ISO8601 timestamp of the - * operation. * @member {object} [twin] Information about the device twin, which is the - * cloud represenation of application device metadata. + * cloud representation of application device metadata. * @member {string} [twin.authenticationType] Authentication type used for this * device: either SAS, SelfSigned, or CertificateAuthority. * @member {number} [twin.cloudToDeviceMessageCount] Count of cloud to device @@ -487,8 +483,6 @@ export interface SubscriptionDeletedEventData { export interface DeviceLifeCycleEventProperties { deviceId?: string; hubName?: string; - opType?: string; - operationTimestamp?: string; twin?: DeviceTwinInfo; } @@ -512,6 +506,58 @@ export interface IotHubDeviceCreatedEventData extends DeviceLifeCycleEventProper export interface IotHubDeviceDeletedEventData extends DeviceLifeCycleEventProperties { } +/** + * @class + * Initializes a new instance of the DeviceConnectionStateEventProperties class. + * @constructor + * Schema of the Data property of an EventGridEvent for a device connection + * state event (DeviceConnected, DeviceDisconnected). + * + * @member {string} [deviceId] The unique identifier of the device. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [moduleId] The unique identifier of the module. This + * case-sensitive string can be up to 128 characters long, and supports ASCII + * 7-bit alphanumeric characters plus the following special characters: - : . + + * % _ # * ? ! ( ) , = @ ; $ '. + * @member {string} [hubName] Name of the IoT Hub where the device was created + * or deleted. + * @member {object} [deviceConnectionStateEventInfo] Information about the + * device connection state event. + * @member {string} [deviceConnectionStateEventInfo.sequenceNumber] Sequence + * number is string representation of a hexadecimal number. string compare can + * be used to identify the larger number because both in ASCII and HEX numbers + * come after alphabets. If you are converting the string to hex, then the + * number is a 256 bit number. + */ +export interface DeviceConnectionStateEventProperties { + deviceId?: string; + moduleId?: string; + hubName?: string; + deviceConnectionStateEventInfo?: DeviceConnectionStateEventInfo; +} + +/** + * @class + * Initializes a new instance of the IotHubDeviceConnectedEventData class. + * @constructor + * Event data for Microsoft.Devices.DeviceConnected event. + * + */ +export interface IotHubDeviceConnectedEventData extends DeviceConnectionStateEventProperties { +} + +/** + * @class + * Initializes a new instance of the IotHubDeviceDisconnectedEventData class. + * @constructor + * Event data for Microsoft.Devices.DeviceDisconnected event. + * + */ +export interface IotHubDeviceDisconnectedEventData extends DeviceConnectionStateEventProperties { +} + /** * @class * Initializes a new instance of the DeviceTwinMetadata class. @@ -592,7 +638,7 @@ export interface DeviceTwinInfoX509Thumbprint { * @class * Initializes a new instance of the DeviceTwinInfo class. * @constructor - * Information about the device twin, which is the cloud represenation of + * Information about the device twin, which is the cloud representation of * application device metadata. * * @member {string} [authenticationType] Authentication type used for this @@ -651,6 +697,21 @@ export interface DeviceTwinInfo { x509Thumbprint?: DeviceTwinInfoX509Thumbprint; } +/** + * @class + * Initializes a new instance of the DeviceConnectionStateEventInfo class. + * @constructor + * Information about the device connection state event. + * + * @member {string} [sequenceNumber] Sequence number is string representation + * of a hexadecimal number. string compare can be used to identify the larger + * number because both in ASCII and HEX numbers come after alphabets. If you + * are converting the string to hex, then the number is a 256 bit number. + */ +export interface DeviceConnectionStateEventInfo { + sequenceNumber?: string; +} + /** * @class * Initializes a new instance of the ContainerRegistryEventData class. diff --git a/lib/services/eventgrid/lib/models/index.js b/lib/services/eventgrid/lib/models/index.js index 9c2d712ab8..c8ee447130 100644 --- a/lib/services/eventgrid/lib/models/index.js +++ b/lib/services/eventgrid/lib/models/index.js @@ -34,11 +34,15 @@ exports.SubscriptionDeletedEventData = require('./subscriptionDeletedEventData') exports.DeviceLifeCycleEventProperties = require('./deviceLifeCycleEventProperties'); exports.IotHubDeviceCreatedEventData = require('./iotHubDeviceCreatedEventData'); exports.IotHubDeviceDeletedEventData = require('./iotHubDeviceDeletedEventData'); +exports.DeviceConnectionStateEventProperties = require('./deviceConnectionStateEventProperties'); +exports.IotHubDeviceConnectedEventData = require('./iotHubDeviceConnectedEventData'); +exports.IotHubDeviceDisconnectedEventData = require('./iotHubDeviceDisconnectedEventData'); exports.DeviceTwinMetadata = require('./deviceTwinMetadata'); exports.DeviceTwinProperties = require('./deviceTwinProperties'); exports.DeviceTwinInfoProperties = require('./deviceTwinInfoProperties'); exports.DeviceTwinInfoX509Thumbprint = require('./deviceTwinInfoX509Thumbprint'); exports.DeviceTwinInfo = require('./deviceTwinInfo'); +exports.DeviceConnectionStateEventInfo = require('./deviceConnectionStateEventInfo'); exports.ContainerRegistryEventData = require('./containerRegistryEventData'); exports.ContainerRegistryImagePushedEventData = require('./containerRegistryImagePushedEventData'); exports.ContainerRegistryImageDeletedEventData = require('./containerRegistryImageDeletedEventData'); diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceConnectedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceConnectedEventData.js new file mode 100644 index 0000000000..2bc1d2f13c --- /dev/null +++ b/lib/services/eventgrid/lib/models/iotHubDeviceConnectedEventData.js @@ -0,0 +1,77 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Event data for Microsoft.Devices.DeviceConnected event. + * + * @extends models['DeviceConnectionStateEventProperties'] + */ +class IotHubDeviceConnectedEventData extends models['DeviceConnectionStateEventProperties'] { + /** + * Create a IotHubDeviceConnectedEventData. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of IotHubDeviceConnectedEventData + * + * @returns {object} metadata of IotHubDeviceConnectedEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'IotHubDeviceConnectedEventData', + type: { + name: 'Composite', + className: 'IotHubDeviceConnectedEventData', + modelProperties: { + deviceId: { + required: false, + serializedName: 'deviceId', + type: { + name: 'String' + } + }, + moduleId: { + required: false, + serializedName: 'moduleId', + type: { + name: 'String' + } + }, + hubName: { + required: false, + serializedName: 'hubName', + type: { + name: 'String' + } + }, + deviceConnectionStateEventInfo: { + required: false, + serializedName: 'deviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo' + } + } + } + } + }; + } +} + +module.exports = IotHubDeviceConnectedEventData; diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js index f3999447ac..46dc59c0fb 100644 --- a/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js +++ b/lib/services/eventgrid/lib/models/iotHubDeviceCreatedEventData.js @@ -53,20 +53,6 @@ class IotHubDeviceCreatedEventData extends models['DeviceLifeCycleEventPropertie name: 'String' } }, - opType: { - required: false, - serializedName: 'opType', - type: { - name: 'String' - } - }, - operationTimestamp: { - required: false, - serializedName: 'operationTimestamp', - type: { - name: 'String' - } - }, twin: { required: false, serializedName: 'twin', diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js index 6cc0deda1b..fd47e335af 100644 --- a/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js +++ b/lib/services/eventgrid/lib/models/iotHubDeviceDeletedEventData.js @@ -53,20 +53,6 @@ class IotHubDeviceDeletedEventData extends models['DeviceLifeCycleEventPropertie name: 'String' } }, - opType: { - required: false, - serializedName: 'opType', - type: { - name: 'String' - } - }, - operationTimestamp: { - required: false, - serializedName: 'operationTimestamp', - type: { - name: 'String' - } - }, twin: { required: false, serializedName: 'twin', diff --git a/lib/services/eventgrid/lib/models/iotHubDeviceDisconnectedEventData.js b/lib/services/eventgrid/lib/models/iotHubDeviceDisconnectedEventData.js new file mode 100644 index 0000000000..f47e1fcf7c --- /dev/null +++ b/lib/services/eventgrid/lib/models/iotHubDeviceDisconnectedEventData.js @@ -0,0 +1,77 @@ +/* + * 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'; + +const models = require('./index'); + +/** + * Event data for Microsoft.Devices.DeviceDisconnected event. + * + * @extends models['DeviceConnectionStateEventProperties'] + */ +class IotHubDeviceDisconnectedEventData extends models['DeviceConnectionStateEventProperties'] { + /** + * Create a IotHubDeviceDisconnectedEventData. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of IotHubDeviceDisconnectedEventData + * + * @returns {object} metadata of IotHubDeviceDisconnectedEventData + * + */ + mapper() { + return { + required: false, + serializedName: 'IotHubDeviceDisconnectedEventData', + type: { + name: 'Composite', + className: 'IotHubDeviceDisconnectedEventData', + modelProperties: { + deviceId: { + required: false, + serializedName: 'deviceId', + type: { + name: 'String' + } + }, + moduleId: { + required: false, + serializedName: 'moduleId', + type: { + name: 'String' + } + }, + hubName: { + required: false, + serializedName: 'hubName', + type: { + name: 'String' + } + }, + deviceConnectionStateEventInfo: { + required: false, + serializedName: 'deviceConnectionStateEventInfo', + type: { + name: 'Composite', + className: 'DeviceConnectionStateEventInfo' + } + } + } + } + }; + } +} + +module.exports = IotHubDeviceDisconnectedEventData; From 2e0e2e88d75ff05516487ec4e4bb8bbb0d8119b7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 27 Jul 2018 10:27:11 -0700 Subject: [PATCH 6/7] Generated from d3ae56a91d4eb96ddb651fa9b0ccf07efab0a0a7 (#3237) Add actions to event grid schema Added ResourceActionSuccessData, ResourceActionFailedData and ResourceActionCancelData --- lib/services/eventgrid/lib/models/index.d.ts | 108 ++++++++++++++ lib/services/eventgrid/lib/models/index.js | 3 + .../lib/models/resourceActionCancelData.js | 136 ++++++++++++++++++ .../lib/models/resourceActionFailureData.js | 136 ++++++++++++++++++ .../lib/models/resourceActionSuccessData.js | 136 ++++++++++++++++++ 5 files changed, 519 insertions(+) create mode 100644 lib/services/eventgrid/lib/models/resourceActionCancelData.js create mode 100644 lib/services/eventgrid/lib/models/resourceActionFailureData.js create mode 100644 lib/services/eventgrid/lib/models/resourceActionSuccessData.js diff --git a/lib/services/eventgrid/lib/models/index.d.ts b/lib/services/eventgrid/lib/models/index.d.ts index 40491ac44a..e12e32152a 100644 --- a/lib/services/eventgrid/lib/models/index.d.ts +++ b/lib/services/eventgrid/lib/models/index.d.ts @@ -341,6 +341,114 @@ export interface ResourceDeleteCancelData { httpRequest?: string; } +/** + * @class + * Initializes a new instance of the ResourceActionSuccessData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionSuccess event. This is raised when a + * resource action operation succeeds. + * + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ +export interface ResourceActionSuccessData { + tenantId?: string; + subscriptionId?: string; + resourceGroup?: string; + resourceProvider?: string; + resourceUri?: string; + operationName?: string; + status?: string; + authorization?: string; + claims?: string; + correlationId?: string; + httpRequest?: string; +} + +/** + * @class + * Initializes a new instance of the ResourceActionFailureData class. + * @constructor + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionFailure event. This is raised when a + * resource action operation fails. + * + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ +export interface ResourceActionFailureData { + tenantId?: string; + subscriptionId?: string; + resourceGroup?: string; + resourceProvider?: string; + resourceUri?: string; + operationName?: string; + status?: string; + authorization?: string; + claims?: string; + correlationId?: string; + httpRequest?: string; +} + +/** + * @class + * Initializes a new instance of the ResourceActionCancelData class. + * @constructor + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Resources.ResourceActionCancel event. This is raised when a + * resource action operation is canceled. + * + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ +export interface ResourceActionCancelData { + tenantId?: string; + subscriptionId?: string; + resourceGroup?: string; + resourceProvider?: string; + resourceUri?: string; + operationName?: string; + status?: string; + authorization?: string; + claims?: string; + correlationId?: string; + httpRequest?: string; +} + /** * @class * Initializes a new instance of the EventGridEvent class. diff --git a/lib/services/eventgrid/lib/models/index.js b/lib/services/eventgrid/lib/models/index.js index c8ee447130..84de9aaefd 100644 --- a/lib/services/eventgrid/lib/models/index.js +++ b/lib/services/eventgrid/lib/models/index.js @@ -27,6 +27,9 @@ exports.ResourceWriteCancelData = require('./resourceWriteCancelData'); exports.ResourceDeleteSuccessData = require('./resourceDeleteSuccessData'); exports.ResourceDeleteFailureData = require('./resourceDeleteFailureData'); exports.ResourceDeleteCancelData = require('./resourceDeleteCancelData'); +exports.ResourceActionSuccessData = require('./resourceActionSuccessData'); +exports.ResourceActionFailureData = require('./resourceActionFailureData'); +exports.ResourceActionCancelData = require('./resourceActionCancelData'); exports.EventGridEvent = require('./eventGridEvent'); exports.SubscriptionValidationEventData = require('./subscriptionValidationEventData'); exports.SubscriptionValidationResponse = require('./subscriptionValidationResponse'); diff --git a/lib/services/eventgrid/lib/models/resourceActionCancelData.js b/lib/services/eventgrid/lib/models/resourceActionCancelData.js new file mode 100644 index 0000000000..00522dbb2b --- /dev/null +++ b/lib/services/eventgrid/lib/models/resourceActionCancelData.js @@ -0,0 +1,136 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for an + * Microsoft.Resources.ResourceActionCancel event. This is raised when a + * resource action operation is canceled. + * + */ +class ResourceActionCancelData { + /** + * Create a ResourceActionCancelData. + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceActionCancelData + * + * @returns {object} metadata of ResourceActionCancelData + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceActionCancelData', + type: { + name: 'Composite', + className: 'ResourceActionCancelData', + modelProperties: { + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + subscriptionId: { + required: false, + serializedName: 'subscriptionId', + type: { + name: 'String' + } + }, + resourceGroup: { + required: false, + serializedName: 'resourceGroup', + type: { + name: 'String' + } + }, + resourceProvider: { + required: false, + serializedName: 'resourceProvider', + type: { + name: 'String' + } + }, + resourceUri: { + required: false, + serializedName: 'resourceUri', + type: { + name: 'String' + } + }, + operationName: { + required: false, + serializedName: 'operationName', + type: { + name: 'String' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + }, + authorization: { + required: false, + serializedName: 'authorization', + type: { + name: 'String' + } + }, + claims: { + required: false, + serializedName: 'claims', + type: { + name: 'String' + } + }, + correlationId: { + required: false, + serializedName: 'correlationId', + type: { + name: 'String' + } + }, + httpRequest: { + required: false, + serializedName: 'httpRequest', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceActionCancelData; diff --git a/lib/services/eventgrid/lib/models/resourceActionFailureData.js b/lib/services/eventgrid/lib/models/resourceActionFailureData.js new file mode 100644 index 0000000000..d180ac3cbb --- /dev/null +++ b/lib/services/eventgrid/lib/models/resourceActionFailureData.js @@ -0,0 +1,136 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionFailure event. This is raised when a + * resource action operation fails. + * + */ +class ResourceActionFailureData { + /** + * Create a ResourceActionFailureData. + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceActionFailureData + * + * @returns {object} metadata of ResourceActionFailureData + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceActionFailureData', + type: { + name: 'Composite', + className: 'ResourceActionFailureData', + modelProperties: { + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + subscriptionId: { + required: false, + serializedName: 'subscriptionId', + type: { + name: 'String' + } + }, + resourceGroup: { + required: false, + serializedName: 'resourceGroup', + type: { + name: 'String' + } + }, + resourceProvider: { + required: false, + serializedName: 'resourceProvider', + type: { + name: 'String' + } + }, + resourceUri: { + required: false, + serializedName: 'resourceUri', + type: { + name: 'String' + } + }, + operationName: { + required: false, + serializedName: 'operationName', + type: { + name: 'String' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + }, + authorization: { + required: false, + serializedName: 'authorization', + type: { + name: 'String' + } + }, + claims: { + required: false, + serializedName: 'claims', + type: { + name: 'String' + } + }, + correlationId: { + required: false, + serializedName: 'correlationId', + type: { + name: 'String' + } + }, + httpRequest: { + required: false, + serializedName: 'httpRequest', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceActionFailureData; diff --git a/lib/services/eventgrid/lib/models/resourceActionSuccessData.js b/lib/services/eventgrid/lib/models/resourceActionSuccessData.js new file mode 100644 index 0000000000..849fc2ee28 --- /dev/null +++ b/lib/services/eventgrid/lib/models/resourceActionSuccessData.js @@ -0,0 +1,136 @@ +/* + * 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'; + +/** + * Schema of the Data property of an EventGridEvent for a + * Microsoft.Resources.ResourceActionSuccess event. This is raised when a + * resource action operation succeeds. + * + */ +class ResourceActionSuccessData { + /** + * Create a ResourceActionSuccessData. + * @member {string} [tenantId] The tenant ID of the resource. + * @member {string} [subscriptionId] The subscription ID of the resource. + * @member {string} [resourceGroup] The resource group of the resource. + * @member {string} [resourceProvider] The resource provider performing the + * operation. + * @member {string} [resourceUri] The URI of the resource in the operation. + * @member {string} [operationName] The operation that was performed. + * @member {string} [status] The status of the operation. + * @member {string} [authorization] The requested authorization for the + * operation. + * @member {string} [claims] The properties of the claims. + * @member {string} [correlationId] An operation ID used for troubleshooting. + * @member {string} [httpRequest] The details of the operation. + */ + constructor() { + } + + /** + * Defines the metadata of ResourceActionSuccessData + * + * @returns {object} metadata of ResourceActionSuccessData + * + */ + mapper() { + return { + required: false, + serializedName: 'ResourceActionSuccessData', + type: { + name: 'Composite', + className: 'ResourceActionSuccessData', + modelProperties: { + tenantId: { + required: false, + serializedName: 'tenantId', + type: { + name: 'String' + } + }, + subscriptionId: { + required: false, + serializedName: 'subscriptionId', + type: { + name: 'String' + } + }, + resourceGroup: { + required: false, + serializedName: 'resourceGroup', + type: { + name: 'String' + } + }, + resourceProvider: { + required: false, + serializedName: 'resourceProvider', + type: { + name: 'String' + } + }, + resourceUri: { + required: false, + serializedName: 'resourceUri', + type: { + name: 'String' + } + }, + operationName: { + required: false, + serializedName: 'operationName', + type: { + name: 'String' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + }, + authorization: { + required: false, + serializedName: 'authorization', + type: { + name: 'String' + } + }, + claims: { + required: false, + serializedName: 'claims', + type: { + name: 'String' + } + }, + correlationId: { + required: false, + serializedName: 'correlationId', + type: { + name: 'String' + } + }, + httpRequest: { + required: false, + serializedName: 'httpRequest', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ResourceActionSuccessData; From dba42e62a6ff098312e6245e6ae6a18638bba238 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Wed, 29 Aug 2018 12:09:35 -0700 Subject: [PATCH 7/7] Update azure-eventgrid version to 1.3.1 --- lib/services/eventgrid/package-lock.json | 2 +- lib/services/eventgrid/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/eventgrid/package-lock.json b/lib/services/eventgrid/package-lock.json index 96c36de71b..e4dd804885 100644 --- a/lib/services/eventgrid/package-lock.json +++ b/lib/services/eventgrid/package-lock.json @@ -1,6 +1,6 @@ { "name": "azure-eventgrid", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/lib/services/eventgrid/package.json b/lib/services/eventgrid/package.json index 37ed423b12..3f9201c054 100644 --- a/lib/services/eventgrid/package.json +++ b/lib/services/eventgrid/package.json @@ -2,7 +2,7 @@ "name": "azure-eventgrid", "author": "Microsoft Corporation", "description": "EventGridClient Library with typescript type definitions for node", - "version": "1.3.0", + "version": "1.3.1", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5"