From 7c2a25cc3afc11a38598eb2df59729e3cc754e8b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 26 Feb 2019 03:02:30 +0000 Subject: [PATCH 1/3] Generated from 46cf5eb760200cfa581a2988ac88c7d790c895c0 update readme.md file and address some violations --- lib/services/eventgridManagement/README.md | 8 +- .../lib/eventGridManagementClient.d.ts | 2 + .../lib/eventGridManagementClient.js | 4 +- .../lib/models/advancedFilter.js | 8 +- .../lib/models/boolEqualsAdvancedFilter.js | 4 +- .../eventgridManagement/lib/models/domain.js | 16 +- .../lib/models/domainRegenerateKeyRequest.js | 2 +- .../lib/models/domainSharedAccessKeys.js | 4 +- .../lib/models/domainTopic.js | 10 + .../lib/models/domainTopicsListResult.js | 8 + .../lib/models/domainUpdateParameters.js | 2 +- .../lib/models/domainsListResult.js | 8 + .../lib/models/eventSubscription.js | 26 +- .../lib/models/eventSubscriptionFilter.js | 27 +- .../eventSubscriptionUpdateParameters.js | 26 +- .../models/eventSubscriptionsListResult.js | 9 + .../lib/models/eventType.js | 9 + .../eventgridManagement/lib/models/index.d.ts | 414 +- .../eventgridManagement/lib/models/index.js | 47 +- .../lib/models/inputSchemaMapping.js | 2 +- .../lib/models/jsonField.js | 4 +- .../lib/models/jsonFieldWithDefault.js | 15 +- .../lib/models/jsonInputSchemaMapping.js | 40 +- .../models/numberGreaterThanAdvancedFilter.js | 4 +- ...numberGreaterThanOrEqualsAdvancedFilter.js | 4 +- .../lib/models/numberInAdvancedFilter.js | 4 +- .../models/numberLessThanAdvancedFilter.js | 4 +- .../numberLessThanOrEqualsAdvancedFilter.js | 4 +- .../lib/models/numberNotInAdvancedFilter.js | 4 +- ...iceBusQueueEventSubscriptionDestination.js | 70 + .../storageBlobDeadLetterDestination.js | 3 +- .../models/stringBeginsWithAdvancedFilter.js | 4 +- .../models/stringContainsAdvancedFilter.js | 4 +- .../models/stringEndsWithAdvancedFilter.js | 4 +- .../lib/models/stringInAdvancedFilter.js | 4 +- .../lib/models/stringNotInAdvancedFilter.js | 4 +- .../eventgridManagement/lib/models/topic.js | 31 + .../lib/models/topicsListResult.js | 8 + .../lib/operations/domainTopics.js | 1197 +++- .../lib/operations/domains.js | 518 +- .../lib/operations/eventSubscriptions.js | 4843 ++++++++++++++--- .../lib/operations/index.d.ts | 4198 +++++++++++--- .../lib/operations/index.js | 2 + .../lib/operations/topics.js | 566 ++ 44 files changed, 10264 insertions(+), 1911 deletions(-) create mode 100644 lib/services/eventgridManagement/lib/models/serviceBusQueueEventSubscriptionDestination.js diff --git a/lib/services/eventgridManagement/README.md b/lib/services/eventgridManagement/README.md index 680b32541e..f72fd1fdb7 100644 --- a/lib/services/eventgridManagement/README.md +++ b/lib/services/eventgridManagement/README.md @@ -20,7 +20,7 @@ npm install azure-arm-eventgrid ### How to use -#### Authentication, client creation, and get eventSubscriptions as an example. +#### Authentication, client creation, and get domains as an example. ```javascript const msRestAzure = require("ms-rest-azure"); @@ -28,10 +28,10 @@ const EventGridManagementClient = require("azure-arm-eventgrid"); msRestAzure.interactiveLogin().then((creds) => { const subscriptionId = ""; const client = new EventGridManagementClient(creds, subscriptionId); - const scope = "testscope"; - const eventSubscriptionName = "testeventSubscriptionName"; + const resourceGroupName = "testresourceGroupName"; + const domainName = "testdomainName"; - return client.eventSubscriptions.get(scope, eventSubscriptionName).then((result) => { + return client.domains.get(resourceGroupName, domainName).then((result) => { console.log("The result is:"); console.log(result); }); diff --git a/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts b/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts index 03519d10f0..49705230e9 100644 --- a/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts +++ b/lib/services/eventgridManagement/lib/eventGridManagementClient.d.ts @@ -56,6 +56,8 @@ export default class EventGridManagementClient extends AzureServiceClient { generateClientRequestId: boolean; // Operation groups + domains: operations.Domains; + domainTopics: operations.DomainTopics; eventSubscriptions: operations.EventSubscriptions; operations: operations.Operations; topics: operations.Topics; diff --git a/lib/services/eventgridManagement/lib/eventGridManagementClient.js b/lib/services/eventgridManagement/lib/eventGridManagementClient.js index b7a0b0380b..20dff74dd7 100644 --- a/lib/services/eventgridManagement/lib/eventGridManagementClient.js +++ b/lib/services/eventgridManagement/lib/eventGridManagementClient.js @@ -50,7 +50,7 @@ class EventGridManagementClient extends ServiceClient { super(credentials, options); - this.apiVersion = '2019-01-01'; + this.apiVersion = '2019-02-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; @@ -72,6 +72,8 @@ class EventGridManagementClient extends ServiceClient { if(options.generateClientRequestId !== null && options.generateClientRequestId !== undefined) { this.generateClientRequestId = options.generateClientRequestId; } + this.domains = new operations.Domains(this); + this.domainTopics = new operations.DomainTopics(this); this.eventSubscriptions = new operations.EventSubscriptions(this); this.operations = new operations.Operations(this); this.topics = new operations.Topics(this); diff --git a/lib/services/eventgridManagement/lib/models/advancedFilter.js b/lib/services/eventgridManagement/lib/models/advancedFilter.js index 6114ec0050..b22118af51 100644 --- a/lib/services/eventgridManagement/lib/models/advancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/advancedFilter.js @@ -11,16 +11,14 @@ 'use strict'; /** - * Represents an advanced filter that can be used to filter events based on - * various event envelope/data fields. + * The Advanced Filter base class. * */ class AdvancedFilter { /** * Create a AdvancedFilter. - * @member {string} [key] The filter key. Represents an event property with - * up to two levels of nesting. - * @member {string} operatorType Polymorphic Discriminator + * @property {string} [key] The Key value + * @property {string} operatorType Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js index 09675d2caa..e7f47c9273 100644 --- a/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * BoolEquals Filter + * BoolEquals Advanced Filter. * * @extends models['AdvancedFilter'] */ class BoolEqualsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a BoolEqualsAdvancedFilter. - * @member {boolean} [value] The filter value + * @property {boolean} [value] The boolean filter value */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/domain.js b/lib/services/eventgridManagement/lib/models/domain.js index 5b0c27960c..f1e39e239e 100644 --- a/lib/services/eventgridManagement/lib/models/domain.js +++ b/lib/services/eventgridManagement/lib/models/domain.js @@ -20,16 +20,17 @@ const models = require('./index'); class Domain extends models['TrackedResource'] { /** * Create a Domain. - * @member {string} [provisioningState] Provisioning state of the domain. + * @property {string} [provisioningState] Provisioning state of the domain. * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', * 'Canceled', 'Failed' - * @member {string} [endpoint] Endpoint for the domain. - * @member {string} [inputSchema] This determines the format that Event Grid - * should expect for incoming events published to the domain. Possible values - * include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' - * @member {object} [inputSchemaMapping] Information about the + * @property {string} [endpoint] Endpoint for the domain. + * @property {string} [inputSchema] This determines the format that Event + * Grid should expect for incoming events published to the domain. Possible + * values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema'. Default value: 'EventGridSchema' . + * @property {object} [inputSchemaMapping] Information about the * InputSchemaMapping which specified the info about mapping event payload. - * @member {string} [inputSchemaMapping.inputSchemaMappingType] Polymorphic + * @property {string} [inputSchemaMapping.inputSchemaMappingType] Polymorphic * Discriminator */ constructor() { @@ -114,6 +115,7 @@ class Domain extends models['TrackedResource'] { inputSchema: { required: false, serializedName: 'properties.inputSchema', + defaultValue: 'EventGridSchema', type: { name: 'String' } diff --git a/lib/services/eventgridManagement/lib/models/domainRegenerateKeyRequest.js b/lib/services/eventgridManagement/lib/models/domainRegenerateKeyRequest.js index 12c49d8951..165862eaee 100644 --- a/lib/services/eventgridManagement/lib/models/domainRegenerateKeyRequest.js +++ b/lib/services/eventgridManagement/lib/models/domainRegenerateKeyRequest.js @@ -17,7 +17,7 @@ class DomainRegenerateKeyRequest { /** * Create a DomainRegenerateKeyRequest. - * @member {string} keyName Key name to regenerate key1 or key2 + * @property {string} keyName Key name to regenerate key1 or key2 */ constructor() { } diff --git a/lib/services/eventgridManagement/lib/models/domainSharedAccessKeys.js b/lib/services/eventgridManagement/lib/models/domainSharedAccessKeys.js index 317b305a99..2397698bf3 100644 --- a/lib/services/eventgridManagement/lib/models/domainSharedAccessKeys.js +++ b/lib/services/eventgridManagement/lib/models/domainSharedAccessKeys.js @@ -17,8 +17,8 @@ class DomainSharedAccessKeys { /** * Create a DomainSharedAccessKeys. - * @member {string} [key1] Shared access key1 for the domain. - * @member {string} [key2] Shared access key2 for the domain. + * @property {string} [key1] Shared access key1 for the domain. + * @property {string} [key2] Shared access key2 for the domain. */ constructor() { } diff --git a/lib/services/eventgridManagement/lib/models/domainTopic.js b/lib/services/eventgridManagement/lib/models/domainTopic.js index 82c82b58f6..cafb336a62 100644 --- a/lib/services/eventgridManagement/lib/models/domainTopic.js +++ b/lib/services/eventgridManagement/lib/models/domainTopic.js @@ -20,6 +20,9 @@ const models = require('./index'); class DomainTopic extends models['Resource'] { /** * Create a DomainTopic. + * @property {string} [provisioningState] Provisioning state of the domain + * topic. Possible values include: 'Creating', 'Updating', 'Deleting', + * 'Succeeded', 'Canceled', 'Failed' */ constructor() { super(); @@ -62,6 +65,13 @@ class DomainTopic extends models['Resource'] { type: { name: 'String' } + }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } } } } diff --git a/lib/services/eventgridManagement/lib/models/domainTopicsListResult.js b/lib/services/eventgridManagement/lib/models/domainTopicsListResult.js index 2d1fcc369a..cedcc04ee4 100644 --- a/lib/services/eventgridManagement/lib/models/domainTopicsListResult.js +++ b/lib/services/eventgridManagement/lib/models/domainTopicsListResult.js @@ -16,6 +16,7 @@ class DomainTopicsListResult extends Array { /** * Create a DomainTopicsListResult. + * @property {string} [nextLink] A link for the next page of domain topics */ constructor() { super(); @@ -49,6 +50,13 @@ class DomainTopicsListResult extends Array { } } } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } } } } diff --git a/lib/services/eventgridManagement/lib/models/domainUpdateParameters.js b/lib/services/eventgridManagement/lib/models/domainUpdateParameters.js index 7188ca4084..c3014577b7 100644 --- a/lib/services/eventgridManagement/lib/models/domainUpdateParameters.js +++ b/lib/services/eventgridManagement/lib/models/domainUpdateParameters.js @@ -17,7 +17,7 @@ class DomainUpdateParameters { /** * Create a DomainUpdateParameters. - * @member {object} [tags] Tags of the domains resource + * @property {object} [tags] Tags of the domains resource */ constructor() { } diff --git a/lib/services/eventgridManagement/lib/models/domainsListResult.js b/lib/services/eventgridManagement/lib/models/domainsListResult.js index f75a6a3382..f502569559 100644 --- a/lib/services/eventgridManagement/lib/models/domainsListResult.js +++ b/lib/services/eventgridManagement/lib/models/domainsListResult.js @@ -16,6 +16,7 @@ class DomainsListResult extends Array { /** * Create a DomainsListResult. + * @property {string} [nextLink] A link for the next page of domains */ constructor() { super(); @@ -49,6 +50,13 @@ class DomainsListResult extends Array { } } } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } } } } diff --git a/lib/services/eventgridManagement/lib/models/eventSubscription.js b/lib/services/eventgridManagement/lib/models/eventSubscription.js index 17331a648d..65f923c2d3 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscription.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscription.js @@ -37,13 +37,19 @@ class EventSubscription extends models['Resource'] { * events for an event subscription based on a resource path suffix. * Wildcard characters are not supported in this path. * @property {array} [filter.includedEventTypes] A list of applicable event - * types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs - * to be specified as an element in this list. + * types that need to be part of the event subscription. If it is desired to + * subscribe to all event types, set the IncludedEventTypes to null. * @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. + * @property {array} [filter.advancedFilters] An array of advanced filters + * that are used for filtering event subscriptions. * @property {array} [labels] List of user defined labels. + * @property {date} [expirationTimeUtc] Expiration time of the event + * subscription. + * @property {string} [eventDeliverySchema] The event delivery schema for the + * event subscription. Possible values include: 'EventGridSchema', + * 'CloudEventV01Schema', 'CustomInputSchema' * @property {object} [retryPolicy] The retry policy for events. This can be * used to configure maximum number of delivery attempts and time to live for * events. @@ -149,6 +155,20 @@ class EventSubscription extends models['Resource'] { } } }, + expirationTimeUtc: { + required: false, + serializedName: 'properties.expirationTimeUtc', + type: { + name: 'DateTime' + } + }, + eventDeliverySchema: { + required: false, + serializedName: 'properties.eventDeliverySchema', + type: { + name: 'String' + } + }, retryPolicy: { required: false, serializedName: 'properties.retryPolicy', diff --git a/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js b/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js index 98f50cd738..346e2e2786 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js @@ -25,12 +25,13 @@ class EventSubscriptionFilter { * for an event subscription based on a resource path suffix. * Wildcard characters are not supported in this path. * @property {array} [includedEventTypes] A list of applicable event types - * that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs - * to be specified as an element in this list. + * that need to be part of the event subscription. If it is desired to + * subscribe to all event types, set the IncludedEventTypes to null. * @property {boolean} [isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. Default value: false . + * @property {array} [advancedFilters] An array of advanced filters that are + * used for filtering event subscriptions. */ constructor() { } @@ -84,6 +85,26 @@ class EventSubscriptionFilter { type: { name: 'Boolean' } + }, + advancedFilters: { + required: false, + serializedName: 'advancedFilters', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AdvancedFilterElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'operatorType', + clientName: 'operatorType' + }, + uberParent: 'AdvancedFilter', + className: 'AdvancedFilter' + } + } + } } } } diff --git a/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js b/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js index de96c627ef..eb928e10fb 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js @@ -30,13 +30,19 @@ class EventSubscriptionUpdateParameters { * events for an event subscription based on a resource path suffix. * Wildcard characters are not supported in this path. * @property {array} [filter.includedEventTypes] A list of applicable event - * types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs - * to be specified as an element in this list. + * types that need to be part of the event subscription. If it is desired to + * subscribe to all event types, set the IncludedEventTypes to null. * @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. + * @property {array} [filter.advancedFilters] An array of advanced filters + * that are used for filtering event subscriptions. * @property {array} [labels] List of user defined labels. + * @property {date} [expirationTimeUtc] Information about the expiration time + * for the event subscription. + * @property {string} [eventDeliverySchema] The event delivery schema for the + * event subscription. Possible values include: 'EventGridSchema', + * 'CloudEventV01Schema', 'CustomInputSchema' * @property {object} [retryPolicy] The retry policy for events. This can be * used to configure maximum number of delivery attempts and time to live for * events. @@ -101,6 +107,20 @@ class EventSubscriptionUpdateParameters { } } }, + expirationTimeUtc: { + required: false, + serializedName: 'expirationTimeUtc', + type: { + name: 'DateTime' + } + }, + eventDeliverySchema: { + required: false, + serializedName: 'eventDeliverySchema', + type: { + name: 'String' + } + }, retryPolicy: { required: false, serializedName: 'retryPolicy', diff --git a/lib/services/eventgridManagement/lib/models/eventSubscriptionsListResult.js b/lib/services/eventgridManagement/lib/models/eventSubscriptionsListResult.js index ad382fcfe4..9ebad7c63e 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscriptionsListResult.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscriptionsListResult.js @@ -16,6 +16,8 @@ class EventSubscriptionsListResult extends Array { /** * Create a EventSubscriptionsListResult. + * @property {string} [nextLink] A link for the next page of event + * subscriptions */ constructor() { super(); @@ -49,6 +51,13 @@ class EventSubscriptionsListResult extends Array { } } } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } } } } diff --git a/lib/services/eventgridManagement/lib/models/eventType.js b/lib/services/eventgridManagement/lib/models/eventType.js index b8079ce432..abd912f099 100644 --- a/lib/services/eventgridManagement/lib/models/eventType.js +++ b/lib/services/eventgridManagement/lib/models/eventType.js @@ -23,6 +23,8 @@ class EventType extends models['Resource'] { * @property {string} [displayName] Display name of the event type. * @property {string} [description] Description of the event type. * @property {string} [schemaUrl] Url of the schema for this event type. + * @property {boolean} [isInDefaultSet] IsInDefaultSet flag of the event + * type. */ constructor() { super(); @@ -86,6 +88,13 @@ class EventType extends models['Resource'] { type: { name: 'String' } + }, + isInDefaultSet: { + required: false, + serializedName: 'properties.isInDefaultSet', + type: { + name: 'Boolean' + } } } } diff --git a/lib/services/eventgridManagement/lib/models/index.d.ts b/lib/services/eventgridManagement/lib/models/index.d.ts index d19c1574a7..725fa58687 100644 --- a/lib/services/eventgridManagement/lib/models/index.d.ts +++ b/lib/services/eventgridManagement/lib/models/index.d.ts @@ -15,6 +15,181 @@ export { CloudError }; +/** + * By default, Event Grid expects events to be in the Event Grid event schema. Specifying an input + * schema mapping enables publishing to Event Grid using a custom input schema. Currently, the only + * supported type of InputSchemaMapping is 'JsonInputSchemaMapping'. + */ +export interface InputSchemaMapping { + /** + * Polymorphic Discriminator + */ + inputSchemaMappingType: string; +} + +/** + * Definition of a Resource + */ +export interface Resource extends BaseResource { + /** + * Fully qualified identifier of the resource + */ + readonly id?: string; + /** + * Name of the resource + */ + readonly name?: string; + /** + * Type of the resource + */ + readonly type?: string; +} + +/** + * This is used to express the source of an input schema mapping for a single target field in the + * Event Grid Event schema. This is currently used in the mappings for the 'id', 'topic' and + * 'eventtime' properties. This represents a field in the input event schema. + */ +export interface JsonField { + /** + * Name of a field in the input event schema that's to be used as the source of a mapping. + */ + sourceField?: string; +} + +/** + * This is used to express the source of an input schema mapping for a single target field + * in the Event Grid Event schema. This is currently used in the mappings for the 'subject', + * 'eventtype' and 'dataversion' properties. This represents a field in the input event schema + * along with a default value to be used, and at least one of these two properties should be + * provided. + */ +export interface JsonFieldWithDefault { + /** + * Name of a field in the input event schema that's to be used as the source of a mapping. + */ + sourceField?: string; + /** + * The default value to be used for mapping when a SourceField is not provided or if there's no + * property with the specified name in the published JSON event payload. + */ + defaultValue?: string; +} + +/** + * This enables publishing to Event Grid using a custom input schema. This can be used to map + * properties from a custom input JSON schema to the Event Grid event schema. + */ +export interface JsonInputSchemaMapping extends InputSchemaMapping { + /** + * The mapping information for the Id property of the Event Grid Event. + */ + id?: JsonField; + /** + * The mapping information for the Topic property of the Event Grid Event. + */ + topic?: JsonField; + /** + * The mapping information for the EventTime property of the Event Grid Event. + */ + eventTime?: JsonField; + /** + * The mapping information for the EventType property of the Event Grid Event. + */ + eventType?: JsonFieldWithDefault; + /** + * The mapping information for the Subject property of the Event Grid Event. + */ + subject?: JsonFieldWithDefault; + /** + * The mapping information for the DataVersion property of the Event Grid Event. + */ + dataVersion?: JsonFieldWithDefault; +} + +/** + * Definition of a Tracked Resource + */ +export interface TrackedResource extends Resource { + /** + * Location of the resource + */ + location: string; + /** + * Tags of the resource + */ + tags?: { [propertyName: string]: string }; +} + +/** + * EventGrid Domain + */ +export interface Domain extends TrackedResource { + /** + * Provisioning state of the domain. Possible values include: 'Creating', 'Updating', 'Deleting', + * 'Succeeded', 'Canceled', 'Failed' + */ + readonly provisioningState?: string; + /** + * Endpoint for the domain. + */ + readonly endpoint?: string; + /** + * This determines the format that Event Grid should expect for incoming events published to the + * domain. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' + */ + inputSchema?: string; + /** + * Information about the InputSchemaMapping which specified the info about mapping event payload. + */ + inputSchemaMapping?: InputSchemaMapping; +} + +/** + * Properties of the Domain update + */ +export interface DomainUpdateParameters { + /** + * Tags of the domains resource + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Shared access keys of the Domain + */ +export interface DomainSharedAccessKeys { + /** + * Shared access key1 for the domain. + */ + key1?: string; + /** + * Shared access key2 for the domain. + */ + key2?: string; +} + +/** + * Domain regenerate share access key request + */ +export interface DomainRegenerateKeyRequest { + /** + * Key name to regenerate key1 or key2 + */ + keyName: string; +} + +/** + * Domain Topic + */ +export interface DomainTopic extends Resource { + /** + * Provisioning state of the domain topic. Possible values include: 'Creating', 'Updating', + * 'Deleting', 'Succeeded', 'Canceled', 'Failed' + */ + provisioningState?: string; +} + /** * Information about the destination for an event subscription */ @@ -25,6 +200,20 @@ export interface EventSubscriptionDestination { endpointType: string; } +/** + * The Advanced Filter base class. + */ +export interface AdvancedFilter { + /** + * The Key value + */ + key?: string; + /** + * Polymorphic Discriminator + */ + operatorType: string; +} + /** * Filter for the Event Subscription */ @@ -41,9 +230,8 @@ export interface EventSubscriptionFilter { */ subjectEndsWith?: string; /** - * A list of applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to be specified as an - * element in this list. + * A list of applicable event types that need to be part of the event subscription. If it is + * desired to subscribe to all event types, set the IncludedEventTypes to null. */ includedEventTypes?: string[]; /** @@ -51,6 +239,10 @@ export interface EventSubscriptionFilter { * should be compared in a case sensitive manner. */ isSubjectCaseSensitive?: boolean; + /** + * An array of advanced filters that are used for filtering event subscriptions. + */ + advancedFilters?: AdvancedFilter[]; } /** @@ -81,21 +273,13 @@ export interface DeadLetterDestination { } /** - * Definition of a Resource + * NumberIn Advanced Filter */ -export interface Resource extends BaseResource { +export interface NumberInAdvancedFilter extends AdvancedFilter { /** - * Fully qualified identifier of the resource + * The set of filter values */ - readonly id?: string; - /** - * Name of the resource - */ - readonly name?: string; - /** - * Type of the resource - */ - readonly type?: string; + values?: number[]; } /** @@ -103,9 +287,7 @@ export interface Resource extends BaseResource { */ export interface StorageBlobDeadLetterDestination extends DeadLetterDestination { /** - * The Azure Resource ID of the storage account that is the destination of the deadletter events. - * For example: - * /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName} + * The Azure Resource ID of the storage account that is the destination of the deadletter events */ resourceId?: string; /** @@ -114,6 +296,116 @@ export interface StorageBlobDeadLetterDestination extends DeadLetterDestination blobContainerName?: string; } +/** + * NumberNotIn Advanced Filter + */ +export interface NumberNotInAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values + */ + values?: number[]; +} + +/** + * NumberLessThan Advanced Filter + */ +export interface NumberLessThanAdvancedFilter extends AdvancedFilter { + /** + * The filter value + */ + value?: number; +} + +/** + * NumberGreaterThan Advanced Filter + */ +export interface NumberGreaterThanAdvancedFilter extends AdvancedFilter { + /** + * The filter value + */ + value?: number; +} + +/** + * NumberLessThanOrEquals Advanced Filter + */ +export interface NumberLessThanOrEqualsAdvancedFilter extends AdvancedFilter { + /** + * The filter value + */ + value?: number; +} + +/** + * NumberGreaterThanOrEquals Advanced Filter + */ +export interface NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilter { + /** + * The filter value + */ + value?: number; +} + +/** + * BoolEquals Advanced Filter. + */ +export interface BoolEqualsAdvancedFilter extends AdvancedFilter { + /** + * The boolean filter value + */ + value?: boolean; +} + +/** + * StringIn Advanced Filter + */ +export interface StringInAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values + */ + values?: string[]; +} + +/** + * StringNotIn Advanced Filter + */ +export interface StringNotInAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values + */ + values?: string[]; +} + +/** + * StringBeginsWith Advanced Filter + */ +export interface StringBeginsWithAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values + */ + values?: string[]; +} + +/** + * StringEndsWith Advanced Filter + */ +export interface StringEndsWithAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values + */ + values?: string[]; +} + +/** + * StringContains Advanced Filter + */ +export interface StringContainsAdvancedFilter extends AdvancedFilter { + /** + * The set of filter values + */ + values?: string[]; +} + /** * Information about the webhook destination for an event subscription */ @@ -166,6 +458,17 @@ export interface HybridConnectionEventSubscriptionDestination extends EventSubsc resourceId?: string; } +/** + * Information about the service bus destination for an event subscription + */ +export interface ServiceBusQueueEventSubscriptionDestination extends EventSubscriptionDestination { + /** + * The Azure Resource Id that represents the endpoint of the Service Bus destination of an event + * subscription. + */ + resourceId?: string; +} + /** * Event Subscription */ @@ -192,6 +495,15 @@ export interface EventSubscription extends Resource { * List of user defined labels. */ labels?: string[]; + /** + * Expiration time of the event subscription. + */ + expirationTimeUtc?: Date; + /** + * The event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + */ + eventDeliverySchema?: string; /** * The retry policy for events. This can be used to configure maximum number of delivery attempts * and time to live for events. @@ -220,6 +532,15 @@ export interface EventSubscriptionUpdateParameters { * List of user defined labels. */ labels?: string[]; + /** + * Information about the expiration time for the event subscription. + */ + expirationTimeUtc?: Date; + /** + * The event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + */ + eventDeliverySchema?: string; /** * The retry policy for events. This can be used to configure maximum number of delivery attempts * and time to live for events. @@ -285,20 +606,6 @@ export interface Operation { properties?: any; } -/** - * Definition of a Tracked Resource - */ -export interface TrackedResource extends Resource { - /** - * Location of the resource - */ - location: string; - /** - * Tags of the resource - */ - tags?: { [propertyName: string]: string }; -} - /** * EventGrid Topic */ @@ -312,6 +619,17 @@ export interface Topic extends TrackedResource { * Endpoint for the topic. */ readonly endpoint?: string; + /** + * This determines the format that Event Grid should expect for incoming events published to the + * topic. Possible values include: 'EventGridSchema', 'CustomEventSchema', 'CloudEventV01Schema' + */ + inputSchema?: string; + /** + * This enables publishing using custom event schemas. An InputSchemaMapping can be specified to + * map various properties of a source schema to various required properties of the EventGridEvent + * schema. + */ + inputSchemaMapping?: InputSchemaMapping; } /** @@ -364,6 +682,10 @@ export interface EventType extends Resource { * Url of the schema for this event type. */ schemaUrl?: string; + /** + * IsInDefaultSet flag of the event type. + */ + isInDefaultSet?: boolean; } /** @@ -397,10 +719,34 @@ export interface TopicTypeInfo extends Resource { supportedLocations?: string[]; } +/** + * Result of the List Domains operation + */ +export interface DomainsListResult extends Array { + /** + * A link for the next page of domains + */ + nextLink?: string; +} + +/** + * Result of the List Domain Topics operation + */ +export interface DomainTopicsListResult extends Array { + /** + * A link for the next page of domain topics + */ + nextLink?: string; +} + /** * Result of the List EventSubscriptions operation */ export interface EventSubscriptionsListResult extends Array { + /** + * A link for the next page of event subscriptions + */ + nextLink?: string; } /** @@ -413,6 +759,10 @@ export interface OperationsListResult extends Array { * Result of the List Topics operation */ export interface TopicsListResult extends Array { + /** + * A link for the next page of topics + */ + nextLink?: string; } /** diff --git a/lib/services/eventgridManagement/lib/models/index.js b/lib/services/eventgridManagement/lib/models/index.js index 4a796676a4..919636c5cd 100644 --- a/lib/services/eventgridManagement/lib/models/index.js +++ b/lib/services/eventgridManagement/lib/models/index.js @@ -18,39 +18,80 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; +exports.InputSchemaMapping = require('./inputSchemaMapping'); +exports.Resource = require('./resource'); +exports.JsonField = require('./jsonField'); +exports.JsonFieldWithDefault = require('./jsonFieldWithDefault'); +exports.JsonInputSchemaMapping = require('./jsonInputSchemaMapping'); +exports.TrackedResource = require('./trackedResource'); +exports.Domain = require('./domain'); +exports.DomainUpdateParameters = require('./domainUpdateParameters'); +exports.DomainSharedAccessKeys = require('./domainSharedAccessKeys'); +exports.DomainRegenerateKeyRequest = require('./domainRegenerateKeyRequest'); +exports.DomainTopic = require('./domainTopic'); exports.EventSubscriptionDestination = require('./eventSubscriptionDestination'); +exports.AdvancedFilter = require('./advancedFilter'); exports.EventSubscriptionFilter = require('./eventSubscriptionFilter'); exports.RetryPolicy = require('./retryPolicy'); exports.DeadLetterDestination = require('./deadLetterDestination'); -exports.Resource = require('./resource'); +exports.NumberInAdvancedFilter = require('./numberInAdvancedFilter'); exports.StorageBlobDeadLetterDestination = require('./storageBlobDeadLetterDestination'); +exports.NumberNotInAdvancedFilter = require('./numberNotInAdvancedFilter'); +exports.NumberLessThanAdvancedFilter = require('./numberLessThanAdvancedFilter'); +exports.NumberGreaterThanAdvancedFilter = require('./numberGreaterThanAdvancedFilter'); +exports.NumberLessThanOrEqualsAdvancedFilter = require('./numberLessThanOrEqualsAdvancedFilter'); +exports.NumberGreaterThanOrEqualsAdvancedFilter = require('./numberGreaterThanOrEqualsAdvancedFilter'); +exports.BoolEqualsAdvancedFilter = require('./boolEqualsAdvancedFilter'); +exports.StringInAdvancedFilter = require('./stringInAdvancedFilter'); +exports.StringNotInAdvancedFilter = require('./stringNotInAdvancedFilter'); +exports.StringBeginsWithAdvancedFilter = require('./stringBeginsWithAdvancedFilter'); +exports.StringEndsWithAdvancedFilter = require('./stringEndsWithAdvancedFilter'); +exports.StringContainsAdvancedFilter = require('./stringContainsAdvancedFilter'); exports.WebHookEventSubscriptionDestination = require('./webHookEventSubscriptionDestination'); exports.EventHubEventSubscriptionDestination = require('./eventHubEventSubscriptionDestination'); exports.StorageQueueEventSubscriptionDestination = require('./storageQueueEventSubscriptionDestination'); exports.HybridConnectionEventSubscriptionDestination = require('./hybridConnectionEventSubscriptionDestination'); +exports.ServiceBusQueueEventSubscriptionDestination = require('./serviceBusQueueEventSubscriptionDestination'); exports.EventSubscription = require('./eventSubscription'); exports.EventSubscriptionUpdateParameters = require('./eventSubscriptionUpdateParameters'); exports.EventSubscriptionFullUrl = require('./eventSubscriptionFullUrl'); exports.OperationInfo = require('./operationInfo'); exports.Operation = require('./operation'); -exports.TrackedResource = require('./trackedResource'); exports.Topic = require('./topic'); exports.TopicUpdateParameters = require('./topicUpdateParameters'); exports.TopicSharedAccessKeys = require('./topicSharedAccessKeys'); exports.TopicRegenerateKeyRequest = require('./topicRegenerateKeyRequest'); exports.EventType = require('./eventType'); exports.TopicTypeInfo = require('./topicTypeInfo'); +exports.DomainsListResult = require('./domainsListResult'); +exports.DomainTopicsListResult = require('./domainTopicsListResult'); exports.EventSubscriptionsListResult = require('./eventSubscriptionsListResult'); exports.OperationsListResult = require('./operationsListResult'); exports.TopicsListResult = require('./topicsListResult'); exports.EventTypesListResult = require('./eventTypesListResult'); exports.TopicTypesListResult = require('./topicTypesListResult'); exports.discriminators = { + 'InputSchemaMapping' : exports.InputSchemaMapping, + 'InputSchemaMapping.Json' : exports.JsonInputSchemaMapping, 'EventSubscriptionDestination' : exports.EventSubscriptionDestination, + 'AdvancedFilter' : exports.AdvancedFilter, 'DeadLetterDestination' : exports.DeadLetterDestination, + 'AdvancedFilter.NumberIn' : exports.NumberInAdvancedFilter, 'DeadLetterDestination.StorageBlob' : exports.StorageBlobDeadLetterDestination, + 'AdvancedFilter.NumberNotIn' : exports.NumberNotInAdvancedFilter, + 'AdvancedFilter.NumberLessThan' : exports.NumberLessThanAdvancedFilter, + 'AdvancedFilter.NumberGreaterThan' : exports.NumberGreaterThanAdvancedFilter, + 'AdvancedFilter.NumberLessThanOrEquals' : exports.NumberLessThanOrEqualsAdvancedFilter, + 'AdvancedFilter.NumberGreaterThanOrEquals' : exports.NumberGreaterThanOrEqualsAdvancedFilter, + 'AdvancedFilter.BoolEquals' : exports.BoolEqualsAdvancedFilter, + 'AdvancedFilter.StringIn' : exports.StringInAdvancedFilter, + 'AdvancedFilter.StringNotIn' : exports.StringNotInAdvancedFilter, + 'AdvancedFilter.StringBeginsWith' : exports.StringBeginsWithAdvancedFilter, + 'AdvancedFilter.StringEndsWith' : exports.StringEndsWithAdvancedFilter, + 'AdvancedFilter.StringContains' : exports.StringContainsAdvancedFilter, 'EventSubscriptionDestination.WebHook' : exports.WebHookEventSubscriptionDestination, 'EventSubscriptionDestination.EventHub' : exports.EventHubEventSubscriptionDestination, 'EventSubscriptionDestination.StorageQueue' : exports.StorageQueueEventSubscriptionDestination, - 'EventSubscriptionDestination.HybridConnection' : exports.HybridConnectionEventSubscriptionDestination + 'EventSubscriptionDestination.HybridConnection' : exports.HybridConnectionEventSubscriptionDestination, + 'EventSubscriptionDestination.ServiceBusQueue' : exports.ServiceBusQueueEventSubscriptionDestination }; diff --git a/lib/services/eventgridManagement/lib/models/inputSchemaMapping.js b/lib/services/eventgridManagement/lib/models/inputSchemaMapping.js index 72946a3a91..42cbe184c2 100644 --- a/lib/services/eventgridManagement/lib/models/inputSchemaMapping.js +++ b/lib/services/eventgridManagement/lib/models/inputSchemaMapping.js @@ -20,7 +20,7 @@ class InputSchemaMapping { /** * Create a InputSchemaMapping. - * @member {string} inputSchemaMappingType Polymorphic Discriminator + * @property {string} inputSchemaMappingType Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/eventgridManagement/lib/models/jsonField.js b/lib/services/eventgridManagement/lib/models/jsonField.js index b3385d1bb6..a627484f34 100644 --- a/lib/services/eventgridManagement/lib/models/jsonField.js +++ b/lib/services/eventgridManagement/lib/models/jsonField.js @@ -13,14 +13,14 @@ /** * This is used to express the source of an input schema mapping for a single * target field in the Event Grid Event schema. This is currently used in the - * mappings for the 'id','topic' and 'eventTime' properties. This represents a + * mappings for the 'id', 'topic' and 'eventtime' properties. This represents a * field in the input event schema. * */ class JsonField { /** * Create a JsonField. - * @member {string} [sourceField] Name of a field in the input event schema + * @property {string} [sourceField] Name of a field in the input event schema * that's to be used as the source of a mapping. */ constructor() { diff --git a/lib/services/eventgridManagement/lib/models/jsonFieldWithDefault.js b/lib/services/eventgridManagement/lib/models/jsonFieldWithDefault.js index 8a8467ece3..39e0eafd2e 100644 --- a/lib/services/eventgridManagement/lib/models/jsonFieldWithDefault.js +++ b/lib/services/eventgridManagement/lib/models/jsonFieldWithDefault.js @@ -12,18 +12,21 @@ /** * This is used to express the source of an input schema mapping for a single - * target field in the Event Grid Event schema. This is currently used in the - * mappings for the 'subject','eventType' and 'dataVersion' properties. This - * represents a field in the input event schema along with a default value to - * be used, and at least one of these two properties should be provided. + * target field + * in the Event Grid Event schema. This is currently used in the mappings for + * the 'subject', + * 'eventtype' and 'dataversion' properties. This represents a field in the + * input event schema + * along with a default value to be used, and at least one of these two + * properties should be provided. * */ class JsonFieldWithDefault { /** * Create a JsonFieldWithDefault. - * @member {string} [sourceField] Name of a field in the input event schema + * @property {string} [sourceField] Name of a field in the input event schema * that's to be used as the source of a mapping. - * @member {string} [defaultValue] The default value to be used for mapping + * @property {string} [defaultValue] The default value to be used for mapping * when a SourceField is not provided or if there's no property with the * specified name in the published JSON event payload. */ diff --git a/lib/services/eventgridManagement/lib/models/jsonInputSchemaMapping.js b/lib/services/eventgridManagement/lib/models/jsonInputSchemaMapping.js index 3c1edf2044..8f1162ed56 100644 --- a/lib/services/eventgridManagement/lib/models/jsonInputSchemaMapping.js +++ b/lib/services/eventgridManagement/lib/models/jsonInputSchemaMapping.js @@ -22,37 +22,37 @@ const models = require('./index'); class JsonInputSchemaMapping extends models['InputSchemaMapping'] { /** * Create a JsonInputSchemaMapping. - * @member {object} [id] The mapping information for the Id property of the + * @property {object} [id] The mapping information for the Id property of the * Event Grid Event. - * @member {string} [id.sourceField] Name of a field in the input event + * @property {string} [id.sourceField] Name of a field in the input event * schema that's to be used as the source of a mapping. - * @member {object} [topic] The mapping information for the Topic property of - * the Event Grid Event. - * @member {string} [topic.sourceField] Name of a field in the input event + * @property {object} [topic] The mapping information for the Topic property + * of the Event Grid Event. + * @property {string} [topic.sourceField] Name of a field in the input event * schema that's to be used as the source of a mapping. - * @member {object} [eventTime] The mapping information for the EventTime + * @property {object} [eventTime] The mapping information for the EventTime * property of the Event Grid Event. - * @member {string} [eventTime.sourceField] Name of a field in the input + * @property {string} [eventTime.sourceField] Name of a field in the input * event schema that's to be used as the source of a mapping. - * @member {object} [eventType] The mapping information for the EventType + * @property {object} [eventType] The mapping information for the EventType * property of the Event Grid Event. - * @member {string} [eventType.sourceField] Name of a field in the input + * @property {string} [eventType.sourceField] Name of a field in the input * event schema that's to be used as the source of a mapping. - * @member {string} [eventType.defaultValue] The default value to be used for - * mapping when a SourceField is not provided or if there's no property with - * the specified name in the published JSON event payload. - * @member {object} [subject] The mapping information for the Subject + * @property {string} [eventType.defaultValue] The default value to be used + * for mapping when a SourceField is not provided or if there's no property + * with the specified name in the published JSON event payload. + * @property {object} [subject] The mapping information for the Subject * property of the Event Grid Event. - * @member {string} [subject.sourceField] Name of a field in the input event - * schema that's to be used as the source of a mapping. - * @member {string} [subject.defaultValue] The default value to be used for + * @property {string} [subject.sourceField] Name of a field in the input + * event schema that's to be used as the source of a mapping. + * @property {string} [subject.defaultValue] The default value to be used for * mapping when a SourceField is not provided or if there's no property with * the specified name in the published JSON event payload. - * @member {object} [dataVersion] The mapping information for the DataVersion - * property of the Event Grid Event. - * @member {string} [dataVersion.sourceField] Name of a field in the input + * @property {object} [dataVersion] The mapping information for the + * DataVersion property of the Event Grid Event. + * @property {string} [dataVersion.sourceField] Name of a field in the input * event schema that's to be used as the source of a mapping. - * @member {string} [dataVersion.defaultValue] The default value to be used + * @property {string} [dataVersion.defaultValue] The default value to be used * for mapping when a SourceField is not provided or if there's no property * with the specified name in the published JSON event payload. */ diff --git a/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js index 1ee255d67d..1008dd850c 100644 --- a/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberGreaterThan Filter + * NumberGreaterThan Advanced Filter * * @extends models['AdvancedFilter'] */ class NumberGreaterThanAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberGreaterThanAdvancedFilter. - * @member {number} [value] The filter value + * @property {number} [value] The filter value */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js index 0c177ce542..71f0bbb7e2 100644 --- a/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberGreaterThanOrEquals Filter + * NumberGreaterThanOrEquals Advanced Filter * * @extends models['AdvancedFilter'] */ class NumberGreaterThanOrEqualsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberGreaterThanOrEqualsAdvancedFilter. - * @member {number} [value] The filter value + * @property {number} [value] The filter value */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js index dc04d0749b..2d0c24dce3 100644 --- a/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberIn filter + * NumberIn Advanced Filter * * @extends models['AdvancedFilter'] */ class NumberInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberInAdvancedFilter. - * @member {array} [values] The set of filter values + * @property {array} [values] The set of filter values */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js index 6b660906f7..82bca84d51 100644 --- a/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberLessThan Filter + * NumberLessThan Advanced Filter * * @extends models['AdvancedFilter'] */ class NumberLessThanAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberLessThanAdvancedFilter. - * @member {number} [value] The filter value + * @property {number} [value] The filter value */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js index ebd5ba8ab6..8a6ac05698 100644 --- a/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberLessThanOrEquals Filter + * NumberLessThanOrEquals Advanced Filter * * @extends models['AdvancedFilter'] */ class NumberLessThanOrEqualsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberLessThanOrEqualsAdvancedFilter. - * @member {number} [value] The filter value + * @property {number} [value] The filter value */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js index 2390c476e6..5882e6c23e 100644 --- a/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberNotIn Filter + * NumberNotIn Advanced Filter * * @extends models['AdvancedFilter'] */ class NumberNotInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberNotInAdvancedFilter. - * @member {array} [values] The set of filter values + * @property {array} [values] The set of filter values */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/serviceBusQueueEventSubscriptionDestination.js b/lib/services/eventgridManagement/lib/models/serviceBusQueueEventSubscriptionDestination.js new file mode 100644 index 0000000000..fcb86cbf8e --- /dev/null +++ b/lib/services/eventgridManagement/lib/models/serviceBusQueueEventSubscriptionDestination.js @@ -0,0 +1,70 @@ +/* + * 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'); + +/** + * Information about the service bus destination for an event subscription + * + * @extends models['EventSubscriptionDestination'] + */ +class ServiceBusQueueEventSubscriptionDestination extends models['EventSubscriptionDestination'] { + /** + * Create a ServiceBusQueueEventSubscriptionDestination. + * @property {string} [resourceId] The Azure Resource Id that represents the + * endpoint of the Service Bus destination of an event subscription. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceBusQueueEventSubscriptionDestination + * + * @returns {object} metadata of ServiceBusQueueEventSubscriptionDestination + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceBusQueue', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'endpointType', + clientName: 'endpointType' + }, + uberParent: 'EventSubscriptionDestination', + className: 'ServiceBusQueueEventSubscriptionDestination', + modelProperties: { + endpointType: { + required: true, + serializedName: 'endpointType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + resourceId: { + required: false, + serializedName: 'properties.resourceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceBusQueueEventSubscriptionDestination; diff --git a/lib/services/eventgridManagement/lib/models/storageBlobDeadLetterDestination.js b/lib/services/eventgridManagement/lib/models/storageBlobDeadLetterDestination.js index f422c0e049..2b1c601da2 100644 --- a/lib/services/eventgridManagement/lib/models/storageBlobDeadLetterDestination.js +++ b/lib/services/eventgridManagement/lib/models/storageBlobDeadLetterDestination.js @@ -21,8 +21,7 @@ class StorageBlobDeadLetterDestination extends models['DeadLetterDestination'] { /** * Create a StorageBlobDeadLetterDestination. * @property {string} [resourceId] The Azure Resource ID of the storage - * account that is the destination of the deadletter events. For example: - * /subscriptions/{AzureSubscriptionId}/resourceGroups/{ResourceGroupName}/providers/microsoft.Storage/storageAccounts/{StorageAccountName} + * account that is the destination of the deadletter events * @property {string} [blobContainerName] The name of the Storage blob * container that is the destination of the deadletter events */ diff --git a/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js index acf6ec67c6..c8921893c4 100644 --- a/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringBeginsWith Filter + * StringBeginsWith Advanced Filter * * @extends models['AdvancedFilter'] */ class StringBeginsWithAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringBeginsWithAdvancedFilter. - * @member {array} [values] The set of filter values + * @property {array} [values] The set of filter values */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js index ef7b522776..b3b98cfbf6 100644 --- a/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringContains Filter + * StringContains Advanced Filter * * @extends models['AdvancedFilter'] */ class StringContainsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringContainsAdvancedFilter. - * @member {array} [values] The set of filter values + * @property {array} [values] The set of filter values */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js index c9df18365b..47af24d7dd 100644 --- a/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringEndsWith Filter + * StringEndsWith Advanced Filter * * @extends models['AdvancedFilter'] */ class StringEndsWithAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringEndsWithAdvancedFilter. - * @member {array} [values] The set of filter values + * @property {array} [values] The set of filter values */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js index b14610102b..3a2ba6d361 100644 --- a/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringIn Filter + * StringIn Advanced Filter * * @extends models['AdvancedFilter'] */ class StringInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringInAdvancedFilter. - * @member {array} [values] The set of filter values + * @property {array} [values] The set of filter values */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js index 2e7e7fea92..dbb3111f5c 100644 --- a/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringNotIn Filter + * StringNotIn Advanced Filter * * @extends models['AdvancedFilter'] */ class StringNotInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringNotInAdvancedFilter. - * @member {array} [values] The set of filter values + * @property {array} [values] The set of filter values */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/topic.js b/lib/services/eventgridManagement/lib/models/topic.js index 70d34f8117..54f593bd1e 100644 --- a/lib/services/eventgridManagement/lib/models/topic.js +++ b/lib/services/eventgridManagement/lib/models/topic.js @@ -24,6 +24,16 @@ class Topic extends models['TrackedResource'] { * Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', * 'Canceled', 'Failed' * @property {string} [endpoint] Endpoint for the topic. + * @property {string} [inputSchema] This determines the format that Event + * Grid should expect for incoming events published to the topic. Possible + * values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema'. Default value: 'EventGridSchema' . + * @property {object} [inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map + * various properties of a source schema to various required properties of + * the EventGridEvent schema. + * @property {string} [inputSchemaMapping.inputSchemaMappingType] Polymorphic + * Discriminator */ constructor() { super(); @@ -103,6 +113,27 @@ class Topic extends models['TrackedResource'] { type: { name: 'String' } + }, + inputSchema: { + required: false, + serializedName: 'properties.inputSchema', + defaultValue: 'EventGridSchema', + type: { + name: 'String' + } + }, + inputSchemaMapping: { + required: false, + serializedName: 'properties.inputSchemaMapping', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'inputSchemaMappingType', + clientName: 'inputSchemaMappingType' + }, + uberParent: 'InputSchemaMapping', + className: 'InputSchemaMapping' + } } } } diff --git a/lib/services/eventgridManagement/lib/models/topicsListResult.js b/lib/services/eventgridManagement/lib/models/topicsListResult.js index 4c736c9dc9..49b39d9c41 100644 --- a/lib/services/eventgridManagement/lib/models/topicsListResult.js +++ b/lib/services/eventgridManagement/lib/models/topicsListResult.js @@ -16,6 +16,7 @@ class TopicsListResult extends Array { /** * Create a TopicsListResult. + * @property {string} [nextLink] A link for the next page of topics */ constructor() { super(); @@ -49,6 +50,13 @@ class TopicsListResult extends Array { } } } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } } } } diff --git a/lib/services/eventgridManagement/lib/operations/domainTopics.js b/lib/services/eventgridManagement/lib/operations/domainTopics.js index c4668fb24b..573af3f44a 100644 --- a/lib/services/eventgridManagement/lib/operations/domainTopics.js +++ b/lib/services/eventgridManagement/lib/operations/domainTopics.js @@ -24,7 +24,7 @@ const WebResource = msRest.WebResource; * * @param {string} domainName Name of the domain * - * @param {string} topicName Name of the topic + * @param {string} domainTopicName Name of the topic * * @param {object} [options] Optional Parameters. * @@ -44,7 +44,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, domainName, topicName, options, callback) { +function _get(resourceGroupName, domainName, domainTopicName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -65,8 +65,8 @@ function _get(resourceGroupName, domainName, topicName, options, callback) { if (domainName === null || domainName === undefined || typeof domainName.valueOf() !== 'string') { throw new Error('domainName cannot be null or undefined and it must be of type string.'); } - if (topicName === null || topicName === undefined || typeof topicName.valueOf() !== 'string') { - throw new Error('topicName cannot be null or undefined and it must be of type string.'); + if (domainTopicName === null || domainTopicName === undefined || typeof domainTopicName.valueOf() !== 'string') { + throw new Error('domainTopicName cannot be null or undefined and it must be of type string.'); } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); @@ -80,11 +80,11 @@ function _get(resourceGroupName, domainName, topicName, options, callback) { // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}'; requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{domainName}', encodeURIComponent(domainName)); - requestUrl = requestUrl.replace('{topicName}', encodeURIComponent(topicName)); + requestUrl = requestUrl.replace('{domainTopicName}', encodeURIComponent(domainTopicName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); if (queryParameters.length > 0) { @@ -168,6 +168,158 @@ function _get(resourceGroupName, domainName, topicName, options, callback) { }); } + +/** + * @summary Create or update a domain topic + * + * Asynchronously creates or updates a new domain topic with the specified + * parameters. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopic} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, domainName, domainTopicName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DomainTopic']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * @summary Delete a domain topic + * + * Delete existing domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, domainName, domainTopicName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, domainName, domainTopicName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + /** * @summary List domain topics. * @@ -180,6 +332,10 @@ function _get(resourceGroupName, domainName, topicName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -207,6 +363,8 @@ function _listByDomain(resourceGroupName, domainName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -221,6 +379,12 @@ function _listByDomain(resourceGroupName, domainName, options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -236,6 +400,12 @@ function _listByDomain(resourceGroupName, domainName, options, callback) { requestUrl = requestUrl.replace('{domainName}', encodeURIComponent(domainName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -292,54 +462,871 @@ function _listByDomain(resourceGroupName, domainName, options, callback) { } return callback(error); } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['DomainTopicsListResult']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DomainTopicsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Create or update a domain topic + * + * Asynchronously creates or updates a new domain topic with the specified + * parameters. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopic} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (domainName === null || domainName === undefined || typeof domainName.valueOf() !== 'string') { + throw new Error('domainName cannot be null or undefined and it must be of type string.'); + } + if (domainTopicName === null || domainTopicName === undefined || typeof domainTopicName.valueOf() !== 'string') { + throw new Error('domainTopicName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{domainName}', encodeURIComponent(domainName)); + requestUrl = requestUrl.replace('{domainTopicName}', encodeURIComponent(domainTopicName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DomainTopic']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary Delete a domain topic + * + * Delete existing domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, domainName, domainTopicName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (domainName === null || domainName === undefined || typeof domainName.valueOf() !== 'string') { + throw new Error('domainName cannot be null or undefined and it must be of type string.'); + } + if (domainTopicName === null || domainTopicName === undefined || typeof domainTopicName.valueOf() !== 'string') { + throw new Error('domainTopicName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{domainTopicName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{domainName}', encodeURIComponent(domainName)); + requestUrl = requestUrl.replace('{domainTopicName}', encodeURIComponent(domainTopicName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopicsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByDomainNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DomainTopicsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a DomainTopics. */ +class DomainTopics { + /** + * Create a DomainTopics. + * @param {EventGridManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._listByDomain = _listByDomain; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._listByDomainNext = _listByDomainNext; + } + + /** + * @summary Get a domain topic + * + * Get properties of a domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, domainName, domainTopicName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get a domain topic + * + * Get properties of a domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DomainTopic} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopic} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, domainName, domainTopicName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, domainName, domainTopicName, options, optionalCallback); + } + } + + /** + * @summary Create or update a domain topic + * + * Asynchronously creates or updates a new domain topic with the specified + * parameters. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, domainName, domainTopicName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Create or update a domain topic + * + * Asynchronously creates or updates a new domain topic with the specified + * parameters. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DomainTopic} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopic} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, domainName, domainTopicName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, domainName, domainTopicName, options, optionalCallback); + } + } + + /** + * @summary Delete a domain topic + * + * Delete existing domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, domainName, domainTopicName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Delete a domain topic + * + * Delete existing domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, domainName, domainTopicName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, domainName, domainTopicName, options, optionalCallback); } + } - return callback(null, result, httpRequest, response); - }); -} + /** + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Domain name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByDomainWithHttpOperationResponse(resourceGroupName, domainName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByDomain(resourceGroupName, domainName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } -/** Class representing a DomainTopics. */ -class DomainTopics { /** - * Create a DomainTopics. - * @param {EventGridManagementClient} client Reference to the service client. + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Domain name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DomainTopicsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopicsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. */ - constructor(client) { - this.client = client; - this._get = _get; - this._listByDomain = _listByDomain; + listByDomain(resourceGroupName, domainName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByDomain(resourceGroupName, domainName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByDomain(resourceGroupName, domainName, options, optionalCallback); + } } /** - * @summary Get a domain topic + * @summary Create or update a domain topic * - * Get properties of a domain topic + * Asynchronously creates or updates a new domain topic with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} domainName Name of the domain * - * @param {string} topicName Name of the topic + * @param {string} domainTopicName Name of the domain topic * * @param {object} [options] Optional Parameters. * @@ -352,11 +1339,11 @@ class DomainTopics { * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, domainName, topicName, options) { + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, domainName, domainTopicName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, domainName, topicName, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -367,16 +1354,17 @@ class DomainTopics { } /** - * @summary Get a domain topic + * @summary Create or update a domain topic * - * Get properties of a domain topic + * Asynchronously creates or updates a new domain topic with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * * @param {string} domainName Name of the domain * - * @param {string} topicName Name of the topic + * @param {string} domainTopicName Name of the domain topic * * @param {object} [options] Optional Parameters. * @@ -405,7 +1393,7 @@ class DomainTopics { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, domainName, topicName, options, optionalCallback) { + beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -414,26 +1402,28 @@ class DomainTopics { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, domainName, topicName, options, (err, result, request, response) => { + self._beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, domainName, topicName, options, optionalCallback); + return self._beginCreateOrUpdate(resourceGroupName, domainName, domainTopicName, options, optionalCallback); } } /** - * @summary List domain topics. + * @summary Delete a domain topic * - * List all the topics in a domain. + * Delete existing domain topic * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} domainName Domain name. + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic * * @param {object} [options] Optional Parameters. * @@ -442,15 +1432,15 @@ class DomainTopics { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByDomainWithHttpOperationResponse(resourceGroupName, domainName, options) { + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, domainName, domainTopicName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByDomain(resourceGroupName, domainName, options, (err, result, request, response) => { + self._beginDeleteMethod(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -461,14 +1451,103 @@ class DomainTopics { } /** - * @summary List domain topics. + * @summary Delete a domain topic * - * List all the topics in a domain. + * Delete existing domain topic * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} domainName Domain name. + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, domainName, domainTopicName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, domainName, domainTopicName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, domainName, domainTopicName, options, optionalCallback); + } + } + + /** + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByDomainNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByDomainNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -498,7 +1577,7 @@ class DomainTopics { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByDomain(resourceGroupName, domainName, options, optionalCallback) { + listByDomainNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -507,14 +1586,14 @@ class DomainTopics { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByDomain(resourceGroupName, domainName, options, (err, result, request, response) => { + self._listByDomainNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByDomain(resourceGroupName, domainName, options, optionalCallback); + return self._listByDomainNext(nextPageLink, options, optionalCallback); } } diff --git a/lib/services/eventgridManagement/lib/operations/domains.js b/lib/services/eventgridManagement/lib/operations/domains.js index f63e7a4a2b..0de6a4326e 100644 --- a/lib/services/eventgridManagement/lib/operations/domains.js +++ b/lib/services/eventgridManagement/lib/operations/domains.js @@ -164,9 +164,10 @@ function _get(resourceGroupName, domainName, options, callback) { /** - * @summary Create a domain + * @summary Create or update a domain * - * Asynchronously creates a new domain with the specified parameters. + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. @@ -418,6 +419,10 @@ function _update(resourceGroupName, domainName, domainUpdateParameters, options, * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -444,6 +449,8 @@ function _listBySubscription(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -452,6 +459,12 @@ function _listBySubscription(options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -465,6 +478,12 @@ function _listBySubscription(options, callback) { requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -556,6 +575,10 @@ function _listBySubscription(options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -582,6 +605,8 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -593,6 +618,12 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -607,6 +638,12 @@ function _listByResourceGroup(resourceGroupName, options, callback) { requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1009,9 +1046,10 @@ function _regenerateKey(resourceGroupName, domainName, regenerateKeyRequest, opt } /** - * @summary Create a domain + * @summary Create or update a domain * - * Asynchronously creates a new domain with the specified parameters. + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. @@ -1489,6 +1527,264 @@ function _beginUpdate(resourceGroupName, domainName, domainUpdateParameters, opt }); } +/** + * @summary List domains under an Azure subscription + * + * List all the domains under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DomainsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List domains under a resource group + * + * List all the domains under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DomainsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** Class representing a Domains. */ class Domains { /** @@ -1508,6 +1804,8 @@ class Domains { this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._beginUpdate = _beginUpdate; + this._listBySubscriptionNext = _listBySubscriptionNext; + this._listByResourceGroupNext = _listByResourceGroupNext; } /** @@ -1603,9 +1901,10 @@ class Domains { } /** - * @summary Create a domain + * @summary Create or update a domain * - * Asynchronously creates a new domain with the specified parameters. + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. @@ -1655,9 +1954,10 @@ class Domains { } /** - * @summary Create a domain + * @summary Create or update a domain * - * Asynchronously creates a new domain with the specified parameters. + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. @@ -1926,6 +2226,10 @@ class Domains { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1956,6 +2260,10 @@ class Domains { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2011,6 +2319,10 @@ class Domains { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2044,6 +2356,10 @@ class Domains { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2286,9 +2602,10 @@ class Domains { } /** - * @summary Create a domain + * @summary Create or update a domain * - * Asynchronously creates a new domain with the specified parameters. + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. @@ -2338,9 +2655,10 @@ class Domains { } /** - * @summary Create a domain + * @summary Create or update a domain * - * Asynchronously creates a new domain with the specified parameters. + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. @@ -2602,6 +2920,182 @@ class Domains { } } + /** + * @summary List domains under an Azure subscription + * + * List all the domains under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List domains under an Azure subscription + * + * List all the domains under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DomainsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary List domains under a resource group + * + * List all the domains under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List domains under a resource group + * + * List all the domains under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DomainsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = Domains; diff --git a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js index b1da019e90..fa3ce02f40 100644 --- a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js +++ b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js @@ -213,17 +213,27 @@ function _get(scope, eventSubscriptionName, options, callback) { * Wildcard characters are not supported in this path. * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the * filter * should be compared in a case sensitive manner. * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts * and time to live for events. @@ -430,18 +440,27 @@ function _deleteMethod(scope, eventSubscriptionName, options, callback) { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery * attempts and time to live for events. @@ -693,6 +712,13 @@ function _getFullUrl(scope, eventSubscriptionName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -720,6 +746,9 @@ function _listGlobalBySubscription(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -728,6 +757,15 @@ function _listGlobalBySubscription(options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -741,6 +779,15 @@ function _listGlobalBySubscription(options, callback) { requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -832,6 +879,13 @@ function _listGlobalBySubscription(options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -859,6 +913,9 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -870,6 +927,15 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -884,6 +950,15 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) requestUrl = requestUrl.replace('{topicTypeName}', encodeURIComponent(topicTypeName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -977,6 +1052,13 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1004,6 +1086,9 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1015,6 +1100,15 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1029,6 +1123,15 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1124,6 +1227,13 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1151,6 +1261,9 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1165,6 +1278,15 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1180,6 +1302,15 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName requestUrl = requestUrl.replace('{topicTypeName}', encodeURIComponent(topicTypeName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1271,6 +1402,13 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1298,6 +1436,9 @@ function _listRegionalBySubscription(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1309,6 +1450,15 @@ function _listRegionalBySubscription(location, options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1323,6 +1473,15 @@ function _listRegionalBySubscription(location, options, callback) { requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1418,6 +1577,13 @@ function _listRegionalBySubscription(location, options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1445,6 +1611,9 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1459,6 +1628,15 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1474,6 +1652,15 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call requestUrl = requestUrl.replace('{location}', encodeURIComponent(location)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1568,6 +1755,13 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1595,6 +1789,9 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1609,6 +1806,15 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1624,6 +1830,15 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option requestUrl = requestUrl.replace('{topicTypeName}', encodeURIComponent(topicTypeName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1721,6 +1936,13 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1748,6 +1970,9 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1765,6 +1990,15 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1781,6 +2015,15 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t requestUrl = requestUrl.replace('{topicTypeName}', encodeURIComponent(topicTypeName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1878,6 +2121,13 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -1905,6 +2155,9 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1925,6 +2178,15 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -1942,6 +2204,199 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, requestUrl = requestUrl.replace('{resourceName}', encodeURIComponent(resourceName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all event subscriptions for a specific domain topic + * + * List all event subscriptions that have been created for a specific domain + * topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the top level domain + * + * @param {string} topicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByDomainTopic(resourceGroupName, domainName, topicName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; + let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (domainName === null || domainName === undefined || typeof domainName.valueOf() !== 'string') { + throw new Error('domainName cannot be null or undefined and it must be of type string.'); + } + if (topicName === null || topicName === undefined || typeof topicName.valueOf() !== 'string') { + throw new Error('topicName cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } + if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { + throw new Error('lABEL must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/providers/Microsoft.EventGrid/eventSubscriptions'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{domainName}', encodeURIComponent(domainName)); + requestUrl = requestUrl.replace('{topicName}', encodeURIComponent(topicName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } + if (lABEL !== null && lABEL !== undefined) { + queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -2069,17 +2524,27 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, * Wildcard characters are not supported in this path. * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the * filter * should be compared in a case sensitive manner. * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for * events. This can be used to configure maximum number of delivery attempts * and time to live for events. @@ -2426,18 +2891,27 @@ function _beginDeleteMethod(scope, eventSubscriptionName, options, callback) { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies * if the SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * * @param {array} [eventSubscriptionUpdateParameters.labels] List of user * defined labels. * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry * policy for events. This can be used to configure maximum number of delivery * attempts and time to live for events. @@ -2608,15 +3082,1330 @@ function _beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParam }); } -/** Class representing a EventSubscriptions. */ -class EventSubscriptions { - /** - * Create a EventSubscriptions. - * @param {EventGridManagementClient} client Reference to the service client. - */ - constructor(client) { - this.client = client; - this._get = _get; +/** + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription + * + * List all aggregated global event subscriptions under a specific Azure + * subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGlobalBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all global event subscriptions for a topic type + * + * List all global event subscriptions under an Azure subscription for a topic + * type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGlobalBySubscriptionForTopicTypeNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all global event subscriptions under an Azure subscription and + * resource group + * + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGlobalByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all global event subscriptions under a resource group for a + * topic type + * + * List all global event subscriptions under a resource group for a specific + * topic type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listGlobalByResourceGroupForTopicTypeNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all regional event subscriptions under an Azure subscription + * + * List all event subscriptions from the given location under a specific Azure + * subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listRegionalBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listRegionalByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listRegionalBySubscriptionForTopicTypeNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listRegionalByResourceGroupForTopicTypeNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all event subscriptions for a specific topic + * + * List all event subscriptions that have been created for a specific topic + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List all event subscriptions for a specific domain topic + * + * List all event subscriptions that have been created for a specific domain + * topic + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByDomainTopicNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['EventSubscriptionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a EventSubscriptions. */ +class EventSubscriptions { + /** + * Create a EventSubscriptions. + * @param {EventGridManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; this._update = _update; @@ -2630,45 +4419,1386 @@ class EventSubscriptions { this._listRegionalBySubscriptionForTopicType = _listRegionalBySubscriptionForTopicType; this._listRegionalByResourceGroupForTopicType = _listRegionalByResourceGroupForTopicType; this._listByResource = _listByResource; + this._listByDomainTopic = _listByDomainTopic; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._beginUpdate = _beginUpdate; + this._listGlobalBySubscriptionNext = _listGlobalBySubscriptionNext; + this._listGlobalBySubscriptionForTopicTypeNext = _listGlobalBySubscriptionForTopicTypeNext; + this._listGlobalByResourceGroupNext = _listGlobalByResourceGroupNext; + this._listGlobalByResourceGroupForTopicTypeNext = _listGlobalByResourceGroupForTopicTypeNext; + this._listRegionalBySubscriptionNext = _listRegionalBySubscriptionNext; + this._listRegionalByResourceGroupNext = _listRegionalByResourceGroupNext; + this._listRegionalBySubscriptionForTopicTypeNext = _listRegionalBySubscriptionForTopicTypeNext; + this._listRegionalByResourceGroupForTopicTypeNext = _listRegionalByResourceGroupForTopicTypeNext; + this._listByResourceNext = _listByResourceNext; + this._listByDomainTopicNext = _listByDomainTopicNext; + } + + /** + * @summary Get an event subscription + * + * Get properties of an event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(scope, eventSubscriptionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(scope, eventSubscriptionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get an event subscription + * + * Get properties of an event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(scope, eventSubscriptionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(scope, eventSubscriptionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(scope, eventSubscriptionName, options, optionalCallback); + } + } + + /** + * @summary Create or update an event subscription + * + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. + * + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. + * + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information + * + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. + * + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. + * + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionInfo, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Create or update an event subscription + * + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. + * + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. + * + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information + * + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. + * + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. + * + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback); + } + } + + /** + * @summary Delete an event subscription + * + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(scope, eventSubscriptionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Delete an event subscription + * + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(scope, eventSubscriptionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(scope, eventSubscriptionName, options, optionalCallback); + } + } + + /** + * @summary Update an event subscription + * + * Asynchronously updates an existing event subscription. + * + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Update an event subscription + * + * Asynchronously updates an existing event subscription. + * + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscription} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback); + } + } + + /** + * @summary Get full URL of an event subscription + * + * Get the full endpoint URL for an event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getFullUrlWithHttpOperationResponse(scope, eventSubscriptionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getFullUrl(scope, eventSubscriptionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get full URL of an event subscription + * + * Get the full endpoint URL for an event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscriptionFullUrl} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionFullUrl} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getFullUrl(scope, eventSubscriptionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getFullUrl(scope, eventSubscriptionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getFullUrl(scope, eventSubscriptionName, options, optionalCallback); + } + } + + /** + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription + * + * List all aggregated global event subscriptions under a specific Azure + * subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGlobalBySubscriptionWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGlobalBySubscription(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription + * + * List all aggregated global event subscriptions under a specific Azure + * subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalBySubscription(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGlobalBySubscription(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGlobalBySubscription(options, optionalCallback); + } + } + + /** + * @summary List all global event subscriptions for a topic type + * + * List all global event subscriptions under an Azure subscription for a topic + * type. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGlobalBySubscriptionForTopicTypeWithHttpOperationResponse(topicTypeName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGlobalBySubscriptionForTopicType(topicTypeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all global event subscriptions for a topic type + * + * List all global event subscriptions under an Azure subscription for a topic + * type. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalBySubscriptionForTopicType(topicTypeName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGlobalBySubscriptionForTopicType(topicTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGlobalBySubscriptionForTopicType(topicTypeName, options, optionalCallback); + } + } + + /** + * @summary List all global event subscriptions under an Azure subscription and + * resource group + * + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGlobalByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGlobalByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all global event subscriptions under an Azure subscription and + * resource group + * + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGlobalByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGlobalByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * @summary List all global event subscriptions under a resource group for a + * topic type + * + * List all global event subscriptions under a resource group for a specific + * topic type. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listGlobalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName, topicTypeName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all global event subscriptions under a resource group for a + * topic type + * + * List all global event subscriptions under a resource group for a specific + * topic type. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, optionalCallback); + } + } + + /** + * @summary List all regional event subscriptions under an Azure subscription + * + * List all event subscriptions from the given location under a specific Azure + * subscription + * + * @param {string} location Name of the location + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listRegionalBySubscriptionWithHttpOperationResponse(location, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listRegionalBySubscription(location, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); } /** - * @summary Get an event subscription + * @summary List all regional event subscriptions under an Azure subscription * - * Get properties of an event subscription + * List all event subscriptions from the given location under a specific Azure + * subscription * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} location Name of the location * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalBySubscription(location, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listRegionalBySubscription(location, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listRegionalBySubscription(location, options, optionalCallback); + } + } + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} location Name of the location * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(scope, eventSubscriptionName, options) { + listRegionalByResourceGroupWithHttpOperationResponse(resourceGroupName, location, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._listRegionalByResourceGroup(resourceGroupName, location, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2679,25 +5809,26 @@ class EventSubscriptions { } /** - * @summary Get an event subscription + * @summary List all regional event subscriptions under an Azure subscription + * and resource group * - * Get properties of an event subscription + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} location Name of the location * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2708,7 +5839,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2717,13 +5848,14 @@ class EventSubscriptions { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * See {@link EventSubscriptionsListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(scope, eventSubscriptionName, options, optionalCallback) { + listRegionalByResourceGroup(resourceGroupName, location, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2732,106 +5864,163 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._listRegionalByResourceGroup(resourceGroupName, location, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(scope, eventSubscriptionName, options, optionalCallback); + return self._listRegionalByResourceGroup(resourceGroupName, location, options, optionalCallback); } } /** - * @summary Create or update an event subscription + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} location Name of the location * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. + * @param {string} topicTypeName Name of the topic type * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information + * @param {object} [options] Optional Parameters. * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. + * @param {string} [options.filter] Filter the results using OData syntax. * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator + * @param {number} [options.top] The number of results to return. * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. + * @returns {Promise} A promise is returned * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listRegionalBySubscriptionForTopicTypeWithHttpOperationResponse(location, topicTypeName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listRegionalBySubscriptionForTopicType(location, topicTypeName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. + * + * @param {string} location Name of the location + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalBySubscriptionForTopicType(location, topicTypeName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listRegionalBySubscriptionForTopicType(location, topicTypeName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listRegionalBySubscriptionForTopicType(location, topicTypeName, options, optionalCallback); + } + } + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. + * @param {string} location Name of the location * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. + * @param {string} topicTypeName Name of the topic type * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {object} [options] Optional Parameters. * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. + * @param {string} [options.filter] Filter the results using OData syntax. * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {number} [options.top] The number of results to return. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - createOrUpdateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionInfo, options) { + listRegionalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName, location, topicTypeName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { + self._listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -2842,79 +6031,27 @@ class EventSubscriptions { } /** - * @summary Create or update an event subscription - * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. - * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. - * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information - * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. - * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator - * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. - * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. + * @param {string} location Name of the location * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. + * @param {string} topicTypeName Name of the topic type * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {object} [options] Optional Parameters. * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. + * @param {string} [options.filter] Filter the results using OData syntax. * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {number} [options.top] The number of results to return. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -2926,7 +6063,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -2935,13 +6072,14 @@ class EventSubscriptions { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * See {@link EventSubscriptionsListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback) { + listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -2950,51 +6088,54 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { + self._listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._createOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback); + return self._listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, optionalCallback); } } /** - * @summary Delete an event subscription + * @summary List all event subscriptions for a specific topic * - * Delete an existing event subscription + * List all event subscriptions that have been created for a specific topic * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} providerNamespace Namespace of the provider of the topic + * + * @param {string} resourceTypeName Name of the resource type + * + * @param {string} resourceName Name of the resource * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - deleteMethodWithHttpOperationResponse(scope, eventSubscriptionName, options) { + listByResourceWithHttpOperationResponse(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._deleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3005,25 +6146,28 @@ class EventSubscriptions { } /** - * @summary Delete an event subscription + * @summary List all event subscriptions for a specific topic * - * Delete an existing event subscription + * List all event subscriptions that have been created for a specific topic * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} providerNamespace Namespace of the provider of the topic + * + * @param {string} resourceTypeName Name of the resource type + * + * @param {string} resourceName Name of the resource * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -3034,7 +6178,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3042,13 +6186,15 @@ class EventSubscriptions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(scope, eventSubscriptionName, options, optionalCallback) { + listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3057,109 +6203,53 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._deleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._deleteMethod(scope, eventSubscriptionName, options, optionalCallback); + return self._listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, optionalCallback); } } /** - * @summary Update an event subscription - * - * Asynchronously updates an existing event subscription. - * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated - * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information - * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. - * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType - * Polymorphic Discriminator - * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. - * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. + * @summary List all event subscriptions for a specific domain topic * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * List all event subscriptions that have been created for a specific domain + * topic * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. - * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. + * @param {string} domainName Name of the top level domain * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. + * @param {string} topicName Name of the domain topic * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {object} [options] Optional Parameters. * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. + * @param {string} [options.filter] Filter the results using OData syntax. * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {number} [options.top] The number of results to return. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - updateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options) { + listByDomainTopicWithHttpOperationResponse(resourceGroupName, domainName, topicName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { + self._listByDomainTopic(resourceGroupName, domainName, topicName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3170,82 +6260,26 @@ class EventSubscriptions { } /** - * @summary Update an event subscription - * - * Asynchronously updates an existing event subscription. - * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated - * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information - * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. - * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType - * Polymorphic Discriminator + * @summary List all event subscriptions for a specific domain topic * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. - * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. - * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. + * List all event subscriptions that have been created for a specific domain + * topic * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. + * @param {string} domainName Name of the top level domain * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. + * @param {string} topicName Name of the domain topic * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {object} [options] Optional Parameters. * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. + * @param {string} [options.filter] Filter the results using OData syntax. * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {number} [options.top] The number of results to return. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -3257,7 +6291,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3266,13 +6300,14 @@ class EventSubscriptions { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * See {@link EventSubscriptionsListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback) { + listByDomainTopic(resourceGroupName, domainName, topicName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3281,24 +6316,26 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { + self._listByDomainTopic(resourceGroupName, domainName, topicName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._update(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback); + return self._listByDomainTopic(resourceGroupName, domainName, topicName, options, optionalCallback); } } /** - * @summary Get full URL of an event subscription + * @summary Create or update an event subscription * - * Get the full endpoint URL for an event subscription + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a * resource provider namespace, or an EventGrid topic. For example, use * '/subscriptions/{subscriptionId}/' for a subscription, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a @@ -3308,7 +6345,70 @@ class EventSubscriptions { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. + * + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information + * + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. + * + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. + * + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * @@ -3317,15 +6417,15 @@ class EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getFullUrlWithHttpOperationResponse(scope, eventSubscriptionName, options) { + beginCreateOrUpdateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionInfo, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getFullUrl(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3336,12 +6436,14 @@ class EventSubscriptions { } /** - * @summary Get full URL of an event subscription + * @summary Create or update an event subscription * - * Get the full endpoint URL for an event subscription + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a * resource provider namespace, or an EventGrid topic. For example, use * '/subscriptions/{subscriptionId}/' for a subscription, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a @@ -3351,7 +6453,70 @@ class EventSubscriptions { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. + * + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information + * + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. + * + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. + * + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * @@ -3365,7 +6530,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscriptionFullUrl} - The deserialized result object. + * @resolve {EventSubscription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3374,14 +6539,13 @@ class EventSubscriptions { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionFullUrl} for more - * information. + * See {@link EventSubscription} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getFullUrl(scope, eventSubscriptionName, options, optionalCallback) { + beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3390,23 +6554,34 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getFullUrl(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getFullUrl(scope, eventSubscriptionName, options, optionalCallback); + return self._beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback); } } /** - * @summary Get an aggregated list of all global event subscriptions under an - * Azure subscription + * @summary Delete an event subscription * - * List all aggregated global event subscriptions under a specific Azure - * subscription + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription * * @param {object} [options] Optional Parameters. * @@ -3415,15 +6590,15 @@ class EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listGlobalBySubscriptionWithHttpOperationResponse(options) { + beginDeleteMethodWithHttpOperationResponse(scope, eventSubscriptionName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGlobalBySubscription(options, (err, result, request, response) => { + self._beginDeleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3434,11 +6609,22 @@ class EventSubscriptions { } /** - * @summary Get an aggregated list of all global event subscriptions under an - * Azure subscription + * @summary Delete an event subscription * - * List all aggregated global event subscriptions under a specific Azure - * subscription + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription * * @param {object} [options] Optional Parameters. * @@ -3452,7 +6638,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3460,15 +6646,13 @@ class EventSubscriptions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalBySubscription(options, optionalCallback) { + beginDeleteMethod(scope, eventSubscriptionName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3477,24 +6661,101 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGlobalBySubscription(options, (err, result, request, response) => { + self._beginDeleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGlobalBySubscription(options, optionalCallback); + return self._beginDeleteMethod(scope, eventSubscriptionName, options, optionalCallback); } } /** - * @summary List all global event subscriptions for a topic type + * @summary Update an event subscription * - * List all global event subscriptions under an Azure subscription for a topic - * type. + * Asynchronously updates an existing event subscription. * - * @param {string} topicTypeName Name of the topic type + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * @@ -3503,15 +6764,15 @@ class EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listGlobalBySubscriptionForTopicTypeWithHttpOperationResponse(topicTypeName, options) { + beginUpdateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGlobalBySubscriptionForTopicType(topicTypeName, options, (err, result, request, response) => { + self._beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3522,12 +6783,89 @@ class EventSubscriptions { } /** - * @summary List all global event subscriptions for a topic type + * @summary Update an event subscription * - * List all global event subscriptions under an Azure subscription for a topic - * type. + * Asynchronously updates an existing event subscription. * - * @param {string} topicTypeName Name of the topic type + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator * * @param {object} [options] Optional Parameters. * @@ -3541,7 +6879,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {EventSubscription} - The deserialized result object. * * @reject {Error} - The error object. * @@ -3550,14 +6888,13 @@ class EventSubscriptions { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * See {@link EventSubscription} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalBySubscriptionForTopicType(topicTypeName, options, optionalCallback) { + beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3566,26 +6903,26 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGlobalBySubscriptionForTopicType(topicTypeName, options, (err, result, request, response) => { + self._beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGlobalBySubscriptionForTopicType(topicTypeName, options, optionalCallback); + return self._beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback); } } /** - * @summary List all global event subscriptions under an Azure subscription and - * resource group + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription * - * List all global event subscriptions under a specific Azure subscription and - * resource group + * List all aggregated global event subscriptions under a specific Azure + * subscription * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3598,11 +6935,11 @@ class EventSubscriptions { * * @reject {Error} - The error object. */ - listGlobalByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + listGlobalBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGlobalByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listGlobalBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3613,14 +6950,14 @@ class EventSubscriptions { } /** - * @summary List all global event subscriptions under an Azure subscription and - * resource group + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription * - * List all global event subscriptions under a specific Azure subscription and - * resource group + * List all aggregated global event subscriptions under a specific Azure + * subscription * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3650,7 +6987,7 @@ class EventSubscriptions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalByResourceGroup(resourceGroupName, options, optionalCallback) { + listGlobalBySubscriptionNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3659,28 +6996,25 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGlobalByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + self._listGlobalBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGlobalByResourceGroup(resourceGroupName, options, optionalCallback); + return self._listGlobalBySubscriptionNext(nextPageLink, options, optionalCallback); } } /** - * @summary List all global event subscriptions under a resource group for a - * topic type - * - * List all global event subscriptions under a resource group for a specific - * topic type. + * @summary List all global event subscriptions for a topic type * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * List all global event subscriptions under an Azure subscription for a topic + * type. * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3693,11 +7027,11 @@ class EventSubscriptions { * * @reject {Error} - The error object. */ - listGlobalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName, topicTypeName, options) { + listGlobalBySubscriptionForTopicTypeNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, (err, result, request, response) => { + self._listGlobalBySubscriptionForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3708,16 +7042,13 @@ class EventSubscriptions { } /** - * @summary List all global event subscriptions under a resource group for a - * topic type - * - * List all global event subscriptions under a resource group for a specific - * topic type. + * @summary List all global event subscriptions for a topic type * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * List all global event subscriptions under an Azure subscription for a topic + * type. * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3747,7 +7078,7 @@ class EventSubscriptions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, optionalCallback) { + listGlobalBySubscriptionForTopicTypeNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3756,24 +7087,26 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, (err, result, request, response) => { + self._listGlobalBySubscriptionForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName, options, optionalCallback); + return self._listGlobalBySubscriptionForTopicTypeNext(nextPageLink, options, optionalCallback); } } /** - * @summary List all regional event subscriptions under an Azure subscription - * - * List all event subscriptions from the given location under a specific Azure - * subscription + * @summary List all global event subscriptions under an Azure subscription and + * resource group * - * @param {string} location Name of the location + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3786,11 +7119,11 @@ class EventSubscriptions { * * @reject {Error} - The error object. */ - listRegionalBySubscriptionWithHttpOperationResponse(location, options) { + listGlobalByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listRegionalBySubscription(location, options, (err, result, request, response) => { + self._listGlobalByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3801,12 +7134,14 @@ class EventSubscriptions { } /** - * @summary List all regional event subscriptions under an Azure subscription + * @summary List all global event subscriptions under an Azure subscription and + * resource group * - * List all event subscriptions from the given location under a specific Azure - * subscription + * List all global event subscriptions under a specific Azure subscription and + * resource group * - * @param {string} location Name of the location + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3836,7 +7171,7 @@ class EventSubscriptions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalBySubscription(location, options, optionalCallback) { + listGlobalByResourceGroupNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3845,28 +7180,26 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listRegionalBySubscription(location, options, (err, result, request, response) => { + self._listGlobalByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listRegionalBySubscription(location, options, optionalCallback); + return self._listGlobalByResourceGroupNext(nextPageLink, options, optionalCallback); } } /** - * @summary List all regional event subscriptions under an Azure subscription - * and resource group - * - * List all event subscriptions from the given location under a specific Azure - * subscription and resource group + * @summary List all global event subscriptions under a resource group for a + * topic type * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * List all global event subscriptions under a resource group for a specific + * topic type. * - * @param {string} location Name of the location + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3879,11 +7212,11 @@ class EventSubscriptions { * * @reject {Error} - The error object. */ - listRegionalByResourceGroupWithHttpOperationResponse(resourceGroupName, location, options) { + listGlobalByResourceGroupForTopicTypeNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listRegionalByResourceGroup(resourceGroupName, location, options, (err, result, request, response) => { + self._listGlobalByResourceGroupForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3894,16 +7227,14 @@ class EventSubscriptions { } /** - * @summary List all regional event subscriptions under an Azure subscription - * and resource group - * - * List all event subscriptions from the given location under a specific Azure - * subscription and resource group + * @summary List all global event subscriptions under a resource group for a + * topic type * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * List all global event subscriptions under a resource group for a specific + * topic type. * - * @param {string} location Name of the location + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3933,7 +7264,7 @@ class EventSubscriptions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalByResourceGroup(resourceGroupName, location, options, optionalCallback) { + listGlobalByResourceGroupForTopicTypeNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -3942,27 +7273,25 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listRegionalByResourceGroup(resourceGroupName, location, options, (err, result, request, response) => { + self._listGlobalByResourceGroupForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listRegionalByResourceGroup(resourceGroupName, location, options, optionalCallback); + return self._listGlobalByResourceGroupForTopicTypeNext(nextPageLink, options, optionalCallback); } } /** * @summary List all regional event subscriptions under an Azure subscription - * for a topic type * * List all event subscriptions from the given location under a specific Azure - * subscription and topic type. - * - * @param {string} location Name of the location + * subscription * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -3975,11 +7304,11 @@ class EventSubscriptions { * * @reject {Error} - The error object. */ - listRegionalBySubscriptionForTopicTypeWithHttpOperationResponse(location, topicTypeName, options) { + listRegionalBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listRegionalBySubscriptionForTopicType(location, topicTypeName, options, (err, result, request, response) => { + self._listRegionalBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -3991,14 +7320,12 @@ class EventSubscriptions { /** * @summary List all regional event subscriptions under an Azure subscription - * for a topic type * * List all event subscriptions from the given location under a specific Azure - * subscription and topic type. - * - * @param {string} location Name of the location + * subscription * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4028,7 +7355,7 @@ class EventSubscriptions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalBySubscriptionForTopicType(location, topicTypeName, options, optionalCallback) { + listRegionalBySubscriptionNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4037,30 +7364,26 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listRegionalBySubscriptionForTopicType(location, topicTypeName, options, (err, result, request, response) => { + self._listRegionalBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listRegionalBySubscriptionForTopicType(location, topicTypeName, options, optionalCallback); + return self._listRegionalBySubscriptionNext(nextPageLink, options, optionalCallback); } } /** * @summary List all regional event subscriptions under an Azure subscription - * and resource group for a topic type + * and resource group * * List all event subscriptions from the given location under a specific Azure - * subscription and resource group and topic type - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} location Name of the location + * subscription and resource group * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4073,11 +7396,11 @@ class EventSubscriptions { * * @reject {Error} - The error object. */ - listRegionalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName, location, topicTypeName, options) { + listRegionalByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, (err, result, request, response) => { + self._listRegionalByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4089,17 +7412,13 @@ class EventSubscriptions { /** * @summary List all regional event subscriptions under an Azure subscription - * and resource group for a topic type + * and resource group * * List all event subscriptions from the given location under a specific Azure - * subscription and resource group and topic type - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} location Name of the location + * subscription and resource group * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4129,7 +7448,7 @@ class EventSubscriptions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, optionalCallback) { + listRegionalByResourceGroupNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4138,30 +7457,26 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, (err, result, request, response) => { + self._listRegionalByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listRegionalByResourceGroupForTopicType(resourceGroupName, location, topicTypeName, options, optionalCallback); + return self._listRegionalByResourceGroupNext(nextPageLink, options, optionalCallback); } } /** - * @summary List all event subscriptions for a specific topic - * - * List all event subscriptions that have been created for a specific topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} providerNamespace Namespace of the provider of the topic + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type * - * @param {string} resourceTypeName Name of the resource type + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. * - * @param {string} resourceName Name of the resource + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4174,11 +7489,11 @@ class EventSubscriptions { * * @reject {Error} - The error object. */ - listByResourceWithHttpOperationResponse(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options) { + listRegionalBySubscriptionForTopicTypeNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, (err, result, request, response) => { + self._listRegionalBySubscriptionForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4189,18 +7504,14 @@ class EventSubscriptions { } /** - * @summary List all event subscriptions for a specific topic - * - * List all event subscriptions that have been created for a specific topic - * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. - * - * @param {string} providerNamespace Namespace of the provider of the topic + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type * - * @param {string} resourceTypeName Name of the resource type + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. * - * @param {string} resourceName Name of the resource + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4230,7 +7541,7 @@ class EventSubscriptions { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, optionalCallback) { + listRegionalBySubscriptionForTopicTypeNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4239,187 +7550,61 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, (err, result, request, response) => { + self._listRegionalBySubscriptionForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByResource(resourceGroupName, providerNamespace, resourceTypeName, resourceName, options, optionalCallback); + return self._listRegionalBySubscriptionForTopicTypeNext(nextPageLink, options, optionalCallback); } } - - /** - * @summary Create or update an event subscription - * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. - * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. - * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information - * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. - * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator - * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. - * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. - * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. - * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. - * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. - * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. - * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. - * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. - * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - beginCreateOrUpdateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionInfo, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * @summary Create or update an event subscription - * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. - * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. - * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information - * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. - * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator - * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. - * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. + * @param {object} [options] Optional Parameters. * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. + * @returns {Promise} A promise is returned * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @reject {Error} - The error object. + */ + listRegionalByResourceGroupForTopicTypeNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listRegionalByResourceGroupForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4433,7 +7618,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4442,13 +7627,14 @@ class EventSubscriptions { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * See {@link EventSubscriptionsListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback) { + listRegionalByResourceGroupForTopicTypeNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4457,34 +7643,24 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, (err, result, request, response) => { + self._listRegionalByResourceGroupForTopicTypeNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginCreateOrUpdate(scope, eventSubscriptionName, eventSubscriptionInfo, options, optionalCallback); + return self._listRegionalByResourceGroupForTopicTypeNext(nextPageLink, options, optionalCallback); } } /** - * @summary Delete an event subscription - * - * Delete an existing event subscription + * @summary List all event subscriptions for a specific topic * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * List all event subscriptions that have been created for a specific topic * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4493,15 +7669,15 @@ class EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(scope, eventSubscriptionName, options) { + listByResourceNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginDeleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._listByResourceNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4512,22 +7688,12 @@ class EventSubscriptions { } /** - * @summary Delete an event subscription - * - * Delete an existing event subscription + * @summary List all event subscriptions for a specific topic * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * List all event subscriptions that have been created for a specific topic * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4541,7 +7707,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4549,13 +7715,15 @@ class EventSubscriptions { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(scope, eventSubscriptionName, options, optionalCallback) { + listByResourceNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4564,92 +7732,25 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginDeleteMethod(scope, eventSubscriptionName, options, (err, result, request, response) => { + self._listByResourceNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginDeleteMethod(scope, eventSubscriptionName, options, optionalCallback); + return self._listByResourceNext(nextPageLink, options, optionalCallback); } } /** - * @summary Update an event subscription - * - * Asynchronously updates an existing event subscription. - * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated - * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information - * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. + * @summary List all event subscriptions for a specific domain topic * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType - * Polymorphic Discriminator - * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. - * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. - * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. - * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. - * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. + * List all event subscriptions that have been created for a specific domain + * topic * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. - * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. - * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. - * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4658,15 +7759,15 @@ class EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - beginUpdateWithHttpOperationResponse(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options) { + listByDomainTopicNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { + self._listByDomainTopicNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4677,80 +7778,13 @@ class EventSubscriptions { } /** - * @summary Update an event subscription - * - * Asynchronously updates an existing event subscription. - * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @summary List all event subscriptions for a specific domain topic * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated - * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information - * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. - * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType - * Polymorphic Discriminator - * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. - * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. - * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. - * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. - * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. - * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. - * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. - * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. + * List all event subscriptions that have been created for a specific domain + * topic * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4764,7 +7798,7 @@ class EventSubscriptions { * * {Promise} A promise is returned * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -4773,13 +7807,14 @@ class EventSubscriptions { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * See {@link EventSubscriptionsListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback) { + listByDomainTopicNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -4788,14 +7823,14 @@ class EventSubscriptions { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, (err, result, request, response) => { + self._listByDomainTopicNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._beginUpdate(scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options, optionalCallback); + return self._listByDomainTopicNext(nextPageLink, options, optionalCallback); } } diff --git a/lib/services/eventgridManagement/lib/operations/index.d.ts b/lib/services/eventgridManagement/lib/operations/index.d.ts index 782b9282c3..722c0fd13f 100644 --- a/lib/services/eventgridManagement/lib/operations/index.d.ts +++ b/lib/services/eventgridManagement/lib/operations/index.d.ts @@ -14,30 +14,22 @@ import * as models from '../models'; /** * @class - * EventSubscriptions + * Domains * __NOTE__: An instance of this class is automatically created for an * instance of the EventGridManagementClient. */ -export interface EventSubscriptions { +export interface Domains { /** - * @summary Get an event subscription + * @summary Get a domain * - * Get properties of an event subscription + * Get properties of a domain * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -46,29 +38,21 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get an event subscription + * @summary Get a domain * - * Get properties of an event subscription + * Get properties of a domain * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -82,7 +66,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {Domain} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -90,90 +74,45 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscription} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * {Domain} [result] - The deserialized result object if an error did not occur. + * See {@link Domain} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; - get(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Create or update an event subscription - * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. - * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. - * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information - * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. - * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator - * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. + * @summary Create or update a domain * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. + * Asynchronously creates or updates a new domain with the specified + * parameters. * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. + * @param {string} domainName Name of the domain * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * @param {object} domainInfo Domain information * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. + * @param {string} [domainInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the domain. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. + * @param {object} [domainInfo.inputSchemaMapping] Information about the + * InputSchemaMapping which specified the info about mapping event payload. * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. + * @param {string} domainInfo.location Location of the resource * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {object} [domainInfo.tags] Tags of the resource * * @param {object} [options] Optional Parameters. * @@ -182,84 +121,39 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create or update an event subscription - * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. - * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. - * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information - * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. - * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator - * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. + * @summary Create or update a domain * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. + * Asynchronously creates or updates a new domain with the specified + * parameters. * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. + * @param {string} domainName Name of the domain * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * @param {object} domainInfo Domain information * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. + * @param {string} [domainInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the domain. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. + * @param {object} [domainInfo.inputSchemaMapping] Information about the + * InputSchemaMapping which specified the info about mapping event payload. * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. + * @param {string} domainInfo.location Location of the resource * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {object} [domainInfo.tags] Tags of the resource * * @param {object} [options] Optional Parameters. * @@ -273,7 +167,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {Domain} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -281,35 +175,27 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscription} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * {Domain} [result] - The deserialized result object if an error did not occur. + * See {@link Domain} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, callback: ServiceCallback): void; - createOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete an event subscription + * @summary Delete a domain * - * Delete an existing event subscription + * Delete existing domain * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -322,25 +208,17 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete an event subscription + * @summary Delete a domain * - * Delete an existing event subscription + * Delete existing domain * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -368,178 +246,117 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; - deleteMethod(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Update an event subscription + * @summary Update a domain * - * Asynchronously updates an existing event subscription. + * Asynchronously updates a domain with the specified parameters. * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated + * @param {string} domainName Name of the domain * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information + * @param {object} domainUpdateParameters Domain update information * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. + * @param {object} [domainUpdateParameters.tags] Tags of the domains resource * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType - * Polymorphic Discriminator + * @param {object} [options] Optional Parameters. * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. + * @returns {Promise} A promise is returned * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. - * Wildcard characters are not supported in this path. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Update a domain * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. + * Asynchronously updates a domain with the specified parameters. * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. - * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. - * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {string} domainName Name of the domain * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. + * @param {object} domainUpdateParameters Domain update information * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {object} [domainUpdateParameters.tags] Tags of the domains resource * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @reject {Error|ServiceError} - The error object. - */ - updateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * @summary Update an event subscription + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * Asynchronously updates an existing event subscription. + * {Promise} A promise is returned. * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @resolve {Domain} - The deserialized result object. * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated + * @reject {Error|ServiceError} - The error object. * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType - * Polymorphic Discriminator + * {Domain} [result] - The deserialized result object if an error did not occur. + * See {@link Domain} for more information. * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, callback: ServiceCallback): void; + update(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List domains under an Azure subscription * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. - * Wildcard characters are not supported in this path. + * List all the domains under an Azure subscription * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @param {object} [options] Optional Parameters. * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. + * @param {string} [options.filter] Filter the results using OData syntax. * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. + * @param {number} [options.top] The number of results to return. * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. + * @returns {Promise} A promise is returned * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionWithHttpOperationResponse(options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List domains under an Azure subscription * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * List all the domains under an Azure subscription * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -550,7 +367,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {DomainsListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -558,69 +375,57 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscription} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * {DomainsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - update(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, callback: ServiceCallback): void; - update(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscription(options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(callback: ServiceCallback): void; + listBySubscription(options: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get full URL of an event subscription + * @summary List domains under a resource group * - * Get the full endpoint URL for an event subscription - * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * List all the domains under a resource group * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getFullUrlWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get full URL of an event subscription + * @summary List domains under a resource group * - * Get the full endpoint URL for an event subscription - * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * List all the domains under a resource group * - * @param {string} eventSubscriptionName Name of the event subscription + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -631,7 +436,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionFullUrl} - The deserialized result object. + * @resolve {DomainsListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -639,25 +444,27 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionFullUrl} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionFullUrl} for more - * information. + * {DomainsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getFullUrl(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getFullUrl(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; - getFullUrl(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Get an aggregated list of all global event subscriptions under an - * Azure subscription + * @summary List keys for a domain * - * List all aggregated global event subscriptions under a specific Azure - * subscription + * List the two keys used to publish to a domain + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -666,18 +473,21 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listGlobalBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listSharedAccessKeysWithHttpOperationResponse(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Get an aggregated list of all global event subscriptions under an - * Azure subscription + * @summary List keys for a domain * - * List all aggregated global event subscriptions under a specific Azure - * subscription + * List the two keys used to publish to a domain + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -691,7 +501,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {DomainSharedAccessKeys} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -699,26 +509,33 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more + * {DomainSharedAccessKeys} [result] - The deserialized result object if an error did not occur. + * See {@link DomainSharedAccessKeys} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGlobalBySubscription(callback: ServiceCallback): void; - listGlobalBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listSharedAccessKeys(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listSharedAccessKeys(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; + listSharedAccessKeys(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List all global event subscriptions for a topic type + * @summary Regenerate key for a domain * - * List all global event subscriptions under an Azure subscription for a topic - * type. + * Regenerate a shared access key for a domain * - * @param {string} topicTypeName Name of the topic type + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {object} regenerateKeyRequest Request body to regenerate key + * + * @param {string} regenerateKeyRequest.keyName Key name to regenerate key1 or + * key2 * * @param {object} [options] Optional Parameters. * @@ -727,19 +544,26 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listGlobalBySubscriptionForTopicTypeWithHttpOperationResponse(topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + regenerateKeyWithHttpOperationResponse(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all global event subscriptions for a topic type + * @summary Regenerate key for a domain * - * List all global event subscriptions under an Azure subscription for a topic - * type. + * Regenerate a shared access key for a domain * - * @param {string} topicTypeName Name of the topic type + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {object} regenerateKeyRequest Request body to regenerate key + * + * @param {string} regenerateKeyRequest.keyName Key name to regenerate key1 or + * key2 * * @param {object} [options] Optional Parameters. * @@ -753,7 +577,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {DomainSharedAccessKeys} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -761,29 +585,47 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more + * {DomainSharedAccessKeys} [result] - The deserialized result object if an error did not occur. + * See {@link DomainSharedAccessKeys} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalBySubscriptionForTopicType(topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGlobalBySubscriptionForTopicType(topicTypeName: string, callback: ServiceCallback): void; - listGlobalBySubscriptionForTopicType(topicTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, callback: ServiceCallback): void; + regenerateKey(resourceGroupName: string, domainName: string, regenerateKeyRequest: models.DomainRegenerateKeyRequest, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List all global event subscriptions under an Azure subscription and - * resource group + * @summary Create or update a domain * - * List all global event subscriptions under a specific Azure subscription and - * resource group + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * + * @param {string} domainName Name of the domain + * + * @param {object} domainInfo Domain information + * + * @param {string} [domainInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the domain. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [domainInfo.inputSchemaMapping] Information about the + * InputSchemaMapping which specified the info about mapping event payload. + * + * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * + * @param {string} domainInfo.location Location of the resource + * + * @param {object} [domainInfo.tags] Tags of the resource + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -791,22 +633,40 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listGlobalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all global event subscriptions under an Azure subscription and - * resource group + * @summary Create or update a domain * - * List all global event subscriptions under a specific Azure subscription and - * resource group + * Asynchronously creates or updates a new domain with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * + * @param {string} domainName Name of the domain + * + * @param {object} domainInfo Domain information + * + * @param {string} [domainInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the domain. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [domainInfo.inputSchemaMapping] Information about the + * InputSchemaMapping which specified the info about mapping event payload. + * + * @param {string} domainInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * + * @param {string} domainInfo.location Location of the resource + * + * @param {object} [domainInfo.tags] Tags of the resource + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -819,7 +679,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {Domain} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -827,30 +687,27 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {Domain} [result] - The deserialized result object if an error did not occur. + * See {@link Domain} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGlobalByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listGlobalByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: models.Domain, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List all global event subscriptions under a resource group for a - * topic type + * @summary Delete a domain * - * List all global event subscriptions under a resource group for a specific - * topic type. + * Delete existing domain * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} topicTypeName Name of the topic type + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -859,23 +716,21 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listGlobalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all global event subscriptions under a resource group for a - * topic type + * @summary Delete a domain * - * List all global event subscriptions under a resource group for a specific - * topic type. + * Delete existing domain * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} topicTypeName Name of the topic type + * @param {string} domainName Name of the domain * * @param {object} [options] Optional Parameters. * @@ -889,7 +744,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -897,26 +752,30 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, callback: ServiceCallback): void; - listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, domainName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, domainName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List all regional event subscriptions under an Azure subscription + * @summary Update a domain * - * List all event subscriptions from the given location under a specific Azure - * subscription + * Asynchronously updates a domain with the specified parameters. * - * @param {string} location Name of the location + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {object} domainUpdateParameters Domain update information + * + * @param {object} [domainUpdateParameters.tags] Tags of the domains resource * * @param {object} [options] Optional Parameters. * @@ -925,19 +784,25 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listRegionalBySubscriptionWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all regional event subscriptions under an Azure subscription + * @summary Update a domain * - * List all event subscriptions from the given location under a specific Azure - * subscription + * Asynchronously updates a domain with the specified parameters. * - * @param {string} location Name of the location + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {object} domainUpdateParameters Domain update information + * + * @param {object} [domainUpdateParameters.tags] Tags of the domains resource * * @param {object} [options] Optional Parameters. * @@ -951,7 +816,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {Domain} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -959,30 +824,25 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {Domain} [result] - The deserialized result object if an error did not occur. + * See {@link Domain} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalBySubscription(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRegionalBySubscription(location: string, callback: ServiceCallback): void; - listRegionalBySubscription(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: models.DomainUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List all regional event subscriptions under an Azure subscription - * and resource group - * - * List all event subscriptions from the given location under a specific Azure - * subscription and resource group + * @summary List domains under an Azure subscription * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * List all the domains under an Azure subscription * - * @param {string} location Name of the location + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -991,23 +851,19 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listRegionalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all regional event subscriptions under an Azure subscription - * and resource group - * - * List all event subscriptions from the given location under a specific Azure - * subscription and resource group + * @summary List domains under an Azure subscription * - * @param {string} resourceGroupName The name of the resource group within the - * user's subscription. + * List all the domains under an Azure subscription * - * @param {string} location Name of the location + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1021,7 +877,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {DomainsListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1029,29 +885,25 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {DomainsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalByResourceGroup(resourceGroupName: string, location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRegionalByResourceGroup(resourceGroupName: string, location: string, callback: ServiceCallback): void; - listRegionalByResourceGroup(resourceGroupName: string, location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List all regional event subscriptions under an Azure subscription - * for a topic type - * - * List all event subscriptions from the given location under a specific Azure - * subscription and topic type. + * @summary List domains under a resource group * - * @param {string} location Name of the location + * List all the domains under a resource group * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1060,22 +912,19 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listRegionalBySubscriptionForTopicTypeWithHttpOperationResponse(location: string, topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all regional event subscriptions under an Azure subscription - * for a topic type - * - * List all event subscriptions from the given location under a specific Azure - * subscription and topic type. + * @summary List domains under a resource group * - * @param {string} location Name of the location + * List all the domains under a resource group * - * @param {string} topicTypeName Name of the topic type + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1089,7 +938,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {DomainsListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1097,32 +946,38 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {DomainsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DomainsListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, callback: ServiceCallback): void; - listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * DomainTopics + * __NOTE__: An instance of this class is automatically created for an + * instance of the EventGridManagementClient. + */ +export interface DomainTopics { /** - * @summary List all regional event subscriptions under an Azure subscription - * and resource group for a topic type + * @summary Get a domain topic * - * List all event subscriptions from the given location under a specific Azure - * subscription and resource group and topic type + * Get properties of a domain topic * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} location Name of the location + * @param {string} domainName Name of the domain * - * @param {string} topicTypeName Name of the topic type + * @param {string} domainTopicName Name of the topic * * @param {object} [options] Optional Parameters. * @@ -1131,25 +986,23 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listRegionalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, location: string, topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all regional event subscriptions under an Azure subscription - * and resource group for a topic type + * @summary Get a domain topic * - * List all event subscriptions from the given location under a specific Azure - * subscription and resource group and topic type + * Get properties of a domain topic * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} location Name of the location + * @param {string} domainName Name of the domain * - * @param {string} topicTypeName Name of the topic type + * @param {string} domainTopicName Name of the topic * * @param {object} [options] Optional Parameters. * @@ -1163,7 +1016,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {DomainTopic} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1171,32 +1024,30 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {DomainTopic} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopic} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, callback: ServiceCallback): void; - listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, domainName: string, domainTopicName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, domainName: string, domainTopicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary List all event subscriptions for a specific topic + * @summary Create or update a domain topic * - * List all event subscriptions that have been created for a specific topic + * Asynchronously creates or updates a new domain topic with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} providerNamespace Namespace of the provider of the topic - * - * @param {string} resourceTypeName Name of the resource type + * @param {string} domainName Name of the domain * - * @param {string} resourceName Name of the resource + * @param {string} domainTopicName Name of the domain topic * * @param {object} [options] Optional Parameters. * @@ -1205,25 +1056,24 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByResourceWithHttpOperationResponse(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary List all event subscriptions for a specific topic + * @summary Create or update a domain topic * - * List all event subscriptions that have been created for a specific topic + * Asynchronously creates or updates a new domain topic with the specified + * parameters. * * @param {string} resourceGroupName The name of the resource group within the * user's subscription. * - * @param {string} providerNamespace Namespace of the provider of the topic - * - * @param {string} resourceTypeName Name of the resource type + * @param {string} domainName Name of the domain * - * @param {string} resourceName Name of the resource + * @param {string} domainTopicName Name of the domain topic * * @param {object} [options] Optional Parameters. * @@ -1237,7 +1087,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * @resolve {DomainTopic} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1245,91 +1095,29 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscriptionsListResult} for more - * information. + * {DomainTopic} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopic} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, callback: ServiceCallback): void; - listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Create or update an event subscription - * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. - * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. + * @summary Delete a domain topic * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information - * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. - * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator - * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. - * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. - * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. - * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. - * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. - * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. + * Delete existing domain topic * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. + * @param {string} domainName Name of the domain * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {string} domainTopicName Name of the domain topic * * @param {object} [options] Optional Parameters. * @@ -1338,84 +1126,23 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Create or update an event subscription - * - * Asynchronously creates a new event subscription or updates an existing event - * subscription based on the specified scope. - * - * @param {string} scope The identifier of the resource to which the event - * subscription needs to be created or updated. The scope can be a - * subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use - * '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. - * - * @param {string} eventSubscriptionName Name of the event subscription. Event - * subscription names must be between 3 and 64 characters in length and should - * use alphanumeric letters only. - * - * @param {object} eventSubscriptionInfo Event subscription properties - * containing the destination and filter information - * - * @param {object} [eventSubscriptionInfo.destination] Information about the - * destination where events have to be delivered for the event subscription. - * - * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic - * Discriminator - * - * @param {object} [eventSubscriptionInfo.filter] Information about the filter - * for the event subscription. - * - * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional - * string to filter events for an event subscription based on a resource path - * prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. - * - * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional - * string to filter events for an event subscription based on a resource path - * suffix. - * Wildcard characters are not supported in this path. - * - * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of - * applicable event types that need to be part of the event subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. - * - * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] - * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the - * filter - * should be compared in a case sensitive manner. - * - * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. - * - * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for - * events. This can be used to configure maximum number of delivery attempts - * and time to live for events. + * @summary Delete a domain topic * - * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] - * Maximum number of delivery retry attempts for events. + * Delete existing domain topic * - * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. * - * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter - * destination of the event subscription. + * @param {string} domainName Name of the domain * - * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {string} domainTopicName Name of the domain topic * * @param {object} [options] Optional Parameters. * @@ -1429,7 +1156,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1437,26 +1164,309 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscription} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, callback: ServiceCallback): void; - beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, domainName: string, domainTopicName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, domainName: string, domainTopicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Delete an event subscription + * @summary List domain topics. * - * Delete an existing event subscription + * List all the topics in a domain. * - * @param {string} scope The scope of the event subscription. The scope can be - * a subscription, or a resource group, or a top level resource belonging to a - * resource provider namespace, or an EventGrid topic. For example, use + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Domain name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByDomainWithHttpOperationResponse(resourceGroupName: string, domainName: string, options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Domain name. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DomainTopicsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DomainTopicsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopicsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByDomain(resourceGroupName: string, domainName: string, options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByDomain(resourceGroupName: string, domainName: string, callback: ServiceCallback): void; + listByDomain(resourceGroupName: string, domainName: string, options: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Create or update a domain topic + * + * Asynchronously creates or updates a new domain topic with the specified + * parameters. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Create or update a domain topic + * + * Asynchronously creates or updates a new domain topic with the specified + * parameters. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DomainTopic} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DomainTopic} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopic} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Delete a domain topic + * + * Delete existing domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Delete a domain topic + * + * Delete existing domain topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the domain + * + * @param {string} domainTopicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, domainName: string, domainTopicName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, domainName: string, domainTopicName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, domainName: string, domainTopicName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByDomainNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List domain topics. + * + * List all the topics in a domain. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DomainTopicsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DomainTopicsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DomainTopicsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByDomainNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDomainNext(nextPageLink: string, callback: ServiceCallback): void; + listByDomainNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * EventSubscriptions + * __NOTE__: An instance of this class is automatically created for an + * instance of the EventGridManagementClient. + */ +export interface EventSubscriptions { + + + /** + * @summary Get an event subscription + * + * Get properties of an event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use * '/subscriptions/{subscriptionId}/' for a subscription, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a * resource group, and @@ -1474,16 +1484,16 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Delete an event subscription + * @summary Get an event subscription * - * Delete an existing event subscription + * Get properties of an event subscription * * @param {string} scope The scope of the event subscription. The scope can be * a subscription, or a resource group, or a top level resource belonging to a @@ -1510,7 +1520,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {EventSubscription} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1518,92 +1528,2461 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {EventSubscription} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; - beginDeleteMethod(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; + get(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * @summary Update an event subscription + * @summary Create or update an event subscription * - * Asynchronously updates an existing event subscription. + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' * for a resource, and * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' * for an EventGrid topic. * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. + * + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType * Polymorphic Discriminator * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. + * @param {object} [options] Optional Parameters. * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Create or update an event subscription + * + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. + * + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. + * + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information + * + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. + * + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. * The format of this depends on the publisher of the events. * Wildcard characters are not supported in this path. * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. * Wildcard characters are not supported in this path. * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter * should be compared in a case sensitive manner. * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscription} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, callback: ServiceCallback): void; + createOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Delete an event subscription + * + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Delete an event subscription + * + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; + deleteMethod(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Update an event subscription + * + * Asynchronously updates an existing event subscription. + * + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Update an event subscription + * + * Asynchronously updates an existing event subscription. + * + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscription} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + update(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, callback: ServiceCallback): void; + update(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get full URL of an event subscription + * + * Get the full endpoint URL for an event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getFullUrlWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get full URL of an event subscription + * + * Get the full endpoint URL for an event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionFullUrl} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionFullUrl} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionFullUrl} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getFullUrl(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getFullUrl(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; + getFullUrl(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription + * + * List all aggregated global event subscriptions under a specific Azure + * subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalBySubscriptionWithHttpOperationResponse(options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription + * + * List all aggregated global event subscriptions under a specific Azure + * subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalBySubscription(options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalBySubscription(callback: ServiceCallback): void; + listGlobalBySubscription(options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all global event subscriptions for a topic type + * + * List all global event subscriptions under an Azure subscription for a topic + * type. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalBySubscriptionForTopicTypeWithHttpOperationResponse(topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all global event subscriptions for a topic type + * + * List all global event subscriptions under an Azure subscription for a topic + * type. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalBySubscriptionForTopicType(topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalBySubscriptionForTopicType(topicTypeName: string, callback: ServiceCallback): void; + listGlobalBySubscriptionForTopicType(topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all global event subscriptions under an Azure subscription and + * resource group + * + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all global event subscriptions under an Azure subscription and + * resource group + * + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalByResourceGroup(resourceGroupName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listGlobalByResourceGroup(resourceGroupName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all global event subscriptions under a resource group for a + * topic type + * + * List all global event subscriptions under a resource group for a specific + * topic type. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all global event subscriptions under a resource group for a + * topic type + * + * List all global event subscriptions under a resource group for a specific + * topic type. + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, callback: ServiceCallback): void; + listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * + * List all event subscriptions from the given location under a specific Azure + * subscription + * + * @param {string} location Name of the location + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalBySubscriptionWithHttpOperationResponse(location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * + * List all event subscriptions from the given location under a specific Azure + * subscription + * + * @param {string} location Name of the location + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalBySubscription(location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalBySubscription(location: string, callback: ServiceCallback): void; + listRegionalBySubscription(location: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} location Name of the location + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} location Name of the location + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalByResourceGroup(resourceGroupName: string, location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalByResourceGroup(resourceGroupName: string, location: string, callback: ServiceCallback): void; + listRegionalByResourceGroup(resourceGroupName: string, location: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. + * + * @param {string} location Name of the location + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalBySubscriptionForTopicTypeWithHttpOperationResponse(location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. + * + * @param {string} location Name of the location + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, callback: ServiceCallback): void; + listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} location Name of the location + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} location Name of the location + * + * @param {string} topicTypeName Name of the topic type + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, callback: ServiceCallback): void; + listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all event subscriptions for a specific topic + * + * List all event subscriptions that have been created for a specific topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} providerNamespace Namespace of the provider of the topic + * + * @param {string} resourceTypeName Name of the resource type + * + * @param {string} resourceName Name of the resource + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceWithHttpOperationResponse(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all event subscriptions for a specific topic + * + * List all event subscriptions that have been created for a specific topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} providerNamespace Namespace of the provider of the topic + * + * @param {string} resourceTypeName Name of the resource type + * + * @param {string} resourceName Name of the resource + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, callback: ServiceCallback): void; + listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all event subscriptions for a specific domain topic + * + * List all event subscriptions that have been created for a specific domain + * topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the top level domain + * + * @param {string} topicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByDomainTopicWithHttpOperationResponse(resourceGroupName: string, domainName: string, topicName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all event subscriptions for a specific domain topic + * + * List all event subscriptions that have been created for a specific domain + * topic + * + * @param {string} resourceGroupName The name of the resource group within the + * user's subscription. + * + * @param {string} domainName Name of the top level domain + * + * @param {string} topicName Name of the domain topic + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * + * @param {string} [options.lABEL] The label used to filter the results for + * event subscriptions list. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, callback: ServiceCallback): void; + listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Create or update an event subscription + * + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. + * + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. + * + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information + * + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. + * + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. + * + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Create or update an event subscription + * + * Asynchronously creates a new event subscription or updates an existing event + * subscription based on the specified scope. + * + * @param {string} scope The identifier of the resource to which the event + * subscription needs to be created or updated. The scope can be a + * subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription. Event + * subscription names must be between 3 and 64 characters in length and should + * use alphanumeric letters only. + * + * @param {object} eventSubscriptionInfo Event subscription properties + * containing the destination and filter information + * + * @param {object} [eventSubscriptionInfo.destination] Information about the + * destination where events have to be delivered for the event subscription. + * + * @param {string} eventSubscriptionInfo.destination.endpointType Polymorphic + * Discriminator + * + * @param {object} [eventSubscriptionInfo.filter] Information about the filter + * for the event subscription. + * + * @param {string} [eventSubscriptionInfo.filter.subjectBeginsWith] An optional + * string to filter events for an event subscription based on a resource path + * prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionInfo.filter.subjectEndsWith] An optional + * string to filter events for an event subscription based on a resource path + * suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of + * applicable event types that need to be part of the event subscription. If it + * is desired to subscribe to all event types, set the IncludedEventTypes to + * null. + * + * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] + * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the + * filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionInfo.filter.advancedFilters] An array of + * advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionInfo.labels] List of user defined labels. + * + * @param {date} [eventSubscriptionInfo.expirationTimeUtc] Expiration time of + * the event subscription. + * + * @param {string} [eventSubscriptionInfo.eventDeliverySchema] The event + * delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionInfo.retryPolicy] The retry policy for + * events. This can be used to configure maximum number of delivery attempts + * and time to live for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.maxDeliveryAttempts] + * Maximum number of delivery retry attempts for events. + * + * @param {number} [eventSubscriptionInfo.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionInfo.deadLetterDestination] The DeadLetter + * destination of the event subscription. + * + * @param {string} eventSubscriptionInfo.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscription} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, callback: ServiceCallback): void; + beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: models.EventSubscription, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Delete an event subscription + * + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Delete an event subscription + * + * Delete an existing event subscription + * + * @param {string} scope The scope of the event subscription. The scope can be + * a subscription, or a resource group, or a top level resource belonging to a + * resource provider namespace, or an EventGrid topic. For example, use + * '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(scope: string, eventSubscriptionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(scope: string, eventSubscriptionName: string, callback: ServiceCallback): void; + beginDeleteMethod(scope: string, eventSubscriptionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Update an event subscription + * + * Asynchronously updates an existing event subscription. + * + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Update an event subscription + * + * Asynchronously updates an existing event subscription. + * + * @param {string} scope The scope of existing event subscription. The scope + * can be a subscription, or a resource group, or a top level resource + * belonging to a resource provider namespace, or an EventGrid topic. For + * example, use '/subscriptions/{subscriptionId}/' for a subscription, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a + * resource group, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' + * for a resource, and + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' + * for an EventGrid topic. + * + * @param {string} eventSubscriptionName Name of the event subscription to be + * updated + * + * @param {object} eventSubscriptionUpdateParameters Updated event subscription + * information + * + * @param {object} [eventSubscriptionUpdateParameters.destination] Information + * about the destination where events have to be delivered for the event + * subscription. + * + * @param {string} eventSubscriptionUpdateParameters.destination.endpointType + * Polymorphic Discriminator + * + * @param {object} [eventSubscriptionUpdateParameters.filter] Information about + * the filter for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] + * An optional string to filter events for an event subscription based on a + * resource path prefix. + * The format of this depends on the publisher of the events. + * Wildcard characters are not supported in this path. + * + * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] + * An optional string to filter events for an event subscription based on a + * resource path suffix. + * Wildcard characters are not supported in this path. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] + * A list of applicable event types that need to be part of the event + * subscription. If it is desired to subscribe to all event types, set the + * IncludedEventTypes to null. + * + * @param {boolean} + * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies + * if the SubjectBeginsWith and SubjectEndsWith properties of the filter + * should be compared in a case sensitive manner. + * + * @param {array} [eventSubscriptionUpdateParameters.filter.advancedFilters] An + * array of advanced filters that are used for filtering event subscriptions. + * + * @param {array} [eventSubscriptionUpdateParameters.labels] List of user + * defined labels. + * + * @param {date} [eventSubscriptionUpdateParameters.expirationTimeUtc] + * Information about the expiration time for the event subscription. + * + * @param {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The + * event delivery schema for the event subscription. Possible values include: + * 'EventGridSchema', 'CloudEventV01Schema', 'CustomInputSchema' + * + * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry + * policy for events. This can be used to configure maximum number of delivery + * attempts and time to live for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum + * number of delivery retry attempts for events. + * + * @param {number} + * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] + * Time To Live (in minutes) for events. + * + * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] + * The DeadLetter destination of the event subscription. + * + * @param {string} + * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType + * Polymorphic Discriminator + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscription} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscription} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscription} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, callback: ServiceCallback): void; + beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription + * + * List all aggregated global event subscriptions under a specific Azure + * subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary Get an aggregated list of all global event subscriptions under an + * Azure subscription + * + * List all aggregated global event subscriptions under a specific Azure + * subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listGlobalBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all global event subscriptions for a topic type + * + * List all global event subscriptions under an Azure subscription for a topic + * type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalBySubscriptionForTopicTypeNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all global event subscriptions for a topic type + * + * List all global event subscriptions under an Azure subscription for a topic + * type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalBySubscriptionForTopicTypeNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalBySubscriptionForTopicTypeNext(nextPageLink: string, callback: ServiceCallback): void; + listGlobalBySubscriptionForTopicTypeNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all global event subscriptions under an Azure subscription and + * resource group + * + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all global event subscriptions under an Azure subscription and + * resource group + * + * List all global event subscriptions under a specific Azure subscription and + * resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listGlobalByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all global event subscriptions under a resource group for a + * topic type + * + * List all global event subscriptions under a resource group for a specific + * topic type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listGlobalByResourceGroupForTopicTypeNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all global event subscriptions under a resource group for a + * topic type + * + * List all global event subscriptions under a resource group for a specific + * topic type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listGlobalByResourceGroupForTopicTypeNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalByResourceGroupForTopicTypeNext(nextPageLink: string, callback: ServiceCallback): void; + listGlobalByResourceGroupForTopicTypeNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * + * List all event subscriptions from the given location under a specific Azure + * subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * + * List all event subscriptions from the given location under a specific Azure + * subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listRegionalBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listRegionalByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalBySubscriptionForTopicTypeNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and topic type. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalBySubscriptionForTopicTypeNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalBySubscriptionForTopicTypeNext(nextPageLink: string, callback: ServiceCallback): void; + listRegionalBySubscriptionForTopicTypeNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRegionalByResourceGroupForTopicTypeNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all regional event subscriptions under an Azure subscription + * and resource group for a topic type + * + * List all event subscriptions from the given location under a specific Azure + * subscription and resource group and topic type + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EventSubscriptionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRegionalByResourceGroupForTopicTypeNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalByResourceGroupForTopicTypeNext(nextPageLink: string, callback: ServiceCallback): void; + listRegionalByResourceGroupForTopicTypeNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all event subscriptions for a specific topic * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. + * List all event subscriptions that have been created for a specific topic * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1612,87 +3991,83 @@ export interface EventSubscriptions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateWithHttpOperationResponse(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * @summary Update an event subscription + * @summary List all event subscriptions for a specific topic * - * Asynchronously updates an existing event subscription. + * List all event subscriptions that have been created for a specific topic * - * @param {string} scope The scope of existing event subscription. The scope - * can be a subscription, or a resource group, or a top level resource - * belonging to a resource provider namespace, or an EventGrid topic. For - * example, use '/subscriptions/{subscriptionId}/' for a subscription, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for a - * resource group, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}' - * for a resource, and - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}' - * for an EventGrid topic. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} eventSubscriptionName Name of the event subscription to be - * updated + * @param {object} [options] Optional Parameters. * - * @param {object} eventSubscriptionUpdateParameters Updated event subscription - * information + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [eventSubscriptionUpdateParameters.destination] Information - * about the destination where events have to be delivered for the event - * subscription. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} eventSubscriptionUpdateParameters.destination.endpointType - * Polymorphic Discriminator + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {object} [eventSubscriptionUpdateParameters.filter] Information about - * the filter for the event subscription. + * {Promise} A promise is returned. * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectBeginsWith] - * An optional string to filter events for an event subscription based on a - * resource path prefix. - * The format of this depends on the publisher of the events. - * Wildcard characters are not supported in this path. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * - * @param {string} [eventSubscriptionUpdateParameters.filter.subjectEndsWith] - * An optional string to filter events for an event subscription based on a - * resource path suffix. - * Wildcard characters are not supported in this path. + * @reject {Error|ServiceError} - The error object. * - * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] - * A list of applicable event types that need to be part of the event - * subscription. - * If it is desired to subscribe to all event types, the string "all" needs to - * be specified as an element in this list. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {boolean} - * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies - * if the SubjectBeginsWith and SubjectEndsWith properties of the filter - * should be compared in a case sensitive manner. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {array} [eventSubscriptionUpdateParameters.labels] List of user - * defined labels. + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. * - * @param {object} [eventSubscriptionUpdateParameters.retryPolicy] The retry - * policy for events. This can be used to configure maximum number of delivery - * attempts and time to live for events. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.maxDeliveryAttempts] Maximum - * number of delivery retry attempts for events. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List all event subscriptions for a specific domain topic * - * @param {number} - * [eventSubscriptionUpdateParameters.retryPolicy.eventTimeToLiveInMinutes] - * Time To Live (in minutes) for events. + * List all event subscriptions that have been created for a specific domain + * topic * - * @param {object} [eventSubscriptionUpdateParameters.deadLetterDestination] - * The DeadLetter destination of the event subscription. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} - * eventSubscriptionUpdateParameters.deadLetterDestination.endpointType - * Polymorphic Discriminator + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByDomainTopicNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List all event subscriptions for a specific domain topic + * + * List all event subscriptions that have been created for a specific domain + * topic + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -1706,7 +4081,7 @@ export interface EventSubscriptions { * * {Promise} A promise is returned. * - * @resolve {EventSubscription} - The deserialized result object. + * @resolve {EventSubscriptionsListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -1714,16 +4089,17 @@ export interface EventSubscriptions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EventSubscription} [result] - The deserialized result object if an error did not occur. - * See {@link EventSubscription} for more information. + * {EventSubscriptionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EventSubscriptionsListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, callback: ServiceCallback): void; - beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: models.EventSubscriptionUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDomainTopicNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDomainTopicNext(nextPageLink: string, callback: ServiceCallback): void; + listByDomainTopicNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -1878,6 +4254,19 @@ export interface Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -1907,6 +4296,19 @@ export interface Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -2087,6 +4489,10 @@ export interface Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2096,7 +4502,7 @@ export interface Topics { * * @reject {Error|ServiceError} - The error object. */ - listBySubscriptionWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listBySubscriptionWithHttpOperationResponse(options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List topics under an Azure subscription @@ -2105,6 +4511,10 @@ export interface Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2130,9 +4540,9 @@ export interface Topics { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listBySubscription(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscription(options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; listBySubscription(callback: ServiceCallback): void; - listBySubscription(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listBySubscription(options: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2145,6 +4555,10 @@ export interface Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2154,7 +4568,7 @@ export interface Topics { * * @reject {Error|ServiceError} - The error object. */ - listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List topics under a resource group @@ -2166,6 +4580,10 @@ export interface Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2191,9 +4609,9 @@ export interface Topics { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, options?: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { filter? : string, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2421,6 +4839,19 @@ export interface Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -2450,6 +4881,19 @@ export interface Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -2621,6 +5065,128 @@ export interface Topics { beginUpdate(resourceGroupName: string, topicName: string, topicUpdateParameters: models.TopicUpdateParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; beginUpdate(resourceGroupName: string, topicName: string, topicUpdateParameters: models.TopicUpdateParameters, callback: ServiceCallback): void; beginUpdate(resourceGroupName: string, topicName: string, topicUpdateParameters: models.TopicUpdateParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List topics under an Azure subscription + * + * List all the topics under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List topics under an Azure subscription + * + * List all the topics under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {TopicsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {TopicsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link TopicsListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listBySubscriptionNext(nextPageLink: string, callback: ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * @summary List topics under a resource group + * + * List all the topics under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * @summary List topics under a resource group + * + * List all the topics under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {TopicsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {TopicsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link TopicsListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** diff --git a/lib/services/eventgridManagement/lib/operations/index.js b/lib/services/eventgridManagement/lib/operations/index.js index 4b3d0fac59..6ca7250658 100644 --- a/lib/services/eventgridManagement/lib/operations/index.js +++ b/lib/services/eventgridManagement/lib/operations/index.js @@ -14,6 +14,8 @@ 'use strict'; +exports.Domains = require('./domains'); +exports.DomainTopics = require('./domainTopics'); exports.EventSubscriptions = require('./eventSubscriptions'); exports.Operations = require('./operations'); exports.Topics = require('./topics'); diff --git a/lib/services/eventgridManagement/lib/operations/topics.js b/lib/services/eventgridManagement/lib/operations/topics.js index bec5bc953b..cd9f8362fe 100644 --- a/lib/services/eventgridManagement/lib/operations/topics.js +++ b/lib/services/eventgridManagement/lib/operations/topics.js @@ -175,6 +175,19 @@ function _get(resourceGroupName, topicName, options, callback) { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -407,6 +420,10 @@ function _update(resourceGroupName, topicName, topicUpdateParameters, options, c * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -433,6 +450,8 @@ function _listBySubscription(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -441,6 +460,12 @@ function _listBySubscription(options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -454,6 +479,12 @@ function _listBySubscription(options, callback) { requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -545,6 +576,10 @@ function _listBySubscription(options, callback) { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -571,6 +606,8 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let top = (options && options.top !== undefined) ? options.top : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -582,6 +619,12 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter must be of type string.'); + } + if (top !== null && top !== undefined && typeof top !== 'number') { + throw new Error('top must be of type number.'); + } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); } @@ -596,6 +639,12 @@ function _listByResourceGroup(resourceGroupName, options, callback) { requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + if (top !== null && top !== undefined) { + queryParameters.push('$top=' + encodeURIComponent(top.toString())); + } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); } @@ -1167,6 +1216,19 @@ function _listEventTypes(resourceGroupName, providerNamespace, resourceTypeName, * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -1625,6 +1687,264 @@ function _beginUpdate(resourceGroupName, topicName, topicUpdateParameters, optio }); } +/** + * @summary List topics under an Azure subscription + * + * List all the topics under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link TopicsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listBySubscriptionNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['TopicsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * @summary List topics under a resource group + * + * List all the topics under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link TopicsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['TopicsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** Class representing a Topics. */ class Topics { /** @@ -1645,6 +1965,8 @@ class Topics { this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; this._beginUpdate = _beginUpdate; + this._listBySubscriptionNext = _listBySubscriptionNext; + this._listByResourceGroupNext = _listByResourceGroupNext; } /** @@ -1751,6 +2073,19 @@ class Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -1792,6 +2127,19 @@ class Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -2041,6 +2389,10 @@ class Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2071,6 +2423,10 @@ class Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2126,6 +2482,10 @@ class Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2159,6 +2519,10 @@ class Topics { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] Filter the results using OData syntax. + * + * @param {number} [options.top] The number of results to return. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -2510,6 +2874,19 @@ class Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -2551,6 +2928,19 @@ class Topics { * * @param {object} topicInfo Topic information * + * @param {string} [topicInfo.inputSchema] This determines the format that + * Event Grid should expect for incoming events published to the topic. + * Possible values include: 'EventGridSchema', 'CustomEventSchema', + * 'CloudEventV01Schema' + * + * @param {object} [topicInfo.inputSchemaMapping] This enables publishing using + * custom event schemas. An InputSchemaMapping can be specified to map various + * properties of a source schema to various required properties of the + * EventGridEvent schema. + * + * @param {string} topicInfo.inputSchemaMapping.inputSchemaMappingType + * Polymorphic Discriminator + * * @param {string} topicInfo.location Location of the resource * * @param {object} [topicInfo.tags] Tags of the resource @@ -2793,6 +3183,182 @@ class Topics { } } + /** + * @summary List topics under an Azure subscription + * + * List all the topics under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listBySubscriptionNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List topics under an Azure subscription + * + * List all the topics under an Azure subscription + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {TopicsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link TopicsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listBySubscriptionNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listBySubscriptionNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listBySubscriptionNext(nextPageLink, options, optionalCallback); + } + } + + /** + * @summary List topics under a resource group + * + * List all the topics under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * @summary List topics under a resource group + * + * List all the topics under a resource group + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {TopicsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link TopicsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = Topics; From 042c77f142b6d8c86e676763cf0faa69c6e9cfde Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 26 Feb 2019 06:00:37 +0000 Subject: [PATCH 2/3] Generated from a24d800830002278277351bbf1a580248c585274 update summary text per code review comments --- .../lib/models/advancedFilter.js | 9 +- .../lib/models/boolEqualsAdvancedFilter.js | 2 +- .../eventgridManagement/lib/models/index.d.ts | 53 +++--- .../models/numberGreaterThanAdvancedFilter.js | 4 +- ...numberGreaterThanOrEqualsAdvancedFilter.js | 4 +- .../lib/models/numberInAdvancedFilter.js | 4 +- .../models/numberLessThanAdvancedFilter.js | 4 +- .../numberLessThanOrEqualsAdvancedFilter.js | 4 +- .../lib/models/numberNotInAdvancedFilter.js | 4 +- .../models/stringBeginsWithAdvancedFilter.js | 4 +- .../models/stringContainsAdvancedFilter.js | 4 +- .../models/stringEndsWithAdvancedFilter.js | 4 +- .../lib/models/stringInAdvancedFilter.js | 4 +- .../lib/models/stringNotInAdvancedFilter.js | 4 +- .../lib/operations/eventSubscriptions.js | 160 +++++++++--------- .../lib/operations/index.d.ts | 100 +++++------ 16 files changed, 188 insertions(+), 180 deletions(-) diff --git a/lib/services/eventgridManagement/lib/models/advancedFilter.js b/lib/services/eventgridManagement/lib/models/advancedFilter.js index b22118af51..e6aa34991c 100644 --- a/lib/services/eventgridManagement/lib/models/advancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/advancedFilter.js @@ -11,13 +11,18 @@ 'use strict'; /** - * The Advanced Filter base class. + * This is the base type that represents an advanced filter. To configure an + * advanced filter, do not directly instantiate an object of this class. + * Instead, instantiate an object of a derived class such as + * BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter + * etc. depending on the type of the key based on which you want to filter. * */ class AdvancedFilter { /** * Create a AdvancedFilter. - * @property {string} [key] The Key value + * @property {string} [key] The field/property in the event based on which + * you want to filter. * @property {string} operatorType Polymorphic Discriminator */ constructor() { diff --git a/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js index e7f47c9273..4b2a6a369f 100644 --- a/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/boolEqualsAdvancedFilter.js @@ -20,7 +20,7 @@ const models = require('./index'); class BoolEqualsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a BoolEqualsAdvancedFilter. - * @property {boolean} [value] The boolean filter value + * @property {boolean} [value] The boolean filter value. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/index.d.ts b/lib/services/eventgridManagement/lib/models/index.d.ts index 725fa58687..5c7bcc2d00 100644 --- a/lib/services/eventgridManagement/lib/models/index.d.ts +++ b/lib/services/eventgridManagement/lib/models/index.d.ts @@ -201,11 +201,14 @@ export interface EventSubscriptionDestination { } /** - * The Advanced Filter base class. + * This is the base type that represents an advanced filter. To configure an advanced filter, do + * not directly instantiate an object of this class. Instead, instantiate an object of a derived + * class such as BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter etc. + * depending on the type of the key based on which you want to filter. */ export interface AdvancedFilter { /** - * The Key value + * The field/property in the event based on which you want to filter. */ key?: string; /** @@ -273,11 +276,11 @@ export interface DeadLetterDestination { } /** - * NumberIn Advanced Filter + * NumberIn Advanced Filter. */ export interface NumberInAdvancedFilter extends AdvancedFilter { /** - * The set of filter values + * The set of filter values. */ values?: number[]; } @@ -297,51 +300,51 @@ export interface StorageBlobDeadLetterDestination extends DeadLetterDestination } /** - * NumberNotIn Advanced Filter + * NumberNotIn Advanced Filter. */ export interface NumberNotInAdvancedFilter extends AdvancedFilter { /** - * The set of filter values + * The set of filter values. */ values?: number[]; } /** - * NumberLessThan Advanced Filter + * NumberLessThan Advanced Filter. */ export interface NumberLessThanAdvancedFilter extends AdvancedFilter { /** - * The filter value + * The filter value. */ value?: number; } /** - * NumberGreaterThan Advanced Filter + * NumberGreaterThan Advanced Filter. */ export interface NumberGreaterThanAdvancedFilter extends AdvancedFilter { /** - * The filter value + * The filter value. */ value?: number; } /** - * NumberLessThanOrEquals Advanced Filter + * NumberLessThanOrEquals Advanced Filter. */ export interface NumberLessThanOrEqualsAdvancedFilter extends AdvancedFilter { /** - * The filter value + * The filter value. */ value?: number; } /** - * NumberGreaterThanOrEquals Advanced Filter + * NumberGreaterThanOrEquals Advanced Filter. */ export interface NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilter { /** - * The filter value + * The filter value. */ value?: number; } @@ -351,57 +354,57 @@ export interface NumberGreaterThanOrEqualsAdvancedFilter extends AdvancedFilter */ export interface BoolEqualsAdvancedFilter extends AdvancedFilter { /** - * The boolean filter value + * The boolean filter value. */ value?: boolean; } /** - * StringIn Advanced Filter + * StringIn Advanced Filter. */ export interface StringInAdvancedFilter extends AdvancedFilter { /** - * The set of filter values + * The set of filter values. */ values?: string[]; } /** - * StringNotIn Advanced Filter + * StringNotIn Advanced Filter. */ export interface StringNotInAdvancedFilter extends AdvancedFilter { /** - * The set of filter values + * The set of filter values. */ values?: string[]; } /** - * StringBeginsWith Advanced Filter + * StringBeginsWith Advanced Filter. */ export interface StringBeginsWithAdvancedFilter extends AdvancedFilter { /** - * The set of filter values + * The set of filter values. */ values?: string[]; } /** - * StringEndsWith Advanced Filter + * StringEndsWith Advanced Filter. */ export interface StringEndsWithAdvancedFilter extends AdvancedFilter { /** - * The set of filter values + * The set of filter values. */ values?: string[]; } /** - * StringContains Advanced Filter + * StringContains Advanced Filter. */ export interface StringContainsAdvancedFilter extends AdvancedFilter { /** - * The set of filter values + * The set of filter values. */ values?: string[]; } diff --git a/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js index 1008dd850c..5804505885 100644 --- a/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberGreaterThanAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberGreaterThan Advanced Filter + * NumberGreaterThan Advanced Filter. * * @extends models['AdvancedFilter'] */ class NumberGreaterThanAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberGreaterThanAdvancedFilter. - * @property {number} [value] The filter value + * @property {number} [value] The filter value. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js index 71f0bbb7e2..2145e4c642 100644 --- a/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberGreaterThanOrEqualsAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberGreaterThanOrEquals Advanced Filter + * NumberGreaterThanOrEquals Advanced Filter. * * @extends models['AdvancedFilter'] */ class NumberGreaterThanOrEqualsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberGreaterThanOrEqualsAdvancedFilter. - * @property {number} [value] The filter value + * @property {number} [value] The filter value. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js index 2d0c24dce3..2393c84836 100644 --- a/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberIn Advanced Filter + * NumberIn Advanced Filter. * * @extends models['AdvancedFilter'] */ class NumberInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberInAdvancedFilter. - * @property {array} [values] The set of filter values + * @property {array} [values] The set of filter values. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js index 82bca84d51..ef3c261a37 100644 --- a/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberLessThanAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberLessThan Advanced Filter + * NumberLessThan Advanced Filter. * * @extends models['AdvancedFilter'] */ class NumberLessThanAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberLessThanAdvancedFilter. - * @property {number} [value] The filter value + * @property {number} [value] The filter value. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js index 8a6ac05698..91dc3370b5 100644 --- a/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberLessThanOrEqualsAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberLessThanOrEquals Advanced Filter + * NumberLessThanOrEquals Advanced Filter. * * @extends models['AdvancedFilter'] */ class NumberLessThanOrEqualsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberLessThanOrEqualsAdvancedFilter. - * @property {number} [value] The filter value + * @property {number} [value] The filter value. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js index 5882e6c23e..9cf7494944 100644 --- a/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/numberNotInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * NumberNotIn Advanced Filter + * NumberNotIn Advanced Filter. * * @extends models['AdvancedFilter'] */ class NumberNotInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a NumberNotInAdvancedFilter. - * @property {array} [values] The set of filter values + * @property {array} [values] The set of filter values. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js index c8921893c4..1b67257a50 100644 --- a/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringBeginsWithAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringBeginsWith Advanced Filter + * StringBeginsWith Advanced Filter. * * @extends models['AdvancedFilter'] */ class StringBeginsWithAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringBeginsWithAdvancedFilter. - * @property {array} [values] The set of filter values + * @property {array} [values] The set of filter values. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js index b3b98cfbf6..405f74182c 100644 --- a/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringContainsAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringContains Advanced Filter + * StringContains Advanced Filter. * * @extends models['AdvancedFilter'] */ class StringContainsAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringContainsAdvancedFilter. - * @property {array} [values] The set of filter values + * @property {array} [values] The set of filter values. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js index 47af24d7dd..f2028dd687 100644 --- a/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringEndsWithAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringEndsWith Advanced Filter + * StringEndsWith Advanced Filter. * * @extends models['AdvancedFilter'] */ class StringEndsWithAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringEndsWithAdvancedFilter. - * @property {array} [values] The set of filter values + * @property {array} [values] The set of filter values. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js index 3a2ba6d361..e1001e3205 100644 --- a/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringIn Advanced Filter + * StringIn Advanced Filter. * * @extends models['AdvancedFilter'] */ class StringInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringInAdvancedFilter. - * @property {array} [values] The set of filter values + * @property {array} [values] The set of filter values. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js b/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js index dbb3111f5c..ceb7337411 100644 --- a/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js +++ b/lib/services/eventgridManagement/lib/models/stringNotInAdvancedFilter.js @@ -13,14 +13,14 @@ const models = require('./index'); /** - * StringNotIn Advanced Filter + * StringNotIn Advanced Filter. * * @extends models['AdvancedFilter'] */ class StringNotInAdvancedFilter extends models['AdvancedFilter'] { /** * Create a StringNotInAdvancedFilter. - * @property {array} [values] The set of filter values + * @property {array} [values] The set of filter values. */ constructor() { super(); diff --git a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js index fa3ce02f40..17169246ee 100644 --- a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js +++ b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js @@ -716,7 +716,7 @@ function _getFullUrl(scope, eventSubscriptionName, options, callback) { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -748,7 +748,7 @@ function _listGlobalBySubscription(options, callback) { } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -763,8 +763,8 @@ function _listGlobalBySubscription(options, callback) { if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -785,8 +785,8 @@ function _listGlobalBySubscription(options, callback) { if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -883,7 +883,7 @@ function _listGlobalBySubscription(options, callback) { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -915,7 +915,7 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -933,8 +933,8 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -956,8 +956,8 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1056,7 +1056,7 @@ function _listGlobalBySubscriptionForTopicType(topicTypeName, options, callback) * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1088,7 +1088,7 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1106,8 +1106,8 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1129,8 +1129,8 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1231,7 +1231,7 @@ function _listGlobalByResourceGroup(resourceGroupName, options, callback) { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1263,7 +1263,7 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1284,8 +1284,8 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1308,8 +1308,8 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1406,7 +1406,7 @@ function _listGlobalByResourceGroupForTopicType(resourceGroupName, topicTypeName * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1438,7 +1438,7 @@ function _listRegionalBySubscription(location, options, callback) { } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1456,8 +1456,8 @@ function _listRegionalBySubscription(location, options, callback) { if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1479,8 +1479,8 @@ function _listRegionalBySubscription(location, options, callback) { if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1581,7 +1581,7 @@ function _listRegionalBySubscription(location, options, callback) { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1613,7 +1613,7 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1634,8 +1634,8 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1658,8 +1658,8 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1759,7 +1759,7 @@ function _listRegionalByResourceGroup(resourceGroupName, location, options, call * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1791,7 +1791,7 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1812,8 +1812,8 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -1836,8 +1836,8 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -1940,7 +1940,7 @@ function _listRegionalBySubscriptionForTopicType(location, topicTypeName, option * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1972,7 +1972,7 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1996,8 +1996,8 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -2021,8 +2021,8 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -2125,7 +2125,7 @@ function _listRegionalByResourceGroupForTopicType(resourceGroupName, location, t * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2157,7 +2157,7 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -2184,8 +2184,8 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -2210,8 +2210,8 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -2313,7 +2313,7 @@ function _listByResource(resourceGroupName, providerNamespace, resourceTypeName, * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2345,7 +2345,7 @@ function _listByDomainTopic(resourceGroupName, domainName, topicName, options, c } let filter = (options && options.filter !== undefined) ? options.filter : undefined; let top = (options && options.top !== undefined) ? options.top : undefined; - let lABEL = (options && options.lABEL !== undefined) ? options.lABEL : undefined; + let label = (options && options.label !== undefined) ? options.label : undefined; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -2369,8 +2369,8 @@ function _listByDomainTopic(resourceGroupName, domainName, topicName, options, c if (top !== null && top !== undefined && typeof top !== 'number') { throw new Error('top must be of type number.'); } - if (lABEL !== null && lABEL !== undefined && typeof lABEL.valueOf() !== 'string') { - throw new Error('lABEL must be of type string.'); + if (label !== null && label !== undefined && typeof label.valueOf() !== 'string') { + throw new Error('label must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -2394,8 +2394,8 @@ function _listByDomainTopic(resourceGroupName, domainName, topicName, options, c if (top !== null && top !== undefined) { queryParameters.push('$top=' + encodeURIComponent(top.toString())); } - if (lABEL !== null && lABEL !== undefined) { - queryParameters.push('LABEL=' + encodeURIComponent(lABEL)); + if (label !== null && label !== undefined) { + queryParameters.push('label=' + encodeURIComponent(label)); } if (queryParameters.length > 0) { requestUrl += '?' + queryParameters.join('&'); @@ -5252,7 +5252,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5291,7 +5291,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5354,7 +5354,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5394,7 +5394,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5459,7 +5459,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5501,7 +5501,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5568,7 +5568,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5612,7 +5612,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5675,7 +5675,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5715,7 +5715,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5782,7 +5782,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5826,7 +5826,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5892,7 +5892,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5935,7 +5935,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6004,7 +6004,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6050,7 +6050,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6119,7 +6119,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6165,7 +6165,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6233,7 +6233,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6278,7 +6278,7 @@ class EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/eventgridManagement/lib/operations/index.d.ts b/lib/services/eventgridManagement/lib/operations/index.d.ts index 722c0fd13f..85fd58efdf 100644 --- a/lib/services/eventgridManagement/lib/operations/index.d.ts +++ b/lib/services/eventgridManagement/lib/operations/index.d.ts @@ -2141,7 +2141,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2153,7 +2153,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listGlobalBySubscriptionWithHttpOperationResponse(options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listGlobalBySubscriptionWithHttpOperationResponse(options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Get an aggregated list of all global event subscriptions under an @@ -2168,7 +2168,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2197,9 +2197,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalBySubscription(options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalBySubscription(options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listGlobalBySubscription(callback: ServiceCallback): void; - listGlobalBySubscription(options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGlobalBySubscription(options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2216,7 +2216,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2228,7 +2228,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listGlobalBySubscriptionForTopicTypeWithHttpOperationResponse(topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listGlobalBySubscriptionForTopicTypeWithHttpOperationResponse(topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all global event subscriptions for a topic type @@ -2244,7 +2244,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2273,9 +2273,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalBySubscriptionForTopicType(topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalBySubscriptionForTopicType(topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listGlobalBySubscriptionForTopicType(topicTypeName: string, callback: ServiceCallback): void; - listGlobalBySubscriptionForTopicType(topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGlobalBySubscriptionForTopicType(topicTypeName: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2294,7 +2294,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2306,7 +2306,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listGlobalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listGlobalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all global event subscriptions under an Azure subscription and @@ -2324,7 +2324,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2353,9 +2353,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalByResourceGroup(resourceGroupName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalByResourceGroup(resourceGroupName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listGlobalByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; - listGlobalByResourceGroup(resourceGroupName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGlobalByResourceGroup(resourceGroupName: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2376,7 +2376,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2388,7 +2388,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listGlobalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listGlobalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all global event subscriptions under a resource group for a @@ -2408,7 +2408,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2437,9 +2437,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, callback: ServiceCallback): void; - listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listGlobalByResourceGroupForTopicType(resourceGroupName: string, topicTypeName: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2456,7 +2456,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2468,7 +2468,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listRegionalBySubscriptionWithHttpOperationResponse(location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listRegionalBySubscriptionWithHttpOperationResponse(location: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all regional event subscriptions under an Azure subscription @@ -2484,7 +2484,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2513,9 +2513,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalBySubscription(location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalBySubscription(location: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listRegionalBySubscription(location: string, callback: ServiceCallback): void; - listRegionalBySubscription(location: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listRegionalBySubscription(location: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2536,7 +2536,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2548,7 +2548,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listRegionalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listRegionalByResourceGroupWithHttpOperationResponse(resourceGroupName: string, location: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all regional event subscriptions under an Azure subscription @@ -2568,7 +2568,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2597,9 +2597,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalByResourceGroup(resourceGroupName: string, location: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalByResourceGroup(resourceGroupName: string, location: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listRegionalByResourceGroup(resourceGroupName: string, location: string, callback: ServiceCallback): void; - listRegionalByResourceGroup(resourceGroupName: string, location: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listRegionalByResourceGroup(resourceGroupName: string, location: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2619,7 +2619,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2631,7 +2631,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listRegionalBySubscriptionForTopicTypeWithHttpOperationResponse(location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listRegionalBySubscriptionForTopicTypeWithHttpOperationResponse(location: string, topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all regional event subscriptions under an Azure subscription @@ -2650,7 +2650,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2679,9 +2679,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, callback: ServiceCallback): void; - listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listRegionalBySubscriptionForTopicType(location: string, topicTypeName: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2704,7 +2704,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2716,7 +2716,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listRegionalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listRegionalByResourceGroupForTopicTypeWithHttpOperationResponse(resourceGroupName: string, location: string, topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all regional event subscriptions under an Azure subscription @@ -2738,7 +2738,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2767,9 +2767,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, callback: ServiceCallback): void; - listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listRegionalByResourceGroupForTopicType(resourceGroupName: string, location: string, topicTypeName: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2792,7 +2792,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2804,7 +2804,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listByResourceWithHttpOperationResponse(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceWithHttpOperationResponse(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all event subscriptions for a specific topic @@ -2826,7 +2826,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2855,9 +2855,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, callback: ServiceCallback): void; - listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResource(resourceGroupName: string, providerNamespace: string, resourceTypeName: string, resourceName: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -2879,7 +2879,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2891,7 +2891,7 @@ export interface EventSubscriptions { * * @reject {Error|ServiceError} - The error object. */ - listByDomainTopicWithHttpOperationResponse(resourceGroupName: string, domainName: string, topicName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDomainTopicWithHttpOperationResponse(resourceGroupName: string, domainName: string, topicName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary List all event subscriptions for a specific domain topic @@ -2912,7 +2912,7 @@ export interface EventSubscriptions { * * @param {number} [options.top] The number of results to return. * - * @param {string} [options.lABEL] The label used to filter the results for + * @param {string} [options.label] The label used to filter the results for * event subscriptions list. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2941,9 +2941,9 @@ export interface EventSubscriptions { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options?: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options?: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }): Promise; listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, callback: ServiceCallback): void; - listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options: { filter? : string, top? : number, lABEL? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDomainTopic(resourceGroupName: string, domainName: string, topicName: string, options: { filter? : string, top? : number, label? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** From 72e6b54f5156df4725aa467802b9ab151fd3dc15 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 26 Feb 2019 07:49:25 +0000 Subject: [PATCH 3/3] Generated from c681e1b7ce8baad94433d826b119127fc9c4891b Address CR comments --- .../lib/models/eventSubscription.js | 2 +- .../lib/models/eventSubscriptionFilter.js | 2 +- .../eventSubscriptionUpdateParameters.js | 2 +- .../eventgridManagement/lib/models/index.d.ts | 2 +- .../lib/operations/eventSubscriptions.js | 48 +++++++++---------- .../lib/operations/index.d.ts | 32 ++++++------- 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/services/eventgridManagement/lib/models/eventSubscription.js b/lib/services/eventgridManagement/lib/models/eventSubscription.js index 65f923c2d3..f611e4da00 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscription.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscription.js @@ -38,7 +38,7 @@ class EventSubscription extends models['Resource'] { * Wildcard characters are not supported in this path. * @property {array} [filter.includedEventTypes] A list of applicable event * types that need to be part of the event subscription. If it is desired to - * subscribe to all event types, set the IncludedEventTypes to null. + * subscribe to all default event types, set the IncludedEventTypes to null. * @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. diff --git a/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js b/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js index 346e2e2786..25d8b0815c 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscriptionFilter.js @@ -26,7 +26,7 @@ class EventSubscriptionFilter { * Wildcard characters are not supported in this path. * @property {array} [includedEventTypes] A list of applicable event types * that need to be part of the event subscription. If it is desired to - * subscribe to all event types, set the IncludedEventTypes to null. + * subscribe to all default event types, set the IncludedEventTypes to null. * @property {boolean} [isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. Default value: false . diff --git a/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js b/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js index eb928e10fb..95fa1a752a 100644 --- a/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js +++ b/lib/services/eventgridManagement/lib/models/eventSubscriptionUpdateParameters.js @@ -31,7 +31,7 @@ class EventSubscriptionUpdateParameters { * Wildcard characters are not supported in this path. * @property {array} [filter.includedEventTypes] A list of applicable event * types that need to be part of the event subscription. If it is desired to - * subscribe to all event types, set the IncludedEventTypes to null. + * subscribe to all default event types, set the IncludedEventTypes to null. * @property {boolean} [filter.isSubjectCaseSensitive] Specifies if the * SubjectBeginsWith and SubjectEndsWith properties of the filter * should be compared in a case sensitive manner. diff --git a/lib/services/eventgridManagement/lib/models/index.d.ts b/lib/services/eventgridManagement/lib/models/index.d.ts index 5c7bcc2d00..0c68678f40 100644 --- a/lib/services/eventgridManagement/lib/models/index.d.ts +++ b/lib/services/eventgridManagement/lib/models/index.d.ts @@ -234,7 +234,7 @@ export interface EventSubscriptionFilter { subjectEndsWith?: string; /** * A list of applicable event types that need to be part of the event subscription. If it is - * desired to subscribe to all event types, set the IncludedEventTypes to null. + * desired to subscribe to all default event types, set the IncludedEventTypes to null. */ includedEventTypes?: string[]; /** diff --git a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js index 17169246ee..dcb5dcb216 100644 --- a/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js +++ b/lib/services/eventgridManagement/lib/operations/eventSubscriptions.js @@ -214,8 +214,8 @@ function _get(scope, eventSubscriptionName, options, callback) { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -440,8 +440,8 @@ function _deleteMethod(scope, eventSubscriptionName, options, callback) { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -2525,8 +2525,8 @@ function _listByDomainTopic(resourceGroupName, domainName, topicName, options, c * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -2891,8 +2891,8 @@ function _beginDeleteMethod(scope, eventSubscriptionName, options, callback) { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -4590,8 +4590,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -4698,8 +4698,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -4933,8 +4933,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -5043,8 +5043,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -6374,8 +6374,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -6482,8 +6482,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -6717,8 +6717,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -6827,8 +6827,8 @@ class EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies diff --git a/lib/services/eventgridManagement/lib/operations/index.d.ts b/lib/services/eventgridManagement/lib/operations/index.d.ts index 85fd58efdf..48f49a649c 100644 --- a/lib/services/eventgridManagement/lib/operations/index.d.ts +++ b/lib/services/eventgridManagement/lib/operations/index.d.ts @@ -1587,8 +1587,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -1683,8 +1683,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -1876,8 +1876,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -1974,8 +1974,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -2993,8 +2993,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -3089,8 +3089,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionInfo.filter.includedEventTypes] A list of * applicable event types that need to be part of the event subscription. If it - * is desired to subscribe to all event types, set the IncludedEventTypes to - * null. + * is desired to subscribe to all default event types, set the + * IncludedEventTypes to null. * * @param {boolean} [eventSubscriptionInfo.filter.isSubjectCaseSensitive] * Specifies if the SubjectBeginsWith and SubjectEndsWith properties of the @@ -3282,8 +3282,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies @@ -3380,8 +3380,8 @@ export interface EventSubscriptions { * * @param {array} [eventSubscriptionUpdateParameters.filter.includedEventTypes] * A list of applicable event types that need to be part of the event - * subscription. If it is desired to subscribe to all event types, set the - * IncludedEventTypes to null. + * subscription. If it is desired to subscribe to all default event types, set + * the IncludedEventTypes to null. * * @param {boolean} * [eventSubscriptionUpdateParameters.filter.isSubjectCaseSensitive] Specifies