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

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 WorkflowScheduleResponse = {
  /**
   * The ID of the schedule
   */
  scheduleId: string;
};

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

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