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

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

export type ExportDatasetResponse = {
  fileUrl: string;
};

/** @internal */
export const ExportDatasetResponse$inboundSchema: z.ZodType<
  ExportDatasetResponse,
  unknown
> = z.object({
  file_url: z.string(),
}).transform((v) => {
  return remap$(v, {
    "file_url": "fileUrl",
  });
});

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