/* * 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 FailedOperationDto = { /** * The error message associated with the failed operation. */ message?: string | undefined; /** * The subscriber ID associated with the failed operation. This field is optional. */ subscriberId?: string | undefined; }; /** @internal */ export const FailedOperationDto$inboundSchema: z.ZodType< FailedOperationDto, z.ZodTypeDef, unknown > = z.object({ message: z.string().optional(), subscriberId: z.string().optional(), }); export function failedOperationDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FailedOperationDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FailedOperationDto' from JSON`, ); }