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

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 MessageResponse = {
  message: string;
};

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

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