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

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";
import { Workflow, Workflow$inboundSchema } from "./workflow.js";

export type WorkflowUnarchiveResponse = {
  workflow: Workflow;
};

/** @internal */
export const WorkflowUnarchiveResponse$inboundSchema: z.ZodType<
  WorkflowUnarchiveResponse,
  unknown
> = z.object({
  workflow: Workflow$inboundSchema,
});

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