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

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 { GetLog, GetLog$inboundSchema } from "./getlog.js";

export type FeedResultGetLog = {
  results?: Array<GetLog> | undefined;
  next?: string | null | undefined;
  cursor?: string | null | undefined;
};

/** @internal */
export const FeedResultGetLog$inboundSchema: z.ZodType<
  FeedResultGetLog,
  unknown
> = z.object({
  results: z.array(GetLog$inboundSchema).optional(),
  next: z.nullable(z.string()).optional(),
  cursor: z.nullable(z.string()).optional(),
});

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