lib/spatio/model/share_settings.ex

# 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.ShareSettings do
  @moduledoc """
  Public share configuration for a note. Owner-only mutation; unauthenticated readers consume `GET /public/notes/{token}` instead. 
  """

  @derive JSON.Encoder
  defstruct [
    :isPublic,
    :hasPassword,
    :shareToken,
    :shareUrl,
    :passwordSetAt
  ]

  @type t :: %__MODULE__{
    :isPublic => boolean(),
    :hasPassword => boolean(),
    :shareToken => String.t | nil,
    :shareUrl => Uri | nil,
    :passwordSetAt => DateTime.t | nil
  }

  alias Spatio.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:shareUrl, :struct, Spatio.Model.Uri)
  end
end