/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 0f4190b5e87f
 */

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

export type DeleteModelResponse = {
  /**
   * The ID of the deleted model.
   */
  id: string;
  /**
   * The object type that was deleted.
   */
  object: string;
  /**
   * The deletion status.
   */
  deleted: boolean;
};

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

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