// Generated by smithplates HTTP codegen. Do not edit.
import { JoinRoom } from "generated/example/joinRoom";
import { LeaveRoom } from "generated/example/leaveRoom";
import { Ping } from "generated/example/ping";

export interface ClientMessageJoin {
  join: JoinRoom;
}

export interface ClientMessageLeave {
  leave: LeaveRoom;
}

export interface ClientMessagePing {
  ping: Ping;
}

export type ClientMessage = ClientMessageJoin | ClientMessageLeave | ClientMessagePing;

export function parseClientMessage(value: unknown): ClientMessage {
  return value as ClientMessage;
}

export function serializeClientMessage(value: ClientMessage): Record<string, unknown> {
  return { ...value };
}
