# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
defmodule Kreuzberg.CoreProperties do
  @moduledoc """
  Dublin Core metadata from docProps/core.xml

  Contains standard metadata fields defined by the Dublin Core standard
  and Office-specific extensions.
  """

  @typedoc "Dublin Core metadata from docProps/core.xml"
  @type t :: %__MODULE__{
          title: String.t() | nil,
          subject: String.t() | nil,
          creator: String.t() | nil,
          keywords: String.t() | nil,
          description: String.t() | nil,
          last_modified_by: String.t() | nil,
          revision: String.t() | nil,
          created: String.t() | nil,
          modified: String.t() | nil,
          category: String.t() | nil,
          content_status: String.t() | nil,
          language: String.t() | nil,
          identifier: String.t() | nil,
          version: String.t() | nil,
          last_printed: String.t() | nil
        }

  defstruct title: nil,
            subject: nil,
            creator: nil,
            keywords: nil,
            description: nil,
            last_modified_by: nil,
            revision: nil,
            created: nil,
            modified: nil,
            category: nil,
            content_status: nil,
            language: nil,
            identifier: nil,
            version: nil,
            last_printed: nil

  defimpl Jason.Encoder do
    @doc false
    def encode(value, opts) do
      value
      |> Map.from_struct()
      |> Enum.reject(fn {_k, v} -> v == nil end)
      |> Enum.into(%{})
      |> Jason.Encoder.encode(opts)
    end
  end
end
