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

import {ZodUUID} from "./uuid";
import {ZodGenericTiming, ZodGenericTimingWrite } from "./generic-timing";

export const ZodUUIDGenericData = ZodGenericTiming.extend({
	/**
	 * Unique UUID of the object
	 */
	uuid: ZodUUID.readonly(),

});

export type UUIDGenericData = zod.infer<typeof ZodUUIDGenericData>;

export function isUUIDGenericData(data: any): data is UUIDGenericData {
	try {
		ZodUUIDGenericData.parse(data);
		return true;
	} catch (e: any) {
		console.log(`Fail to parse data type='ZodUUIDGenericData' error=${e}`);
		return false;
	}
}
export const ZodUUIDGenericDataWrite = ZodGenericTimingWrite.extend({

});

export type UUIDGenericDataWrite = zod.infer<typeof ZodUUIDGenericDataWrite>;

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