/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export type ArchiveFTModelOut = {
  id: string;
  object?: "model" | undefined;
  archived: boolean | undefined;
};

/** @internal */
export const ArchiveFTModelOut$inboundSchema: z.ZodType<
  ArchiveFTModelOut,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.string(),
  object: z.literal("model").default("model"),
  archived: z.boolean().default(true),
});

export function archiveFTModelOutFromJSON(
  jsonString: string,
): SafeParseResult<ArchiveFTModelOut, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => ArchiveFTModelOut$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'ArchiveFTModelOut' from JSON`,
  );
}
