lib/gen_lsp/protocol/structures/file_event.ex

# codegen: do not edit
defmodule GenLSP.Structures.FileEvent do
  @moduledoc """
  An event describing a file change.
  """

  import Schematic, warn: false

  use TypedStruct

  @doc """
  ## Fields

  * uri: The file's uri.
  * type: The change type.
  """
  @derive Jason.Encoder
  typedstruct do
    field :uri, GenLSP.BaseTypes.document_uri(), enforce: true
    field :type, GenLSP.Enumerations.FileChangeType.t(), enforce: true
  end

  @doc false
  @spec schematic() :: Schematic.t()
  def schematic() do
    schema(__MODULE__, %{
      {"uri", :uri} => str(),
      {"type", :type} => GenLSP.Enumerations.FileChangeType.schematic()
    })
  end
end