def update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
      # Send request
      promise = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers)

      promise = promise.then do |response|
        # Defining deserialization method.
        deserialize_method = lambda do |parsed_response|
          result_mapper = Azure::EventGrid::Mgmt::V2019_02_01_preview::Models::EventSubscription.mapper()
          parsed_response = @client.deserialize(result_mapper, parsed_response)
        end

        # Waiting for response.
        @client.get_long_running_operation_result(response, deserialize_method)
      end

      promise
    end
def update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:nil)
      # Send request
      promise = begin_update_async(scope, event_subscription_name, event_subscription_update_parameters, custom_headers:custom_headers)

      promise = promise.then do |response|
        # Defining deserialization method.
        deserialize_method = lambda do |parsed_response|
          result_mapper = Azure::EventGrid::Mgmt::V2019_02_01_preview::Models::EventSubscription.mapper()
          parsed_response = @client.deserialize(result_mapper, parsed_response)
        end

        # Waiting for response.
        @client.get_long_running_operation_result(response, deserialize_method)
      end

      promise
    end
@param scope [String] 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 event_subscription_name [String] Name of the event subscription to be
 updated
 @param event_subscription_update_parameters
 [EventSubscriptionUpdateParameters] Updated event subscription information
 @param custom_headers [Hash{String => String}] A hash of custom headers that
 will be added to the HTTP request.

 @return [Concurrent::Promise] promise which provides async access to http
 response.