lib/spatio/model/channel.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.Channel do
  @moduledoc """
  A chat conversation. The same struct backs both group channels (`type: channel | private`) and direct-message threads (`type: im | mpim`); the `Channels` and `DirectMessages` HTTP surfaces filter on `type` to give each its dedicated URL space. 
  """

  @derive JSON.Encoder
  defstruct [
    :id,
    :provider,
    :accountId,
    :name,
    :type,
    :description,
    :topic,
    :isMember,
    :isArchived,
    :memberCount,
    :createdAt
  ]

  @type t :: %__MODULE__{
    :id => String.t,
    :provider => String.t | nil,
    :accountId => String.t | nil,
    :name => String.t,
    :type => String.t,
    :description => String.t | nil,
    :topic => String.t | nil,
    :isMember => boolean(),
    :isArchived => boolean(),
    :memberCount => integer() | nil,
    :createdAt => DateTime.t | nil
  }

  def decode(value) do
    value
  end
end