lib/spatio/model/organization.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.Organization do
  @moduledoc """
  Organization summary used in list responses (`GET /v1/organizations`, `GET /v1/organizations/{id}/workspaces`). Returned with camelCase field names.  NB: The single-org GET `/v1/organizations/{id}` returns a *different shape* (`OrganizationDetailLegacy`, PascalCase keys) today — see that schema for the wire-level reality. This is a known inconsistency the platform-service is expected to converge on the camelCase shape in a future cleanup. 
  """

  @derive JSON.Encoder
  defstruct [
    :id,
    :name,
    :slug,
    :description,
    :logoUrl,
    :role,
    :memberCount,
    :workspaceCount,
    :workspaces,
    :createdAt,
    :updatedAt
  ]

  @type t :: %__MODULE__{
    :id => String.t,
    :name => String.t,
    :slug => String.t,
    :description => String.t | nil,
    :logoUrl => String.t | nil,
    :role => String.t,
    :memberCount => integer() | nil,
    :workspaceCount => integer() | nil,
    :workspaces => [Spatio.Model.OrganizationWorkspacesInner.t] | nil,
    :createdAt => DateTime.t,
    :updatedAt => DateTime.t
  }

  alias Spatio.Deserializer

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