/*
 * 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 FileSignedURL = {
  url: string;
};

/** @internal */
export const FileSignedURL$inboundSchema: z.ZodType<
  FileSignedURL,
  z.ZodTypeDef,
  unknown
> = z.object({
  url: z.string(),
});

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