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: event.rb
    path of file: ./repos/avo/spec/dummy/app/avo/resources
    
    the code of the file until where you have to start completion: class Avo::Resources::Event < Avo::BaseResource
  self.title = :name
  self.description = "An event that happened at a certain time."
  self.inclu
    
  def fields
    field :name, as: :text, link_to_record: true, sortable: true, stacked: true
    field :event_time, as: :datetime, sortable: true

    if params[:show_location_field] == '1'
      # Example for error message when resource is missing
      field :location, as: :belongs_to
    end