You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: update_service.rb
    path of file: ./repos/gitlabhq/app/services/incident_management/timeline_events
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module IncidentManagement
  module TimelineEvents
    # @param timeline_event [IncidentManagement::TimelineEvent]
    # @param user [User]
    # @param params [Hash]
    # @option params [string] note
    # @option params [datetime] occurred_at
    class UpdateService < TimelineEvents::BaseService
      VALIDATION_CONTEXT = :user_input

      def initialize(timeline_event, user, params)
        @timeline_event = timeline_event
        @incident = timeline_event.incident
        @project = incident.project
        @user = user
        @note = params[:note]
        @occurred_at = para
    
      def execute
        return error_no_permissions unless allowed?

        unless timeline_event_tags.nil?
          auto_create_predefined_tags(timeline_event_tags)

          # Refetches the tag objects to consider predefined tags as well
          new_tags = timeline_event
                      .project
                      .incident_management_timeline_event_tags
                      .by_names(timeline_event_tags)

          non_existing_tags = validate_tags(new_tags)

          return error("#{_("Following tags don't exist")}: #{non_existing_tags}") if non_existing_tags.any?
        end

        begin
          timeline_event_saved = update_timeline_event_and_event_tags(new_tags)
        rescue ActiveRecord::RecordInvalid
          error_in_save(timeline_event)
        end