Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR eventgrid/data-plane] EventGrid Dataplane: Added schemas corresponding to SubscriptionValidationEvent/Response and SubscriptionDeletedEvent #2862

Merged
merged 1 commit into from
May 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions lib/services/eventgrid/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}

5 changes: 5 additions & 0 deletions lib/services/eventgrid/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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;
55 changes: 55 additions & 0 deletions lib/services/eventgrid/lib/models/subscriptionDeletedEventData.js
Original file line number Diff line number Diff line change
@@ -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;
Loading