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

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

export type ListDatasetImportTasksResponse = {
  tasks: PaginatedResultDatasetImportTask;
};

/** @internal */
export const ListDatasetImportTasksResponse$inboundSchema: z.ZodType<
  ListDatasetImportTasksResponse,
  unknown
> = z.object({
  tasks: PaginatedResultDatasetImportTask$inboundSchema,
});

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