/**
 * Interface of the server (auto-generated code)
 */
import { z as zod } from "zod";

import {ZodLong} from "./long";

export const ZodUserOut = zod.object({
	id: ZodLong,
	login: zod.string().optional(),

});

export type UserOut = zod.infer<typeof ZodUserOut>;

export function isUserOut(data: any): data is UserOut {
	try {
		ZodUserOut.parse(data);
		return true;
	} catch (e: any) {
		console.log(`Fail to parse data type='ZodUserOut' error=${e}`);
		return false;
	}
}
export const ZodUserOutWrite = zod.object({
	id: ZodLong,
	login: zod.string().nullable().optional(),

});

export type UserOutWrite = zod.infer<typeof ZodUserOutWrite>;

export function isUserOutWrite(data: any): data is UserOutWrite {
	try {
		ZodUserOutWrite.parse(data);
		return true;
	} catch (e: any) {
		console.log(`Fail to parse data type='ZodUserOutWrite' error=${e}`);
		return false;
	}
}
