lib/services/eventgridManagement/lib/operations/eventSubscriptions.js
/**
   * @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, 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 {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The
   * event delivery schema for the event subscription. Possible values include:
   * 'EventGridSchema', 'InputEventSchema', 'CloudEventV01Schema'
   *
   * @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<EventSubscription>} - The deserialized result object.
   *
   * @reject {Error} - The error object.
   */
@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.

@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 {string} [eventSubscriptionUpdateParameters.eventDeliverySchema] The
event delivery schema for the event 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 {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 {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.
@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 . @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 { string } [ eventSubscriptionUpdateParameters . eventDeliverySchema ] The event delivery schema for the event 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 { 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 { 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;
      });
    });
  }
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.
@summary Update an event subscription Asynchronously updates an existing event subscription .