# 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.Workspace do
@moduledoc """
A workspace within an organization. Returned in list responses (`GET /v1/workspaces`, `GET /v1/organizations/{id}/workspaces`) and the single-get response (`GET /v1/workspaces/{id}`, wrapped in `{workspace: ...}`). `settings` shape varies by endpoint — sometimes a JSON object, sometimes a JSON-encoded string. Treat as opaque.
"""
@derive JSON.Encoder
defstruct [
:id,
:name,
:slug,
:description,
:logoUrl,
:organizationId,
:organization,
:role,
:settings,
:isDefault,
:memberCount,
:billingTier,
:createdAt,
:updatedAt
]
@type t :: %__MODULE__{
:id => String.t,
:name => String.t,
:slug => String.t,
:description => String.t | nil,
:logoUrl => String.t | nil,
:organizationId => String.t | nil,
:organization => Spatio.Model.WorkspaceOrganization.t | nil,
:role => String.t | nil,
:settings => any() | nil,
:isDefault => boolean() | nil,
:memberCount => integer() | nil,
:billingTier => String.t | nil,
:createdAt => DateTime.t | nil,
:updatedAt => DateTime.t | nil
}
alias Spatio.Deserializer
def decode(value) do
value
|> Deserializer.deserialize(:organization, :struct, Spatio.Model.WorkspaceOrganization)
end
end