# NOTE: This file is auto generated by OpenAPI Generator 7.22.0 (https://openapi-generator.tech).
# Do not edit this file manually.
defmodule Spatio.Model.SpatioFile do
@moduledoc """
A user file. Files belong to one connected file provider account (`accountId` + `provider`); native storage uses Spatio's block-store, external providers (Google Drive, Dropbox, etc.) round-trip through Spatio. Schema name is `SpatioFile` (not `File`) to avoid the `java.io.File` collision that breaks the Kotlin SDK generator when the schema is named `File`.
"""
@derive JSON.Encoder
defstruct [
:id,
:provider,
:accountId,
:name,
:size,
:mimeType,
:folderId,
:storageType,
:downloadUrl,
:metadata,
:createdAt,
:updatedAt
]
@type t :: %__MODULE__{
:id => String.t,
:provider => String.t | nil,
:accountId => String.t | nil,
:name => String.t,
:size => integer(),
:mimeType => String.t,
:folderId => String.t | nil,
:storageType => String.t,
:downloadUrl => Uri | nil,
:metadata => %{optional(String.t) => any()} | nil,
:createdAt => DateTime.t,
:updatedAt => DateTime.t
}
alias Spatio.Deserializer
def decode(value) do
value
|> Deserializer.deserialize(:downloadUrl, :struct, Spatio.Model.Uri)
end
end