lib/spatio/model/block_list_response.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.BlockListResponse do
  @moduledoc """
  Single-account list response for `GET /v1/notes/{id}/blocks`. Unlike `GET /v1/notes`, block listing always targets one account so it does not fan out — `total` is the count for the current page slice. 
  """

  @derive JSON.Encoder
  defstruct [
    :blocks,
    :total
  ]

  @type t :: %__MODULE__{
    :blocks => [Spatio.Model.Block.t],
    :total => integer()
  }

  alias Spatio.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:blocks, :list, Spatio.Model.Block)
  end
end