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",