Current section
Files
Jump to
Current section
Files
lib/xberg/extract_input.ex
# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:b2c29ab80fb9cdb8c5190a7808ad862ad890f416ad887092447b282a5b1b69e0
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.ExtractInput do
@moduledoc "Unified extraction input for all public extraction entry points."
@typedoc "Unified extraction input for all public extraction entry points."
@type t :: %__MODULE__{
kind: String.t() | nil,
bytes: binary() | nil,
uri: String.t() | nil,
mime_type: String.t() | nil,
filename: String.t() | nil,
config: Xberg.FileExtractionConfig.t() | nil
}
defstruct kind: :uri,
bytes: nil,
uri: nil,
mime_type: nil,
filename: nil,
config: 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