# 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.PptxAppProperties do
  @moduledoc """
  Application properties from docProps/app.xml for PPTX

  Contains PowerPoint-specific document metadata.
  """

  @typedoc "Application properties from docProps/app.xml for PPTX"
  @type t :: %__MODULE__{
          application: String.t() | nil,
          app_version: String.t() | nil,
          total_time: integer() | nil,
          company: String.t() | nil,
          doc_security: integer() | nil,
          scale_crop: boolean() | nil,
          links_up_to_date: boolean() | nil,
          shared_doc: boolean() | nil,
          hyperlinks_changed: boolean() | nil,
          slides: integer() | nil,
          notes: integer() | nil,
          hidden_slides: integer() | nil,
          multimedia_clips: integer() | nil,
          presentation_format: String.t() | nil,
          slide_titles: [String.t()]
        }

  defstruct application: nil,
            app_version: nil,
            total_time: nil,
            company: nil,
            doc_security: nil,
            scale_crop: nil,
            links_up_to_date: nil,
            shared_doc: nil,
            hyperlinks_changed: nil,
            slides: nil,
            notes: nil,
            hidden_slides: nil,
            multimedia_clips: nil,
            presentation_format: nil,
            slide_titles: []

  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
